pwrs.core.pqcost#
- pwrs.core.pqcost.pqcost(gencost, ng, on=None)[source]#
Split generator costs into active and reactive components.
Mirrors MATPOWER’s
pqcosthelper by separating a combined generator cost matrix into the active-power cost block and, when present, the reactive-power cost block.- Parameters:
gencost (array_like) – Generator cost matrix.
ng (int) – Number of generators.
on (array_like, optional) – One-based generator indices to extract.
nargout (int, optional) – MATLAB compatibility flag.
- Returns:
(pcost, qcost)cost matrices for the selected generators.- Return type:
tuple