You are on page 1of 67

Decision-making for

industrial management
H0T99a

Johan W. Joubert
Course overview: Stochastic decision models
▶ Markov Chains.
▶ Dynamic programming.
▶ Queuing theory.
▶ Simulation.
With one exercise session on each topic.

The emphasis is equally on formulation and solving.

189 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Queuing theory

Customer
population
Service system

Arrival Priority Served


system rule customers
Service
facilities
Single
arrivals
Waiting line Series
Parallel
No bulk
(queue)
arrivals
but customers
(In)finite source can balk

190 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Queuing theory
The type of questions we aim to answer:
▶ What fraction of the time is each server idle?
▶ What is the expected number of customers present in the queue?
▶ What is the expected time that a customer spends in the queue?
▶ If a bank manager wants to ensure that only 1% of all customers will
have to wait more than 5 minutes for a teller, how many tellers should be
employed?

191 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Arrival processes

T1 = 8 − 3 = 5 T2 = 15 − 8 = 7

time
t1 = 3 t2 = 8 t3 = 15

Ti ≜ interarrival times that are independent, continuous random


variables described by A, which has a density function of a(t).
The arrival times are assumed to be stationary.

For small ∆t, P (t ≤ A ≤ t + ∆t) ≈ ∆t × a(t), allowing us


Z c Z ∞
P (A ≤ c) = a(t)dt and P (A > c) = a(t)dt
0 c

192 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Exponential distribution
1
We define λ to be the mean interarrival time.

1 Z∞
= ta(t)dt
λ 0

where λ is defined as the arrival rate.


For reasons of computational tractability (and being realistic), the most
common choice for A is the exponential distribution. With a single
parameter λ and a density a(t) = λe−λt , we can express
1 1
E(A) = and var A =
λ λ2

193 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


No-memory property

Lemma (1)
If A is exponentially distributed, then for all nonnegative values of t and h,

P (A > t + h|A ≥ t) = P (A > h)

Interarrival times are important and they are independent of what has
happened before.

P (A > 9|A ≥ 5) = P (A > 7|A ≥ 3) = P (A > 4|A ≥ 0) = e−4λ

194 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Relationship between distributions
Theorem 1 and Theorem 2 (under given assumptions) boils down to. . .

Consequence
If the arrival rate is stationary, if bulk arrivals cannot occur, and if past
arrivals do not affect future arrivals, the interarrival times will follow an
exponential distribution with parameter λ, and the number of arrivals in any
interval of length t is Poisson with parameter λt.

195 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Service process
1
Similar to the arrival process, we define µ to be the mean service time.

1 Z∞
= ts(t)dt
µ 0

where µ is defined as the service rate.


For reasons of computational tractability, and to benefit from the no-memory
property, our choice for S is the exponential distribution. With a single
parameter µ and a density s(t) = µe−µt

196 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Erlang distribution
Unfortunately, actual service (or arrival) times may not be consistent with the
no-memory property. For this reason, we often assume that s(t) is an Erlang
distribution with shape parameter k and rate parameter kµ.
This yields a mean service time of µ1 .
A customer’s service time can be considered a passage of k phases of
1
service, with each phase having the no-memory property and a mean of kµ .

Service
starts
Phase 1 Phase 2 ··· Phase k
Service
ends

Exponential Exponential Exponential


with mean with mean with mean
1 1 1
kµ kµ kµ

197 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


The influence of variance
The time between consecutive buses is exponentially distributed with a
mean of λ1 =60 minutes.

30 90 30 90
1
8 (15) + 3
8 (45) + 1
8 (15) + 3
8 (45) = 37.5 minutes

 
1 var A
Average waiting time = 2 E(A) + E(A)

198 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


The Kendall-Lee notation for queuing systems

Arrival process: Number of Maximum


parallel allowable
M: Exponential number of
D: Deterministic
services
customers
Ek : Erlang (shape parameter k )
GI: General distribution 1 / 2 / 3 / 4 / 5 / 6
Service time: Population size
M: Exponential Queue discipline
D: Deterministic
Ek : Erlang (shape parameter k ) FCFS: First come, first served
G: General distribution LCFS: Last come, first served
SIRO: Service in random order
GD: General discipline
199 Decision-making for Industrial Management: Chapter 20 (Queuing theory)
20.3 Birth-death processes
We define the number of people present in any queuing system at time t as
the state of the system at time t.
Pij (t) ≜ the probability that j people will be in the system at time t given that
there were i people at time 0.
lim Pij (t) = πj (Markov chain steady state, or equilibrium probability)
t→∞

