AnyLogic
Expand
Font size

Running the model until a certain date or for a certain time interval

Running the model for the specified interval of model time

If required, you can simulate the model for some specified period of model time and pause the execution after that. Having studied the model state at the particular moment of model lifetime (or having performed some interactive actions with the model), you can continue the model execution: run it again for the same period of model time (or period of any other duration), and so on.

To run the model for the specified interval of model time

  1. To do this, we need the  run for advanced execution control, which is located in the developer panel. Open the developer panel by clicking the rightmost control Open developer panel  in the model window.
  2. By default, the enhanced model execution controls are hidden. To see them, click the  show/hide run options control in the model execution section of the developer panel.

  3. To the right of the  run for option, define the interval of the model time that you want to simulate until the model will be paused. Interval is defined as a number of time units that should pass starting from the current model time. You can define the interval in different time units, from ms to years, choose them using the control on the right.
  4. Click the  run for button to run the model. The model execution will be paused when the specified model time interval will be simulated.

Running the model until the specified moment of model time

If the model is not running currently (its execution was not started yet, or it is paused currently):

To run the model until the specified moment of model time

  1. To do this, we need the  run until advanced execution control, which is located in the developer panel. Open the developer panel by clicking the rightmost Open developer panel  control, located in the model window.
  2. By default, the enhanced model execution controls are hidden. To see them, click the  show/hide run options control in the model execution section of the developer panel:

  3. To the right of the  run until option, define the moment of model time when you want to pause the model execution. You can define the pause time as a number of model time units starting from the model start time, entering the corresponding value to the right of the  run until button.
    This value should naturally be greater than the current model time value (it is displayed in the upper line of the developer panel:

  4. You can also define the pause moment as a calendar date and specify the time of day. For that, switch to the date definition mode by clicking the  toggle date/time units button. After that you will see the controls for date and time definition to the right of the  run until option. Use them to define the pause time moment.
    This moment should naturally be in the future regarding the current model time (that is displayed in the upper line of the developer panel:

  5. Having defined the pause time, run the model by clicking the  run until button. The model execution will be paused at the specified moment of model time.
How can we improve this article?