AnyLogic
Expand
Font size

Managing event queue

Using AnyLogic Events panel, you can check the event queue of AnyLogic simulation engine to see what is happening at the simulation engine at the lowest level of detail.

Events panel

The Events panel displays the event queue of AnyLogic simulation engine for the launched model. You can use the events panel for debugging purposes to see what is happening at the simulation engine at the lowest level of detail. The user often works with the events panel using the Step command.

To open the Events panel

  1. Launch the model.
  2. In the model window, click the Toggle Developer panel button and click the Events tab.

The Events panel itself consists of two tabs:

  • Event queue - displays currently executed events and events scheduled for execution at a particular time.
  • Monitored conditions - displays events that do not have a scheduled execution time, since the execution of such an event is triggered by a condition.

Both tabs can display no more than 50 events at a time. The events displayed are updated every 0.5 second.

Events panel. Event queue. Events panel. Monitored conditions.

Each event in the Events panel is displayed in the following form:

  • Event number – The sequential number of this event in the event queue.
  • Event originator – model path to the object that is associated with this event.
  • Time left – the countdown until the moment when the event is scheduled to be executed.

The event that is going to be executed next is highlighted in blue. The system events, e.g. auto-generated chart update, are grayed-out. Events that occur at the same time are grouped together and the time left until these events are executed is displayed only for the first event in the group.

Depending on the type of the event, they are marked by different icons. The image on the left side of the icon indicates the source of event:

events scheduled by statecharts

events scheduled by Event or Dynamic Event element from the Agent palette

The image on the right side of the icon indicates how the event is scheduled to occur:

timeout triggered event

condition triggered event

rate triggered event

dynamic event

To open the presentation of the agent that contains an event

  1. Click Pause button to pause the model execution.
  2. Click the event originator of the intended event.

To pause the model execution directly before particular event execution

  1. Click Pause button to pause the model execution.
  2. Click the countdown of the intended event. The model execution will start again, run for the given time and then pause. While the model execution proceeds to the requested time of pause, the Events panel displays the following message:

How can we improve this article?