“How large must t be before the steady state is reached?”


The behaviour of Pij (t) before this critical t is called the transient behaviour
of the queuing system.

200 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Steady-state
When analysing queuing systems, we are interested in the steady-state
situation.
Number in
the system

steady-state

t
arrivals
(births)
departures
(deaths)

201 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Laws of motion
Law 1
With probability λj ∆t + o(∆t), a birth occurs between time t and t + ∆t, increasing the
system state from j to j + 1. The variable λj is the birth rate in state j .

Law 2
With probability µj ∆t + o(∆t), a death occurs between time t and t + ∆t, decreasing the
system state from j to j − 1. The variable µj is the death rate in state j .

Law 3
Births and deaths are independent of each other.

Most queuing systems with exponential arrival times and exponential service times may be
modelled as birth-death processes.
202 Decision-making for Industrial Management: Chapter 20 (Queuing theory)
Birth-death processes (steady state probabilities)
Winston (2004), Section 20.3 goes into detail about relating Pij (t + ∆t) to
Pij (t). From the conservation of flow constraints, we can demonstrate

π0 λ0 π1 λ1 π2 λ2 π3 λ3 π4 λ4

0 1 2 3 4 ···
µ1 µ2 µ3 µ4 µ5

π1 µ1 = π0 λ0 j=0
πj−1 λj−1 + πj+1 µj+1 = πj (λj + µj ) ∀j > 0

203 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Birth-death processes (steady state probabilities)

π j = π 0 cj
λ0 λ1 · · · λj−1
where cj =
µ1 µ2 · · · µj

X
given that πj = 1
j=0
 

X
π0 1 + cj  = 1
j=1


and we can solve for π0 if cj is finite.
P
j=1

204 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.4 M/M/1 (or, more complete, M/M/1/GD/∞/∞)
We can model the queuing system using a birth-death process with

λj = λ ∀j ∈ {0, 1, . . .}
µ0 = 0
µj = µ ∀j ∈ {1, 2, . . .}

From the previous slide on steady-state probabilities, we then find


λπ0 λ 2 π0 λj π 0
π1 = µ , π2 = µ2 , . . . , π1 = µj

We refer to µλ as the traffic intensity, ρ, or the utilisation and assume


0 ≤ ρ < 1 to ensure a steady-state exists.

205 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/1 (continued)

πj = 1, we can evaluate the steady-state probabilities in terms of
P
Since
j=1
the traffic intensity
 
π 0 1 + ρ + ρ2 + · · · = 1
π0
∴ =1
1−ρ
∴ π0 = 1 − ρ
and, consequently πj = ρj (1 − ρ)

206 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


The number of customers
We denote with L the average number of customers in the queuing system.

X
L= jπj
j=0

jρj
X
= (1 − ρ)
j=0
ρ ρ λ
= (1 − ρ) 2
= =
(1 − ρ) 1−ρ µ−λ

207 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/1 - The number of customers (continued)
We denote with Lq the expected number of people waiting in the queue.

X ∞
X ∞
X
Lq = (j − 1)πj = jπj − πj = L − (1 − π0 ) = L − ρ
j=1 j=1 j=1
ρ2 λ2
= =
1−ρ µ(µ − λ)
Similarly, denote with Ls the number of customers in service.
!
ρ ρ
Ls = L − Lq = − −ρ
1−ρ 1−ρ

208 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Little’s queuing formula
If we denote with W the expected time a customer spends in the system,
including the queuing time, Wq , and the service time, Ws , we can use the
powerful Little’s queuing formula.
Theorem
For any queuing system in which a steady-state distribution exist, the
following relations hold:

L = λW
Lq = λWq
Ls = λWs

