You are on page 1of 106

QUEUING THEORY

Learning Objectives
By the end of this module, the students are expected to:
1. Identify the appropriate queuing model for a particular situation.
2. Evaluate the performance of a queuing system using different metrics.
3. Use a spreadsheet template to easily compute queuing-related
performance measures.

University of the Philippines


QUEUING THEORY
The Queuing System

customers
in service

queue

arriving
customer service facility
system boundary

customer server
University of the Philippines
QUEUING THEORY
Kendall-Lee Notation
A six-element classification system for queuing systems using the notation:

A S s D K N
_____ / _____ / _____ / _____ / _____ / _____

Examples:
1. M / M / 2 / FCFS / 20 / 20
2. D / M / 1 / FCFS / ∞ / ∞
3. G / G / 2 / LCFS / 100 / ∞

University of the Philippines


QUEUING THEORY
Kendall-Lee Notation

A S s D K N
_____ / _____ / _____ / _____ / _____ / _____
A: Arrival (Input) Process. The arrival pattern of arriving customers. Let λ be
the arrival rate of customers.
M – Markovian (exponential)
Ek – Erlang
D – constant (degenerate)
G – general
S: Service (Output ) Process. The service time distribution. Let µ be the
service rate of each server.
M – Markovian
Ek – Erlang
D – constant (degenerate)
G – general
s: Servers. The number of servers in a service facility.
University of the Philippines
QUEUING THEORY
Kendall-Lee Notation

A S s D K N
_____ / _____ / _____ / _____ / _____ / _____
D: Queuing Discipline. Determines which customer will be served next.
FSFC – first come, first served
LCFS – last come, first served
SIRO – service in random order
GD – general discipline
K: System Capacity. The maximum number of customers that are allowed to
enter the system.
N: Input Source / Calling Population. The number of customers that may
enter the system.

The last three may be omitted in the notation if FCFS/∞/∞.

University of the Philippines


QUEUING THEORY
Review of Relevant Probability Distributions

Degenerate Normal Erlang Exponential

Increasing Randomness (Variability)

Mathematically Limited Mathematical Analysis Mathematically


tractable (may require simulation) tractable

University of the Philippines


QUEUING THEORY
Review of Relevant Probability Distributions

Degenerate Normal Erlang Exponential


10.0 9.7 17.6 7.6
10.0 9.7 17.9 8.6
10.0 9.6 15.0 40.0
10.0 9.6 7.0 36.1
10.0 9.3 6.4 8.3
10.0 11.3 7.2 34.2
10.0 9.3 39.3 3.4
10.0 10.1 4.0 9.0

University of the Philippines


QUEUING THEORY
Review of Relevant Probability Distributions

Degenerate

Normal

Erlang

Exponential

University of the Philippines


QUEUING THEORY
Kendall-Lee Notation
Identify the Kendall-Lee notation of these queuing systems.
1. A canteen operates an espresso stand. Customers arrive to the stand
with an exponential inter-arrival time. The espresso vending machine
requires exactly 45 seconds for each customer to operate.

M/D/1/FCFS/∞/∞ or M/D/1

2. A company has provided specialized machines to 12 different clients.


Part of the agreement between the company and the clients is that the
company will send a technician whenever the machine breaks. The
technician visits the site and will spend an average of 3 days per site to
fix the machine. Assume normally distributed fix time. The company has
2 technicians. Mean time to failure (MTTF) of each machine is
exponential with mean of 60 days.

M/G/2/FCFS/12/12

University of the Philippines


QUEUING THEORY
Kendall-Lee Notation
Identify the Kendall-Lee notation of these queueing systems.
3. An eat-all-you-can dining place is usually full (can seat only 45 groups of
people). That is why it usually has a number of groups waiting in the
holding area. A group of customers will balk (go to other dining place) if
they see that there are 10 groups already in the holding area. Eating
time per group is roughly 1.5 hrs. Assume Poisson arrival and random
eating time.
M/M/45/FCFS/55/∞

4. Students return books to the library at a rate of 6 books per hour. The
borrower’s section librarian returns the books, one at a time, to their
respective bookshelves. This takes an erlang distributed time per book.
Since a newly-returned book is placed on top of the pile, it is the first
one to be given attention by the librarian.
M/Ek/1/LCFS/∞/∞
University of the Philippines
QUEUING THEORY
Performance Measure of Queuing Systems
▪ Ls. Average number of customers being served.
▪ Lq. Average length of customers in the line (queue).
▪ L = Ls + Lq. Average number of customers in the system
▪ Ws. Average service time of a customer.
▪ Wq. Average waiting time of customer in the line (queue).
▪ W = Ws + Wq. Average waiting time of customer in the system.
▪ Probability of Balking. Balking happens when a customer cannot (or
refuses to) enter the line because it is either full or too long.
▪ Server Utilization. The proportion of time that a given server is busy as it
attends to customers.

University of the Philippines


QUEUING THEORY
Performance Measure of Queuing Systems

Steady State
(reported values)

Transient Period
(not reported)

University of the Philippines


QUEUING THEORY
Performance Measure of Queuing Systems
Let Pn be the steady-state probability that the queuing system has n
customers.

𝐿 = ෍ 𝑛𝑃𝑛
𝑛

𝐿𝑞 = ෍ ൫𝑛 − 𝑠)𝑃𝑛
𝑛>𝑠

University of the Philippines


QUEUING THEORY
Little’s Queuing Formulas
Little’s Law states that the average number of customers in a queuing
system is the product of the average entry rate of customers and the
average time a customer spends in the system.

𝐿 = 𝜆𝑎𝑣𝑒 𝑊

The following relationships are likewise true.


𝐿𝑞 = 𝜆𝑎𝑣𝑒 𝑊𝑞
𝐿𝑠 = 𝜆𝑎𝑣𝑒 𝑊𝑠

University of the Philippines


QUEUING THEORY
Little’s Queuing Formulas

L = λaveW
L W

L = Lq + λ/µ W = Wq + 1/µ

Lq = λaveWq
Lq Wq

University of the Philippines


QUEUING THEORY
Little’s Queuing Formulas
In the Bills Payment section of a utility company, customers arrive to settle
their bills at a rate of 60 per hour. These customers join a single queue
leading to three cashiers. Each cashier, if working continuously, can serve
can serve a customer 24 customers in an hour. It is estimated that a
customer waits in line for an average of 1.5 mins before service begins.
Determine the average number of customers in queuing system.

𝜆 = 60 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟 μ = 24 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟

𝑊𝑞 = 1.5 𝑚𝑖𝑛𝑠

1 1
𝑊𝑠 = = = 0.042 ℎ𝑟 = 2.5 𝑚𝑖𝑛𝑠
𝜇 24
1.5
𝑊 = 𝑊𝑞 + 𝑊𝑠 = + 0.042 = 0.067 ℎ𝑟 = 4 𝑚𝑖𝑛𝑠
60
𝐿 = 𝜆𝑎𝑣𝑒 𝑊 = 60 0.067 = 𝟒 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔

University of the Philippines


QUEUING THEORY
Birth-and-Death Model of Markovian Queues
Let the state N(t) of the queuing system be the number of customers in the
system at time t.
Birth is the transition from state n to state n+1. If the system is in state n,
the remaining time until the next birth is exponential with rate λn, n ≥ 0.
Death is the transition from state n to state n-1. If the system is in state n,
the remaining time until the next death is exponential with rate µn, n ≥ 1.

λ0 λ1 λ2 λ3 λ4 λ5

0 1 2 3 4 5 ...

µ1 µ2 µ3 µ4 µ5 µ6

University of the Philippines


QUEUING THEORY
Birth-and-Death Model of Markovian Queues
λ0 λ1 λ2 λ3 λ4 λ5

0 1 2 3 4 5 ...

