1

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

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?

anonymous user
asked 2013-03-11 02:45:00 -0500
edit flag offensive 0 remove flag close merge delete

Comments

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

JervisW's avatar JervisW (2013-03-15 20:00:18 -0500) edit
1

Thanks. It works!

Taichi's avatar Taichi (2013-04-01 01:42:23 -0500) edit
add a comment see more comments

2 Answers

1

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.

cajief's avatar
174
cajief
answered 2013-03-11 09:05:21 -0500
edit flag offensive 0 remove flag delete link

Comments

1

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

jsexauer's avatar jsexauer (2013-03-11 11:03:46 -0500) edit
add a comment see more comments
0

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

NunoFul's avatar
1
NunoFul
answered 2020-06-01 10:13:29 -0500
edit flag offensive 0 remove flag delete 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's avatar jconto (2020-06-01 11:18:56 -0500) edit
add a comment see more comments

Your Answer

Login/Signup to Answer