where λ is the average number of arrivals entering the system per time unit.
209 Decision-making for Industrial Management: Chapter 20 (Queuing theory)
An example
From Winston (2004), Section 20.3, Problem 4.
A fast-food restaurant has one drive-through window. An average of 40
customers per hour arrive at the window. It takes an average of 1 minute to
serve a customer. Assume that the interarrival and service times are
exponential.
a) On average, how many customers are waiting in line?
b) On average, how long does a customer spend at the restaurant (from
arrival to service completion?)
c) What fraction of the time are more than 3 cars waiting for service (this
includes the car (if any) at the window?

210 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.5 M/M/1/GD/c/∞ queuing system
Here we have a total capacity of c customers. When modelling it as a birth-death process,
we have
λj =λ ∀j ∈ {0, 1, . . . , c − 1}
λc =0 (cannot enter the queue)
µ0 =0 (nobody in the system)
µj =µ ∀j ∈ {1, 2, . . . , c}

For c = 4, the graphical representation would be


π0 λ π1 λ π2 λ π3 λ π4
0 1 2 3 4
µ µ µ µ

π1Management:
211 Decision-making for Industrial µ1 = π0 λChapter
0 20 (Queuing theory) j=0
M/M/1/GD/c/∞ (continued)
λ
The steady-state probabilities for M/M/1/GD/c/∞ systems, when ρ = µ and λ ̸= µ:

1−ρ
π0 =
1 − ρc+1
πj = ρj π0 ∀j ∈ {1, 2, . . . , c}
πj = 0 ∀j > c
c
ρ 1 − (c + 1)ρc + cρc+1

X
L= jπj =
j=0
(1 − ρc+1 )(1 − ρ)

When λ = µ, then ρ = 1, resulting in π0 = π1 = · · · = πc = 1


c+1 and L = 2c .

212 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/1/GD/c/∞ (continued)

Ls = 0π0 + 1(π1 + π2 + · · · + πc ) = 1 − π0
Lq = L − Ls

Because not all customers can enter the system, W and Wq is trickier to calculate, because
λπc of the arrivals find the system full. Consequently, λ − λπc = λ(1 − πc ) can be serviced.

L
W =
λ(1 − πc )

and
Lq
Wq =
λ(1 − πc )

213 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/1/GD/c/∞ example
From Winston (2004), Section 20.5, Example 8
A one-man barber shop has a total of 10 seats. Interarrival times are exponentially
distributed, and an average of 20 prospective customers arrive each hour at the shop.
Those customers who find the shop full do not enter. The barber takes an average of 12
minutes to cut each customer’s hair. Haircut times are exponentially distributed.
a) On average, how many haircuts per hour will the barber complete?
b) On average, how much time will be spent in the shop by a customer who enters?

214 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.6 M/M/s/GD/∞/∞ queuing system
Here we have s service points. When modelling it as a birth-death process,
we have
λj = λ ∀j ∈ {0, 1, 2, . . .}
µj = jµ ∀j ∈ {0, 1, . . . , s}
µj = sµ ∀j ∈ {s, s + 1, s + 2, . . .}

The graphical representation would be


π0 λ π1 λ π2 πs λ πs+1 λ

0 1 2 ··· s s+1 ···


µ 2µ sµ sµ

219 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/s/GD/∞/∞ (continued)
λ
Here we set the utilisation as ρ = sµ and when ρ < 1 we can calculate steady-state
probabilities.

1
π0 = s−1
P (sρ)i (sρ)s
i! + s!(1−ρ)
i=0
(sp)j π0
πj = ∀j ∈ {1, 2, . . . , s}
j!
(sp)j π0
πj = ∀j ∈ {s, s + 1, s + 2, . . .}
s!sj−s
(sρ)s π0
and P (j ≥ s) = (the probability all servers are busy)
s!(1 − ρ)

