7/30/2019 Systems Methodology and Design II
1/22
1
Department of Systems Engineering
George Mason University
Kuo-Chu ChangFairfax, Virginia
SYST 302: Systems Methodologyand Design II #6
SYST 302: Systems Methodologyand Design II #6
7/30/2019 Systems Methodology and Design II
2/22
2
Queuing Theory and Analysis
Queuing Theory and Analysis
Concepts and Introduction
Monte Carlo Analysis of Queuing
Single-Channel Queuing Models
Multiple-Channel Queuing Models
Finite Population Queuing Models
7/30/2019 Systems Methodology and Design II
3/22
3
Introduction
Introduction
The Queuing System (Waiting-Line) A facility or a group of facilities for service
A population of individuals or units which form a line tobe served with a pre-determined waiting-line discipline
Single-channel or multiple-channel
Single-stage or multiple-stage
Common Examples The public forms waiting-lines at grocery stores,
theaters, doctors office, etc. Items in process produces a waiting-line at each machine
center in a production system
Automobiles form waiting-lines at toll-gates, traffic
signals, docks in a transportation system
7/30/2019 Systems Methodology and Design II
4/224
The Queuing SystemThe Queuing System
Objective: determine the capacity of the service facility
in the light of the relevant costs and the characteristics ofthe arrival patterns so that the overall cost associated withthe queuing system is minimized
The arrival mechanism: finite or infinite population,arrival pattern may be time-dependent
The waiting line: form a queue with a certain disciplinesuch as first come/first serve, relative urgency, or firstcome/last serve. Waiting cost is incurred.
The service mechanism: discrete process provides
service for units in line, can be single channel or multiplechannel with a certain capacity. The cost is facilitydependent.
The decision model: decide a policy of service capacity
to meet the demand at a minimum cost
7/30/2019 Systems Methodology and Design II
5/225
Some ExamplesSome Examples
Population o o o o o o o
waiting line
o
o
o
Service facility
Population o o o o o o o
waiting line
o
Service facility
o. . .
7/30/2019 Systems Methodology and Design II
6/226
Monte Carlo AnalysisMonte Carlo Analysis The Mechanism
Uncertain Waiting-line decision models usually based on
assumptions of the arrival and service-time distributions Formal mathematic solutions may be difficult or
impossible in general
Monte Carlo analysis does not require these distributionsto obey certain theoretical forms
Provides analysis tool through simulation
5 6 7 8 9 10 11
0
0.05
0.1
0.15
0.2
0.25
0.3
Arrival Time
Probability
5 6 7 8 9 10 11
0
0.2
0.4
0.6
0.8
1
Arrival Time
Cumulativ
eProb
6 7 8 9 10 11 120
0.2
0.4
0.6
0.8
1
Service Time
CumulativeProb
6 7 8 9 10 11 120
0.05
0.1
0.15
0.2
0.25
0.3
Service Time
Probability
7/30/2019 Systems Methodology and Design II
7/227
Single Channel Queuing MC AnalysisSingle Channel Queuing MC Analysis
Economic Analysis:
Total cost = unit-waiting-cost-per-time-period * (waiting-time-in-queue + waiting-time-in-service)
+ service-cost-per-time-period * service-timeEx: $9.6 * (23 + 337) + $16.10 * 400 = $9,896
7/30/2019 Systems Methodology and Design II
8/228
Queuing ModelsQueuing Models
Queuing Models A/B/C: Arrival/Service/Number of Servers
M/M/1: Markov (Poisson) / Markov (Exponential) /
one server M/M/S: Multiple servers
M/G/1: General service time distribution
M/D/1: Deterministic service time
7/30/2019 Systems Methodology and Design II
9/229
Single-Channel Queuing ModelsSingle-Channel Queuing Models Model Assumptions
Infinite population pool
Arrival per period is a Poisson distribution
Service time is an exponential distribution
Provides theoretical analysis tool
System Parameters
ttedt
tttt
tttt
tntP
tn
tt
t
n
===
+
+
)1(1e:Note
andbetweenoccurscompletionserviceay thatprobabilit:
andmebetween tioccursarrivalany thatprobabilit:
at timesystemin theunitsofyprobabilit:)(
at timesystemin theunitsofnumber:
periodper timescompletionserviceofnumberexpected:
periodper timearrivalofnumberexpected:
00t-
7/30/2019 Systems Methodology and Design II
10/2210
Probability of n Units in the SystemProbability of n Units in the System[ ][ ]{ } [ ][ ]{ } [ ]{ }
[ ]{ } [ ][ ]{ }
n
n
nnnn
t
nnnnnn
t
nn
nnnnn
nnnn
P
tPtPtPtPtPdt
d
tPtPtPtPdt
d
tPtPtPdt
d
t
tPttP
tttPttPttP
tPtPtPtPdt
d
t
tPttP
t
ttPttP
ttPttPttPttPtP
tttPtttPtttPttP
=
=+==
+++==
+==
+
+=+
+++==
+
+
+++=
++=+
+
+
++
+
1
)()()()(0)(
)()()()(0)(
state,steadyIn
)()()()()(
lim
1)(1)()(but
)()()()()()()(
lim
haveweterms,ignoring
)()(
)()()()()()(
1)(1)(11)()(
01100
11
10000
0
100
110
2
211
2
11
2
11
7/30/2019 Systems Methodology and Design II
11/22
11
Probability of n Units in the SystemProbability of n Units in the System
( )
1 1 1 2
1 0
1 2 0 1 2 1 0 1 2 0 0
0 0 0
0 0
Let average number of units being served
( ) (1 ) ( ) ( ) 0
But, 0,
1But 1 1
1
(1 ) 1
n
n n n n
n
n
n
n
n n
n
n
P t P t P t P c c
P Pc c P c c P P c c P P P
P P P P
P
+
= =
=
+ + = = +
= + = + = = = = =
= = = =
= =
n
0 1 2 3 4 5 6 7 8 9 10
0
0. 1
0. 2
0. 3
0. 4
0. 5
0. 6
0. 7Ex:
4.0
25.0
1.0
==
==
8.0=
Ex:
0 1 2 3 4 5 6 7 8 9 10
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
7/30/2019 Systems Methodology and Design II
12/22
12
Other Performance MeasuresOther Performance Measures
( ) ( ) ( )
( ) ( )
Expected number of units in the system:
n nP n nnn
nn
n
n
n
n
= = = =
=
=
=
=
=
=
=
=
1 1 1
11
11
1
1 1
00 0 0
2
( )
Note: is the average number of units being serviced =
Average length of the queue:
avg. number of units in the system - avg. numbers of units being serviced
=
m =
=
2
( )
[ ] kn
nk
kn
n
kn
nPkP
k
=
===
=
=
= 0'
')1()1(systemin
:systemin theunitsthanmoreofyProbabilit
7/30/2019 Systems Methodology and Design II
13/22
13
ExampleExample25.0
4
1,1.0
10
1,)1(1 =====
=
nn
nP
Expected number of units in the system:
0.6671
n
= = =
267.0)(
:queuetheoflengthAverage2
=
=
m
Average length of the nonempty queue:
in the system]m
m
P m
m
Pm> = >
=
= = =0 20 20 267 0 267
0161667
( ) [
. .
..
7/30/2019 Systems Methodology and Design II
14/22
14
Waiting TimeWaiting Time
( ) 67.6101667.0example,previousIn the1
111fact,In
11
)(
=
timeserviceaverage+timewaitingaverage
:systemin thespenttimetotalAverage
)()()1()(
10.3)(Sec.ICBST0,>for w
1=system}in theunit0{)0(
:timewaitingofonDistributi
0
)(
0
==
=
=
===
=+
=
===
===
T
nTTn
T
dwwwfwewf
PPwP
w
w
7/30/2019 Systems Methodology and Design II
15/22
15
System Performance CurvesSystem Performance Curves
n =
1
T =
1
1
0 0.2 0.4 0.6 0.8 10
10
20
30
40
50
TotalTim
einSystem
0 0.2 0.4 0.6 0.8 10
5
10
15
20
Average
#inSystem
7/30/2019 Systems Methodology and Design II
16/22
16
ExampleExample
=
==
1
1][
bygivenisdelaymeanThe.nutilizatiotheand
,rateservice,artearrivalwithqueueM/M/1anisprocessorlargeThe:
systems.proposedtheandexistingtheofeperformancdelaymean
theCompare.ratearrivalandrateprocessingwitheachprocessorswith
processorlargethereplacetomadeisproposalathatSupposetime.processing
ofamountddistributellyexponentiaanrequiresactionsthat tranandsecond,per
ionstransactrateofprocessa PoissontoaccordingarrivalonstransactiSupposesecond.perionstransactofrateaatonstransactihandlesprocessorlargeA:
KTE
KK
KK
K
KK
A
Q
t.improvemeneperformancdelaytsignificaninresultssystemsingleaintodemandcustomerofionconcentratThe
][1
1]'[
isdelaymeanThe.nutilizatioand,rateservice
,ratearrivalwithsystemM/M/1anisprocessorssmalltheofEach
=
=
=
TKETE
7/30/2019 Systems Methodology and Design II
17/22
17
Cost Analysisper unit time
Cost Analysisper unit time
Expect total cost = expected waiting cost + expected facility cost
=
Minimize cost:
0
where : waiting cost per unit per tim
w f w f
w
f
w
TC C n C C C
CTC
C
C
+ = +
= = +
e period
: facility cost per unit serviced
Example:
1 8 , $0.10, $0.165
0.4, 0.1115
f
w f
C
C C
TC
= = =
= =
7/30/2019 Systems Methodology and Design II
18/22
18
Cost CurvesCost Curves
0.2 0.4 0.6 0.8 10
0.1
0.2
0.3
0.4
0.5
Service Rate
TotalCost
FCWC
TC
7/30/2019 Systems Methodology and Design II
19/22
19
Multiple-Channel Queuing ModelsMultiple-Channel Queuing Models
Model Assumptions Same as single channel
Multiple service facility, # of channel = c
( ) ( ) ( ) ( )
, 0,0 ,0 0,0
0,0 1
0
,
Let , then
1 1,
! !1
1 ! [1/(1 )] 1 !
other measures such , , and can also be obtained (see Sec. 10.4),
where is the probability that ther
c m
n
c n m
r cc r
r
m n
c
P P P P
c m
P
c r
n m w
P
=
=
=
= =
= +
,
e are n units waiting in queue
and m channels are busy
Note: 0 m c and 0 for and 0m nP m c n =
7/30/2019 Systems Methodology and Design II
20/22
20
Queuing with Nonexponential ServiceQueuing with Nonexponential Service
Model Assumptions Poisson arrival
Nonexponential service time
( )
( )[ ]
( )
( )[ ]
( )
( )[ ]
( )
( )[ ]( )
For any service time distribution, if is its variance, then
and
For constant service time,
and
For exponential service time,
and
2
2 2 2 2 2
2
2
2 2
2 1 2 1
1
0
2 1 2 1
1
1
1
n T
n T
n T
=+
+ =+
+
=
= + = +
=
= = = w fT C C n C +
7/30/2019 Systems Methodology and Design II
21/22
21
Example*Example*
( )( )
( )( )
( )
2
22
For constant service time, 0.1, 0.25
1=0.5333 and 5.332 1 2 1
For exponential service time, 1
1=0.667 and 6.67
n T
n T
= =
= + = + =
=
= = =
*See MATLAB code lec61.m and lec62.m
7/30/2019 Systems Methodology and Design II
22/22
22
SummarySummary
Queuing
Monte Carlo Analysis of Queuing
Single-Channel Queuing Models
Multiple-Channel Queuing Models
Finite Population Queuing Models Control Concepts and Techniques
Statistical Process Control
Optimal Policy Control
Project Control