Ask Your Question
1

How to show time during dynamic run?

asked 2025-04-20 21:49:33 -0500

Bishwam gravatar image

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.

edit retag flag offensive close merge delete

Comments

Do you really want to print the time in progress window at every time step? What is the purpose?

perolofl gravatar imageperolofl ( 2025-04-21 14:39:40 -0500 )edit

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.

chandv gravatar imagechandv ( 2025-04-21 21:00:59 -0500 )edit

2 answers

Sort by » oldest newest most voted
1

answered 2025-04-29 20:06:56 -0500

Tassie Dave gravatar image

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.

edit flag offensive delete link more

Comments

Hi, thanks for your response. Suppose I want to print the time at each timestep—can that be done with this code? I'm mainly interested in tracking the time during the dynamic simulation to monitor its progress

Bishwam gravatar imageBishwam ( 2025-05-03 04:22:29 -0500 )edit
1

answered 2025-04-26 10:25:59 -0500

Javier Rosa gravatar image

updated 2025-04-26 10:26:43 -0500

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.

edit flag offensive delete link more

Comments

Hi, thanks for your response. I'm not working in any custom models—I'm more interested in displaying the time value during a dynamic simulation, so I can monitor the progress being made.

Bishwam gravatar imageBishwam ( 2025-05-03 04:20:31 -0500 )edit

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

1 follower

Stats

Asked: 2025-04-20 21:49:33 -0500

Seen: 305 times

Last updated: Apr 29