Ask Your Question
0

How do you store and retrieve dynamic workspace in dynamic simulation using Python?

asked 2023-10-09 02:14:28 -0600

Shahab Mehraeen gravatar image

Hello, I am working with PSSE dynamic simulation. I would like to run PSSE34 dynamic simulation using Python up to a certain time. Then, quit PSSE and do some offline calculations and then continue PSSE from where the simulation was stopped. I wonder how I should store and retrieve the dynamic states using Python. Thank you.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2023-10-09 03:20:58 -0600

perolofl gravatar image

updated 2023-10-11 04:25:49 -0600

EDIT based on new information:

1: Put the interesting STATES into channels.

2: Initialise and define output file.

3: Run the simulation up to T1.

4: save the case and snapshot in temp files.

5: Adjust control settings and continue simulation to T2

6: Do the calculation and evaluation.

To repeat the simulation from time T1:

7: Open the case temp.sav and open the snapshot temp.snp. Change name of the output file.

8: Repeat steps 5 - 6

edit flag offensive delete link more

Comments

Thank you for the tips. I have to repeat a dynamic scenario from a system state at a specific time with modified controller, network, and loads. So, I will need to somehow store all the states and rerun the system from that instant onwards. Do you know a way to do it by any chance? Thank you.

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-09 15:50:10 -0600 )edit

What kind of modifications are you meaning to do?

perolofl gravatar imageperolofl ( 2023-10-10 00:20:00 -0600 )edit

It is an optimization problem: 1- Run a fault-clear scenario up to time T1. 2- Adjust control settings and continue simulation from T1 to T2. 3- Collect states time series form T1 to T2 and calculate cost function. 3- Evaluate cost function and return to Step 2.

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-10 15:46:46 -0600 )edit

So, I need to start from T1 and repeat to avoid running the entire simulation again. Thank you.

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-10 15:50:15 -0600 )edit

Can you also please let me know how to open Case and Snap files? Is it : - psspy.case(savefile) - psspy.rstr(snapfile) ?

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-12 20:17:47 -0600 )edit
0

answered 2023-10-11 14:06:16 -0600

Alex P gravatar image

If the computation time from t=0 to T1 isn't very long, I would run the simulation from scratch (from t=0). Saving the workspace increases the risk of inadvertently saving some undesired setting, parameter, or state.

edit flag offensive delete link more

Comments

Thank you for the comment. Unfortunately, going back to t=0 is not efficient.

Shahab Mehraeen gravatar imageShahab Mehraeen ( 2023-10-13 12:57:39 -0600 )edit
0

answered 2023-10-09 20:12:13 -0600

Shahab Mehraeen gravatar image

Thank you for the tips. I have to repeat a dynamic scenario from a system state at a specific time with modified controller, network, and loads. So, I will need to somehow store all the states and rerun the system from that instant onwards. Do you know a way to do it by any chance? Thank you.

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

Stats

Asked: 2023-10-09 02:14:28 -0600

Seen: 208 times

Last updated: Oct 11 '23