Ok. I didn’t catch that you are using runpf() as a subroutine called by
fmincon(). I’m not surprised this works, and of course it can be considered a
“correct” OPF. But, as you say, it’s much less efficient than what I thought
you were doing which is something like ...
define_constants;
mpopt = mpoption('opf.ac.solver', 'FMINCON', 'opf.use_vg', 1);
mpc = loadcase('case30');
mpc.gencost(:, COST) = 0; TCL MERGE ERROR ( 08/07/2017 10:18:02 ): "wrong
# args: should be "set varName ?newValue?""
OutmailID: 121705894, List: 'matpower-l', MemberID: 75174736
SCRIPT: "set identical, constant mpc.gencost(:, COST+1) = 1;"
generator costs
r = runopf(mpc, mpopt);
Ray
> On Aug 7, 2017, at 9:47 AM, Ehsan Hejri <[email protected]> wrote:
>
> Dear Prof. Zimmerman,
>
> Thanks for the answer. I have read some previews discussion about OPF. It is
> mentioned that in OPF we do not care about type of buses (PQ or PV). But in
> my case we use runpf function to find OPF and for runpf, type of node is
> important.This method is still correct?
>
> Best Wishes
> Ehsan
>
>
> On Mon, Aug 7, 2017 at 3:40 PM, Ray Zimmerman <[email protected]
> <mailto:[email protected]>> wrote:
> Yes, this is an Optimal Power Flow, with a specific objective function and
> specific bounds on the optimization variables.
>
> Ray
>
>
> > On Aug 4, 2017, at 8:41 AM, Ehsan Hejri <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > Hi Dear Community,
> >
> > I have a strange question about OPF.
> >
> > If I use a solver like fmincon with Interior Point algorithm in MATLAB
> > optimization toolbox to solve runpf('case30') with objective of loss
> > minimization (Pgen_total - Pdemand_total ) and considering Pg in all
> > PV-buses as control variables, can we call this funny method OPF?
> >
> > It is converged surprisingly!
> >
> > It is like, you run so many PF to find the best one. It is time consuming
> > but changing objective function is easier.
> >
> > Best Wishes,
> > Ehsan
>
>
>
>