Ask Your Question

Process for successfully stopping, saving, loading, and restarting a Dynamic Simulation via Python API?

asked 2014-04-17 19:58:51 -0500

wassup_doc gravatar image

Hello Everyone,

I am wondering if there is anyone that would be willing to explain the process of starting a Dynamic simulation, running for a discrete time period, saving the state (all of the necessary variables) of the simulation, doing some offline calculations (possibly even exiting and closing pss/e), and then reloading the last state and continuing the simulation without causing dynamic variables to start over at 0.

I thought that this simple process below would suffice, however it seems that upon restarting the simulation, the generators essentially black-start (speed, angle, etc. ramp up from zero) as opposed to simply picking up where they left off:

Assuming that I start with my two desired black-start binary files:

# Load initial condition binaries and run"initial condition binary file")  # Saved with all gens/loads converted, factorized admittance matrices, etc....    
psspy.rstr("desired dynamic simulation variables preferences")
psspy.strt(0, dynamic Outfile) = 2) # run 0-2 seconds

# attempt to save all state information (possibly missing step here?)"binary of the case state")
psspy.snap("dynamic sim preferences and monitored variables etc.")

# Do some random offline calculations, or close pss/e, etc.

# Attempt to reload the saved binary case files and continue dynamic simulation exactly where I left off."binary of the case state")
psspy.rstr("dynamic sim preferences and monitored variables etc.") = 4) # run 2-4 seconds

Thanks for any thoughts on how to successfully achieve this workflow. Also, perhaps if anyone knows of where to find the process for this workflow in the pss/e manuals that would also be helpful -- I can't seem to find it.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-10-07 17:06:09 -0500

perolofl gravatar image

You are not saving the snapshot correctly. Use

psspy.snap(sfile="dynamic sim preferences and monitored variables etc.")


psspy.snap([-1,-1,-1,-1,-1],"dynamic sim preferences and monitored variables etc.")


edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools


Asked: 2014-04-17 19:58:51 -0500

Seen: 3,908 times

Last updated: Oct 07 '16