pwrs.core.opf_gen_cost_fcn#
- pwrs.core.opf_gen_cost_fcn.opf_gen_cost_fcn(x, baseMVA, gencost, ig=None, mpopt=None, nargout=1)[source]#
Evaluate polynomial generator costs and derivatives.
- Parameters:
x (sequence) – Single-element sequence containing the active or reactive dispatch vector in per unit.
baseMVA (float) – System power base.
gencost (ndarray) – Standard MATPOWER
gencostmatrix corresponding to the dispatch provided inx.ig (array_like, optional) – Generator indices of interest. Defaults to all polynomial-cost rows.
mpopt (dict, optional) – MATPOWER options dict. Accepted for API compatibility.
nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.
- Returns:
Returns total cost
fand, when requested, the gradientdfand Hessiand2f.- Return type:
float or tuple