pwrs.core.margcost#
- pwrs.core.margcost.margcost(gencost, Pg)[source]#
Evaluate marginal generator production costs.
Mirrors MATPOWER’s
margcosthelper by evaluating the slope of 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 marginal cost.
nargout (int, optional) – MATLAB compatibility flag.
- Returns:
Marginal costs with the same shape as
Pg.- Return type:
numpy.ndarray or float