Main Content

Queue and Service

FIFO queue, LIFO queue, priority queue, delay modeling, entity storage, buffering

In a discrete-event simulation, queueing blocks store entities for a length of time that cannot be determined in advance. Queuing blocks attempt to output entities when possible, but its output depends on whether the downstream block accepts new entities. An everyday example of a queue is people waiting in line for a store register. A shopper cannot determine in advance how long they will have to wait to complete their purchase. The Entity Queue block is one of the queueing blocks provided in the SimEvents® library that can sort entities in a queue based on a sorting policy. You can model FIFO queue, LIFO queue, and priority queue. For more information, see Model Basic Queuing Systems.

You can use queue and server blocks provided in the SimEvents library to model basic or complex queue-server systems. Server blocks store and delay entities for a specified length of time then attempt to output entities. An everyday example of a server is processing parts for a certain period of time in a factory assembly line. In this case, server delay can represent the duration of a thermal process. The Entity Server block is one of the server blocks that stores and services entities, and then attempts to output them.

You can also create more advanced queuing systems using discrete-event System object™ and Discrete-Event Chart block.


expand all

Entity QueueEnqueue messages and entities
Entity StoreStore entities
Entity ServerServe entities
Entity Transport DelayIntroduce a delay in propagation of a SimEvents message (Since R2019b)
Conveyor SystemTransport entities


Basic Queuing Systems

Applications of Basic Queuing Systems

Model Preemption and Server Failure

Model Advanced Queuing Systems with Custom Behavior