Dear sir,
I want to do the extensible OPF, and I read paper MATPOWER’s Extensible Optimal
Power Flow Architecture.
The objective function is min f(x)+fu(x,z),and fu=sum(ci*ri), following the
code:
Ar = [I I];
om = add_vars(om, 'R', ng, [], Rmin, Rmax);
om = add_constraints(om, 'Pg_plus_R', Ar, [], Pmax, {'Pg', 'R'});
om = add_constraints(om, 'Rreq', Az, Rreq, [], {'R'});
om = add_costs(om, 'Rcost', struct('N',I,'Cw',Rcost), {'R'});
I add these into .m file, as for add_vars if I should change [], Rmin, Rmax
into data I need, and do the same with other codes.
I don't know if it's right.
Best regards.
Yang.