pwrs.core.totcost#

pwrs.core.totcost.totcost(gencost, Pg)[source]#

Evaluate total generator production costs.

Mirrors MATPOWER’s totcost helper by evaluating either piecewise linear or polynomial generator cost models at the supplied output levels.

Parameters:
  • gencost (array_like) – Generator cost matrix.

  • Pg (array_like) – Generator output values at which to evaluate total cost.

  • nargout (int, optional) – MATLAB compatibility flag.

Returns:

Total production costs with the same shape as Pg.

Return type:

numpy.ndarray or float