mp.mme_gen_opf_ac_oval

class mp.mme_gen_opf_ac_oval

Bases: mp.mme_gen_opf_ac

mp.mme_gen_opf_ac_oval - Math model element for generator for AC OPF w/oval cap curve.

Math model element class for generator elements for AC OPF problems, implementing an oval, as opposed to rectangular, PQ capability curve.

Method Summary
add_constraints(mm, nm, dm, mpopt)

Set up the nonlinear constraint for gen oval PQ capability curves.

mme.add_constraints(mm, nm, dm, mpopt)
oval_pq_capability_fcn(xx, idx, p0, q0, a2, b2)

Compute oval PQ capability constraints and Jacobian.

h = mme.oval_pq_capability_fcn(xx, idx, p0, q0, a2, b2)
[h, dh] = mme.oval_pq_capability_fcn(xx, idx, p0, q0, a2, b2)

Compute constraint function and optionally the Jacobian for oval PQ capability limits.

Inputs:
  • xx (1 x 2 cell array) – active power injection in xx{1}, reactive injection in xx{2}

  • idx (integer) – index of subset of generators of interest to include in constraint; if empty, include all

  • p0 (double) – vector of horizontal (p) centers

  • q0 (double) – vector of vertical (q) centers

  • a2 (double) – vector of squares of horizontal (p) radii

  • b2 (double) – vector of squares of vertical (q) radii

Outputs:
  • h (double) – constraint function, \(\h(\x)\)

  • dh (double) – constraint Jacobian, \(\h_\x\)

Note that the oval specs p0, q0, a2, b2 are assumed to have dimension corresponding to idx.

oval_pq_capability_hess(xx, lam, idx, p0, q0, a2, b2)

Compute oval PQ capability constraint Hessian.

d2H = mme.oval_pq_capability_hess(xx, lam, idx, p0, q0, a2, b2)

Compute a sparse Hessian matrix for oval PQ capability limits. Rather than a full, 3-dimensional Hessian, it computes the Jacobian of the vector obtained by muliplying the transpose of the constraint Jacobian by a vector \(\muv\).

Inputs:
  • xx (1 x 2 cell array) – active power injection in xx{1}, reactive injection in xx{2}

  • lam (double) – vector \(\muv\) of multipliers

  • idx (integer) – index of subset of generators of interest to include in constraint; if empty, include all

  • p0 (double) – vector of horizontal (p) centers

  • q0 (double) – vector of vertical (q) centers

  • a2 (double) – vector of squares of horizontal (p) radii

  • b2 (double) – vector of squares of vertical (q) radii

Output:

d2H (double) – sparse constraint Hessian matrix

Note that the oval specs p0, q0, a2, b2 are assumed to have dimension corresponding to idx.