µ1 µ2 µ3 µ4 µ5 µ6
−1
𝜆0𝜆0 𝜆0𝜆𝜆01𝜆1 𝜆𝜆00𝜆𝜆11𝜆𝜆22 𝜆𝜆00𝜆𝜆11𝜆𝜆22𝜆𝜆33 𝜆𝜆00𝜆𝜆11𝜆𝜆22𝜆𝜆33𝜆𝜆44
𝑃0 = 1 +
1 + ++ +
+ + +
+ +…
+ …
𝜇1𝜇1 𝜇1𝜇𝜇1 𝜇
2 2 𝜇𝜇1𝜇𝜇2
1 2 3𝜇𝜇3 𝜇
𝜇 1𝜇𝜇2𝜇𝜇
1 2 3 4 3𝜇𝜇 4 𝜇
𝜇 1𝜇𝜇2𝜇𝜇 3
1 2 3 4 5𝜇𝜇 4𝜇𝜇 5

𝜆0 𝜆0 𝜆1 𝜆2 𝜆3 𝜆3
𝑃1 = 𝑃0 𝑃4 = 𝑃 = 𝑃
𝜇1 𝜇1 𝜇2 𝜇3 𝜇4 0 𝜇4 3
𝜆0 𝜆1 𝜆1 𝜆0 𝜆1 𝜆2 𝜆3 𝜆4 𝜆4
𝑃2 = 𝑃0 = 𝑃1 𝑃5 = 𝑃0 = 𝑃4
𝜇1 𝜇2 𝜇2 𝜇1 𝜇2 𝜇3 𝜇4 𝜇5 𝜇5
𝜆0 𝜆1 𝜆2 𝜆2
𝑃3 = 𝑃0 = 𝑃2
𝜇1 𝜇2 𝜇3 𝜇3

University of the Philippines


QUEUING THEORY
Birth-and-Death Model of Markovian Queues
Consider the rate diagram of a Markovian queuing system. Find the steady-
state probabilities Pn’s.
5/hr 5/hr 5/hr 5/hr 5/hr

0 1 2 3 4 5

4/hr 8/hr 8/hr 8/hr 8/hr


−1
5 𝜆0 5(5)
𝜆0 𝜆1 5(5)(5)
𝜆0 𝜆1 𝜆2 5(5)(5)(5)
𝜆0 𝜆1 𝜆2 𝜆3 𝜆5(5)(5)(5)
0 𝜆1 𝜆2 𝜆3 𝜆4
𝑃0 = 1 +
1+ ++ ++ +
+ ++ + = 0.249
𝜇 𝜇 𝜇 𝜇 𝜇
4 1 4(8)1 2 4(8)(8) 𝜇 𝜇 𝜇 𝜇
1 2 3 4(8)(8)(8)
1 2 3 4 𝜇 𝜇 𝜇 𝜇 𝜇
4(8)(8)(8)
1 2 3 4 5 𝜇

𝜆0 5 𝜆3 5
𝑃1 = 𝑃0 = 0.249 = 0.311 𝑃4 = 𝑃3 = 0.122 = 0.076
𝜇1 4 𝜇4 8
𝜆1 5 𝜆4 5
𝑃2 = 𝑃1 = 0.311 = 0.195 𝑃5 = 𝑃4 = 0.076 = 0.048
𝜇2 8 𝜇5 8
𝜆2 5
𝑃3 = 𝑃2 = 0.195 = 0.122
𝜇3 8
University of the Philippines
QUEUING MODELS
M/M/1
λ λ λ λ

0 1 2 3 . . .

μ μ μ μ

𝜆
𝜌= <1 𝑃0 = 1 − 𝜌 𝑃𝑛 = 𝜌𝑛 (1 − 𝜌)
𝜇
𝜌 𝜆 𝜌2 𝜆2
𝐿= = 𝐿𝑞 = =
1−𝜌 𝜇− 𝜆 1−𝜌 𝜇(𝜇 − 𝜆)
𝜌 1 𝜌2 𝜆
𝑊= = 𝑊𝑞 = =
𝜆(1 − 𝜌) 𝜇− 𝜆 𝜆(1 − 𝜌) 𝜇(𝜇 − 𝜆)

𝑃 Wq > 𝑡 = 𝜌𝑒 −𝜇 1−𝜌 𝑡

Note: Wq is the waiting time of customer in queue. Wq is the average waiting time of
customer in queue or E(Wq ).
University of the Philippines
QUEUING MODELS
M/M/1
A regional airport has a single runway. Airplanes requiring the use of the
runway arrive at a Poisson rate of 12 per hour. Each plane uses the runway
for an exponential time with mean of 4 mins.
a. Find the average waiting time of airplanes before they can use the
runway.
b. What is the utilization of the runway?
c. Compute the average number of airplanes currently using or waiting to
use the runway.
d. Find the probability that an airplane does not need to queue to use the
runway.
e. What is the probability that an airplane needs to wait for more than 6
mins before it can use the runway?

University of the Philippines


QUEUING MODELS
M/M/1

12/hr 12/hr 12/hr 12/hr 12/hr 12/hr

0 1 2 3 4 5 ...

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

M/M/1 with λ = 12/hr and µ = 15/hr

University of the Philippines


QUEUING MODELS
M/M/1
a. Find the average waiting time of airplanes before they can use the
runway.

𝜆 12
𝑊𝑞 = = = 𝟎. 𝟐𝟔𝟔𝟕 𝒉𝒓 = 𝟏𝟔 𝒎𝒊𝒏𝒔
𝜇(𝜇 − 𝜆) 15(15 − 12)

b. What is the utilization of the runway?

𝜆 12
𝜌= = = 𝟎. 𝟖𝟎
𝜇 15

c. Compute the average number of airplanes currently using or waiting to


use the runway.
𝜆 12
𝐿= = = 𝟒 𝒑𝒍𝒂𝒏𝒆𝒔
𝜇 − 𝜆 15 − 12

University of the Philippines


QUEUING MODELS
M/M/1
d. Find the probability that an airplane does not need to queue to use the
runway.

𝑃0 = 1 − 𝜌 = 1 − 0.80 = 𝟎. 𝟐𝟎

e. What is the probability that an airplane needs to wait for more than 6
mins before it can use the runway?
6
−15 1−0.80 (60)
𝑃 Wq > 𝑡 = 𝜌𝑒 −𝜇 1−𝜌 𝑡 = 0.80𝑒 = 𝟎. 𝟓𝟗𝟑

University of the Philippines


QUEUING MODELS
M/M/1

University of the Philippines


QUEUING MODELS
M/M/1
A small grocery store has a single cashier lane where grocers line up to pay
for their purchases. Inter-arrival time of customers is exponentially
distributed with mean of 3 mins. Due to the variety in type and number of
items purchased, transaction time is approximately exponentially distributed
with mean 2.5 mins.
a. Compute the average number of customers in the cashier lane.
b. Find the probability that there are at most 4 customers in the lane.
c. What is the proportion of time that the cashier is idle?
d. Find the average time a customer spends in the cashier, including
queuing time and transaction time.
e. Buying a POS machine will help reduce average transaction time to only
2 mins (20% reduction) with the aid of a barcode reader – eliminating
the need to type item codes manually. If implemented, find the percent
reduction in the average time a customer spends in the cashier.

University of the Philippines


QUEUING MODELS
M/M/1

20/hr 20/hr 20/hr 20/hr 20/hr 20/hr

0 1 2 3 4 5 ...

24/hr 24/hr 24/hr 24/hr 24/hr 24/hr

M/M/1 with λ = 20/hr and µ = 24/hr

University of the Philippines


QUEUING MODELS
M/M/1
a. Compute the average number of customers in the cashier lane.

𝜆 20
𝐿= = = 𝟓 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔
𝜇 − 𝜆 20 − 24

b. Find the probability that there are at most 4 customers in the lane.
4 4 4 𝑛
20 20
෍ 𝑃𝑛 = ෍ 𝜌𝑛 (1 − 𝜌) = ෍ 1− = 𝟎. 𝟓𝟗𝟖
24 24
𝑛=0 𝑛=0 𝑛=0

c. What is the proportion of time that the cashier is idle?


20
𝑃0 = 1 − 𝜌 = 1 − = 𝟎. 𝟏𝟔𝟕
24

University of the Philippines