220 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/s/GD/∞/∞ calculating P (j ≥ s)
λ
ρ = sµ s =2 s =3 s =4 s =5 s =6 s =7 df <- data.frame(rho=NA, s2=NA, s3=NA, s4=NA,
s5=NA, s6=NA, s7=NA)
0.05 0.00 0.00 0.00 0.00 0.00 0.00 for(rho in seq(0.05,0.95,0.05)){
0.10 0.02 0.00 0.00 0.00 0.00 0.00 vec <- rho
0.15 0.04 0.01 0.00 0.00 0.00 0.00 for(s in 2:7){
0.20 0.07 0.02 0.01 0.00 0.00 0.00 # Calculate pi-zero
0.25 0.10 0.04 0.02 0.01 0.00 0.00 denom <- 0
0.30 0.14 0.07 0.04 0.02 0.01 0.01 for(i in 0:(s-1)){
0.35 0.18 0.10 0.06 0.04 0.02 0.01 denom <- denom + ((s*rho)^i) / factorial(i)
0.40 0.23 0.14 0.09 0.06 0.04 0.03 }
0.45 0.28 0.19 0.13 0.09 0.07 0.05 denom <- denom + ((s*rho)^s)/(factorial(s)*(1-rho))
0.50 0.33 0.24 0.17 0.13 0.10 0.08 pi.zero <- 1 / denom
0.55 0.39 0.29 0.23 0.18 0.14 0.12
0.60 0.45 0.35 0.29 0.24 0.20 0.17 # Calculate P(j >= s)
0.65 0.51 0.42 0.35 0.30 0.26 0.23 p <- ((s*rho)^s)*pi.zero / (factorial(s)*(1-rho))
0.70 0.58 0.49 0.43 0.38 0.34 0.30 vec <- c(vec, p)
0.75 0.64 0.57 0.51 0.46 0.42 0.39 }
0.80 0.71 0.65 0.60 0.55 0.52 0.49 df <- rbind(df, vec)
0.85 0.78 0.73 0.69 0.65 0.62 0.60 }
0.90 0.85 0.82 0.79 0.76 0.74 0.72 df <- df[-1, ]
0.95 0.93 0.91 0.89 0.88 0.87 0.85 print(round(df, digits=2), row.names=FALSE)

221 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/s/GD/∞/∞ (continued)
It can be shown that
P (j≥s)ρ Lq P (j≥s)
Lq = 1−ρ and Wq = λ = sµ−λ

and from this follows


λ
L = Lq +
µ
L Lq 1 1
and W = = + = Wq +
λ λ µ µ
P (j ≥ s) 1
= +
sµ − λ µ

When we need to determine L, Lq , W , or Wq , we begin by looking up P (j ≥ s).

222 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/s/GD/∞/∞ example
From Winston (2004), Section 20.6, Example 9
Consider a bank with two tellers. An average of 80 customers per hour arrive at the bank
and wait in a single line for an idle teller. The average time it takes to serve a customer is
1.2 minutes. Assume that interarrival times and service times are exponential.
a) Determine the expected number of customers present in the bank.
b) Determine the expected length of time a customer spends in the bank.
c) Determine the fraction of time a particular teller is idle.

223 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.7 M/G/∞/GD/∞/∞ and GI/G/∞/GD/∞/∞ models
Infinite-server (or self-service) systems.
Examples of queuing systems where customers never have to wait:
▶ Firms entering (and leaving) the industry.
▶ Students registering for a program.
▶ Cloud computing resource allocation (emulating infinite servers).
▶ Internet servers.
▶ Network and telecommunication packet processing.
▶ Transportation networks.
▶ Order-fulfilment in e-commerce.

224 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Infinite-server systems
Let L again denote the expected number of customers in the system (in the
steady state). The expected time spent in the system, again denoted by W ,
is, by definition, W = µ1 .
From Little’s Law
λ
L = λW = (no assumption of exponentiality)
µ
λ
The steady-state probability will follow a Poisson distribution with mean µ
 j λ
λ −µ
µ e
πj =
j!
225 Decision-making for Industrial Management: Chapter 20 (Queuing theory)
M/G/∞/GD/∞/∞ example
From Winston (2004), Section 20.7, Problem 2
The State U doctoral program in business admits an average of 25 doctoral
students each year. If a doctoral student spends an average of 4 years in
residence at State U, how many doctoral students would one expect to find
there?

226 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.8 M/G/1/GD/∞/∞
A single-server system with an exponential arrival rate (λ) but the service rate need not be
exponential.

1
E(S) =
µ
var(S) = σ 2

This is not a birth-death process (no-memory property does not hold)


Instead, we model the system as a Markov chain.

227 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.8 M/G/1/GD/∞/∞ (continued)
λ
Pollaczek & Khinchin showed that for these systems, where ρ = µ

λ2 σ 2 + ρ2
Lq =
2(1 − ρ)
 
1 1
Since Ws = µ, Little’s Law implies Ls = λ µ = ρ. Since L = Lq + Ls ,

L = Lq + ρ

Finally, we have

Lq 1
Wq = and therefore also W = Wq + . The idle time fraction is π0 = 1 − ρ
λ µ

