Are you using the latest MATPOWER release (v5.1)? Type mpver to find out what 
version you have.

    Ray


> On Feb 12, 2016, at 4:33 PM, Fereshteh Moghateli <f.moghat...@gmail.com> 
> wrote:
> 
> this command gives this error " ??? Undefined function or method 'get_losses' 
> for input arguments of type 'struct'."
> 
> thank you 
> 
> On Sat, Feb 13, 2016 at 12:28 AM, Shruti Rao <sra...@asu.edu 
> <mailto:sra...@asu.edu>> wrote:
> Hi Fereshteh,
> 
> get_losses is an inbuilt MATPower function that computes the branch losses 
> and can also compute the reactive injections from line charging. It can also 
> compute the derivatives with respect to voltage etc. , the details can be 
> found in the manual in Chapter 9.
> 
> 
> Shruti
> 
> On Fri, Feb 12, 2016 at 1:52 PM, Fereshteh Moghateli <f.moghat...@gmail.com 
> <mailto:f.moghat...@gmail.com>> wrote:
> What do you mean by (get_losses)?
> thank you
> 
> On Sat, Feb 13, 2016 at 12:05 AM, Ray Zimmerman <r...@cornell.edu 
> <mailto:r...@cornell.edu>> wrote:
> I’m not sure what you mean by “save losses” and “50 PF iteration”. If you 
> mean something like record the value of total branch active power losses for 
> 50 different power flow runs, then you could do something like the following:
> 
> losses = zeros(50, 1);
> mpc = loadcase(<your_base_case_name>);
> for k = 1:50
>     <update some parameter in mpc>
>     r = runpf(mpc);
>     losses(k) = sum(get_losses(r));
> end
> 
> Then the losses will be stored in the losses vector.
> 
>    Ray
> 
> 
> 
>> On Feb 12, 2016, at 1:41 PM, Fereshteh Moghateli <f.moghat...@gmail.com 
>> <mailto:f.moghat...@gmail.com>> wrote:
>> 
>> hi community
>> how to save losses in matpower in for example 50 PF iteration?
> 
> 
> 
> 
> 
> -- 
> Regards,
> Shruti Dwarkanath Rao
> 
> Graduate Research Associate, Arizona State University
> Co-Vice-Chair: IEEE PES ASU Student Chapter
> Tempe, AZ, 85281
> 650 996 0116
> 

Reply via email to