First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
1

how do I disable the window showing the logs of the power flow solution in python?

asked Mar 11 '13

anonymous user

Anonymous

I have been trying to use python script to solve power flow problem using the pss/e module. When I finished the solving, I got windows showing the log of the solution, including the Siemens company introduction and the power flow result. Since I just need the results for post-processing, I find these windows very disturbing. Can somebody kindly tell me how to disable these windows?

Comments

Were the windows pop ups? In that case you can use the `redirect` module. `import redirect; redirect.psse2py()`

JervisW gravatar imageJervisW (Mar 16 '13)
1

Thanks. It works!

Taichi gravatar imageTaichi (Apr 1 '13)

2 answers

Sort by » oldest newest most voted
1

answered Mar 11 '13

cajief gravatar image

PSS/E prints it's output to different "devices" depending on the activity: progress, prompt, and report. The progress output is the one producing the messages you're referring to. To change how the program interacts with these devices there are some API commands.

ierr = progress_output(islct, filarg, options)
ierr = prompt_output(islct, filarg, options)
ierr = report_output(islct, filarg, options)

You can disable these output devices by setting ISLCT=6. However, it's good practice is to save these log files in case something goes awry or for future analysis (i.e. ISLCT=2 & filarg=output file name).

Having the output go to the PSS/E GUI can slow things down when there's a lot of text being printed. Check out the API documentation for more details.

link

Comments

1

There is also the alert device: ierr = alert_output(islct, filarg, options)

jsexauer gravatar imagejsexauer (Mar 11 '13)
0

answered Jun 1 '0

NunoFul gravatar image

I also have a problem with the production of these reports, even directing them to file (islct = 2). After many simulations (about 4000 or 5000), instead of around 0.001 seconds, these commands start taking 40+ seconds each!

The workaround was simply deactivate them. Since I am running dynamic simulations in an iterative optimisation algorithm, only the best solutions have reports. The others are ignored.

Anyways, if anyone has any suggestion on this, I would appreciate it :) Thanks.

Best, Nuno

link

Comments

In a the dynamic run, to keep the log file open but minimum logging, use: psspy.run(0,0,0,0,0) This way, to can catch warning or error messages from the dynamic models.

jconto gravatar imagejconto (Jun 1 '0)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

Stats

Asked: Mar 11 '13

Seen: 2,127 times

Last updated: Jun 01 '20