Hi all,

There is no need to set breakpoints in the code. If you just want the solution values in your workspace, then simply provide return variables on the left-hand side when you call runpf, as in the second line of Roman's example below .

  [baseMVA, bus, gen, branch, success, et] = runpf('case118');

And, yes, these can be fields of a struct (as suggested by Dirk) if you find that more convenient.

If you also want to create a case file with the solved case in it, you can use 'savecase' as Roman suggests, or equivalently, you can just provide the filename for the solved case as the 4th argument to runpf ...

[baseMVA, bus, gen, branch, success, et] = runpf('case118', mpoption, [], 'case118_results');

Sneak Peak: The next version of MATPOWER will include the ability to return all of the results in a struct, like ...

  results = runpf('case118');

... and should be available as soon as I can get the documentation up- to-date.

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


On Nov 25, 2008, at 5:44 AM, Roman Korab wrote:

Hello Ismail,

You can try this:

[baseMVA, bus, gen, branch, area, gencost]=loadcase('case118')
[MVAbase, bus, gen, branch, success, et] = runpf('case118')

savecase('case118_results','',baseMVA, bus, gen, branch, area, gencost)

Regards

Roman

----- Original Message -----
From: Dr. Ismail Musirin
To: [email protected]
Sent: Tuesday, November 25, 2008 8:53 AM
Subject: MATPOWER QUESTIONS

Dear all,


I am Ismail Musirin from Universiti Teknologi MARA, Malaysia. First of all, I must say thank you to Prof. Ray Zimmerman for the power flow package you developed to solve the power flow problems.

I am writing to you to ask how can I extract all the load flow results and put them in the workspace. Apparently using the following example:-

>> runpf 'case118'

we may get beautiful load flow results on the screen or command window. However, the variables such as the bus and branch variables are not appeared in the workspace. I need to know all these variables in order to do my further coding.

I appreciate your response.

Best regards.

Associate Professor Dr. Ismail Musirin
(MIEEE, -PES, -CIS, -CMCS, ARTIST, IAENG)
Faculty of Electrical Engineering
Universiti Teknologi MARA
40450 Shah Alam, Selangor
MALAYSIA

Tel: 603-55435044 or 6012-6603864
Fax: 603-55435044





Reply via email to