Date post: | 20-Dec-2015 |
Category: |
Documents |
View: | 233 times |
Download: | 4 times |
CE
E 3
20F
all 2
008
Queuing
CEE 320Anne Goodchild
CE
E 3
20F
all 2
008
Outline
1. Fundamentals
2. Poisson Distribution
3. Notation
4. Applications
5. Analysisa. Graphical
b. Numerical
6. Example
CE
E 3
20F
all 2
008
Fundamentals of Queuing Theory
• Microscopic traffic flow– Different analysis than theory of traffic flow– Intervals between vehicles is important– Rate of arrivals is important
• Arrivals• Departures• Service rate
CE
E 3
20F
all 2
008
Server/bottleneck
Arrivals Departures
Activated
Upstream of bottleneck/server Downstream
Direction of flow
CE
E 3
20F
all 2
008
server
Arrivals Departures
Not Activated
CE
E 3
20F
all 2
008
Flow Analysis
• Bottleneck active– Service rate is capacity– Downstream flow is determined by bottleneck
service rate– Arrival rate > departure rate– Queue present
CE
E 3
20F
all 2
008
Flow Analysis
• Bottle neck not active– Arrival rate < departure rate– No queue present– Service rate = arrival rate– Downstream flow equals upstream flow
CE
E 3
20F
all 2
008
• http://trafficlab.ce.gatech.edu/freewayapp/RoadApplet.html
CE
E 3
20F
all 2
008
Fundamentals of Queuing Theory
• Arrivals– Arrival rate (veh/sec)
• Uniform• Poisson
– Time between arrivals (sec)• Constant• Negative exponential
• Service– Service rate– Service times
• Constant• Negative exponential
CE
E 3
20F
all 2
008
Queue Discipline
• First In First Out (FIFO)– prevalent in traffic engineering
• Last In First Out (LIFO)
CE
E 3
20F
all 2
008
Queue Analysis – Graphical
ArrivalRate
DepartureRate
Time
Ve
hicl
es
t1
Queue at time, t1
Maximum delay
Maximum queue
D/D/1 Queue
Delay of nth arriving vehicle
Total vehicle delay
Where is capacity?
CE
E 3
20F
all 2
008
Poisson Distribution
• Good for modeling random events• Count distribution
– Uses discrete values– Different than a continuous distribution
!n
etnP
tn
P(n) = probability of exactly n vehicles arriving over time t
n = number of vehicles arriving over time t
λ = average arrival rate
t = duration of time over which vehicles are counted
CE
E 3
20F
all 2
008
Poisson Ideas
• Probability of exactly 4 vehicles arriving– P(n=4)
• Probability of less than 4 vehicles arriving– P(n<4) = P(0) + P(1) + P(2) + P(3)
• Probability of 4 or more vehicles arriving– P(n≥4) = 1 – P(n<4) = 1 - P(0) + P(1) + P(2) + P(3)
• Amount of time between arrival of successive vehicles
36000
!00 qtt
t
eeet
thPP
CE
E 3
20F
all 2
008
Example Graph
0.00
0.05
0.10
0.15
0.20
0.25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Arrivals in 15 minutes
Pro
bab
ilit
y o
f O
ccu
ran
ce
CE
E 3
20F
all 2
008
0.00
0.05
0.10
0.15
0.20
0.25
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Arrivals in 15 minutes
Pro
bab
ilit
y o
f O
ccu
ran
ce
Mean = 0.2 vehicles/minute
Mean = 0.5 vehicles/minute
Example Graph
CE
E 3
20F
all 2
008
Example: Arrival Intervals
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
0 2 4 6 8 10 12 14 16 18 20
Time Between Arrivals (minutes)
Pro
bab
ilit
y o
f E
xced
ance
Mean = 0.2 vehicles/minute
Mean = 0.5 vehicles/minute
CE
E 3
20F
all 2
008
Queue Notation
• Popular notations:– D/D/1, M/D/1, M/M/1, M/M/N– D = deterministic– M = some distribution
NYX //
Arrival rate nature
Departure rate nature
Number ofservice channels
CE
E 3
20F
all 2
008
Queuing Theory Applications
• D/D/1– Deterministic arrival rate and service times – Not typically observed in real applications but
reasonable for approximations
• M/D/1 – General arrival rate, but service times
deterministic– Relevant for many applications
• M/M/1 or M/M/N– General case for 1 or many servers
CE
E 3
20F
all 2
008
Queue times depend on variability
CE
E 3
20F
all 2
008
Queue Analysis – Numerical
• M/D/1– Average length of queue
– Average time waiting in queue
– Average time spent in system
0.1
12
2
Q
12
1w
1
2
2
1t
λ = arrival rate μ = departure rate =traffic intensity
Steady state assumption
CE
E 3
20F
all 2
008
Queue Analysis – Numerical
• M/M/1– Average length of queue
– Average time waiting in queue
– Average time spent in system
0.1
1
2
Q
1
w
1t
λ = arrival rate μ = departure rate =traffic intensity
CE
E 3
20F
all 2
008
Queue Analysis – Numerical
• M/M/N– Average length of queue
– Average time waiting in queue
– Average time spent in system
2
10
1
1
! NNN
PQ
N
1
Q
w
Q
t
0.1N
λ = arrival rate μ = departure rate =traffic intensity
CE
E 3
20F
all 2
008
M/M/N – More Stuff
– Probability of having no vehicles
– Probability of having n vehicles
– Probability of being in a queue
1
0
0
1!!
1N
n
N
c
n
c
c
NNn
P
Nnfor !
0 n
PP
n
n
Nnfor !
0 NN
PP
Nn
n
n
NNN
PP
N
Nn
1!
10
0.1N
λ = arrival rate μ = departure rate =traffic intensity
CE
E 3
20F
all 2
008
Poisson Distribution Example
From HCM 2000
Vehicle arrivals at the Olympic National Park main gate are assumed Poisson distributed with an average arrival rate of 1 vehicle every 5 minutes. What is the probability of the following:
1. Exactly 2 vehicles arrive in a 15 minute interval?2. Less than 2 vehicles arrive in a 15 minute interval?3. More than 2 vehicles arrive in a 15 minute interval?
!
minveh20.0 minveh20.0
n
etnP
tn
CE
E 3
20F
all 2
008
Example Calculations
%4.22224.0
!2
1520.02
1520.02
e
PExactly 2:
Less than 2:
More than 2:
1992.0102 PPnP
5768.021012 PPPnP
P(0)=e-.2*15=0.0498, P(1)=0.1494
CE
E 3
20F
all 2
008
Example 1
You are entering Bank of America Arena at Hec Edmunson Pavilion to watch a basketball game. There is only one ticket line to purchase tickets. Each ticket purchase takes an average of 18 seconds. The average arrival rate is 3 persons/minute.
Find the average length of queue and average waiting time in queue assuming M/M/1 queuing.
CE
E 3
20F
all 2
008
Example 1
• Departure rate: μ = 18 seconds/person or 3.33 persons/minute
• Arrival rate: λ = 3 persons/minute• ρ = 3/3.33 = 0.90
• Q-bar = 0.902/(1-0.90) = 8.1 people• W-bar = 3/3.33(3.33-3) = 2.73 minutes
• T-bar = 1/(3.33 – 3) = 3.03 minutes
CE
E 3
20F
all 2
008
Example 2
You are now in line to get into the Arena. There are 3 operating turnstiles with one ticket-taker each. On average it takes 3 seconds for a ticket-taker to process your ticket and allow entry. The average arrival rate is 40 persons/minute.
Find the average length of queue, average waiting time in queue assuming M/M/N queuing.
CE
E 3
20F
all 2
008
Example 2
• N = 3• Departure rate: μ = 3 seconds/person or 20 persons/minute• Arrival rate: λ = 40 persons/minute• ρ = 40/20 = 2.0• ρ/N = 2.0/3 = 0.667 < 1 so we can use the other equations
• P0 = 1/(20/0! + 21/1! + 22/2! + 23/3!(1-2/3)) = 0.1111• Q-bar = (0.1111)(24)/(3!*3)*(1/(1 – 2/3)2) = 0.88 people• T-bar = (2 + 0.88)/40 = 0.072 minutes = 4.32 seconds• W-bar = 0.072 – 1/20 = 0.022 minutes = 1.32 seconds
CE
E 3
20F
all 2
008
Example 3
You are now inside the Arena. They are passing out Harry the Husky doggy bags as a free giveaway. There is only one person passing these out and a line has formed behind her. It takes her exactly 6 seconds to hand out a doggy bag and the arrival rate averages 9 people/minute.
Find the average length of queue, average waiting time in queue, and average time spent in the system assuming M/D/1 queuing.
CE
E 3
20F
all 2
008
Example 3
• N = 1• Departure rate: μ = 6 seconds/person or 10
persons/minute• Arrival rate: λ = 9 persons/minute• ρ = 9/10 = 0.9
• Q-bar = (0.9)2/(2(1 – 0.9)) = 4.05 people• W-bar = 0.9/(2(10)(1 – 0.9)) = 0.45 minutes = 27
seconds• T-bar = (2 – 0.9)/((2(10)(1 – 0.9) = 0.55 minutes =
33 seconds
CE
E 3
20F
all 2
008
Primary References
• Mannering, F.L.; Kilareski, W.P. and Washburn, S.S. (2003). Principles of Highway Engineering and Traffic Analysis, Third Edition (Draft). Chapter 5
• Transportation Research Board. (2000). Highway Capacity Manual 2000. National Research Council, Washington, D.C.