How to show time during dynamic run?
Lets say this is the code: psspy.run(0,5,1000,1,0)
I would like to print the time at each time step and store it in a variable for further use.
Lets say this is the code: psspy.run(0,5,1000,1,0)
I would like to print the time at each time step and store it in a variable for further use.
During the simulation you can access the time with this code:
ierr, the_time_right_now = psspy.dsrval('TIME', INDX)
Integer INDX is an index to a dynamics array. It is Ignored for 'TIME'.
So, if you were running and stopping, you could capture the time whenever you pause.
In case you work with user-written models, you may consider storing the TIME variable into on of your VAR memory positions. For example, assuming it is in the first VAR position of your model, you should write the following in your Fortran code:
VAR(L+0) = TIME !store in a variable for further use.
Do you really want to print the time in progress window at every time step? What is the purpose?
Channel data stores variable value, and plots w.r.t. time. When you export Channel Data in to Excel (right click and export to excel), all data, including time step will be exported to excel.