pwrs.core.makeAy#
- pwrs.core.makeAy.makeAy(baseMVA, ng, gencost, pgbas, qgbas, ybas, nargout=1)[source]#
Construct basin constraints for the CCV piecewise-linear formulation.
Builds the linear constraint
Ay * X <= byused by the constrained-cost-variable formulation for piecewise-linear generator costs.- Parameters:
baseMVA (float) – System power base.
ng (int) – Number of generators.
gencost (ndarray) – Generator cost matrix.
pgbas (int) – Starting indices within the optimization variable vector for active-power, reactive-power, and CCV
yvariables.qgbas (int) – Starting indices within the optimization variable vector for active-power, reactive-power, and CCV
yvariables.ybas (int) – Starting indices within the optimization variable vector for active-power, reactive-power, and CCV
yvariables.nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.
- Returns:
Returns
(Ay, by)or the leading subset requested bynargout.- Return type:
tuple or sparse matrix