This example shows how to model a single-queue single-server system with a single traffic source and an infinite storage capacity. In the notation, the M stands for Markovian; M/M/1 means that the system has a Poisson arrival process, an exponential service time distribution, and one server. Queuing theory provides exact theoretical results for some performance measures of an M/M/1 queuing system and this model makes it easy to compare empirical results with the corresponding theoretical results.
The model includes the components listed below:
Time Based Entity Generator block: It models a Poisson arrival process by generating entities (also known as "customers" in queuing theory).
Exponential Interarrival Time Distribution subsystem: It creates a signal representing the interarrival times for the generated entities. The interarrival time of a Poisson arrival process is an exponential random variable.
FIFO Queue block: It stores entities that have yet to be served.
Single Server block: It models a server whose service time has an exponential distribution.
The model includes these visual ways to understand its performance:
Display blocks that show the waiting time in the queue and the server utilization
A scope showing the number of entities (customers) in the queue at any given time
A scope showing the theoretical and empirical values of the waiting time in the queue, on a single set of axes. You can use this plot to see how the empirical values evolve during the simulation and compare them with the theoretical value.
Queuing theory provides the following theoretical results for an M/M/1 queue with an arrival rate of and a service rate of :
Mean waiting time in the queue =
The first term is the mean total waiting time in the combined queue-server system and the second term is the mean service time.
Utilization of the server =
Move the Arrival Rate Gain slider during the simulation and observe the change in the queue content, shown in the Q Content Scope.
 Kleinrock, Leonard, Queueing Systems, Volume I: Theory, New York, Wiley, 1975.