QUEUING MODELS
M/M/1
d. Find the average time a customer spends in the cashier, including
queuing time and transaction time.

1 1
𝑊= = = 0.25 ℎ𝑟 = 𝟏𝟓 𝒎𝒊𝒏𝒔
𝜇 − 𝜆 24 − 20

e. Buying a POS machine will help reduce average transaction time to only
2 mins (20% reduction) with the aid of a barcode reader – eliminating
the need to type item codes manually. If implemented, find the percent
reduction in the average time a customer spends in the cashier.
1 1
𝑊𝑛𝑒𝑤 = = = 0.10 ℎ𝑟 = 𝟔 𝒎𝒊𝒏𝒔
𝜇𝑛𝑒𝑤 − 𝜆 30 − 20

15 𝑚𝑖𝑛𝑠 − 6 𝑚𝑖𝑛𝑠
% 𝑅𝑒𝑑𝑢𝑐𝑡𝑖𝑜𝑛 = = 𝟔𝟎%
15 𝑚𝑖𝑛𝑠

University of the Philippines


QUEUING MODELS
M/M/1

University of the Philippines


QUEUING MODELS
M/M/s
λ λ λ λ λ λ λ

0 1 2 . . . s-1 s s+1 . . .

μ 2μ 3μ (s-1)μ sμ sμ sμ

𝜆 𝜆Τ𝜇 𝑠 𝑃0 𝜆Τ𝜇 𝑛 𝑃0
𝜌= <1 𝑃 𝑛≥𝑠 = , 𝑛≤ 𝑠
𝑠𝜇 𝑠! (1 − 𝜌) 𝑛!
𝑃𝑛 = .
𝜆Τ𝜇 𝑛 𝑃0
, 𝑛≥𝑠
𝑠−1 𝜆Τ𝜇 𝑛
𝜆Τ𝜇 𝑠 −1 𝑠! 𝑠 𝑛−𝑠
𝑃0 = ෍ +
𝑛=0 𝑛! 𝑠! (1 − 𝜌)
𝑃 𝑛≥𝑠
𝑊𝑞 =
𝑃 𝑛≥𝑠 𝜌 𝑠𝜇 − 𝜆
𝐿𝑞 =
1−𝜌
𝑃 Wq > 𝑡 = 𝑃 𝑛 ≥ 𝑠 𝑒 −𝑠𝜇 1−𝜌 𝑡

University of the Philippines


QUEUING MODELS
M/M/s
A customer support contact center employs 15 employees (or agents). Calls
from customers who wish to made an inquiry enter the company’s IT system
at a Poisson rate of 94 calls per hour. The system places the call (or ticket)
in a single queue and directs it to an agent once available. Customer calls
last for an exponential time with mean of 8 mins
a. Find the probability that all agents are busy in a given time.
b. Find the average time a call is put on hold before it is attended by an
agent.
c. On the average, how may calls are in the IT system (both being attended
to and put on hold).
d. Since waiting time is not acceptable, find the number of additional
agents required to ensure that average time a call is put on hold is
reduced to at most 30 seconds.

University of the Philippines


QUEUING MODELS
M/M/s

94/hr 94/hr 94/hr 94/hr 94/hr 94/hr 94/hr

0 1 2 … 14 15 16 …

7.5/hr 2(7.5)/hr 3(7.5)/hr 14(7.5)/hr 15(7.5)/hr 15(7.5)/hr 15(7.5)/hr

M/M/15 with λ = 94/hr and µ = 7.5/hr

University of the Philippines


QUEUING MODELS
M/M/s
a. Find the probability that all agents are busy in a given time.

𝜆 94
𝜌= = = 0.836
𝑠𝜇 15(7.5)

𝑛 −1 −1
𝑠−1 𝜆Τ𝜇 𝜆Τ𝜇 𝑠 14 94Τ7.5 𝑛
94Τ7.5 15
𝑃0 = ෍ + = ෍ +
𝑛=0 𝑛! 𝑠! (1 − 𝜌) 𝑛=0 𝑛! 15! (1 − 0.836)

= 2.96 𝑥 10−6

𝜆Τ𝜇 𝑠 𝑃0 94/7.5 15 2.96 𝑥 10−6


𝑃 𝑛≥𝑠 = = = 𝟎. 𝟒𝟎𝟕
𝑠! (1 − 𝜌) 15! (1 − 0.836)

University of the Philippines


QUEUING MODELS
M/M/s
b. Find the average time a call is put on hold before it is attended by an
agent.

𝑃 𝑛≥𝑠 0.407
𝑊𝑞 = = = 𝟎. 𝟎𝟐𝟐 𝒉𝒓 = 𝟏. 𝟑𝟐𝟏 𝒎𝒊𝒏𝒔
𝑠𝜇 − 𝜆 15(7.5) − 94

c. On the average, how may calls are in the IT system (both being attended
to and put on hold).
𝑃 𝑛 ≥ 𝑠 𝜌 0.407 ∗ 0.836
𝐿𝑞 = = = 2.069 𝑐𝑎𝑙𝑙𝑠
1−𝜌 1 − 0.836

𝜆 94
𝐿 = 𝐿𝑞 + = 2.069 + = 𝟏𝟒. 𝟔𝟎𝟐 𝒄𝒂𝒍𝒍𝒔
𝜇 7.5

University of the Philippines


QUEUING MODELS
M/M/s
d. Since waiting time is not acceptable, find the number of additional
agents required to ensure that average time a call is put on hold is
reduced to at most 30 seconds (0.5 min).

s Wq
15 1.321 mins
16 0.619 min
17 0.306 min
18 0.155 min

University of the Philippines


QUEUING MODELS
M/M/s

University of the Philippines


QUEUING MODELS
M/M/s
A dental clinic has three dentists. Patients arrive at a Poisson rate of 2.7
patients / hr. Due to the varying nature of services required by patients, the
time a dentist needs to serve a patient is found to be exponentially
distributed with mean of 40 mins per patient. Compute the four
performance measures (L, Lq, W, Wq) of the queuing system for the two
assumptions below:
a. Assume that patients are indifferent
among the three dentists and are
willing to be attended by whoever is
immediately available. There is a
single queue of patients.
b. Assume each patient has a preferred
dentist. Thus, there are three
separate queues, each with identical
arrival rate of 0.9 patient per hour.

University of the Philippines


QUEUING MODELS
M/M/s
a. Assume that patients are indifferent among the three dentists and are
willing to be attended by whoever is immediately available. There is a
single queue of patients.

2.7/hr 2.7/hr 2.7/hr 2.7/hr 2.7/hr 2.7/hr

0 1 2 3 4 5 ...

1.5/hr 3.0/hr 4.5/hr 4.5/hr 4.5/hr 4.5/hr

M/M/3 with λ = 2.7/hr and µ = 1.5/hr

University of the Philippines


QUEUING MODELS
M/M/s
a. Assume that patients are indifferent among the three dentists and are
willing to be attended by whoever is immediately available. There is a
single queue of patients.

𝜆 2.7
𝜌= = = 0.60
𝑠𝜇 3(1.5)

𝑛 −1 −1
𝑠−1 𝜆Τ𝜇 𝜆Τ𝜇 𝑠 2 2.7Τ1.5 𝑛 2.7Τ1.5 𝑠
𝑃0 = ෍ + = ෍ + = 0.146
𝑛=0 𝑛! 𝑠! (1 − 𝜌) 𝑛=0 𝑛! 3! (1 − 0.60)

𝜆Τ𝜇 𝑠 𝑃0 2.7/1.5 3 0.146


𝑃 𝑛≥𝑠 = = = 0.355
𝑠! (1 − 𝜌) 3! (1 − 0.60)

University of the Philippines


QUEUING MODELS
M/M/s
a. Assume that patients are indifferent among the three dentists and are
willing to be attended by whoever is immediately available. There is a
single queue of patients.

𝑃 𝑛 ≥ 𝑠 𝜌 0.355 ∗ 0.60
𝐿𝑞 = = = 𝟎. 𝟓𝟑𝟐 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔
1−𝜌 1 − 0.60

