Pass the casestruct 'mpc' instead of the filename 'case92' to runpf

runpf(mpc);

What problem are you trying to solve by decreasing the line flow? Maybe we 
could suggest a better for what you are trying to do.

Shri
On Dec 13, 2013, at 11:25 AM, Nirav Shah wrote:

> I have saved as case9 file with the new name case92.
> I am using this code to decrease my line flow of 4-5. For that I need to 
> decrease the generation 3, but it's not decreasing with this code. 
> 
> Please help me.
> 
> mpc= loadcase (case92)
> [MVAbase, bus, gen, branch, success, et]=runpf (case92)
> a=branch(2,14)
> b=mpc.gen(3,2)
> mpc.gen (3,2)=50;
> runpf (case92)
> for i=1:1:1000
>     if (108.7829-a>0.2)
>         mpc.gen(3,2)=b-2
>         runpf (case92)
>         a=branch(2,14)
>         b=mpc.gen(3,2)
>     end
> end
> mpc.gen(3,2)
>     



Reply via email to