pwrs.core.opf_branch_ang_fcn#

pwrs.core.opf_branch_ang_fcn.opf_branch_ang_fcn(x, Aang, lang, uang, nargout=1)[source]#

Evaluate branch angle difference constraints and Jacobian.

Computes the nonlinear inequality constraints on branch voltage angle differences for the cartesian-voltage OPF formulation. When requested, it also returns the Jacobian with respect to Vr and Vi.

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

  • Aang (sparse matrix) – Linear operator mapping voltage angles to branch angle differences.

  • lang (array_like) – Lower angle-difference limits.

  • uang (array_like) – Upper angle-difference limits.

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

Returns:

Constraint vector containing lower and upper angle-difference violations, and optionally its Jacobian.

Return type:

numpy.ndarray or tuple

pwrs.core.opf_branch_ang_fcn.opf_branch_ang_fcn_with_jacobian(x, Aang, lang, uang)[source]#

Evaluate branch-angle constraints and return their Jacobian.