pwrs.core.opf_branch_flow_hess#
- pwrs.core.opf_branch_flow_hess.opf_branch_flow_hess(x, lambda_, mpc, Yf, Yt, il, mpopt, nargout=1)[source]#
Return Hessian of AC OPF branch flow limit constraints.
Forms the Hessian of the Lagrangian contribution from the branch flow inequality constraints selected by
il. The exact flow model follows MATPOWER’sflow_limoption for current, active-power, or apparent power limits.- Parameters:
x (sequence of array_like) – Voltage-state blocks. The layout matches MATPOWER:
(Va, Vm)in polar form or(Vr, Vi)in cartesian form.lambda (array_like) – Multipliers for the stacked “from” and “to” branch flow constraints.
mpc (dict) – Internal MATPOWER case struct.
Yf (sparse matrix) – Admittance matrix mapping bus voltages to branch “from” currents.
Yt (sparse matrix) – Admittance matrix mapping bus voltages to branch “to” currents.
il (array_like) – One-based indices of branches with active flow limits.
mpopt (MatpowerConfig) – Typed MATPOWER options configuration.
nargout (int, optional) – MATLAB compatibility flag controlling how many outputs are returned.
- Returns:
Hessian block for the branch flow constraint contribution to the OPF Lagrangian.
- Return type:
scipy.sparse.csc_matrix