No Slide Title

Download Report

Transcript No Slide Title

Queueing Analysis of
Production Systems
(Factory Physics)
1
Reading Material
 Chapter 8 from textbook
 Handout: Single Server Queueing Model by Wallace Hopp
(available for download from class website)
2
Queueing analysis is a tool for evaluating operational
performance
 Utilization
 Time-in-system (flow time, leadtime)
 Throughput rate (production rate, output rate)
 Waiting time (queueing time)
 Work-in-process (number of parts or batches in the
systems)
3
A Single Stage System
Finished
parts
Raw
material
Processing
unit
4
The Queueing Perspective
Arrival (release)
of jobs
Queue (logical or
physical) of jobs
Departure
(completion) of jobs
Server (production
facility)
5
System Parameters
 E[A]: average inter-arrival time between consecutive jobs
 l: arrival rate (average number of jobs that arrive per unit
time), l = 1/E[A]
 E[S]: average processing time
 m: processing rate (maximum average number of jobs that
can be processed per unit time), m = 1/E[S]
 r: average utilization, r = E[S]/E[A] = l/m
6
Performance Measures
 E[W]: average time a job spends in the system
 E[Wq]: average time a job spends in the queue
 E[N]: average number of job in the system (average WIP in
the system)
 E[Nq]: average number of jobs in the queue (average WIP in
the queue)
 TH: throughput rate (average number of jobs produced per
unit time)
7
Performance Measures (Continued…)
E[W] = E[Wq] + E[S]
E[N] = E[Nq] + r
8
Little’s Law
9
Little’s Law
E[N] = lE[W]
E[Nq] = lE[Wq]
r = lE[S]
10
Example 1
 Jobs arrive at regular & constant intervals
 Processing times are constant
 Arrival rate < processing rate (l < m)
11
Example 1
 Jobs arrive at regular & constant intervals
 Processing times are constant
 Arrival rate < processing rate (l < m)
 E[Wq] = 0
 E[W] = E[Wq] + E[S] = E[S]
 r = l/m
 E[N] = lE[W] = lE[S] = r
 E[Nq] = lE[Wq] = 0
 TH = l
12
Case 2
 Jobs arrive at regular & constant intervals
 Processing times are constant
 Arrival rate > processing rate (l > m)
13
Case 2
 Jobs arrive at regular & constant intervals
 Processing times are constant
 Arrival rate > processing rate (l > m)
E[Wq] = 
E[W] = E[Wq] + E[S] = 
r = 1
E[N] = lE[W] = 
E[Na] = lE[Wa] = 
TH = m
14
Case 3
 Job arrivals are subject to variability
 Processing times are subject to variability
 Arrival rate < processing rate (l < m)
 Example:









10 min with probabilit y 0.25
Processing time  6 min with probabilit y 0.50
2 min with probabilit y 0.25
Average processing time = 6 min
Inter-arrival time = 8 min
15
Case 3 (Continued…)






r = 6/8 = 0.75
TH = 1/8 job/min = 7.5 job/hour
E[Wq] > 0
E[W] > E[S]
E[Nq] > 0
E[N] > r
16
 In the presence of variability, jobs may wait for
processing and a queue in front of the processing unit
may build up.
 Jobs should not be released to the system at a faster rate
than the system processing rate.
17
Sources of Variability
18
Sources of Variability
Sources of variability include:
 Demand variability
 Processing time variability
 Batching
 Setup times
 Failures and breakdowns
 Material shortages
 Rework
19
Measuring Variability
Var[S ]  Variance of processing time
Var[A]  Variance of inter-arrival time
CS  Coefficient of variation (CV) in processing time 
C A  Coefficient of variation (CV) in inter-arrival time 
Var[S ]
E[ S ]
Var[A]
E[ A]
20
Variability Classes
Low variability
(LV)
0
Moderate variability
(MV)
0.75
High variability
(HV)
CV
1.33
21
Illustrating Processing Time
Variability
Trial
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Mean
Std dev
CV
CV
Class
Machine 1
22
25
23
26
24
28
21
30
24
28
27
25
24
23
22
25.1
2.5
0.1
0.01
LV
Machine 2
5
6
5
35
7
45
6
6
5
4
7
50
6
6
5
13.2
15.9
1.2
1.4
MV
Machine 3
5
6
5
35
7
45
6
6
5
4
7
500
6
6
5
43.2
127.0
2.9
8.6
HV
22
Illustrating Arrival Variability
Low variability arrivals
t
High variability arrivals
t
23
The G/G/1 Queue
If (1) l < m, (2) the distributions of job processing
and inter-arrival times are independent and
identically distributed (iid), and (3) jobs are
processed on a first come, first served (FCFS) basis,
then average waiting time in the queue can be
approximated by the “VUT” formula:
E[Wq ]  V  U  t
 C A2  CS2   r 

