Controlling the Model Execution

When AnyLogic model is run, you can control the model execution using the toolbar, displayed in the top of AnyLogic presentation window.   


The Execution control toolbar contains buttons for controlling the execution of the launched model:

Button

Command

Description

Run from the current state

[Visible only if the model is not running currently

Runs the model from the current state. The model wil be run until you will stop it manually by clicking Pause or Terminate execution toolbar button (or until something in the model will pause or stop its execution).

Clicking the arrow in the right part of the button you open the drop-down list with advanced run options. You can either run the model until the specified moment of model time, or for a specified period of model time starting from the current moment. Please refer here for the details.

Pause

[Visible only if the model is running currently

Pauses the running model. You can resume the paused simulation any time.

Clicking the arrow in the right part of the button you open the drop-down list with advanced pause options. You can pause the model at the specified moment of model time, please refer here for the details.

Step

Makes a step (runs the model until a change then stops).

Terminate execution

Terminates the model run.

Run from the current step  and Step  toolbar buttons become disabled when there is no activity in the model. This indicates that your model has finished its work.

Controlling the model execution programmatically

You may need to control your model execution programmatically. For example, you may need to pause the model on some event, e.g. on event expiry and resume its execution when some statechart transition will be taken. AnyLogic offers a rich API capable of solving all tasks concerned with controlling the model execution, please refer here for more details. 


Related topics

     Running the model

     Running the model until specified moment or for a specified time interval

    Controlling the model execution programmatically