228 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/G/1/GD/∞/∞ example
From Winston (2004), Section 8.8, Problem 3.
An average of 40 cars per hour arrive to be painted at a single-server GM
painting facility. 95% of the cars require 1 minute to paint; 5% must be
painted twice and require 2.5 minutes to paint. Assume that interarrival
times are exponential.
a) On average, how long does a car wait before being painted?
b) If cars never had to be repainted, how would your answer in part (a)
change?

229 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.9 Finite source models
There are two situations where the assumption of state-independent arrival
rates may be invalid:
1 Customers do not want to wait in line: the longer the line, the higher the
likelihood of balking.
2 If arrivals are drawn from a small population.

One such a finite source model is a machine repair model.

230 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/R/GD/K/K model (or M/M/R/GD/∞/K)
Consider the following model where there are K = 5 vehicles that break
down at a rate of λ per time unit and R = 2 repair facilities that can each
repair them at a rate of µ per time unit.
We can model this as a birth-death process where the states are defined as
the number of broken vehicles in/awaiting repair.
π0 5λ π1 4λ π2 3λ π3 2λ π4 λ π5
0 1 2 3 4 5
µ 2µ 2µ 2µ 2µ

µj = jµ ∀j ∈ {0, 1, . . . , R}
µj = Rµ ∀j ∈ {R, R + 1, R + 2, . . .}
231 Decision-making for Industrial Management: Chapter 20 (Queuing theory)
M/M/R/GD/K/K (continued)
λ
Failure (or arrival) rate is (K − j)λ. With ρ = µ we can calculate the
steady-state probabilities (where ρ ≮ 1):

!
K j
πj = ρ π0 ∀j ∈ {0, 1, . . . , R}
j
 
K
j ρj j!π0
πj = ∀j ∈ {R + 1, R + 2, . . . , K}
R!Rj−R
 
K K!
Recall that j = j!(K−j)!

232 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/R/GD/K/K (continued)
The following quantities are interesting. The expected number of broken machines

K
X
L= jπj
j=0

and the expected number of broken machines awaiting repair

K
X
Lq = (j − R)πj
j=R

233 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/R/GD/K/K (continued)
Calculating the average failure rate (because the failure rate is now state-dependent)

K
X K
X
λ̄ = λj πj = λ(K − j)πj = λ(K − L)
j=0 j=0

allows us to calculate

L
W =
λ̄

and

Lq
Wq =
λ̄

234 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/M/R/GD/K/K (example)
A logistic delivery company has 5 vehicles. A vehicle breaks down and requires repair once
every 30 days. The company has two repair workers, each of whom takes an average of 3
days to repair a vehicle. Breakdown times and repair times are exponential.
a) Determine the average number of vehicles in working condition.
b) What is the average downtime for a vehicle requiring repair?
c) What is the fraction of time a particular repair worker is idle?

235 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.10 Exponential queues in series and open networks

Stage 1 Stage 2 Stage k

Ouput 1 = Ouput 2 =
Input rate λ Input 2 Input 3, etc.
.. .. ··· .. Output
. . .

s1 servers s2 servers sk servers


service rate µ1 service rate µ2 service rate µk

239 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Series queuing systems

Theorem 4 (Jackson)
If (1) interarrival times for a series queuing system are exponential with rate
λ, (2) service times for each stage i are exponential, and (3) each stage has
an infinite-capacity waiting room, then interarrival times for arrivals to each
stage of the queuing system are exponential with rate λ.

A key assumption is that between all stages there is an infinite holding area.
If it holds, then each stage j may be analysed independently as an
M/M/sj /GD/∞/∞ system.
See Section 20.10, Example 13

240 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Series queuing systems (example)
From Winston (2004), Section 20.10, Problem 2.
Consider an automobile assembly line in which each car undergoes two
types of service: painting, then engine installation. Each hour, an average of
22.4 unpainted chassis arrive at the assembly line. It takes an average of
2.4 minutes to paint a car and an average of 3.75 minutes to install an
engine. The assembly line has one painter and two engine installers.
Assume that interarrival times and service times are exponential.
a) On average, how many painted cars without completely installed
engines will be in the facility?
b) On average, how long will a painted car have to wait before installation
of its engine begins?

241 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Open queuing systems
Open queuing systems are a generalisation of queues in series.
Stage j
k
P
P (leaving) = 1 − pji
(exponential) i=1