𝜆 2.7
𝐿 = 𝐿𝑞 + = 0.532 + = 𝟐. 𝟑𝟑𝟐 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔
𝜇 1.5

𝑃 𝑛≥𝑠 0.355
𝑊𝑞 = = = 𝟎. 𝟏𝟗𝟕 𝒉𝒓 = 𝟏𝟏. 𝟖𝟐𝟓 𝒎𝒊𝒏𝒔
𝑠𝜇 − 𝜆 3(1.5) − 2.7

1 1
𝑊 = 𝑊𝑞 + = 0.197 + = 𝟎. 𝟖𝟔𝟒 𝒉𝒓 = 𝟓𝟏. 𝟖𝟐𝟓 𝒎𝒊𝒏𝒔
𝜇 1.5

University of the Philippines


QUEUING MODELS
M/M/s
b. Assume each patient has a preferred dentist. Thus, there are three
separate queues, each with identical arrival rate of 0.9 patient per hour.
M/M/1 with λ = 0.9/hr, µ = 1.5/hr

𝜆2 0.92
𝐿𝑞 = = = 𝟎. 𝟗𝟎 𝒑𝒂𝒕𝒊𝒆𝒏𝒕
𝜇(𝜇 − 𝜆) 1.5(1.5 − 0.9)

𝜆 0.9
𝐿= = = 𝟏. 𝟓 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔
𝜇 − 𝜆 1.5 − 0.9

𝜆 0.9
𝑊𝑞 = = = 𝟏 𝒉𝒓 = 𝟔𝟎 𝒎𝒊𝒏𝒔
𝜇(𝜇 − 𝜆) 1.5(1.5 − 0.9)

1 1
𝑊= = = 𝟏. 𝟔𝟕 𝒉𝒓𝒔 = 𝟏𝟎𝟎 𝒎𝒊𝒏𝒔
𝜇 − 𝜆 1.5 − 0.9

University of the Philippines


QUEUING MODELS
M/M/s

(a) 1 M/M/3 (b) 3 M/M/1


Whole Individual Whole
Lq (patients) 0.532 0.90 2.70
L (patients) 2.332 1.50 4.50
Wq (hours) 0.197 1.00 1.00
W (hours) 0.864 1.67 1.67

University of the Philippines


QUEUING MODELS
M/M/s

University of the Philippines


QUEUING MODELS
M/M/s

University of the Philippines


QUEUING MODELS
G/G/∞ (Self-Service Model)
For G/G/∞/GD/∞/∞

1 𝜆
𝑊𝑞 = 𝐿𝑞 = 0 𝑊= 𝐿=
𝜇 𝜇

Only for M/G/∞/GD/∞/∞

𝑒 −(𝜆Τ𝜇) (𝜆Τ𝜇)𝑛
𝑃𝑛 =
𝑛!

University of the Philippines


QUEUING MODELS
G/G/∞ (Self-Service Model)
A gym is available to its members 24/7. Members arrive at a Poisson rate of
4 per hour. On the average, each member stays in the gym for a normally
distributed time with mean of 2.5 hrs and standard deviation of 0.5 hr.
a. How many members are expected to be found in the gym at any given
point in time?
b. What is the probability that there are at most 14 members in the gym?

University of the Philippines


QUEUING MODELS
G/G/∞ (Self-Service Model)
a. How many members are expected to be found in the gym at any given
point in time?
M/G/∞ with λ = 4/hr and µ = 0.4/hr
𝜆 4
𝐿= = = 𝟏𝟎 𝒎𝒆𝒎𝒃𝒆𝒓𝒔
𝜇 0.4

b. What is the probability that there are at most 14 members in the gym?
14 14 14
𝑒 −(𝜆/𝜇) 𝜆/𝜇 𝑛
𝑒 −(4/0.4) 4/0.4 𝑛
෍ 𝑃𝑛 = ෍ =෍ = 𝟎. 𝟗𝟏𝟕
𝑛! 𝑛!
𝑛=0 𝑛=0 𝑛=0

University of the Philippines


QUEUING MODELS
G/G/∞ (Self-Service Model)

University of the Philippines


QUEUING MODELS
M/M/1/GD/K/∞
λ λ λ λ λ

0 1 2 . . . K-1 K

μ μ μ μ μ

𝜆 𝜌 𝐾 + 1 𝜌𝐾+1
𝜌= − , 𝜌≠1
𝜇 1−𝑝 1 − 𝜌𝐾+1
𝐿= .
𝐾
For n > K, Pn = 0. , 𝜌=1
2
For n ≤ K:
1 − 𝜌 𝜌𝑛
, 𝜌≠1 𝐿𝑞 = 𝐿 − (1 − 𝑃0 )
1 − 𝜌𝐾+1
𝑃𝑛 =
1
, 𝜌=1 𝜆𝑎𝑣𝑒 = 𝜆ҧ = 𝜆(1 − 𝑃𝐾
𝐾+1

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
λ λ λ λ λ λ

0 1 . . . s . . . K-1 K

μ 2μ sμ sμ sμ sμ

𝑠 𝑛 𝑠 𝐾 −1
𝜆
𝜆Τ𝜇 𝜆Τ𝜇
𝜌= ,𝑠 ≤ 𝐾 𝑃0 = ෍ + ෍ 𝜌𝑛−𝑠
𝑠𝜇 𝑛=0 𝑛! 𝑠! 𝑛=𝑠+1

𝜌 𝜆Τ𝜇 𝑠 𝑃0 1 − 𝜌𝐾−𝑠 − 𝐾 − 𝑠 𝜌𝐾−𝑠 (1 − 𝜌)


For n > K, Pn = 0. 𝐿𝑞 =
𝑠! 1 − 𝜌 2
For n ≤ K:
𝑠−1 𝑠−1
𝜆Τ𝜇 𝑛 𝑃0 𝐿 = 𝐿𝑞 + ෍ 𝑛𝑃𝑛 + 𝑠 1 − ෍ 𝑃𝑛
, 𝑛≤ 𝑠
𝑛! 𝑛=0 𝑛=0
𝑃𝑛 = .
𝜆Τ𝜇 𝑛 𝑃0
, 𝑛 ≥𝑠 𝜆𝑎𝑣𝑒 = 𝜆ҧ = 𝜆(1 − 𝑃𝐾 ൯
𝑠! 𝑠 𝑛−𝑠

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
A drive-thru of a fast food chain has a single window that services its
customers. Attending a customer takes an exponential time with mean of 4
mins. Including the space for the car/customer being served, the drive-thru
has a total of 6 available spaces. If an arriving car finds that all spaces are
taken, it will opt to get meals elsewhere. Cars arrive at the drive-thru at a
Poisson rate of 15 customers per hour (but not all can enter as pointed out).
a. Find the average number of customers in the queuing system.
b. On the average, how long does a car stay in the drive-thru?
c. What is the probability that all the available spaces are occupied?
d. If each served customer generates a revenue of PhP 200, find the
expected total revenue in 4 hours of operations?

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

0 1 2 3 4 5 6

15/hr 15/hr 15/hr 15/hr 15/hr 15/hr

M/M/1/FCFS/6/∞ with λ = 15/hr and µ = 15/hr

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
a. Find the average number of customers in the queueing system.

𝜆 15
𝜌= = =𝟏
𝜇 15
𝐾 6
𝐿= = = 𝟑 𝒄𝒂𝒓𝒔
2 2

b. On the average, how long does a car stay in the drive-thru?


1 1
𝑃𝐾 = = = 𝟎. 𝟏𝟒𝟑
𝐾+1 6+1

𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 ) = 15 1 − 0.143 = 𝟏𝟐. 𝟖𝟓𝟕 𝒄𝒂𝒓𝒔

𝐿 3
𝑊= = = 𝟎. 𝟐𝟑𝟑 𝒉𝒓 = 𝟏𝟒 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 12.857

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
c. What is the probability that all the available spaces are occupied?
1 1
𝑃𝐾 = = = 𝟎. 𝟏𝟒𝟑
𝐾+1 6+1

d. If each served customer generates a revenue of PhP 200, find the


expected total revenue in 4 hours of operations?

𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 ) = 15 1 − 0.143 = 𝟏𝟐. 𝟖𝟓𝟕 𝒄𝒂𝒓𝒔

