pwrs.core.opf_power_balance_hess#
- pwrs.core.opf_power_balance_hess.opf_power_balance_hess(x, lambda_, mpc, Ybus, mpopt, nargout=1)[source]#
Return Hessian of AC OPF power balance constraints.
Forms the Hessian of the Lagrangian contribution from the power balance equality constraints, using the multipliers in
lambda_and the current OPF statex.- Parameters:
x (sequence of array_like) – OPF state blocks. The layout matches MATPOWER:
(Va, Vm, Pg, Qg)in polar form or(Vr, Vi, Pg, Qg)in cartesian form.lambda (array_like) – Multipliers for the stacked real and reactive power balance constraints.
mpc (dict) – Internal MATPOWER case struct.
Ybus (sparse matrix) – Bus admittance matrix.
mpopt (MatpowerConfig) – Typed MATPOWER options configuration.
nargout (int, optional) – MATLAB compatibility flag controlling how many outputs are returned.
- Returns:
Hessian block for the power balance constraint contribution to the OPF Lagrangian.
- Return type:
scipy.sparse.csc_matrix