rj arrival
leaving the system
rate λj

p1j λ1 .. pj1 λj
.
. .
. .
. .
pkj λk pjk λj
sj servers
service rate µj

k
X
λj = rj + pij λi ∀j ∈ {1, 2, . . . , k}
i=1

242 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Open queuing systems (continued)
If we assume that sj µj > λj for all stations
▶ a steady state exists; and
▶ station j can be treated as an M/M/sj /GD/∞/∞ system with
▶ arrival rate λj and service rate µj .
The numbers of customers present at each station are independent random
variables (but only under the assumption of exponential rates).
▶ To find L, add each station’s individual Ls.
▶ To find W = L
λ (Little’s law) using λ = r1 + r2 + · · · + rk .

243 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Open queuing systems example
Consider two servers. An average of 8 customers/hour arrive from outside at server 1, and
an average of 17 customers per hour arrive from outside at server 2. Interarrival times are
exponential. Server 1 can serve at an exponential rate of 20 customers/hour, and server 2
can serve at an exponential rate of 30 customers/hour. After completing service at server 1,
half of the customers leave the system, and half go to server 2. After completing service at
server 2, 34 leave the system and 41 return to server 1.
a) What fraction of time is station 1 idle?
b) Find the expected number of customers at each server.
c) Find the average time a customer spends in the system.
d) How would the answers to the previous questions change if station 2 can handle only
an average of 20 customers/hour?

244 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Open queuing system example

µ1 = 20/h
1
r1 = 8/h Server 1 P (leaving) = 2
1 1
p21 = 4 p12 = 2
3
r2 = 17/h Server 2 P (leaving) = 4
µ2 = 30/h

245 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.11 M/G/s/GD/s/∞ (blocked customers cleared)
Customers are lost to the system when all servers are busy.
▶ L, W , Lq and Wq are of limited interest.
▶ Primary interest is the fraction of arrivals turned away.
▶ 1 1
If we let λ be the arrival rate and a mean service time of µ, W = Ws = µ
▶ Arrivals are turned away only when s customers are present.
▶ An average of λπs will be lost, and λ(1 − πs ) will enter the system.

λ(1 − πs )
L = Ls =
µ

The important
  variable, πs , depends on the service time distribution only through its
1
mean µ , a fact known as Erlang’s loss formula.

246 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


M/G/s/GD/s/∞ example
An average of 20 ambulance calls per hour are received by a hospital. An
ambulance requires an average of 20 minutes to pick up a patient and take
the patient to the hospital. The ambulance is then available to pick up
another patient. How many ambulances should the hospital have to ensure
that there is at most 1% probability of not being able to respond immediately
to an ambulance call?
Assume that interarrival times are exponentially distributed.

247 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


FIGURE 32

OZE
Loss Probabilities for MIGIs/GD/sloo Queuing System
A
1.0
TS 9

H114VH9
@
Koay} Guinan)

13

14

0 1 2 3 4 5 6 7 8 9 10 11 12 13
rho, lambda, mu p = Aw

Source: Reprinted by permission of the publisher from /ntroduction to Queuing Theory by Robert B. Cooper. p. 316. Copyright©1980 by Elsevier Science Publishing Co., Inc.
Omitted sections
We omit the following sections:
▶ 20.12: How to tell whether interarrival times and service times are
exponential.
▶ 20.13: Closed queuing networks.
▶ 20.14: An approximation for the G/G/m queuing system

249 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.15 Priority queuing models
Many situations require customers to be served using different priorities
than first come, first served.
Let WF CF S , WSIRO and WLCF S represent random variables of the waiting
time. One can show

E (WF CF S ) = E (WSIRO ) = E (WLCF S )

but indeed that

var (WF CF S ) < var (WSIRO ) < var (WLCF S )

250 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Nonpreemptive priority models
We denote with Si the service time of type i customer (not necessarily
exponential), and assume that lower-numbered customer types have priority
over higher-numbered customer types.
▶ Arrival rates of different customer types are independent.
▶ After each service completion, the next customer with the highest
priority is chosen for service.
▶ Once service starts, it is not interrupted (nonpreemptive).
▶ In the Kendall-Lee notation, the queue priority is expressed as NPRP.

