makeApq

makeApq(baseMVA, gen)

makeApq() - Construct linear constraints for generator capability curves.

[APQH, UBPQH, APQL, UBPQL, DATA] = MAKEAPQ(BASEMVA, GEN)

Constructs the parameters for the following linear constraints
implementing trapezoidal generator capability curves, where
Pg and Qg are the real and reactive generator injections.

APQH * [Pg; Qg] <= UBPQH
APQL * [Pg; Qg] <= UBPQL

DATA constains additional information as shown below.

Example:
    [Apqh, ubpqh, Apql, ubpql, data] = makeApq(baseMVA, gen);

    data.h      [QC1MAX-QC2MAX, PC2-PC1]
    data.l      [QC2MIN-QC1MIN, PC1-PC2]
    data.ipqh   indices of gens with general PQ cap curves (upper)
    data.ipql   indices of gens with general PQ cap curves (lower)