pwrs.core.opf_vref_fcn#

pwrs.core.opf_vref_fcn.opf_vref_fcn(x, mpc, refs, mpopt, nargout=1)[source]#

Evaluate reference angle constraints and Jacobian.

Computes the equality constraints that pin the voltage angles at the reference buses to their specified values in the cartesian-voltage OPF formulation.

Parameters:
  • x (sequence of array_like) – Cartesian voltage state blocks (Vr, Vi).

  • mpc (dict) – Internal MATPOWER case struct.

  • refs (array_like) – One-based indices of reference buses.

  • mpopt (MatpowerConfig) – Typed MATPOWER options configuration.

  • nargout (int, optional) – MATLAB compatibility flag controlling whether the Jacobian is returned.

Returns:

Reference-angle constraint vector, and optionally its Jacobian with respect to Vr and Vi.

Return type:

numpy.ndarray or tuple

pwrs.core.opf_vref_fcn.opf_vref_fcn_with_jacobian(x, mpc, refs, mpopt)[source]#

Evaluate voltage-reference constraints and return their Jacobian.

Parameters:

mpopt (MatpowerConfig)