Simulating a Multiple Server Queue

In queuing theory, the simplest model is called the M/M/1 or M/M/c model (Markovian arrivals, Markovian service, and 1 or servers). Customers arrive at a facility and either get served immediately by a free server or join a queue that waits for a server to become available. Standard notation is:
= customer arrival rate in people per hour; it is assumed that the arrival times are a Poisson process, that is, the inter-arrival times follow an exponential distribution with mean ;
= rate at which a single server can serve customers, in number per hour; this follows an exponential distribution with mean ;
= number of servers.
In the Demonstration graphic, the number of people in the queue is indicated by the height of the red bars at the bottom; the horizontal green lines indicate customers being served; red lines indicate customers waiting. The table below the graphic shows the expected and observed values of several values associated with such a process. Note that the basic units are hours, but some of the parameters are given in minutes.
In order to look at a typical window of the queue situation, a certain percentage of the initial customers is ignored. This is controlled by the choice of the initial deletion ratio. If this is set to 0 then one sees a simulation that starts with the first customer that walks in the door. In that case, the number in the queue or the system will generally be less than the expected value, since the queue is smaller than the limiting value at the start. If the deletion ratio is set to, say, 0.5, then the graphic shown will start with the customer in the order where is the total number of customers. Regardless of deletions, the time starts at 0.


  • [Snapshot]
  • [Snapshot]
  • [Snapshot]


The first snapshot shows the situation starting from an empty queue (initial deletion ratio is 0) and with . In that case the queue builds up and then increases without bound. The last two snapshots use two servers, with and . The first 70% of the time interval is deleted, thus giving a more typical window on the queue formation process. Still there is a lot of variation in the size of the queue: in the first case the average number of people waiting is 0.57 while in the second it is 13. For more information, see [1] and [2].
[1] F. S. Hillier and G. J. Lieberman, Introduction to Operations Research, 8th ed., New York: McGraw-Hill, 2004, pp. 765–774.
[2] R. B. Chase, F. R. Jacobs, and N. J. Aquilano, Operations Management for Competitive Advantage, 10th ed., New York: McGraw-Hill, 2004.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.

Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-Step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2018 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+