Category: Helper Functions
Returns the current timestep.
The syCurrentStep function syntax has the following arguments:
- TimeNow: required. Reference to a cell with syClock().
Return value is current timestep.
During simulation, the function returns the current timestep. Spry is counting timesteps from 0 (timestep at the beginning of simulation time) to the number of all timesteps. This depends from syClock() element's arguments TimeStart, TimeEnd, and TimeInterval. The function is convenient if you want to use the current timestep as a parameter in simulation model.
syCurrentStep(A2)- Let's say that we have a model that simulates 8 working hours, and that we want to collect data in 15 minutes time intervals. To do this, we set
syClock(,8,,15/60)in cell A2. During realization, the function will return timesteps from 0 through 25.