A Queue object defines a location for simulation entities to wait for processing by other entities.
Unlike many other objects in this palette, an entity received by a Queue is not passed automatically to the next object. It must wait in the Queue until it is removed by some other object. Queues are used in this way by the Server, Seize, EntityGate, Assemble, Combine, Pack, Unpack, AddTo, and RemoveFrom objects. Whenever an entity is added to a Queue, all the objects that use this Queue are notified that a new entity is available. The first available object will remove the entity from the Queue and start processing it.
Queued entities can be sequenced by an optional priority value specified by the Priority keyword. In most cases, the Priority is specified by an Expression that is evaluated when the entity first arrives at the Queue. Priority is integer valued and decimal values will be truncated, which means, for example, that priority values of 3.2 and 3.6 are identical (i.e. truncated to 3).
Entities with the same priority values can be sequenced in either the default first-in-first-out (FIFO) order, or in last-in-first-out order (LIFO).
Lastly, a queued entity can be provided with an optional identification using the Match keyword. Objects that use Queues, such as a Server, can request its Queue to provide the first entity with a specified value for the Match keyword. As with the Priority keyword, in most cases the Match value is specified by an Expression that is evaluated when the entity first arrives at the Queue. The Match variable is stored as a string, but will also accept a dimensionless integer or an entity which will be converted to a string. If a decimal value is provided, it will be truncated.