251 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Nonpreemptive priority models (continued)
Wqk ≜ the expected steady-state waiting time in line spent by a type k customer.
Wk ≜ the expected steady-state time in the system spent by a type k customer.
Lqk ≜ the expected steady-state number of type k customers waiting in line.
Lk ≜ the expected steady-state number of type k customers in the system.

252 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /Gi /1/NPRP/∞/∞

λ4 λ3 λ2 λ1

Server 1
ρ4 ρ3 ρ2 ρ1
a1 = ρ1
Type 1: µ1
Type 2: µ2
a2 = a1 + ρ2
Type 3: µ3
a3 = a2 + ρ3 Type 4: µ4
k
P
ak = ρk
i=1 a4 = a3 + ρ4

253 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /Gi /1/NPRP/∞/∞
n
λi
We define ρi = n µλii = ρi = an < 1.
P P
µi and ensure
i=1 i=1

n
λk E(S2k )/2
P
k=1
Wqk =
(1 − ak−1 )(1 − ak )
Lqk = λk Wqk
1
Wk = Wqk +
µk
Lk = λk Wk

See Section 8.15, Example 19

254 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /Gi /1/NPRP/∞/∞ (customer-dependent waiting cost)
If we let ck denote the waiting cost per time unit for type k customers, and
we number our customers in a way so that

c1 µ1 ≥ c2 µ2 ≥ · · · ≥ cn µn
If we have no priorities, then c1 = c2 = · · · = cn = 1. Consider 4 jobs released for
production.

Job
2 4 1 3
1
tj = µ 4 5 6 7 4
cj 4 9 15 22 3
2
P 1
tcj = 50 t
j
0 6 10 17 22

255 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /Gi /1/NPRP/∞/∞ (customer-dependent waiting cost)
If we let ck denote the waiting cost per time unit for type k customers, and
we number our customers in a way so that

c1 µ1 ≥ c2 µ2 ≥ · · · ≥ cn µn
Consider 4 jobs released for production, with customer weights.

Weight
4 1 2 3
1
tj = µ 5 6 4 7
8
cj 4 2 1 1
cj µ j 0.8 0.33 0.25 0.14 6
tcj 6 10 17 22 5
4

2
1
t
0 6 10 17 22

256 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /M /s/NPRP/∞/∞
For multiple servers, we again assume exponentially distributed service times (for
tractability).

P (j ≥ s)
Wqk =
sµ(1 − ak−1 )(1 − ak )
k
X λi
where ak = ∀k ≥ 1
i=1

and a0 = 0

P (j ≥ s) is obtained from the table for an s-server system having

λ1 + λ2 + · · · + λn
ρ=

257 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Preemptive priorities: Mi /M /1/PRP/∞/∞
Customers can be bumped from service:
Preemptive resume model a customer’s service continues from the point at
which it was interrupted.
Preemptive repeat model a customer begins service anew each time s/he
reenters service.
If service times are exponentially distributed, the resume and repeat
disciplines are identical (no-memory).

258 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Mi /M /1/PRP/∞/∞ (continued)
If λi denotes the ith customer type’s interarrival rate (exponentially
distributed), and the service time of each customer is exponential with mean
1
µ , then

1
µ
Wk =
(1 − ak−1 ) (1 − ak )

where a0 = 0 and

k
X λi
ak =
i=1 µ

259 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


20.16 Transient behaviour of queuing systems
When arrival rates change over time, λt , we have nonstationary systems.
You can omit this section. . . ©

260 Decision-making for Industrial Management: Chapter 20 (Queuing theory)


Exercise problems

▶ Section 20.2, Problem 2 ▶ Section 20.4, Problem 11


▶ Section 20.2, Problem 3 ▶ Section 20.4, Problem 12
▶ Section 20.2, Problem 4 ▶ Section 20.5, Problem 1
▶ Section 20.2, Problem 7 ▶ Section 20.5, Problem 6
▶ Section 20.3, Problem 2 ▶ Section 20.5, Problem 7
▶ Section 20.4, Problem 1 ▶ Section 20.6, Problem 1
▶ Section 20.4, Problem 2 ▶ Section 20.6, Problem 3
▶ Section 20.4, Problem 5 ▶ Section 20.6, Problem 12
▶ Section 20.4, Problem 6 ▶ Section 20.6, Problem 15
▶ Section 20.4, Problem 8

261 Decision-making for Industrial Management: Chapter 20 (Queuing theory)

You might also like