How can I obtain the duration of a simulation programmatically?

Categories:
Solution Number:
S20742
Last Modified:
2013-08-20
Issue

How can I obtain the duration of a simulation programmatically?

Solution

You can use the following code to get duration parameter during simulation execution: double sim_dur = 1000.0;if (op_ima_sim_attr_exists (duration) == OPC_TRUE) op_ima_sim_attr_get (OPC_IMA_DOUBLE, duration, &sim_dur); You can get a list of all simulation level environment attributes by using the following command: prompt> op_runsim -help (you will notice that duration is one of the environment attributes).If you are running a simulation from the command line, you can also use op_runsim -sconfirm -net_name <network-name> to print out the list of simulation attributes that can be accessed at run-time. Also refer to FAQ #35.

Environment

DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case