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