𝑇𝑜𝑡𝑎𝑙 𝑅𝑒𝑣𝑒𝑛𝑢𝑒 = 200(4)𝜆𝑎𝑣𝑒 = 200(4) 12.857 = 𝐏𝐡𝐏 𝟏𝟎, 𝟐𝟖𝟓. 𝟕𝟏

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
An amusement arcade has 5 videoke booths where customers can belt
their hearts out. Customers arrive at a Poisson rate of 4 groups per hour.
Each group occupies one booth for an exponential time with mean of 1 hour.
If a group finds no vacant videoke booth, the group will then leave.
a. Find the average number of occupied videoke booths.
b. What is the average time a group spends in queue before it can use the
booth?
c. Find the proportion of time that a given booth is occupied.
d. On the average, how many groups balk in an hour?
e. Recompute average time a group spent in queue assuming this time
that arriving groups will only balk if there are two groups already waiting,
in addition to the five groups in the booths.

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

4/hr 4/hr 4/hr 4/hr 4/hr

0 1 2 3 4 5

1/hr 2/hr 3/hr 4/hr 5/hr

M/M/5/FCFS/5/∞ with λ = 4/hr and µ = 1/hr

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
a. Find the average number of occupied videoke booths.
𝜆 4
𝜌= = = 0.80
𝑠𝜇 5(1)
𝑠 𝑛 𝑠 𝐾 −1
𝜆Τ𝜇 𝜆Τ𝜇
𝑃0 = ෍ + ෍ 𝜌𝑛−𝑠
𝑛=0 𝑛! 𝑠! 𝑛=𝑠+1

𝑛 5 −1
5 4Τ1 4Τ1 5
𝑃0 = ෍ + ෍ 0.80𝑛−5 = 0.0233
𝑛=0 𝑛! 5! 𝑛=6

𝜌 𝜆Τ𝜇 𝑠 𝑃0 1 − 𝜌𝐾−𝑠 − 𝐾 − 𝑠 𝜌𝐾−𝑠 (1 − 𝜌)


𝐿𝑞 =
𝑠! 1 − 𝜌 2

0.80 4Τ1 5 (0.0233) 1 − 0.85−5 − 5 − 5 0.85−5 (1 − 0.80)


𝐿𝑞 = =0
5! 1 − 0.80 2

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
a. Find the average number of occupied videoke booths.
(𝜆/𝜇)𝑛 𝑃0 (4/1)1 0.0233
𝑃1 = = = 0.0933
𝑛! 1!
(𝜆/𝜇)𝑛 𝑃0 (4/1)2 0.0233
𝑃2 = = = 0.1866
𝑛! 2!
(𝜆/𝜇)𝑛 𝑃0 (4/1)3 0.0233
𝑃3 = = = 0.2488
𝑛! 3!
(𝜆/𝜇)𝑛 𝑃0 (4/1)4 0.0233
𝑃4 = = = 0.2488
𝑛! 4!
(𝜆/𝜇)𝑛 𝑃0 (4/1)5 0.0233
𝑃5 = = = 0.1991
𝑛! 5!
𝑠−1 𝑠−1 4 4
𝐿 = 𝐿𝑞 + ෍ 𝑛𝑃𝑛 + 𝑠 1 − ෍ 𝑃𝑛 = 0 + ෍ 𝑛𝑃𝑛 + 5 1 − ෍ 𝑃𝑛
𝑛=0 𝑛=0 𝑛=0 𝑛=0

𝐿 = 𝟑. 𝟐𝟎𝟑𝟕 𝒃𝒐𝒐𝒕𝒉𝒔

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
b. What is the average time a group spends in queue before it can use the
booth?
𝜆𝑎𝑣𝑒 = 𝜆(1 − 𝑃𝐾 ) = 4 1 − 0.1991 = 3.204 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟

𝐿𝑞 0
𝑊𝑞 = = = 𝟎 𝒉𝒓 = 𝟎 𝒎𝒊𝒏
𝜆𝑎𝑣𝑒 3.204

c. Find the proportion of time that a given booth is occupied.


𝜆𝑎𝑣𝑒 3.204
% 𝑈𝑡𝑖𝑙 = = = 𝟔𝟒. 𝟎𝟕%
𝑠µ 5(1)

d. On the average, how many groups balk in an hour?


𝜆𝑏𝑎𝑙𝑘 = 𝜆𝑃𝐾 = 4 0.1991 = 𝟎. 𝟕𝟗𝟔 𝒈𝒓𝒐𝒖𝒑/𝒉𝒓

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

−1
4 4(4) 4(4)(4) 4(4)(4)(4) 4(4)(4)(4)(4)
𝑃0 = 1 + + + + + = 0.0233
1 1(2) 1(2)(3) 1(2)(3)(4) 1(2)(3)(4)(5)

4 4 4 4
𝑃1 = 𝑃0 = (0.0233) = 0.0933 𝑃4 = 𝑃3 = (0.2488) = 0.2488
1 1 4 4

4 4 4 4
𝑃2 = 𝑃1 = (0.0933) = 0.1866 𝑃5 = 𝑃4 = (0.2488) = 0.1991
2 2 5 5

4 4
𝑃3 = 𝑃2 = (0.1866) = 0.2488
3 3

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
a. Find the average number of occupied videoke booths.

K
𝐿= ෍ 𝑛𝑃𝑛 = 0 0.0233 + 1 0.0933 + … + 5 0.1991 = 𝟑. 𝟐𝟎𝟑𝟕 𝒃𝒐𝒐𝒕𝒉𝒔
𝑛=0

b. What is the average time a group spends in queue before it can use the
booth?

𝐿𝑞 = ෍ (𝑛 − 𝑠)𝑃𝑛 = 0 𝑔𝑟𝑜𝑢𝑝
𝑛>s

K
𝜆𝑎𝑣𝑒 = ෍ 𝜆𝑛 𝑃𝑛 = 4 0.0233 + 4 0.0933 + … + 0 0.1991 = 3.204 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟
𝑛=0

𝐿𝑞 0
𝑊𝑞 = = = 𝟎 𝒉𝒓 = 𝟎 𝒎𝒊𝒏
𝜆𝑎𝑣𝑒 3.204

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
c. Find the proportion of time that a given booth is occupied.
0 1 2 5
% 𝑈𝑡𝑖𝑙 = 0.0233 + 0.0933 + 0.1866 + ⋯ + 0.1991 = 𝟔𝟒. 𝟎𝟕%
5 5 5 5

d. On the average, how many groups balk in an hour?

𝜆𝑏𝑎𝑙𝑘 = 0 0.0233 + 0 0.0933 + … + 4 0.1991 = 𝟎. 𝟕𝟗𝟔 𝒈𝒓𝒐𝒖𝒑/𝒉𝒓

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

4/hr 4/hr 4/hr 4/hr 4/hr 4/hr 4/hr

0 1 2 3 4 5 6 7

1/hr 2/hr 3/hr 4/hr 5/hr 5/hr 5/hr

M/M/5/FCFS/7/∞ with λ = 4/hr and µ = 1/hr

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
e. Recompute average time spent in queue assuming this time that
arriving groups will only balk if there are two groups already waiting, in
addition to the five groups in the booths.

−1
4 4(4) 4(4)(4) 4(4)(4)(4)(4)(4) 4(4)(4)(4)(4)(4)(4)
𝑃0 = 1 + + + + ⋯+ +
1 1(2) 1(2)(3) 1(2)(3)(4)(5)(5) 1(2)(3)(4)(5)(5)(5)

𝑃0 = 0.0181

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
e. Recompute average time spent in queue assuming this time that
arriving groups will only balk if there are two groups already waiting, in
addition to the five groups in the booths.
4 4 4 4
𝑃1 = 𝑃0 = (0.181) = 0.0725 𝑃5 = 𝑃4 = (0.1934) = 0.1547
1 1 5 5