E[ S ]


 2 1 r 
24
Example
 CA = CS = 1
 E[S] = 1
 Case 1: r = 0.50
 Case 2: r = 0.66
 Case 2: r = 0.75
 Case 1: r = 0.80
 Case 1: r = 0.90
 Case 1: r = 0.95
 Case 1: r = 0.99
 E[W] = 2, E[N] = 1
 E[W] = 3, E[N] = 1.98
 E[W] = 4, E[N] = 3
 E[W] = 5, E[N] = 4
 E[W] = 10, E[N] = 9
 E[W] = 20, E[N] = 19
 E[W] = 100, E[N] = 99
25
Example
 CA = 1
 E[S] = 1
 r = 0.8
 Case 1: CS = 0
 Case 2: CS = 0.5
 Case 1: CS = 1
 Case 1: CS = 1.5
 Case 1: CS = 2
 E[W] = 3, E[N] = 2.4
 E[W] = 4, E[N] = 3.2
 E[W] = 5, E[N] = 4
 E[W] = 6, E[N] = 4.8
 E[W] = 7, E[N] = 5.6
26
 Facilities should not be operated near full capacity.
 To reduce time in system and WIP, we should allow for
excess capacity or reduce variability (or both).
27
A Single Stage System with
Parallel facilities
Arrival (release)
of jobs
Departure
(completion) of jobs
Queue (logical or
physical) of jobs
Servers (production
facilities)
28
The G/G/m Queue
If (1) l < mm, (2) the distributions of job processing
and inter-arrival times are independent and
identically distributed (iid), and (3) jobs are
processed on a first come, first served (FCFS) basis,
then average waiting time in the queue can be
approximated by the “VUT” formula:
 C A2  CS2  ( r / m) 2( m 1) 1
E[Wq ]  

2
mm  l


29
Increasing Capacity

Capacity can be increased by either increasing the production
rate (decreasing processing times) or increasing the number of
production facilities
30
Increasing Capacity

Capacity can be increased by either increasing the production
rate (decreasing processing times) or increasing the number of
production facilities

In a system with multiple parallel production facilities,
maximum throughput equals the sum of the production rates
31
Dedicated versus Pooled Capacity

Dedicated system: m production facilities, each with a
single processor with production rate m and arrival rate l

Pooled system: A single production facility with m
parallel processors, with production rate m per processor,
and arrival rate ml
32
Dedicated versus Pooled Capacity

Dedicated system:
 C A2  CS2   r 
E[Wq ]  
 m  l 
2




Pooled system:
 C A2  CS2  ( r / m) 2( m 1) 1
E[Wq ]  
 m( m  l )
2


33

Pooling reduces expected waiting time by more than a factor of
m

Pooling makes better use of existing capacity by continuously
balancing the load among different processors
34
The M/M/1 Queue
35
A Common Notation
GX/GY/k/N
G: distribution of interG: distribution of
arrival times
service times
X: distribution of
arrival batch (group)
size
N: maximum number
of customers allowed
k: number of servers
Y: distribution of
service batch size
36
Common examples
M/M/1
M/G/1
M/M/k
M/M/1/N
MX/M/1
GI/M/1
M/M/k/k
37
Notation in the Book versus
Notation in the Lecture Notes

CT (cycle time): E(W)

CTq (cycle time in the queue): E(Wq)

WIP: E(N)

WIPq (WIP in the queue): E(Nq)

u: U (r =l/m)

ra: l

te: E(S); ts: E(X);

ca: cA

ce: cS
38
Assumptions
 A single server queue
 The distribution of inter-arrival times is exponential
(Markovian arrivals)
 The distribution of processing times is exponential
(Markovian processing times)
39
Distribution of Inter-arrival Times
f (t ) : density function for the time interval t between any two
successive arrivals
f (t )  l e  l t , t  0


0
0
E[ A]   tf (t )dt   tl e dt 
 lt


