Model time

Model time units

AnyLogic supports all popular time units: milliseconds, seconds, minutes, hours, days, weeks, months. years. You may change the model time units whenever you like, though we advise that you select the model time units when you create the model.

To set time units
  1. In the Projects view, select the model.
  2. In the model's Properties, choose required time units from the Model time units drop-down list.

However, months and years do not have fixed duration (month may be 28, 29, 30, 31 day, year may be 365 or 366 days, etc). If you choose month here, we assume that month is always is 30 days long. The same situation with a year: we assume that it is always 365 days long.

Simulation start and stop times

To set start and stop times
  1. In the Projects view, select the experiment you are currently working with.
  2. Open the Model time section of the experiment's Properties.
  1. If you want the model to work infinitely until you stop it manually, select Never from the Stop drop-down list.
  2. Otherwise, if you want simulation to be stopped at some other time moment, you can specify stop time as a calendar date or you can specify simulation time horizon as a number of model time units.
  3. If you want to define the simulation time horizon as a number of model time units, choose Stop model at specified time from the Stop drop-down list, and specify the stop time in the Stop time edit box.
  4. Otherwise, if you prefer to specify times as calendar dates, choose Stop model at specified date from the Stop drop-down list, and enter the start and stop times using Start date and Stop date controls.

Time mode and simulation speed

AnyLogic model can be run either in real time or virtual time mode.

In real time mode, the mapping of AnyLogic model time to the real time is made, i.e. you specify how many model time units one second takes. It is frequently needed when you want your presentation to appear as in real life.

In virtual time mode, the model runs at its maximum speed and no mapping is made between model time units and seconds of astronomical time. This time mode is useful when you need to simulate your model for a long period of time.

In real time mode, you can increase or decrease model simulation speed by changing the model simulation speed scale. The default 1x scale means that the model is simulated with the model simulation speed defined in the properties of the current AnyLogic experiment; 2x means that model is run twice faster than the specified model speed, etc. For instance, if the model speed is 6 model time units per second, 2x means that 12 model time units correspond to 1 second.

To set a time mode and simulation speed
  1. In the Projects view, select the experiment you are working with.
  2. In the Model time section of the experiment's Properties, set the time mode using the controls in the Execution mode section.
  3. If you want to run your model in virtual time mode, select the Virtual time (as fast as possible) option.
  4. Otherwise, if you want to set the mapping between model time and real time units, select Real time with scale and set the scale value (number of model time units executed per one second) from the drop-down list to the right.