Entity Priorities

SimEvents® software uses entity priorities to prioritize events. The smaller the priority value, the higher the priority.

You specify entity priorities when you generate entities. You can later change entity priorities using an event action for the priority. For example, in the Entity Generator Event actions tab, you can define an event action to change the entity priority during simulation using code such as:

entitySys.priority=MATLAB code

The event calendar includes event types such as:

  • Entity generation

  • Entity forwarding

  • Entity destruction

  • Timer

  • Service completion

The event calendar sorts events based on times and associated entity priorities as outlined here:

  1. The event that has the earliest time executes first.

  2. If two entities have events occurring at the same time, the event with the entity of higher priority occurs first.

  3. If both entities have the same priority, it is undefined which event is served first. To get deterministic order, change one of the entity priorities.

For example, assume a forward event associated with an entity that exits block A and enters block B. The priority of this event is the priority of the entity being forwarded. If there are two entities trying to depart a block at the same time, the entity with the higher priority departs first.

See Also

| | | | | | | |

Related Topics