Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

parallel dynamic simulations using python and PSS/E

Hello all,

If "best practice" types of questions are not allowed I can remove this question, but I am interested to see if there is anyone that has experience running parallel dynamic simulations in PSS/E using python.

My question, then, is a) is this possible? b) what would be the most "pythonic" method of running this type of simulation?

Here is some pseudo-code of what I am trying to do:

**python instance 1:**
1. initalize PSS/E 
2. Load working case and dynamic simulation models/settings
3. psspy.run(tpause = 1sec)
4. psspy.branch_contingency()#simulate a fault on a heavily loaded line causing a contingency
5. use subprocess module to start 2 new instances of Python/PSS/E #??

**python/PSSE instance 2**
1. reclose the line at 2sec
2. continue simulation psspy.run(tpause = 5sec)
3. send results back to instance 1

**python/PSSE instance 3**
1. reclose the line at 3sec
2. continue simulation psspy.run (tpause = 5sec) 
3. send results back to instance 1

**python instance 1**
6.visualize the output of instance 2 and instance 3

Is it possible to create different instances of psspy in one python script and communicate with different PSS/E processes? How would the API know what process to issue commands to?

It seems obvious to simply serialize this process (eliminating the need for multiple processes) by saving the working case at time 1 and running the first contingency, saving, then running the second contingency, saving. However, this would lead to huge computation times. This simple example of opening and re closing a line will hopefully be implemented, en masse, with different contingencies and RAS's.

Thanks for any suggestions on how to get started.