pwrs.core.opf_current_balance_hess#

pwrs.core.opf_current_balance_hess.opf_current_balance_hess(x, lambda_, mpc, Ybus, mpopt, nargout=1)[source]#

Return Hessian of AC OPF current balance constraints.

Forms the Hessian of the Lagrangian contribution from the current balance equality constraints, using the multipliers in lambda_ and the current OPF state x.

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 imaginary current 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 current balance constraint contribution to the OPF Lagrangian.

Return type:

scipy.sparse.csc_matrix