On Jul 27, 2011, at 2:05 AM, Zaibin Jiao wrote:
>    How can I configure a indispatchable generator (I hope the P and Q
> are constant)?  I think it can be configured as a negative load. Is
> there any other better solutions? 

The easiest way is to set the PMIN and PMAX parameters equal to each other. 
Configuring as a negative load should be equivalent.

>   And the opf in matpower is just fit for the problem of cost. But
> there are many other optimal power flow, such as minimum of loss,
> minimum of transmission load rate. Maybe it is not a solution of cost,
> can I configure or write the object function such as that in matpower,
> and what will I do if i want to change the object function of opf?

If you want to minimize loss, simply use a cost of $1/MWh (or any other value) 
for all generators).

>   finally, is there any simple demo to add constrain equation such
> as Pi+Pj==0. I have red the manual, but I donnot know how to add a
> user constrain.

If your case is in 'mycase.m', you can accomplish this with the following code 
...

mpc = loadcase('mycase.m');
nb = size(mpc.bus, 1);
ng = size(mpc.gen, 1);
A = sparse([1;1], 2*nb+[i;j], [1;1], 1, 2*nb+2*ng);
l = 0;
u = 0;

Notice that the A matrix is simply a single row with 1's in the columns 
corresponding to Pi and Pj.

-- 
Ray Zimmerman
Senior Research Associate
211 Warren Hall, Cornell University, Ithaca, NY 14853
phone: (607) 255-9645

Reply via email to