In a discrete-event simulation, a queue stores entities for some length of time that cannot be determined in advance. The queue attempts to output entities as soon as it can, but its success depends on whether the next block accepts new entities. An everyday example of a queue is a situation where you stand in a line with other people to wait for someone (a bank teller, a retail cashier, etc.) to address your needs and you cannot determine in advance how long you must wait.
Distinguishing features of different queues include
The queue capacity, which is the number of entities the queue can store simultaneously
The queue discipline, which determines which entity departs first if the queue stores multiple entities
In some cases, a queue in a model is similar to an analogous aspect of the real-world system being modeled. This kind of queue is sometimes called a physical queue. For example, you might use a queue to represent a sequence of
People standing in line
Airplanes waiting to access a runway
Messages waiting to be sent
Parts waiting to be assembled in a factory
Computer programs waiting to be executed
In other cases, a queue in a model does not arise in an obvious way from the real-world system but instead is included for modeling purposes. This kind of queue is sometimes called a logical queue. For example, you might use a queue to provide a temporary storage area for entities that might otherwise have nowhere to go. Such use of a logical queue can prevent deadlocks or simplify the simulation. For example, see Example of a Logical Queue.
Queue blocks reside in the Queues library of the SimEvents® library set. This chapter focuses on the FIFO Queue block.
Although queuing theory typically treats a queue-server pair as one component, SimEvents software contains queue blocks and server blocks as distinct components. You often attach a queue block directly to a server block, but you might also want to use the blocks in other ways.