Professional Documents
Culture Documents
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.
Customer
population
Service system
T1 = 8 − 3 = 5 T2 = 15 − 8 = 7
time
t1 = 3 t2 = 8 t3 = 15
1 Z∞
= ta(t)dt
λ 0
Lemma (1)
If A is exponentially distributed, then for all nonnegative values of t and h,
Interarrival times are important and they are independent of what has
happened before.
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.
1 Z∞
= ts(t)dt
µ 0
Service
starts
Phase 1 Phase 2 ··· Phase k
Service
ends
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)
steady-state
t
arrivals
(births)
departures
(deaths)
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
π 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
λj = λ ∀j ∈ {0, 1, . . .}
µ0 = 0
µj = µ ∀j ∈ {1, 2, . . .}
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?
π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 − ρ)
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 )
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 − ρ)
1
E(S) =
µ
var(S) = σ 2
λ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 − ρ
λ µ
µ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)!
K
X
L= jπj
j=0
K
X
Lq = (j − R)πj
j=R
K
X K
X
λ̄ = λj πj = λ(K − j)πj = λ(K − L)
j=0 j=0
allows us to calculate
L
W =
λ̄
and
Lq
Wq =
λ̄
Ouput 1 = Ouput 2 =
Input rate λ Input 2 Input 3, etc.
.. .. ··· .. Output
. . .
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
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
µ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
λ(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.
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
λ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
n
λk E(S2k )/2
P
k=1
Wqk =
(1 − ak−1 )(1 − ak )
Lqk = λk Wqk
1
Wk = Wqk +
µk
Lk = λk Wk
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
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
P (j ≥ s)
Wqk =
sµ(1 − ak−1 )(1 − ak )
k
X λi
where ak = ∀k ≥ 1
i=1
sµ
and a0 = 0
λ1 + λ2 + · · · + λn
ρ=
sµ
1
µ
Wk =
(1 − ak−1 ) (1 − ak )
where a0 = 0 and
k
X λi
ak =
i=1 µ