pwrs.core.opf_vlim_fcn#

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

Evaluate cartesian voltage magnitude limit constraints and Jacobian.

Computes the nonlinear inequality constraints corresponding to lower and upper voltage magnitude limits for the selected buses in the cartesian OPF formulation.

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

  • mpc (dict) – Internal MATPOWER case struct.

  • idx (array_like) – One-based indices of buses with active voltage magnitude limits.

  • mpopt (dict) – MATPOWER options struct.

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

Returns:

Constraint vector containing lower and upper voltage magnitude violations, and optionally its Jacobian.

Return type:

numpy.ndarray or tuple

pwrs.core.opf_vlim_fcn.opf_vlim_fcn_with_jacobian(x, mpc, idx, mpopt)[source]#

Evaluate voltage-limit constraints and return their Jacobian.

Parameters:

mpopt (MatpowerConfig)