DEar Dr. Zimmerman, I don't know how I should change the equality constraint to inequality constraint. I'll be very grateful if you can help me.
Best regards, Carlos On Fri, Sep 18, 2015 at 4:12 PM, Ray Zimmerman <[email protected]> wrote: > *Please address MATPOWER support questions (including followup’s to this > e-mail) to the MATPOWER mailing list > <http://www.pserc.cornell.edu/matpower/#mailinglist>.* > > You simply have to change the equality constraint to an inequality > constraint. Is there a particular part of that code snippet that you are > having trouble understanding? > > Ray > > > On Sep 1, 2015, at 11:58 AM, Carlos Marta Gonzalez Almeida < > [email protected]> wrote: > > Dear Dr. Zimmerman, > > According to your previous posts on the following equation which makes the > power factor constant. Now I want to have power factor varying between > -0.95 and 0.95. What changes to the following equation to be made? > > Thank you very much. > > Carlos > > > > *ng = size(mpc.gen, 1);* > *pf = 0.95;* > *QPratio = sqrt(1/pf^2 -1);* > > *mpc.A = sparse([1:ng 1:ng]', [2*nb+(1:ng) 2*nb+ng+(1:ng)]', > [QPratio*ones(ng,1); -ones(ng,1)], ng, 2*nb+2*ng);* > > *mpc.A = mpc.A(2:10, :);* > *mpc.l = zeros(ng-15, 1);* > *mpc.u = mpc.l;* > > >