4 4 4 4
𝑃2 = 𝑃1 = (0.0725) = 0.1450 𝑃6 = 𝑃5 = (0.1547) = 0.1238
2 2 5 5

4 4 4 4
𝑃3 = 𝑃2 = (0.1450) = 0.1934 𝑃7 = 𝑃6 = (0.1238) = 0.0990
3 3 5 5

4 4
𝑃4 = 𝑃3 = (0.1934) = 0.1934
4 4

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞
e. Recompute average time spent in queue assuming this time that
arriving groups will only balk if there are two groups already waiting, in
addition to the five groups in the booths.

𝐿𝑞 = ෍ (𝑛 − 𝑠)𝑃𝑛 = 1𝑃6 + 2𝑃7 = 1 0.1238 + 2 0.0990 = 0.3218 𝑔𝑟𝑜𝑢𝑝


𝑛>s

K
𝜆𝑎𝑣𝑒 = ෍ 𝜆𝑛 𝑃𝑛 = 4 𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 𝑃5 + 𝑃6 + 0𝑃7 = 4 1 − 𝑃7
𝑛=0

𝜆𝑎𝑣𝑒 = 4 1 − 0.990 = 3.604 𝑔𝑟𝑜𝑢𝑝𝑠/ℎ𝑟

𝐿𝑞 0.3218
𝑊𝑞 = = = 𝟎. 𝟎𝟖𝟗𝟑 𝒉𝒓 = 𝟓. 𝟑𝟓𝟖 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 3.604

University of the Philippines


QUEUING MODELS
M/M/s/GD/K/∞

University of the Philippines


QUEUING MODELS
M/M/1/GD/N/N
Nλ (N-1)λ (N-2)λ 2λ λ

0 1 2 . . . N-1 N

μ μ μ μ μ

𝑛 −1
𝑁 𝑁! 𝜆 𝜇
𝑃0 = ෍ 𝐿=𝑁− 1 − 𝑃0
𝑛=0 𝑁−𝑛 ! 𝜇 𝜆

𝜇+𝜆
For n > N, Pn = 0. 𝐿𝑞 = 𝑁 − 1 − 𝑃0
𝜆
For n ≤ N:
𝑛
𝑁! 𝜆 𝜆𝑎𝑣𝑒 = 𝜆ҧ = 𝜆(𝑁 − 𝐿൯
𝑃𝑛 = 𝑃0
𝑁−𝑛 ! 𝜇

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
Nλ (N-1)λ (N-s+1)λ (N-s)λ 2λ λ

0 1 . . . s . . . N-1 N

μ 2μ sμ sμ sμ sμ

𝑛 𝑛 −1
𝑠−1 𝜆 𝑁 𝐶𝑛𝑁 𝑛! 𝜆
𝑃0 = ෍ 𝐶𝑛𝑁 + ෍
𝑛=0 𝜇 𝑛=𝑠 𝑠! 𝑠 𝑛−𝑠 𝜇
𝑁
For n > N, Pn = 0.
𝐿𝑞 = ෍ ൫𝑛 − 𝑠)𝑃𝑛
For n ≤ N: 𝑛=𝑠
𝑛 𝑠−1 𝑠−1
𝜆
𝐶𝑛𝑁 𝑃0 , 𝑛≤ 𝑠 𝐿 = 𝐿𝑞 + ෍ 𝑛𝑃𝑛 + 𝑠 1 − ෍ 𝑃𝑛
𝜇 𝑛=0 𝑛=0
𝑃𝑛 = .
𝑛
𝐶𝑛𝑁 𝑛! 𝜆 𝜆𝑎𝑣𝑒 = 𝜆ҧ = 𝜆(𝑁 − 𝐿൯
𝑃0 , 𝑛 ≥𝑠
𝑠! 𝑠 𝑛−𝑠 𝜇

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
A printing business has five printing machines used for high-volume orders.
All throughout the day, these machines are running, except for a few times
when they are required to be attended by a printing employee to set
machine parameters. In some instances, the machines may wait for an
employee to be available since the employees may be attending other
machines for setup. The business employs two printing employees. Each
employee can setup a machine at an exponential time with mean of 20
mins. After setup, each machine runs for an exponential time with mean 2
hrs before requiring another setup.
a. What is the proportion of time that the both employees are idle as all
machines are working?
b. On the average, how long does a machine queue before being attended
by an employee for setup?
c. A cost of PhP 1,000 per hour is incurred if a machine is not running due
to lost machine productivity, find the total expected cost of waiting in an
hour considering all the machines.
University of the Philippines
QUEUING MODELS
M/M/s/GD/N/N

2.5/hr 2.0/hr 1.5/hr 1.0/hr 0.5/hr

0 1 2 3 4 5

3/hr 6/hr 6/hr 6/hr 6/hr

M/M/2/FCFS/5/5 with λ = 0.5/hr and µ = 3/hr

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
a. What is the proportion of time that the both employees are idle as all
machines are working?
𝑛 𝑛 −1
𝑠−1 𝜆 𝑁 𝐶𝑛𝑁 𝑛! 𝜆
𝑃0 = ෍ 𝐶𝑛𝑁 + ෍
𝑛=0 𝜇 𝑛=𝑠 𝑠! 𝑠 𝑛−𝑠 𝜇

𝑛 𝑛 −1
1 0.5 5 𝐶𝑛5 𝑛! 0.5
𝑃0 = ෍ 𝐶𝑛5 + ෍ = 𝟎. 𝟒𝟓𝟔
𝑛=0 3 𝑛=2 2! 2𝑛−2 3

b. On the average, how long does a machine queue before being attended
by an employee for setup?
𝑛 1
𝜆 0.5
𝑃1 = 𝐶𝑛𝑁 𝑃0 = 𝐶15 0.456 = 0.3800
𝜇 3
𝑛 2
𝜆 0.5
𝑃2 = 𝐶𝑛𝑁 𝑃0 = 𝐶25 0.456 = 0.1267
𝜇 3

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
b. On the average, how long does a machine queue before being attended
by an employee for setup?

𝑛 𝑛
𝐶𝑛𝑁 𝑛! 𝜆 𝐶35 3! 0.5
𝑃3 = 𝑃0 = 0.456 = 0.0317
𝑠! 𝑠 𝑛−𝑠 𝜇 2! 23−2 3

𝑛 𝑛
𝐶𝑛𝑁 𝑛! 𝜆 𝐶45 4! 0.5
𝑃4 = 𝑃0 = 0.456 = 0.0053
𝑠! 𝑠 𝑛−𝑠 𝜇 2! 24−2 3

𝑛 𝑛
𝐶𝑛𝑁 𝑛! 𝜆 𝐶55 5! 0.5
𝑃5 = 𝑃0 = 0.456 = 0.0004
𝑠! 𝑠 𝑛−𝑠 𝜇 2! 25−2 3

𝑁
𝐿𝑞 = ෍ ൫𝑛 − 𝑠)𝑃𝑛 = 0𝑃2 + 1𝑃3 + 2𝑃4 + 3𝑃5 = 0.0435 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠
𝑛=𝑠

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
b. On the average, how long does a machine queue before being attended
by an employee for setup?

𝑠−1 𝑠−1 1 1
𝐿 = 𝐿𝑞 + ෍ 𝑛𝑃𝑛 + 𝑠 1 − ෍ 𝑃𝑛 = 0.0435 + ෍ 𝑛𝑃𝑛 + 2 1 − ෍ 𝑃𝑛
𝑛=0 𝑛=0 𝑛=0 𝑛=0

𝐿 = 0.0435 + 0 0.3800 + 1 0.1267 + 2 1 − 0.3800 − 0.1267 = 0.7516 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠

𝜆𝑎𝑣𝑒 = 𝜆(N − 𝐿) = 0.5 5 − 0.7516 = 2.1242 𝑚𝑎𝑐ℎ𝑖𝑛𝑒𝑠/ℎ𝑟

