mp.cost_table_utils
- class mp.cost_table_utils
mp.cost_table_utils
- Static methods formp.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 asmp.cost_table
, any subscripting to access the elements of the table must be done through explicit calls to the table’ssubsref()
andsubsasgn()
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:
poly_params()
- create struct of polynomial parameters frommp.cost_table
pwl_params()
- create struct of piecewise linear parameters frommp.cost_table
max_pwl_cost()
- get maximum cost component used to specify pwl costs
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()
. Seemp.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()
. Seemp.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()
. Seemp.cost_table.max_pwl_cost()
for details.