[F, DF, D2F] = OPF_GEN_COST_FCN(X, BASEMVA, COST)
Evaluates the polynomial generator costs and derivatives.
Inputs:
X : single-element cell array with vector of (active or reactive)
dispatches (in per unit)
BASEMVA : system per unit base
GENCOST : standard gencost matrix corresponding to dispatch
(active or reactive) provided in X
IG : vector of generator indices of interest
MPOPT : MATPOWER options struct
Outputs:
F : sum of generator polynomial costs
DF : (optional) gradient (column vector) of polynomial costs
D2F : (optional) Hessian of polynomial costs
Examples:
f = opf_gen_cost_fcn(x, baseMVA, gencost, ig);
[f, df] = opf_gen_cost_fcn(x, baseMVA, gencost, ig);
[f, df, d2f] = opf_gen_cost_fcn(x, baseMVA, gencost, ig);