Sure ... define_constants; r = runopf(mpc); P_load = -r.gen(find(isload(r.gen)), PG);
-- Ray Zimmerman Senior Research Associate 419A Warren Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 On Oct 7, 2011, at 11:46 AM, Dailan Xu wrote: > Thank you so much. I found this problem. I have another problem. I want to > obtain the value of dispatchable load for different case studies (different > kind of generators and different load values) in a vector or matrix. Is it > possible? > > Best Regards > > Dailan > > On Thu, Oct 6, 2011 at 20:33, Ray Zimmerman <[email protected]> wrote: > I'm not sure I understand what you mean. For each case, you can easily > compute the system losses (ignoring shunt elements) as the difference between > total generation and total demand. If you store these for several cases you'd > have a vector. > > If you are talking about allocating the losses for a given run among the > generators (or loads), that is a different problem, and I suppose there is > more than one way to do it, > > -- > Ray Zimmerman > Senior Research Associate > 419A Warren Hall, Cornell University, Ithaca, NY 14853 > phone: (607) 255-9645 > > > > > On Oct 5, 2011, at 1:44 PM, Dailan Xu wrote: > >> Dear Dr. Zimmerman, >> >> How can I put the obtained power losses of generators in the runmarket in a >> matrix? I have different cases of loads and generations. So I want to have >> power losses in a row or column of a matrix for different cases? >> >> Best Regards >> >> Dailan >> > > > > Best Regards > > D. Xu >
