WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Simulating a Multiple Server Queue

total number of customers
50
random seed
1
λ, mean arrival rate per hour
50
initial deletion ratio
0.
0.1
0.2
0.3
0.4
0.5
0.6
0.7
μ, mean service rate per hour for one server
30
c, number of servers
1
2
3
4
5
6
7
8
expected
observed
server utilization factor (proportion of time each server is busy): ρ
λ
cμ
0.830
0.650
probability of no customers in the system:
P
0
1
c
(cρ)
c!(1-ρ)
+
c-1
n=0
n
(cρ)
n!
0.091
0.150
probability that an arriving customer has to wait:
P
w
=
c
(cρ)
P
0
c!(1-ρ)
0.760
0.460
average number of customers in the queue:
N
Q
ρ
P
w
1-ρ
3.800
0.810
average number of customers in the system, including the queue: N
N
Q
+cρ
5.500
2.100
average time a customer spends in the queue, in mins.: W60
N
Q
1
λ
4.500
1.100
average time a customer spends in the system, including the queue, in mins.: W+60
1
μ
6.500
3.300
In queuing theory, the simplest model is called the M/M/1 or M/M/c model (Markovian arrivals, Markovian service, and 1 or
c
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
1/λ
;
μ
= rate at which a single server can serve customers, in number per hour; this follows an exponential distribution with mean
1/μ
;
c
= 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
N/2
where
N
is the total number of customers. Regardless of deletions, the time starts at 0.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.