𝐿𝑞 0.0435
𝑊𝑞 = = = 𝟎. 𝟎𝟐𝟎𝟓 𝒉𝒓 = 𝟏. 𝟐𝟐𝟗𝟖 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 2.1242

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
c. A cost of PhP 1,000 per hour is incurred if a machine is not running due
to lost machine productivity, find the total expected cost of waiting in an
hour considering all the machines.

𝐻𝑜𝑢𝑟𝑙𝑦 𝑊𝑎𝑖𝑡𝑖𝑛𝑔 𝐶𝑜𝑠𝑡 = 1000𝑊𝜆𝑎𝑣𝑒 = 1000𝐿 = 1000 0.7516 = 𝑷𝒉𝑷 𝟕𝟓𝟏. 𝟔𝟏

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
A hospital wing has a supply station where nurses retrieve items important
to their patients. The station is manned by a single supply officer. The wing
has 6 nurses. On the average, each nurse will use be back to the station
1.25 hours after his or her last visit. Assume exponential time. The supply
officer takes an exponential time with mean of 6 minutes to service the
requirement of a nurse.
a. Find the probability that there are exactly 2 nurses, including the one
being served, in the supply station.
b. Find the proportion of time the supply officer is busy.
c. How long, on the average, does a nurse stay in the supply station before
her transaction is completed.

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N

4.8/hr 4.0/hr 3.2/hr 2.4/hr 1.6/hr 0.8/hr

0 1 2 3 4 5 6

10/hr 10/hr 10/hr 10/hr 10/hr 10/hr

M/M/1/FCFS/6/6 with λ = 0.8/hr and µ = 10/hr

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N

−1
4.8 4.8(4.0) 4.8(4.0)(3.2)(2.4)(1.6)(0.8)
𝑃0 = 1 + + + ⋯+ = 0.5712
10 10(10) 10(10)(10)(10)(10)(10)

4.8 4.8 2.4 2.4


𝑃1 = 𝑃 = (0.5712) = 0.2742 𝑃4 = 𝑃3 = (0.0351) = 0.0084
10 0 10 10 10

4.0 4.0 1.6 1.6


𝑃2 = 𝑃 = (0.2742) = 0.1097 𝑃5 = 𝑃 = (0.0084) = 0.0013
10 1 10 10 4 10

3.2 3.2 0.8 0.8


𝑃3 = 𝑃2 = (0.1097) = 0.0351 𝑃6 = 𝑃5 = (0.0013) = 0.0001
10 10 10 10

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
a. Find the probability that there are exactly 2 nurses, including the one
being served, in the supply station.

𝑃2 = 𝟎. 𝟏𝟎𝟗𝟕

b. Find the proportion of time the supply officer is busy.


0 1
% 𝑈𝑡𝑖𝑙 = 𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 𝑃5 + 𝑃6 = 1 − 𝑃0
1 1
% 𝑈𝑡𝑖𝑙 = 1 − 0.5712 = 𝟒𝟐. 𝟖𝟖%

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N
c. How long, on the average, does a nurse stay in the supply station before
her transaction is completed?
N
𝐿= ෍ 𝑛𝑃𝑛 = 0 0.5712 + 1 0.2742 + … + 6 0.0001 = 0.6399 𝑛𝑢𝑟𝑠𝑒
𝑛=0

K
𝜆𝑎𝑣𝑒 = ෍ 𝜆𝑛 𝑃𝑛 = 4.8𝑃0 + 4.0𝑃1 + 3.2𝑃2 + 2.4𝑃3 + 1.6𝑃4 + 0.8𝑃5 + 0𝑃6
𝑛=0

𝜆𝑎𝑣𝑒 = 4.8 0.05712 + 4.0 0.2742 + ⋯ + 0 0.0001 = 4.2881 𝑛𝑢𝑟𝑠𝑒𝑠/ℎ𝑟

𝐿 0.6399
𝑊= = = 𝟎. 𝟏𝟒𝟗𝟐 𝒉𝒓 = 𝟖. 𝟗𝟓𝟑𝟏 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 4.2881

University of the Philippines


QUEUING MODELS
M/M/s/GD/N/N

University of the Philippines


QUEUING MODELS
M/G/1
Pollaczek-Khinchin Equation, where variance of service time is given as σ2.

(𝜆𝜎)2 + 𝜆/𝜇 2
𝐿𝑞 =
𝜆
2 1− 𝜇

University of the Philippines


QUEUING MODELS
M/G/1
Customers arrive randomly to a bank at a rate of 1 customer every 3
minutes. To service customers, the bank is considering two alternatives: (a)
a human teller with random service time of mean 2 minutes, and (b) ATM
with a normal service time with mean 2 minutes and standard deviation of
0.3 mins. Random times are modelled using the exponential distribution.
Which one should be preferred in order to minimize customer queuing time?

University of the Philippines


QUEUING MODELS
M/G/1
a. human teller with random service time of mean 2 minutes
M/M/1 with λ = 20/hr and µ = 30/hr

𝜆 20
𝑊𝑞 = = = 𝟎. 𝟎𝟔𝟕 𝒉𝒓 = 𝟒 𝒎𝒊𝒏𝒔
𝜇(𝜇 − 𝜆) 30(30 − 20)

b. ATM with a normal service time with mean 2 minutes and standard
deviation of 0.3 mins.
M/G/1 with λ = 20/hr, µ = 30/hr, and σ = 0.3/60 hr = 0.005 hr

(𝜆𝜎)2 + 𝜆/𝜇 2 (20 ∗ 0.005)2 + 20/30 2


𝐿𝑞 = = = 0.682 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟
2(1 − 𝜆/𝜇 ) 2(1 − 20/30 )
𝐿𝑞 0.682
𝑊𝑞 = = = 𝟎. 𝟎𝟑𝟒 𝒉𝒓 = 𝟐. 𝟎𝟒𝟓 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 20

University of the Philippines


QUEUING MODELS
M/G/1

University of the Philippines


QUEUING MODELS
M/G/1
Compare the performance measures – L, Lq, W, Wq – of the following
queueing systems: (A) M/M/1, (B) M/D/1, and (C) M/G/1 (where the
service time is uniformly distributed from 2 to 4 minutes). Assume similar
average service rate of 20/hr, and similar arrival rate of 10/hr. Include a 4th
case (D) where the server performs two tasks on a single customer. The
service time for each task is exponentially distributed with mean of 1.5
minutes for this last case.

University of the Philippines


QUEUING MODELS
M/G/1
Computations of standard deviation σ:
a. exponential with rate λexpo = 20/hr

1 1
𝜎= = = 𝟎. 𝟎𝟓𝟎𝟎 𝒉𝒓
𝜆2𝑒𝑥𝑝𝑜 202

b. Constant (deterministic)
𝜎 = 𝟎 𝒉𝒓

c. continuous uniform with minimum a = 2/60 hr and maximum b =


4/60 hr.

𝑏−𝑎 2 (4/60) − (2/60) 2


𝜎= = = 𝟎. 𝟎𝟏𝟔𝟕 𝒉𝒓
12 12

University of the Philippines


QUEUING MODELS
M/G/1
Computations of standard deviation σ:
d. exponential with λexpo = 40/hr + exponential with λexpo = 40/hr =
erlang with shape parameter k = 2 and λexpo = 40/hr

𝑘 2
𝜎= = = 𝟎. 𝟎𝟑𝟓𝟒 𝒉𝒓
𝜆2𝑒𝑥𝑝𝑜 402

University of the Philippines


QUEUING MODELS
M/G/1
Sample computations for case (D)

(𝜆𝜎)2 + 𝜆/𝜇 2 (10 ∗ 0.0354)2 + 10/20 2


𝐿𝑞 = = = 𝟎. 𝟑𝟕𝟓 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓
2(1 − 𝜆/𝜇 ) 2(1 − 10/20 )
𝐿𝑞 0.375
𝑊𝑞 = = = 𝟎. 𝟎𝟑𝟕𝟓 𝒉𝒓
𝜆𝑎𝑣𝑒 10
1 1
𝑊 = 𝑊𝑞 + = 0.0375 + = 𝟎. 𝟎𝟖𝟕𝟓 𝒉𝒓
𝜇 20
𝐿 = 𝜆𝑎𝑣𝑒 𝑊 = 10 0.0875 = 𝟎. 𝟖𝟕𝟓 𝒉𝒓

