mp.cost_table_utils

class mp.cost_table_utils

mp.cost_table_utils - Static methods for mp.cost_table.

Contains the implementation of some methods that would ideally belong in mp.cost_table.

Within classes that inherit from mp_table_subclass, such as mp.cost_table, any subscripting to access the elements of the table must be done through explicit calls to the table’s subsref() and subsasgn() methods. That is, the normal table subscripting syntax will not work, so working with the table becomes extremely cumbersome.

This purpose of this class is to provide the implementation for mp.cost_table methods that do allow access to that table via normal table subscripting syntax.

mp.cost_table_util Methods:

See also mp.cost_table.

Method Summary
static poly_params(cost, idx, pu_base)
p = mp.cost_table_utils.poly_params(cost, idx, pu_base)

Implementation for mp.cost_table.poly_params(). See mp.cost_table.poly_params() for details.

static pwl_params(cost, idx, pu_base, ng, dc)
p = mp.cost_table_utils.pwl_params(cost, idx, pu_base)
p = mp.cost_table_utils.pwl_params(cost, idx, pu_base, ng, dc)

Implementation for mp.cost_table.pwl_params(). See mp.cost_table.pwl_params() for details.

static max_pwl_cost(cost)
maxc = mp.cost_table_utils.max_pwl_cost(cost)

Implementation for mp.cost_table.max_pwl_cost(). See mp.cost_table.max_pwl_cost() for details.