Professional Documents
Culture Documents
Queueing Models
Banks, Carson, Nelson & Nicol
Discrete-Event System Simulation
Purpose
Outline
Calling Population
[Characteristics of Queueing System]
System Capacity
[Characteristics of Queueing System]
Arrival Process
[Characteristics of Queueing System]
Scheduled
S
h d l d arrivals:
i l iinterarrival
t
i l ti
times can b
be constant
t t or constant
t t
plus or minus a small random amount to represent early or late
arrivals.
e.g., patients
ti t to
t a physician
h i i or scheduled
h d l d airline
i li fli
flight
ht arrivals
i l tto an
airport.
Arrival Process
[Characteristics of Queueing System]
First-in-first-out (FIFO)
Last-in-first-out (LIFO)
Service in random order (SIRO)
Shortest processing time first (SPT)
Service according to priority (PR).
10
11
Queueing Notation
[Characteristics of Queueing System]
13
Queueing Notation
[Characteristics of Queueing System]
Pn:
Pn(t):
:
e:
:
:
An:
Sn:
Wn:
WnQ:
L(t):
LQ(t):
L:
LQ :
w:
wQ:
Let Ti denote the total time during [0,T] in which the system
contained exactly i customers, the time-weighted-average number
in a system is defined by:
1
L =
T
i =0
iTi =
T
i i
T
i =0
1
L =
T
1
iTi =
T
i =0
L(t )dt
0
1
L =
T
L(t )dt L
as T
15
1
1 T
Q
LQ =
iTi =
LQ (t )dt LQ as T
T i =0
T 0
if L(t) = 0
0,
LQ (t ) =
L(t ) 1, if L(t) 1
0(15) + 1(4) + 2(1)
LQ =
= 0.3 customers
20
16
i =1
where W1, W2, , WN are the individual times that each of the N
customers spend in the system during [0,T].
w as N
For stable systems: w
If the system under consideration is the queue alone:
1 N Q
w Q = Wi wQ as N
N i =1
L = w
Average
System time
Arrival rate
L = w as T and N
Holds for almost all queueing systems or subsystems (regardless
of the number of servers, the queue discipline, or other special
circumstances).
G/G/1/N/K example (cont.):
(cont ): On average
average, one arrival every 4 time
units and each arrival spends 4.6 time units in the system.
Hence, at an arbitrary point in time, there is (1/4)(4.6) = 1.15
customers present on average.
18
Server Utilization
[Characteristics of Queueing System]
19
Server Utilization
[Characteristics of Queueing System]
T T0
(
)
L
t
L
t
dt
(
)
(
)
=
Q
0
T
T
20
Server Utilization
[Characteristics of Queueing System]
and
= E ( s ) =
<1
21
Server Utilization
[Characteristics of Queueing System]
=
=
, where < c for stable systems
c
c
22
In
23
The occurrence
occ rrence of a relati
relatively
el long ser
service
ice time (S2 = 12) ca
causes
ses a
waiting line to form temporarily.
24
System incurs a cost for each customer in the queue, say at a rate
of $10 per hour per customer.
The average cost per customer is:
Q
N
j =1
$10 *W jQ
N
= $10 * w Q
Wj is the time
customer j spends
in queue
hour customer
system is:
L=
nP
n =0
=0
Apply Littles equation to the whole system and to the queue alone:
w=
, wQ = w
LQ = wQ
M/G/1 Queues
[Steady-State
[Steady
State of Markovian Model]
= / , P0 = 1
2 (1 + 2 2 )
2 (1 + 2 2 )
L=+
, LQ =
2(1 )
2(1 )
(1 / 2 + 2 )
(1 / 2 + 2 )
w= +
, wQ =
2(1 )
2(1 )
1
28
M/G/1 Queues
[Steady-State
[Steady
State of Markovian Model]
2 2
LQ =
+
2(1 ) 2(1 )
29
M/G/1 Queues
[Steady-State
[Steady
State of Markovian Model]
The proportion of arrivals who find Able idle and thus experience no delay is P0
= 1- = 1/5 = 20%.
The proportion of arrivals who find Baker idle and thus experience no delay is
P0 = 1- = 1/6 = 16.7%.
Although
g working
g faster on average,
g , Ables g
greater service variability
y
results in an average queue length about 30% greater than Bakers.
30
M/M/1 Queues
[Steady-State
[Steady
State of Markovian Model]
M/M/1 q
queue is a useful approximate
pp
model when service
times have standard deviation approximately equal to their
means.
The steady-state
steady state parameters:
= / ,
Pn = (1 ) n
2
2
=
, LQ =
L=
=
1
( ) 1
1
1
w=
=
, wQ =
=
(1 )
( ) (1 )
31
M/M/1 Queues
[Steady-State
[Steady
State of Markovian Model]
5.0
6.0
7.2
8.64
10.0
0.500
0.600
0.720
0.864
1.000
1 00
1.00
1 50
1.50
2 57
2.57
6 35
6.35
0.20
0.25
0.36
0.73
If / 1,
1 waiting lines tend to continually grow in length
length.
Increase in average system time (w) and average number in
system (L) is highly nonlinear as a function of .
32
For almost all queues, if lines are too long, they can be reduced
by decreasing server utilization () or by decreasing the service
time variability (2).
Another measure of the variability of a distribution is the
coefficient of variation (cv) or the squared:
V (X )
cv =
E( X )
V (X )
2
(cv) =
2
[ E ( X )]
2 1 + (cv) 2
=
2
1
LQ for M/M/1
queue
34
Multiserver Queue
[Steady-State
[Steady
State of Markovian Model]
c 1 ( / ) n c 1 c
P0 =
+
n! c! c
n =0
L = c +
w=
(c ) c +1 P0
c(c!)(1 ) 2
= c +
P (L ( ) c )
1
35
Multiserver Queue
[Steady-State
[Steady
State of Markovian Model]
36
37
()
n
c 1 K n K
K!
P0 =
+
nc
n
(
K
n
)!
c
!
c
0
=
=
n
n
c
K n
n = 0,1,..., c 1
P0 ,
n
Pn =
n
K
!
P , n = c, c + 1,...K
( K n)!c !c n c 0
()
L = nPn ,
w = L / e ,
n=0
= e / c
where e is the long run effective arrival rate of customers to queue (or entering/e
B17xiting service)
e =
( K n ) P
n =0
38
Slide 38
B17
typo
Brian; 2005/01/09
2 1 10 5 n 10
10!
P0 =
+
n2
n =0 n 20
n = 2 (10 n)!2!2
20
= 0.065
L=
nP
= 3.17 machines
n =0
The average
g number of running
g machines:
K L = 10 3.17 = 6.83 machines
39
Networks of Queues
40
Networks of Queues
j = aj +
p
i
ij
all i
Arrival rate
from outside
the network
all i
41
Network of Queues
42
Summary
43