T
T
1
l
Pr(t  T )   f (t )dt   l e  lt dt  e  lT
40
The Memoryless Property
Pr(t  T  h ) e  l ( T  h )
Pr(t  T  h | t  T ) 
  lT  e  l h  Pr(t  h )
Pr(t  T )
e
41
The Taylor Series Expansion
Pr(no arrivals in any interval of length h)  e  lh
( l h ) 2 ( l h ) 3
 1  lh 

 ...
2!
3!

Pr(no arrivals in any interval of length h)  1  l h (when h is small)
Pr(a single arrival in any interval of length h)  l h (when h is small)
42
Exponential Inter-arrival Times and the
Poisson Process
(lT )n elT
Pr(n arrivals in an interval of length T ) 
, n=0,1,2...
n!
Poisson distribution
43
Distribution of Processing Times
g (t ) : density function for the time t to process any job
g (t )  m e  mt , t  0


0
0
E [ S ]   tg (t )dt   t m e
 mt
dt 
1
m
44
Similarly, when h is small,
Pr(processing time is not completed in interval of length h)  1  m h
Pr(processing time completes in interval of length h)  m h
45
The Distribution of the Number of Jobs in
the System
Pn (T )  Pr( N (T )  n), probability that n customers are in
the system at time T
46
The Distribution of the Number of Jobs in
the System
Pn (T )  Pr( N (t )  n ), probability that n customers are in
the system at time t
Pn (T  h )  (l h )(1  m h ) Pn 1 (T )  (1  l h)(1  m h) Pn (T )
(l h )( m h ) Pn (T )  (1  l h )( m h ) Pn 1 (T )
47
lim h0
Pn (T  h )  Pn (T ) d Pn

 l Pn 1 (T )  (l  m ) Pn (T )  m Pn 1 (T ), for n >0
h
dT
d P0
 l P0 (T )  m P1 (T ), for n =0
dT
48
If r  1, we can show that limT  Pn (T )  Pn , where Pn is a constant

dPn
0
dT

0  l Pn 1  (l  m ) Pn  m Pn 1 , for n  1,2,3,...
0  l P0  m P1 , for n =0
49
The Birth-Death Model
l
0
1
m
State
0
1
2
n 1
l
l
2
m
3
m
rate out of state j  rate into state j
l P0  m P1
(l  m ) P1  m P2  l P0
(l  m ) P2  m P3  l P1
(l  m ) Pn  m Pn 1  l Pn 1
50
l
P1  P0 ( )  P0 r
m
 n0 Pn  P0  n0 r n 


 Pn  P0 r n
P0
1
1 r
 P0 =1-r
 Pn  (1  r ) r n
51
N : number of customers in the system (in the long run), a random variable
E ( N )   n 0 n Pr( N  n )

  n 0 n(1  r ) r n


r
1 r
Var( N )   n 0 n 2 Pr( N  n )

  n 0 n 2 (1  r ) r n


r
(1  r ) 2
52
Pr( N  s )   n  s Pr( N  n )

 1   n 0 Pr( N  n )
s 1
 rs
E(Nq )  E(N )  r
r

r
1 r
r2

1 r
53
Applying Little’s law
E (Wq ) 
E(Nq )
l
r2

l (1  r )
r
r


E (S )
m (1  r ) 1  r
E(N )
E (W ) 
l
r

l (1  r )
1

m l
54
The M/G/1 Queue
 A single server queue
 The distribution of inter-arrival times is exponential
(Markovian arrivals)
 The distribution of processing times is general
55
The M/G/1 Queue (Continued…)
 1  CS2
E [Wq ]  
 2
 r

1 r

 E[ S ]

 1  CS2   r 2 
E[ N q ]  


 2 1 r 
E [W ]  E [Wq ]  E [ S ]
E[ N ]  E[ N q ]  r
56
The G/G/1 Queue Revisited
 C A2  CS2   r 
 C A2  CS2   r 
E[Wq ]  
E[ S ]  




2
2

1 r 

 m  l 
 C A2  cS2   r 2 
E[ N q ]  


2

1 r 
E[Wq ]  E[Wq ]  E[ S ]
E[ N ]  E[ N q ]  r
57
The M/M/m Queue
 A queue with m servers
 The distribution of inter-arrival times is exponential
(Markovian arrivals)
 The distribution of processing times is exponential
