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 <= by used 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 y variables.

  • qgbas (int) – Starting indices within the optimization variable vector for active-power, reactive-power, and CCV y variables.

  • ybas (int) – Starting indices within the optimization variable vector for active-power, reactive-power, and CCV y variables.

  • nargout (int, optional) – Number of outputs to emulate from the MATLAB interface.

Returns:

Returns (Ay, by) or the leading subset requested by nargout.

Return type:

tuple or sparse matrix

pwrs.core.makeAy.makeAy_full(baseMVA, ng, gencost, pgbas, qgbas, ybas)[source]#

Return (Ay, by) for the CCV formulation.