University of the Philippines


QUEUING MODELS
M/G/1

Case A B C D
Kendall-Lee Notation M/M/1 M/D/1 M/G/1 M/E2/1
Service Time Distribution exponential constant uniform erlang
Arrival Rate, λ 10/hr 10/hr 10/hr 10/hr
Service Rate, µ 20/hr 20/hr 20/hr 20/hr
Service Time Std Dev, σ 0.0500 hr 0.0000 hr 0.0167 hr 0.0354 hr
Lq (customers) 0.500 0.250 0.278 0.375
L (customers) 1.000 0.750 0.778 0.875
Wq (hrs) 0.050 0.025 0.028 0.038
W (hrs) 0.100 0.075 0.078 0.088

University of the Philippines


QUEUING MODELS
M/G/1

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers
A car wash shop has 3 employees. Each employee can wash a car in an
exponential time with mean of 45 mins. However, when there are only two
cars in the shop, one of the employees will help one of the other two,
reducing the average time from 45 mins to 30 mins. Meanwhile, the
customer being served by one employee will still have a service time
average of 45 mins. Note than when a new vehicle arrives, one of the
cooperating employee will leave its partner and will now assist the newly
arrived customer. In that case, service time average goes back to 45 mins
per customer.
If there is a single customer in the shop, only two employees will wash the
vehicle, with service time average of 30 mins. The third employee will be
idle during this time.
Cars arrive to this system at a Poisson rate of 5 customers per hour.
However, customers balk when two cars are already waiting in the shop
(excluding those being washed).

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers
a. Find the expected revenue per hour of the shop if each vehicle washed
generates PhP 200.
b. Find the average number of vehicles present in the shop.
c. On the average, how long does a vehicle stay in the car wash?

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers

5/hr 5/hr 5/hr 5/hr 5/hr

0 1 2 3 4 5

2/hr (1.33+2)/hr 3(1.33)/hr 3(1.33)/hr 3(1.33)/hr

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers

−1
5 5(5) 5(5)(5) 5(5)(5)(5)(5)
𝑃0 = 1 + + + + ⋯+ = 0.0398
2 2(3.33) 2(3.33)(4) 2(3.33)(4)(4)(4)

5 5 5 5
𝑃1 = 𝑃0 = (0.0398) = 0.0994 𝑃4 = 𝑃3 = (0.1866) = 0.2333
2 2 4 4
5 5 5 5
𝑃2 = 𝑃 = (0.0994) = 0.1493 𝑃5 = 𝑃4 = (0.2333) = 0.2916
3.33 1 3.33 4 4

5 5
𝑃3 = 𝑃2 = (0.1493) = 0.1866
4 4

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers
a. Find the expected revenue per hour of the shop if each vehicle washed
generates PhP 200.
5
𝜆𝑎𝑣𝑒 = ෍ 𝜆𝑛 𝑃𝑛 = 5 𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 + 𝑃4 + 0𝑃5 = 5 1 − 𝑃5
𝑛=0

𝜆𝑎𝑣𝑒 = 5 1 − 0.2916 = 3.542 𝑣𝑒ℎ𝑖𝑐𝑙𝑒𝑠/ℎ𝑟

𝐻𝑜𝑢𝑟𝑙𝑦 𝑅𝑒𝑣𝑒𝑛𝑢𝑒 = 200𝜆𝑎𝑣𝑒 = 200 3.542 = 𝑷𝒉𝑷 𝟕𝟎𝟖. 𝟒𝟎

b. Find the average number of vehicles present in the shop.


5
𝐿= ෍ 𝑛𝑃𝑛 = 0 0.0398 + 1 0.0994 + … + 5 0.2916 = 𝟑. 𝟑𝟒𝟗 𝒗𝒆𝒉𝒊𝒄𝒍𝒆𝒔
𝑛=0

University of the Philippines


QUEUING MODELS
Other Models: Cooperating Servers
c. On the average, how long does a vehicle stay in the car wash?

𝐿 3.349
𝑊= = = 𝟎. 𝟗𝟒𝟔 𝒉𝒓 = 𝟓𝟔. 𝟕𝟑𝟏 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 3.542

University of the Philippines


QUEUING MODELS
Other Models: Balking Customers
A newly-opened tea shop is very popular to mall-goers. The Poisson arrivals
of customers to the said shop has rate of λ = 26 per hour. The shop has a
single employee. The mean service time is 2.5 mins. Assume that the
service time is exponentially distributed.
Though popular, some clients may not go inside when there is a relatively
long queue. They will instead go to other tea shops in the mall. Specifically,
an arriving customer will balk with probability 0.30 if there are 3 or 4
customers inside (including the one being served). This probability of
balking goes up to 0.75 if there are 5 or 6 customers inside. No customer
enters the queue when there are 7 customers.
a. What is the probability that the employee is idle?
b. Find the average waiting time before a customer is entertained by the
employee.
c. How many customers are lost per hour due to balking?

University of the Philippines


QUEUING MODELS
Other Models: Balking Customers

26/hr 26/hr 26/hr 18.2/hr 18.2/hr 6.5/hr 6.5/hr

0 1 2 3 4 5 6 7

24/hr 24/hr 24/hr 24/hr 24/hr 24/hr 24/hr

University of the Philippines


QUEUING MODELS
Other Models: Balking Customers

𝑃0 = 0.1544 𝑃4 = 0.1489

𝑃1 = 0.1673 𝑃5 = 0.1129

𝑃2 = 0.1812 𝑃6 = 0.0306

𝑃3 = 0.1963 𝑃7 = 0.0083

University of the Philippines


QUEUING MODELS
Other Models: Balking Customers
a. What is the probability that the employee is idle?

𝑃0 = 𝟎. 𝟏𝟓𝟒𝟒

b. Find the average waiting time before a customer is entertained by the


employee.
7
𝐿𝑞 = ෍ ൫𝑛 − 𝑠)𝑃𝑛 = 0𝑃1 + 1𝑃2 + 2𝑃3 + ⋯ + 6𝑃7
𝑛=𝑠

𝐿𝑞 = 0 0.1673 + 1 0.1812 + 2 0.1963 + ⋯ + 6 0.0083 = 1.675 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠


7
𝜆𝑎𝑣𝑒 = ෍ 𝜆𝑛 𝑃𝑛 = 26𝑃0 + 26𝑃1 + 26𝑃2 + 18.2𝑃3 + 18.2𝑃4 + 6.5𝑃5 + 6.5𝑃6 + 0𝑃7
𝑛=0

𝜆𝑎𝑣𝑒 = 26 0.1544 + 26 0.1673 + ⋯ + 0 0.0083 = 20.294 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠/ℎ𝑟


𝐿𝑞 1.675
𝑊𝑞 = = = 𝟎. 𝟎𝟖𝟑 𝒉𝒓 = 𝟒. 𝟗𝟓𝟐 𝒎𝒊𝒏𝒔
𝜆𝑎𝑣𝑒 20.294
University of the Philippines
QUEUING MODELS
Other Models: Balking Customers
c. How many customers are lost per hour due to balking?
𝜆𝑏𝑎𝑙𝑘 = 𝜆 − 𝜆𝑎𝑣𝑒 = 26 − 20.294 = 𝟓. 𝟕𝟎𝟔 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔 𝒑𝒆𝒓 𝒉𝒐𝒖𝒓

University of the Philippines


QUEUING MODELS
References
▪ Hillier F. and G. Lieberman. Introduction to Operations Research, 9th ed.
New York: McGraw-Hill Higher Education, 2010.
▪ Taha, Hamdy. Operations Research: An Introduction, 8th ed. New Jersey:
Pearson Education Ltd, 2007.
▪ Wayne, Winston. Operations Research: Applications and Algorithms, 4th
ed. Belmont, CA: Thomson Brooks / Cole, 2004.

University of the Philippines

You might also like