There are two notations: the simple one, time() returns the current model time as number of model time units simulated since the model start. Another, time(TIME_UNIT) returns the number of specified time units simulated so far.
The function returns not the integer number, but a real value, e.g. 7.65.
- Returns the current model (logical) time. Time stays constant during an event execution and is only advanced between events.
Type Description double Current model time.
- Returns the current time as the number of specified time units simulated so far. You specify time units using the function argument. For example, time(MINUTE) returns the number of minutes simulated so far, the function time(DAY) - the number of simulated days, etc.
Name Value Description units One of the following constants:
Defines the time units.
Type Description double Current model time, as the number of specified time units.
How can we improve this article?