pwrs.core.opf_veq_fcn#
- pwrs.core.opf_veq_fcn.opf_veq_fcn(x, mpc, idx, mpopt, nargout=1)[source]#
Evaluate cartesian fixed-voltage equality constraints and Jacobian.
Computes the equality constraints that enforce specified voltage magnitudes at 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 fixed voltage magnitude constraints.
mpopt (dict) – MATPOWER options struct.
nargout (int, optional) – MATLAB compatibility flag controlling whether the Jacobian is returned.
- Returns:
Equality constraint vector for the selected voltage magnitudes, and optionally its Jacobian.
- Return type:
numpy.ndarray or tuple
- pwrs.core.opf_veq_fcn.opf_veq_fcn_with_jacobian(x, mpc, idx, mpopt)[source]#
Evaluate fixed-voltage equality constraints and return their Jacobian.
- Parameters:
mpopt (MatpowerConfig)