(Markovian arrivals)
58
The Balance Equations
Using analysis similar to the one for the M/M/1 queue:
l P0  m P1 , for n=0
l Pn 1  (n  1) m Pn 1 =(l  nm ) Pn for 1  n  m
l Pn 1  mm Pn 1 =(l  mm ) Pn for n  m
59
The Birth-Death Model
l0
0
1
m1
State
0
1
2
nm
l1
l2
2
m2
3
m3
rate out of state j  rate into state j
l0 P0  m1 P1
(l1  m1 ) P1  m2 P2  l0 P0
(l2  m2 ) P2  m3 P3  l1 P1
(ln  m n ) Pn  mn 1 Pn 1  ln 1 Pn 1
60
The M / M / m queue is a birth and death process with
ln  l
 nm
mn  
 mm
if n  m
if n  m
61

rn
Pn 
P0 , for 0  n  m
n!
rn
Pn 
P , for n  m
n m 0
m!m
1
P0 
m 1 r j
rm
[  j 0

]
r
j ! m!(m  )
m
62

Pr( N  m ) 
rm
P
r 0
m !(1  )
m
r
E [ N q ]  Pr( N  m )
mr
1
E [Wq ]  Pr( N  m )
mm  l
r
U  , average utilization per server
m
63
The G/G/m Queue
For a queue with a general distribution for arrivals and
processing times, average time in the queue can be
approximated as
 C A2  CS2  U 2( m 1) 1
E[Wq ]  
 mm  l
2


64
Notation in the Book versus
Notation in the Lecture Notes

CT (cycle time): E(W)

CTq (cycle time in the queue): E(Wq)

WIP: E(N)

WIPq (WIP in the queue): E(Nq)

u: U

ra: l

te: E(S); ts: E(X);

ca: cA

ce: cS
65
Propagation of Variability
CS(i)
CA(i)
CD(i) = CA(i+1)
i
i+1
Single server queue:
CD2  U 2CS2  (1  U 2 )C A2
U  l/m
Multi-server queue:
U2
C  1  (1  U )(C  1) 
(CS2  1)
m
U  l /( mm )
2
D
2
2
A
66
Propagation of Variability
High Utilization Station
High Process Var
Low Flow Var
High Flow Var
Low Utilization Station
High Process Var
Low Flow Var
Low Flow Var
67
Propagation of Variability (Continued…)
High Utilization Station
Low Process Var
High Flow Var
Low Flow Var
Low Utilization Station
Low Process Var
High Flow Var
High Flow Var
68
Variability Relationships
Flow Variability
CD2  (1  U 2 )c A2  U 2CS2
U  r  l/m
E(S), CS2
l , CA2
Queue Time
 C A2  CS2  U 
E[Wq ]  

 E(S )
2

 1  U 
l , CD2
Processing
Time
E(S )
69
 If utilization is low, reduce arrival arrival variability;
if utilization is high, reduce process variability.
 Operations with the highest variability should be
done as late as possible in the production process.
70
A Production Line
 N: number of stages in the production line
 Si: processing time in stage i (a random variable), i=1,…, N
 U(i): utilization at stage i
 CA(i): coefficient of variation in inter-arrival times to stage i
 CS(i): coefficient of variation in processing time at stage i
71
Time in System for a Production Line
E[W ]  i 1 E[W (i )]  i 1 E[Wq (i )]  E[S (i )]
N
N
E[Wq(i)]= V(i) U(i) E[S(i)]
 C A2 (i )  CS2 (i )   U (i )  E[ S (i )]

  1  U (i ) 
2



l
U (i )  l E [ Si ] 
mi
72
Time in System for a Production Line
 C A2 (i )  CS2 (i )   U (i )  E[ S (i )]

  1  U (i ) 
2



C (i  1)  (1  U (i ) )C (i )  U (i ) C (i )
2
A
2
2
A
2
2
S
l
U (i )  l E [ Si ] 
mi
73
Reducing Time in System (Cycle Time)
 C A2 (i )  CS2 (i )   U (i )  E[ S (i )]

  1  U (i ) 
2



Reduce Variability
• failures
• setup times
• uneven arrivals
• process control
• worker training
Reduce Utilization
• arrival rate (yield, rework, etc.)
• processing time (processing
speed, availability)
• capacity (number of machines)
74
Expected WIP in System for a Production
Line
E [ N ]  l E [W ]
  i 1 l E [W (i )]
N
  i 1 E [ N (i )]
N
  i 1 E [ N q (i )]  U (i )
N
75