Chapter 8: Queueing Theory: 1 Queueing Models and Characteristics
Chapter 8: Queueing Theory: 1 Queueing Models and Characteristics
ρ2
(i.) Average number of customers in the system L (= λ+μ )
λ
and in the queue LQ (= 1−ρ ), in service Ls
(= ρ). L = LQ + Ls .
ρ
(ii.) Average amount of time a customer spends in the system W (= μ−λ )
1
and in the queue WQ (= 1−ρ ).
W = WQ + μ1 .
(v.) Probability a customer finds at least 3 customers ahead of him upon arrival 1 − P0 − P1 − P2 .
1
2
P
∞
Let nρn = Z. Then,
n=0
ρ + 2ρ2 + 3ρ3 + ∙ ∙ ∙ = Z,
ρ2 + 2ρ3 + ∙ ∙ ∙ = ρZ,
−−−−−−−−− −−−−
ρ + ρ 2 + ρ3 + ∙ ∙ ∙ = (1 − ρ)Z.
ρ ρ
Hence, Z = (1−ρ)2 and L = 1−ρ = μ−λ .
λ
As ρ → 1, L → ∞. To see the magnitude,
The fraction of time the server is idle is P0 = 1 − ρ and ρ is the fraction of time the server is busy.
∞
X
W = E(time in system|you observe n in the system upon arrival)Pn
n=0
∞ ∞ ∞ ∞
!
X n+1 n 1−ρ X 1−ρ X X
= ρ (1 − ρ) = (n + 1)ρn = nρn + ρn
n=0
μ μ n=0
μ n=0 n=0
1−ρ ρ 1 1 1
= + = = .
μ (1 − ρ)2 1−ρ μ(1 − ρ) μ−λ
Note that, L = λW which is the well known Little’s Law and apply to any system.
ρ
With Little’s Law, we can calculate the following using L = 1−ρ and W = μ−λ :
1
1
Ls = λ× = ρ, exactly the percentage of time the server is busy,
μ
ρ2
LQ = L − Ls = ,
1−ρ
LQ ρ
WQ = = ,
λ μ−λ
1 1
WQ + = = W.
μ μ−λ
Example: Which cashier to hire? Cashier A is faster with mean service time of 1 min and a salary of
$10, while cashier B is slower with mean service time of 2 min and a salary of $5. Customers arrive at a
rate of λ = 25 per hr. Assume it costs $0.02 (including time being served) for each minute ($1.2/hr) a
customer is in the system.
3
= e−(μ−λ)t .
That is, in steady state, the time a customer spends an exponential amount of time with μ − λ in the
system. So the probability a customer spends more than t amount of time in the system is e−(μ−λ)t . It
can be shown that P (wQ > t) = ρe−(μ−λ)t .
Example: Lead time quotation.
• Quote a fixed lead time t to all customers to achieve a service level SL. Note that Fˉ (t) is the
probability that a customer stays more than t amount of time in the system. Then one should
quote the shortest lead time such that Fˉ (t) = e−(μ−λ)t ≤ 1 − SL or t = − μ−λ
1
ln(1 − SL).
• Quote lead times based on the work load. Let tn be the lead time quoted to a customer when there
are n customers in the system upon his arrival, n ≥ 0. Since the amount of time the customer
will spend in the system is gamma(n + 1, μ), one should quote the shortest lead time such that
P
n
Fˉ (tn ) = e−μtn (μtn )k
k! = 1 − SL. In this case, the lead time increases as the congestion level
k=0
increases.
4
3 M/M/1/K Queues
Let X(t) be the number of customers in the system at time t. Then, {X(t), t ≥ 0} is a birth and death
process on state space {0, 1, . . . , K} with
λ, for 0 ≤ n < K,
λn =
0, for n ≥ K,
μn = μ (n ≥ 1), μ0 = 0.
Now λ
μ (it is no longer the actual utilization) and can be anything. Solving the balance equations in
terms of P0 yields
K −1
P λ i ( μλ )
n
So, P0 = μ and Pn = P
K
. In steady state, the arrival customer will join the queue with
( μλ )
i=0 i
i=0
34/15
L= 2
15 +2× 4
15 +3× 8
15 = 15 ,
34
λ0 = 60(1 − 15 )
8
= 28, and W = L
λ0 = 28 = 17
210 hrs = 34
7 min ≈ 5min.
0
Ls = λ
μ = 15 ,
14
LQ = L − Ls = 53 , WQ = W − 1
μ = 1
21 hrs ≈ 3min.
4 M/M/c Queues
Let X(t) be the number of customers in the system at time t. Then {X(t), t ≥ 0} is a birth and death
process with
λn = λ, n ≥ 0,
nμ, for 0 ≤ n ≤ c,
μn =
cμ, for n > c.
5
Let ρ = λ
cμ or λ
μ = cρ. Thus, the stability condition of the queue is ρ < 1 or c > μ.
λ
Solving the balance
equations in terms of P0 yields,
(cρ)n
n! P0 , for 0 ≤ n ≤ c − 1,
Pn =
c n
c ρ
for n ≥ c,
c! P0 ,
By Little’s Law, L = LQ + Ls = LQ + λ
μ = LQ + cρ and
L 1 1 (cρ)c 1
W = = + × P0 = W Q +
λ μ cμ − λ c!(1 − ρ) μ
P
c−1
as Ws = μ.
The probability an arrival does not need to wait is
1
Pn . The probability that an arrival
n=0
P
c−1
(cρ)c
has to wait for t or longer is 1 − Pn e−(cμ−λ)t = e−(cμ−λ)t c!(1−ρ) P0 .
n=0
Examples
Resource pooling at a call center Two M/M/1 queues vs. one M/M/2 queue.
ρ λ
μ = 2μ/2 = μ
λ λ
ρ2 2ρ3
LQ 1−ρ > 1−ρ2
ρ2 2ρ3
WQ λ(1−ρ) > λ(1−ρ2 )
ρ2 2ρ3
λ(1−ρ) + μ λ(1−ρ2 ) + μ
1 2
W <
Which is better? Depends on price and what better means. If you don’t mind being served longer,
two slow ones may be better. If total time in the system matters, one may be better. It leads to
the discussion of the psychological side of waiting.
and WQ = LQ /λ.
• A customer’s tolerance for waiting in a queue is proportional to the complexity or quantity of service
anticipated by that customer.
Customers at a bank prefers FCFS that assures social justice, but generally does not mind if those
with “12 items or less” join a special express service line in a supermarket. They expect to wait
longer. In an airport, a customer tolerates a multi-hour delay in making a connection to an overseas
flight while even a fraction of that wait for a New York to Washington Shuttle would not be tolerated.
Banks have been neglecting this mixing of high service time and low service time customers. So
far many customers opted to go to an ATM, but maybe banks should set up preferred customers
accounts (common in Latin America) like first class passengers and everyone understands it. This
is not so apparent in a teller line (why should someone came 20 minutes later get served before me).
7
Research should be done before customers started to move away. Besides, a preferred customer
may start life as a non-preferred customer.
• It is not the duration of the delay that matters; it is what you experience while you are waiting
that matters.
How a customer feels in a queue is dependent on the duration of the wait and the total environment
around her. Adding servers will lower the duration, but cost will go up. Disney surrounds its
queue lines with entertainment and other diversions. The line-skipping system called FastPass
allows guests to book a time for an attraction, leave to do other things, and return at an allotted
time. One major initiative of NextGen focuses on what is being called an xPASS, which would
allow guests to book rides weeks or months in advance. Visitors planning their trip would go on the
xPASS website and use the free service which allows you to reserve experiences, including ride times,
exclusive meet-and-greets with Disney characters, even viewing spots for the nightly fireworks. The
xPASS system would also help to avoid lines at restaurants by ordering food in advance.
A couple of things about this strike me as interesting. First, arranging meet and greets as well as
saving spots for fireworks seems pretty easy to do but rides are something else. They are prone
to breakdowns so actually getting everyone with a 2:00 reservation on Pirates of the Caribbean
might be tough. There is also a question of how much capacity one makes available for advance
reservations. The article says that a concern is that people who book late may be unable to get
on popular rides. That obviously is a problem, particularly if a park (like Disneyland in Southern
California) gets a fair amount of local visitors. Even for those who plan early, it is hard to know
what rides are most desirable. How do you tell a five-year old that they can’t go on a ride they
loved a second time because dad only booked one reservation for it? Disney has to limit the number
of reservations: both to buffer for downtime and to accommodate spontaneity.
A second part of NextGen is the use of a wrist band embedded with RFID, that reads your identity
and acts as your ticket. Disney is already experimenting with RFID technology, for example, at
Epcot. But the NextGen wrist band concept is expected to go further. Its believed that guests
would provide information such as their names, credit card information and favorite attractions
ahead of their arrival. After they enter at the park, the RFID would interact with sensors deployed
throughout Disneys resorts and trigger interactive features. So for example, an attraction may greet
you and your family and call you by name.
In effect, a Disney park would become a little more like a website, recording where youve been and
choice youve made. Note that this could make running a reservation system a little easier. When
the Jones party of four has not shown up for their 2:00 reservation by 2:05, it may be possible to
see that they were on the other side of the park 2 minutes ago and dont have any chance of getting
8
to the ride soon. Their space could then be given over to stand by customers.
This also a big data boon. Knowing ages of the family and whether this is their first trip to a
park could allow Disney to suggest itineraries of age-appropriate rides the next time a family with
a similar profile books.
The pivotal research finding in this area dates to the mid-50s in NYC. Complaints started to sore
at that time as more and more people found themselves in high-rise buildings, waiting for elevators.
It has to be the design of the buildings, so either dynamite the building and put in more elevators
or tell people they have to wait. A consultant pointed the problem not to be the duration, but
the complaints about the delay which they needed to reduce. The solution was to place floor-
to-ceiling mirrors next to each elevator door and the complaints plummeted! How to get happy
customers with lower costs at banks? A study on bank teller lines in 1990 at Bank of Boston
(now BankBoston) for three weeks, each week the line operating in a different mode: Status quo;
Silent Radio, Digital queue wait advisory. Silent Radio: placement of a Time Square type scrolling
alphanumeric readout with live news, sports, weather and even advertisements for bank services.
Silent with no disruption and easily seen if chosen to. Digital advisory: At the queue entrance, on a
poll attached to one of the queue stanchions marking the wait lane, the readout would say Current
Wait = 8 minutes (expensive device). Customers loved the Silent Radio so much that several regular
customers complained to the bank manager the Monday following the removal of the display. They
purchased and leased several also in front of busy congested ATMs. Digital Advisory actually
reminded customers of the waiting. Customers repeatedly looked at their wrist watches, trying to
play the game of Beat the Clock. In the 1980s the Savings Bank of New York employed not fancy
technology but rather live piano recitals each day during the lunch hour. Visiting the bank was so
appealing that an enterprising entrepreneur once sold tickets to sidewalk passersby just to get into
the bank lobby. At a Toronto bank shows an eight minutes looped videotape to its customers.
5 M/M/∞ Queues
Let X(t) be the number of customers in the system at time t. {X(t), t ≥ 0} is a birth and death process
with
λn = λ, n ≥ 0,
μn = nμ, n ≥ 0.
ρn
Let ρ = μ.
λ
Solving the balance equations in terms of P0 yields Pn = n! P0 and P0 = e−ρ . So Pn is
Poisson with ρ and L = ρ. W = 1
μ and WQ = 0.
9
6 Multiple stages
The departure process of an M/M/1 queue: If a departing customer leaves behind an empty system with
probability P0 = 1 − ρ, the next departure will take place after a time equal in distribution to the sum
of two independent exponential random variables with λ and μ. If a customer leaves behind at least one
customer with probability ρ, the next departure will occur at an exponential amount of time with μ. Let
N be the number of customers a departing customer leaves behind, X be the interarrival time, Y be the
service time, and T be the inter-departure time. Then,
= e−λt .
Let Ca = std of the interarrival time and Cs = std of the service time , the coefficient of variation.
mean of the interarrival time mean of the service time
Then √
ρ 2(1+c) Ca2 + Cs2
LQ ≈ .
1−ρ 2
LQ
For the M/M/c queue, Ca = Cs = 1. Then WQ = λ , W = WQ + μ1 , L = λW , and Ls = μ.
λ
ρ2
Cd2 = 1 + (1 − ρ2 )(Ca2 − 1) + √ (Cs2 − 1),
c
Cd2 = (1 − ρ2 )Ca2 + ρ2 Cs2 , if c = 1,
Insights:
• Variability propogates.