pwrs.core.makeJac#

pwrs.core.makeJac.makeJac_full(baseMVA, bus=None, branch=None, gen=None, fullJac=None)[source]#

Return (J, Ybus, Yf, Yt) with explicit Python semantics.

pwrs.core.makeJac.makeJac_matrix(baseMVA, bus=None, branch=None, gen=None, fullJac=None)[source]#

Return J only with explicit Python semantics.

pwrs.core.makeJac.makeJac(baseMVA, bus=None, branch=None, gen=None, fullJac=None, *, nargout=None)[source]#

Form the power flow Jacobian.

Parameters:
  • baseMVA (float or dict) – System power base, or an MATPOWER case dict in the one-argument form.

  • bus (ndarray, optional) – MATPOWER matrices in internal ordering.

  • branch (ndarray, optional) – MATPOWER matrices in internal ordering.

  • gen (ndarray, optional) – MATPOWER matrices in internal ordering.

  • fullJac (int or bool, optional) – If true, return the full Jacobian of all bus injections with respect to all voltage angles and magnitudes. Otherwise return the reduced Newton power flow Jacobian.

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

Returns:

Returns (J, Ybus, Yf, Yt) or the leading subset requested by nargout.

Return type:

tuple or matrix