Facilities Design Facilities Design
Facilities Design Facilities Design
S.S. Heragu
Industrial Engineering Department
University of Louisville
Appendix:
Introduction to Queuing, Queuing
Network, and Simulation Modeling
A queuing system
C: customers; S: servers
Queuing Models are descriptive
models
• What is the expected number of parts waiting
in a queue?
• What is the expected time a part spends
waiting in a queue?
• What is the probability that a machine will be
idle?
• What is the probability of a queue being filled
to capacity?
Elements of a queuing system
- Arrival process
- Service process
- Departure process
- Queue discipline
- Balking
Modeling of the Arrivals and Service Processes
0 0
Modeling of the Arrivals and Service Processes
c c
x c t c
e dt e dx e
t x
e 1 e c
0 0
0 0
t
P( F c) e dt e t
e c
• c
Mean can be shown to be 1/λ and Variance
c
can be shown to be 1/λ 2 for exponential dist
V ( F ) t E (t ) f (t )dt
2
E ( F ) tf (t )dt
c c
Property 1 of the Exponential Distribution
• Memoryless
P ( F t t F t ) P ( F t ), provided t , t 0
P( F t t F t ) P( F t t )
P( F t t F t )
P( F t ) P( F t )
•But
P( F t ) e t and P( F t t ) e (t t )
P ( F t t ) e ( t t )
P( F t t F t ) t P( F t )
•Hence, P( F t ) e
Property 2 of the Exponential Distribution
• A / B / C / D / E / F, where
- A denotes the nature of the arrival process
- B denotes the service time distribution
- C is the number of parallel servers (S1)
- D is the queue discipline (FCFS, LCFS,
SIRO, GD, etc.)
- E is the max number of customers allowed
in the system (C1)
- F denotes the size of the calling population
(finite or infinite)
Queuing models that can be solved exactly
P
n 0
n 1.
1
Pn Pn 1. So, 1 cn P0 1 and P0 .
n 1
1 cn
n 1
n 1
L nPn Lq (n S ) Pn Ls L Lq
n 0 nS
n=0 n=0 n 0
S S = 2 ... n ...
• Then
• RHS of the above S =S ρS
= andand S Swas
=
shown to be = 1/(1-ρ)
.
1 1
2
• Hence,
L
(1 )
we get ( / )
Therefore,
(1 ) 2 (1 ) (1 / ) ( )
Lq (n 1) Pn nPn Pn L (1 P0 ) L 1 1 L
• Lq can
n 1
also nbe
1
determined
n 1
in this way:
2 2
Lq
( ) ( ) ( ) ( )
2 1
Ls L Lq
( ) ( ) ( ) ( )
M/M/1/GD/inf/inf queuing model
L 1 1
W Wq Ws
( ) ( )
Example 1
• The utilization
i 1
. i
factor for an M/M/S system is ρ = λ/Sμ
• Clearly, μn = μ{min{n,S}}
• Hence, μn = nμ for n = 1, 2, …, S and μn = Sμ for n = S+1, S+2,
…, Also, λn = λ for n = 0, 1, 2, …, Hence, Pn = P0cn, for n = 1,
2, … S. We get
n
P
Pn P0 n for n 1, 2,..., S
1 2 n n !
M/M/S/GD/inf/inf queuing model
S nS n
P0 P0
Pn P0 = nS for n S 1, S 2,...,
1 2 S S S S ! S S !S
1 1 1
P0
S
nS
S 1
( / ) n ( / ) S
c n c cn n
n! S! nS S
n 0 n 0 nS
n 0
P0 ( S ) n
for n 1, 2,..., S
n!
• Thus, P0
P0 ( S ) for n S 1, S 2,...
n
S ! S n S
M/M/S/GD/inf/inf queuing model
• We now find Lq
( S ) S i P0 ( S ) S P0 i ( S ) S P0
Lq (n S ) Pn iPS i i i S !(1 )2
n S i 0 i 0 S! S ! i 0
Wq
/ S
2 ( S 1) 1
S 1 / S
Property 4 of the Exponential Distribution
• The arrival rate is λ/2 + λ/2 = λ for (b) and (c). The effective arrival and service
rates are λ and 2μ for all three systems.
• For an M/M/1 system with parameters λ and μ, the waiting time in a queue (W)
and length of the queue (Lq) are: W =1/(μ(1-ρ)) = 1/(μ-λ); Lq=λ2/μ(μ-λ).
• For an M/M/2 system, P0 =1/[(2ρ)2/(2!(1-ρ)) + Σ1n=0 ((2ρ)n/n!)] =1/[(2ρ2)/(2!(1-ρ) +
(2ρ)0/0! + (2ρ)1/1!] =[2(1-ρ)]/[2+4ρ-2ρ-4ρ2+4ρ2)] = (1-ρ)/(1+ρ); Lq=[(2ρ)2P0ρ]/[2!(1-
ρ)2] = [(2ρ)2(1-ρ)ρ]/[2!(1+ρ)(1-ρ)2] = 2ρ3/(1-ρ2) = λ3/[μ(4μ2-λ2)]; Wq=Lq/λ = λ2/[μ(4μ2-
λ2)]; W=Wq + 1/μ = λ2/[μ(4μ2-λ2)]+ 1/μ = 4μ/(4μ2-λ2)
• For system (a), therefore, W(a) = 1/(μ-λ/2) = 2/(2μ-λ). Lq(a) = λ2/4μ(μ-λ/2) = λ2/2μ(2μ-
λ). For system (b), W(b) = 1/(2μ-λ). Lq(b) = λ2/2μ(2μ-λ). For system (c), W(c) =
4μ/(4μ2-λ2). Lq(c) = λ3/[μ(4μ2-λ2)]. To prevent an infinite queue, λ must be less than
2μ (i.e. ρ<1). Therefore, W(c) = 4μ/(4μ2-λ2) = [4μ(2μ+λ)][1/(2μ-λ)] > 1/(2μ-λ) = W(b).
Thus, W(a)>W(c) >W(b). Hence, system (a) would result in the most waiting time
and system (b) the least.
• The WIP in the queue of system (c) is given by Lq(c) = [λ2/(2μ(2μ-λ))][2λ/(2μ+λ)] <
[λ2]/[2μ(2μ-λ)] = Lq(b). When WIP in the queue is the criterion system (c) is
preferred to system (b), but when manufacturing lead time is considered, (b) is
better than (c).
Finite Queue Size Models
n for n = 1,2,..., C
• Single server model: cn =
0 for n C
Lq L+P0-1 (ρS)SP0ρ[1-ρC-S-(C-S)ρC-S(1-ρ)]/[S!(1-ρ)2]
W L/(λ(1-PC)) L/(λ(1-PC))
Wq Lq/(λ(1-PC)) Lq/(λ(1-PC))
Finite Source Models
N ! n
for n 0,1, 2,..., N
cn ( N n)!
• Single server model: 0
for n N
N ! n
( N n)!n ! n for n 0,1, 2,..., S
• Multiple server model:
cn
N ! n
for n S 1, S 2,..., N
( N n)! S ! S
nS n
0 for n N
P0 1/[ΣNn=0(λnN!/(μn(N-n)!)] 1/[ΣS-1n=0(λnN!)/(μnn!(N-n)!)+ΣNn=S(λnN!)/(μnS!Sn-S(N-n)!)]
Lq N-(λ+μ)(1-P0)/λ ΣNn=S(n-S)Pn
W L/(λ(N-L)) L/(λ(N-L))
Wq Lq/(λ(N-L)) Lq/(λ(N-L))
Nonexponential Models
2 2 2
• M/G/1: L
2(1 )
2 2
λ σ + ρ
2 2 2 2
λ /(k μ ) + λ / μ
2
λ + λ k = 1 +k
2 2
λ
2
Lq = = =
2( 1 ρ) 2( 1 λ / ) 2k (μ λ) 2k μ(μ )
• M/Ek/1:
Lq 1 + k
Wq = =
2k ( )
ca2 + c s2
W q .
2 ( )
• G/G/m:
Queuing Networks
• Open
• Closed
• Semi-Open
Open Networks
Two-machine System
λ Machine 1 Machine 2 λ
µ1 µ2
Two-node, Open Jackson Network
n1-1, n2+1
n1, n2
The flow balance (rate in equals rate out) equations
for any {n1, n2} pair greater than 0
(λ+μ1+μ2)P(n1,n2) = λP(n1-1,n2) + μ2P(n1,n2+1) + n1-1, n2 n1, n2+1
μ1P(n1+1,n2-1)
n1+1, n2-1
For the remaining states (0,0), (n1,0), (0,n2), the
following flow equations are also easy to derive.
λP(0,0) = μ2P(0,1)
(λ+μ1)P(n1,0) = μ2P(n1,1) + λP(n1-1,0)
(λ+μ2)P(0,n2) = μ1P(1,n2-1) + μ2P(0,n2+1)
Also, Σ Σ P(n1,n2) = 1
Two-node, Open Jackson Network
n1-1, n2+1
n1, n2
P(n1,n2) = ρ1n1(1-ρ1)ρ2n2(1-ρ2) = Pn1Pn2
n1+1, n2-1
General Open Jackson Network
m
i i p ji j
j 1
Example 4
λ = 12
Furnace Press Inspect
µ = 15 µ = 18 µ = 21
• Determine the expected number of jobs in the furnace (F), press (P), and
inspection (I) as well as the WIP and processing time of the system.
• Suppose the capacity of the queue in front of the press is 5 ingots, is
the current design sufficient?
Solution to Example 4 λ = 12
Furnace Press Inspect
µ = 15 µ = 18 µ = 21
λ = 12
Furnace Press Inspect
µ = 15 µ = 18 µ = 21
Example 5
λR
λ = 12
Furnace Press Inspect
λA
µ = 15 µ = 18 µ = 21
Solution to Example 5
Step 3: Combine the results from each center to analyze the performance of
the entire system.
• vF=λF/γF = 13.33/12 = 1.111 vP=vI = 1.111
• L=LF+LP+LI = 8 + 2.86 + 1.74 = 12.6 ingots
• W=vFWF+vPWP +vIWI = 1.111(36 + 12.9 + 7.5) = 62.7 minutes
• The "rework" loop increases the WIP and cycle time by 71.9%, and
70.9%, respectively
Example 6
F - 0.3 0.7 - -
P - - - 1.0 -
I 0.05 -- - - 0.95
Mill
Solution to Example 6
Step 1: Calculate the effective arrival rate.
• λF=λ+0.05λI; λP=0.3λF+0.4λM; λM=0.7λF; λI=1.0λP+0.6λM=λF
• From Example 5, we know that λF = λ/P(A) = 12/0.95 = 12.63. Solving these
equations yields the effective arrival rates presented next. The service rates and
utilizations at each machine center are also shown.
• λF=12.63 μF=15 ρF=0.842
• λP=7.33 μP=12 ρP=0.611
• λM=8.84 μM =18 ρM=0.491
• λI=12.63 μI=21 ρI=0.602
Step 2: Analyze each machine in the system independently. All the machines have
only one server, therefore, we will use Table A.1 for the operating
characteristics of an M/M/1 queue.
• WF=1/(μF(1-ρF)) = 1/(15(1 - 0.842)) = 0.422 hours = 25.33 minutes
• LF=ρF/(1-ρF) = 0.842/(1 - 0.842) = 5.33 ingots
• WP=1/(μP(1-ρP)) = 1/(15(1 - 0.842)) = 0.422 hours = 25.33 minutes
• LP=ρP/(1-ρP) = 0.611/(1 - 0.611) = 1.57 ingots
• WM=1/(μM(1-ρM)) = 1/(18(1 - 0.491)) = 0.109 hours = 6.6 minutes
• LM=ρM/(1-ρM) = 0.491(1 - 0.491) = 0.97 ingots
• WI=1/(μI(1-ρI)) = 1/(21(1 - 0.602)) = 0.119 hours = 7.2 minutes
• LI=ρI/(1-ρI) = 0.602(1 - 0.602) = 1.51 ingots
Solve two key equations simultaneously
2
i a i c w i
2
ci 1 w
i k
a a
• Merging of Arrivals
i
k
superposition
a i
i p i a ci2 pi c 2 1 pi
n oi
b i i
Y
jl1 jkl
a 2 1, 2 d 1 jk i1 l 2
n oi
b Y i
kl
i
jkl
i1 l1
• Batching
Key Network Operations
•
p n
Mean arrival rate into each node: ˆk 0i k ˆ j p jk jk
i 1 j 1
m
c ak2 a k c ai2 bik , k 1,2,..., m
i 1
• SCV of inter-arrival
times
2 into eachnode:
n
p0 k 0 k c0 k 1 p jk jk 1 p jk p jk j x j
2
j 1
ak 1 wk n
p max 1, 0
where
j 0
jk jk
1
b jk wk pjk p jk jk (1 2j ) xj 1 max csj2 , 0.2 1
mj
1 ij oi
uk , p 'jk and p
j ˆ i
ijk,lY jli Yki,l 1
p
n
2 jk
j 0
jk jk i 1 l 1
p oi
ˆ
i 1 l 1
i
jk Y jli Yki,l 1
Closed Queuing Network
. . . .
. . . .
Queue Robot . . Queue Robot . .
1 N j 1 Lij L
Wij ir r , i 1,2,..., m; j 1,2..., r
i j N j S i i j r j Si i
Nj
Xr m
v W
i 1
ij ij
Step 4: Determine the queue length Lij using the equation Lij=Xj(vijWij)
Step 5: Compare the Lij value calculated in step 4 with the previous value. If the new
value is within a desired range of the previous value, stop. If not, go to step 2.
Example 7