Académique Documents
Professionnel Documents
Culture Documents
QUEUING THEORY
DESCRIPTION
Each of us has spent a great deal of time waiting in lines.
In this chapter, we develop mathematical models for waiting lines, or
queues.
5/10/2011
LEARNING OBJECTIVES
When you complete this chapter, you should be
able
bl to
t
Identify or Define:
D-4
5/10/2011
Situation
Input Process
Output Process
Bank
Customers arrive at
bank
Pizza parlor
Arrivals
Servers
Service Process
Bank
Customers
Teller
Deposit etc.
etc
Doctors
office
Patient
Doctor
Treatment
Traffic
intersection
Cars
Light
Controlled
passage
Assembly line
Parts
Workers
Assembly
Tool crib
Workers
Clerks
5/10/2011
D-7
Cost
Costt off
C
Service
(provider)
Cost of
Waiting
(customer)
C*
Capacity to serve
5/10/2011
5/10/2011
Input
source
Waiting
line
Service
facility
INPUT CHARACTERISTICS
Input Source
(Population)
Size
Infinite
5/10/2011
INPUT CHARACTERISTICS
Input Source
( p
(Population)
)
Size
Infinite
Finite
INPUT CHARACTERISTICS
Input Source
(Population)
Size
Infinite
Finite
Arrival
Pattern
Random
NonRandom
5/10/2011
INPUT CHARACTERISTICS
Input Source
((Population)
p
)
Arrival
Pattern
Size
Infinite
Finite
Random
Poisson
NonRandom
Other
POISSON DISTRIBUTION
Example: Number of
customers that arrive in
15 min.
.6
.3
.0
X
0
.6
.3
.0
= 0.5
P(X)
D-16
Number of events
that occur in an
interval of time
10
= 6.0
P(X)
X
0
5/10/2011
0.25
0.25
0.20
0.20
Probabili
ty
Probabili
ty
0.30
0.15
0.10
0.05
0.00
0.15
0.10
0.05
0.00
0 1 2 3 4 5 6 7 8 9 10 11 12
x
=2
6 7
x
9 10 11 12
=4
INPUT CHARACTERISTICS
Input Source
(P
(Population)
l ti )
Arrival
Pattern
Size
Infinite
Finite
Random
Poisson
NonRandom
Behavior
Patient
Impatient
Other
5/10/2011
INPUT CHARACTERISTICS
Input Source
(Population)
Arrival
Pattern
Size
Infinite
Finite
Random
Poisson
Behavior
NonRandom
Patient
Other
Impatient
Balk
BALKING
Input
source
Line was
too long!
Service system
Waiting
line
Service
facility
10
5/10/2011
INPUT CHARACTERISTICS
Input Source
(Population)
Arrival
Pattern
Size
Infinite
Finite
Random
Poisson
RENEGING
Input
source
Behavior
NonRandom
Patient
Other
Balk
Impatient
Renege
Service system
Waiting
line
Service
facility
I give up!
11
5/10/2011
QUEUE DISCIPLINE
12
5/10/2011
ta (t )dt
0
13
5/10/2011
E( )
P( t h |
t ) P ( h)
14
5/10/2011
15
5/10/2011
P ( n)
e n
(n 0,1,2,...))
n!
16
5/10/2011
17
5/10/2011
18
5/10/2011
19
5/10/2011
Summary
a
Arrival
time
pattern
Number
of
servers
Service
time
pattern
Waiting
line
capacity
Queue
discipline
Population
source
40
20
5/10/2011
1/2/3
= arrival dist/
service dist/ # of servers
Poisson arrivals (M)
Distribution of independent
arrivals over time
t = 1
0.3
probability
0.4
0 35
0.35
t = 2
t = 3
t = 4
0.25
0.2
0.15
t = 5
0.1
0.05
0
0
10 11 12
number of arrivals
BIRTH-DEATH PROCESSES
We subsequently use birth-death processes to answer
questions about several different types of queuing
systems.
We define the number of people present in any
queuing system at time t to be the state of the
queuing systems at time t.
We call j the steady state, or equilibrium
probability,
b bilit off state
t t j.
j
The behavior of Pij(t) before the steady state is
reached is called the transient behavior of the
queuing system.
21
5/10/2011
Law 1
Law 2
Law 3
22
5/10/2011
RELATION OF EXPONENTIAL
DISTRIBUTION TO BIRTH-DEATH
PROCESSES
Most queuing systems with exponential
interarrival times and exponential service times
may be modeled as birth-death processes.
More complicated queuing systems with
exponential interarrival times and exponential
service times may often be modeled as birthdeath processes by adding the service rates for
occupied servers and adding the arrival rates for
different arrival streams.
DERIVATION OF STEADY-STATE
PROBABILITIES FOR BIRTH-DEATH
PROCESSES
We now show how the jss may be determined for an
arbitrary birth-death process.
The key role is to relate (for small t) Pij(t+t) to
Pij(t).
j 1 j 1 j 1 j 1 j ( j j ) ( j 1,2,...)
1are
1
0 0 called the flow
The above equations
often
balance equations, or conservation of flow
equations, for a birth-death process.
23
5/10/2011
( jth equation )
0 0 11
(1 1 ) 1 0 0 2 2
(2 2 ) 2 1 1 3 3
( j j ) j j 1 j 1 j 1 j 1
24
5/10/2011
Cj = (0 1 2 j-1)/(1 2 3.. j)
j 0 c j ( j 1,2,...)
25
5/10/2011
0 1 p (0 p 1)
j p j (1 p ) (0 p 1)
p Thus,
If p 1, however, the infinite sum blows up.
if p 1, no steady-state distribution exists.
M/M/1
Customers waiting
Lq = length of queue
Ls = length of (# of customers in) system
= average
g customer arrivals pper hour
= average service rate per hour
26
5/10/2011
1
-
In an effort to maximize
efficiency, the manager of
the airport tried to get the
average time per take off to
equal the time between
arrivals. What will
happen?
time in system
5
4
3
2
1
17
.5
18
.8
15
16
.3
12
.5
13
.8
10
0
11
.3
M/M/1
lam bda
DERIVATION OF L
Throughout the rest of this section, we assume that
p<1, ensuring that a steady-state probability
di t ib ti d
distribution
does exist.
i t
The steady state has been reached, the average
number of customers in the queuing system (call it L)
is given by
L j j jp j (1 p )
j 0
j 0
(1 p) jp j
j 0
and
L (1 p )
p
p
2
(1 p) 1 p
27
5/10/2011
DERIVATION OF LQ
In some circumstances, we are interested in the
expected number of people waiting in line (or in the
queue).
We denote this number by Lq.
Lq
p
p2
2
p
1 p
1 p ( )
j
Lq ( j 1) j
j 1
DERIVATION OF LS
Ls 0 0 1( 1 2 ) 1 0 1 (1 p ) p
Lq L Ls
p
p2
p
1 p
1 p
j 1
0
j
28
5/10/2011
Theorem 3 For any queuing system in which a steadystate distribution exists, the following relations hold:
L = W
Lq = Wq
Ls = Ws
29
5/10/2011
EXAMPLE 4
2.
30
5/10/2011
SOLUTIONS
1.
2.
31
5/10/2011
MORE ON L = W
Then L = W or W = L/
A SIMPLE EXAMPLE
Example
Our local MacDonalds
MacDonalds uses an average of 10
10,000
000
pounds of potatoes per week.
The average number of pounds of potatoes on hand is
5000 pounds.
On the average, how long do potatoes stay in the
restaurant before being used?
Solution
32
5/10/2011
Goal: Minimize the sum of the hourly service cost and expected
hourly cost due to the idle times of machinists
Delay cost is the component of cost due to customers waiting in
line
G l Minimize
Goal:
Mi i i E
Expected
t d cost/hour
t/h
= service
i cost/hour
t/h
+ expected
t d
delay cost/hour
Expected delay cost/hour = (expected delay cost/customer)
(expected customers/hour)
Expected delay cost/customer = ($10/machinist-hour)(average
hours machinist spends in the system) = 10W
Expected delay cost/hour = 10W
Now compute expected cost/hour if the helper is not hired and
also compute the same if the helper is hired
33
5/10/2011
MSOffice
68
34
Slide 67
MSOffice1
; 11/3/2003
5/10/2011
EXAMPLE CONTINUED..
System parameters:
Single-channel, single-phase system
Single-channel
Arrival rate (lambda) = 0.4 ships per hour
Service rate (mu) = 0.5 ships per hour
Number of servers (s) = 1
69
70
35
5/10/2011
SOLUTIONS:
1. Utilization rate of the towing service
0.4
04
0.80
0.5
0.4
P2 0.2
0.128
0.5
71
SOLUTIONS: CONTINUED....
5.
3.20
3 20
0.5 0.5 0.4
6.
0.4
Ls
4.0
0.5 0.4
7.
Wq
0.4
8.0
0.5 0.5 0.4
72
36
5/10/2011
SOLUTIONS: CONTINUED.....
8.
The average amount of time a ships
spends in the towing service (waiting to be
towed and being towed).
Ws
1
1
10
0.5 0.4
73
37
5/10/2011
.0067
.1396
38
5/10/2011
= 30/hr.
39
5/10/2011
40
5/10/2011
41
5/10/2011
4/3
Utilization Factor
Question
What percentage of the time is Joe processing
orders?
Answer
The percentage of time Joe is processing
orders is equivalent to the utilization factor,
factor /.
/
Thus, the percentage of time he is processing
orders is:
/ = 20/30
= 2/3 or 66.67%
42
5/10/2011
Lq
L
and W q
(1 c )
(1 c )
(1 c ) j j
j 0
L W
43
5/10/2011
j
0
1
.
.
c
j
0
.
.
0
j 0
1
0
, if 1
1 c 1
1
, if 1
c 1
=1
=1
=2
2
=2
2
=2
2
p0 = p1
p1 + p1 = p0 + p2
p2 + p2 = p1 + p3
p2 = p3
p0 + p1 + p2 + p3 = 1
Substituting the values of = 1 and = 2, we have
2p1 = p0
p0 + 2p2 = 3p1
p1+2p3 = 2p2
p2 = 2p3
p0 + p1 + p2 + p3 = 1
p0 = 8/15, p1 = 4/15, p2 = 2/15, and p3 = 1/15
44
5/10/2011
45
5/10/2011
46
5/10/2011
47
5/10/2011
2
.
2
.
s+1
.
s
.
s
48
5/10/2011
( j 0,1,...)
j j ( j 0,1,..., s)
j s ( j s 1, s 2,...)
i ( s 1)
i!
i 0
j
j
s 0
s s
s!(1 )
j!
(j 1,2,...., s)
s j 0
(j s, s 1, s 2.....)
s! s j s
s s 0
P(j s)
s!(1 )
Lq
P( j s)
,
(1 )
Wq Lq /
P( j s)
( j s )j
s
j s
L Lq /
W L / Lq / 1 / W q 1 /
P( j s) 1
49
5/10/2011
50
5/10/2011
51
5/10/2011
52
5/10/2011
53