Вы находитесь на странице: 1из 38

QUEUING

Asst. Prof. Dr. Deprizon Syamsunur


Civil Engineering Department
UCSI Kuala Lumpur
deprizon@ucsiuniversity.edu.my
Outline

1. Fundamentals
2. Poisson Distribution
3. Notation
4. Applications
5. Analysis
a. Graphical
b. Numerical
6. Example
DEFINITION

• A queuing system can be described as


follows:
"customers arrive for a given service,
wait if the service cannot start
immediately and leave after being
served"

• The term "customer" can be person,


products, machines, ...
QUEUING THEORY

• Queues from behind breakdown


Uninterrupted points at which arriving demand
flow exceeds capacity.
flow

• Queuing is a systemic process. At


Interrupted every signalized intersection, a
queue forms when the signal is
flow red and dissipates (ideally) during
the green that follows.
QUEUING SYSTEMS: BASIC
FRAMEWORK & KEY METRICS

Customer
Population
Exit
Arrival
Queue
Service

1. Average utilization (% time server busy)


2. Average queuing time
3. Average queue length (# of customers in line)
4. Average system time (queuing + service)

5. Average # of customers in the system (in line + being served)


In general, a deterministic queuing analysis would start at a time when there is no
queue present at the beginning of time period 1
EXAMPLE
An example is used to indicate the practical
importance of this seemingly theoretic issue. In
practical terms, consider the following sequence
of events:
1. A driver wakes up at 6:00 am and hears a radio
report that a truck is broken down and is
blocking one lane of a three-lane freeway
segment on his/her route to work.
2. At 6:30 am, the radio traffic report indicates
that the blockage has been cleared.
3. The driver leaves for work several hours later
but encounters a queue of several miles leading
up to the location of the 6:00 am breakdown.
4. On reaching the location (after passing through
the queue), traffic rapidly accelerates into an
undersaturated downstream freeway.
What exactly happened here? Consider the specifics
of this scenario illustrated in figure.
SOLUTION
1. There are two capacities, one of 2,000 veh/h/ln on the undersaturated or stable
portion of the curve, and one of 1,800 veh/h/ln on the oversaturated or unstable
portion of the curve.
2. There is only one capacity of 2,000 veh/h/ln at the peak of the curve.
If ( it is assumed that vehicles in a queue occupy approximately 50 ft of space
(including spacing between vehicles), then the maximum lengths of queue are;
EXAMPLE
A freeway with two lanes in one direction has a capacity of 2,100 veh/h/ln
under normal operation. On a particular morning, one of these lanes is
blocked for 15 minutes, beginning at 7:00 am. The arrival pattern of
vehicles at this location is as follows:
Conduct a deterministic queuing analysis to determine (a) the maximum size
and length of the queue, and (b) the time that the queue will fully
dissipate. The following two scenarios should be examined:
1. Capacity under stable conditions: 2,100 veh/h/ln queue discharge
capacity: 1,950 veh/h/ln
2. Capacity under stable conditions: 2,100 veh/h/ln queue discharge
capacity: 2,100 veh/h/ln
SOLUTION
Queue analysis scenario 1:
Time Arrival (veh) Capacity (veh) Queue size (veh)
7:00-7:15am 4200/4 = 1050 1950/4 = 487.5 1050-487.5 =562.5
7:15 - 8:00am 3(4200/4)=3150 (1950/4)x3x2=2925 562.5+3150-2925=787.5
8:00-9:00am 4000 1950x2=3900 787.5+4000-3900=887.5
9:00-10:00am 3800 3900 887.5+3800-3900=787.5
>10 3000 3900 -112.5

Queue dissipates
787.5/900=0.875 hr
0.875x60 = 52.5minutes
after 10:00am or 10:52.5 am
Fundamentals of Queuing Theory
Microscopic traffic flow
• Arrivals
– Uniform or random
• Departures
– Uniform or random
• Service rate
– Departure channels
• Discipline
– FIFO and LIFO are most popular
– FIFO is more prevalent in traffic engineering
MICROSCOPIC TRAFFIC FLOW

Microscopic traffic models describe the


interactions between the various vehicles.
Since it is impossible to predict the behaviour
of each driver with absolute certainty,
stochastic models are commonly used for this
purpose.
MICROSCOPIC TRAFFIC FLOW
The car-following model
• The behavior of vehicle and driver

The lane-change model


• Vehicles change lanes

Route choice model


• Shortest route
• OD (Origin-destination)

Additional modules.
• Speed and acceleration of vehicles.
• Pollution, noise pollution, time loss and economic costs
Poisson Distribution
• Count distribution
– Uses discrete values
– Different than a continuous distribution

P n  
t  n
e  t

n!
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
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

P0   Ph  t  
t  0
e  t
 e t  e  qt 3600
0!
Poisson Distribution Example
Vehicle arrivals at the UCSI North Wing Campus 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?

Pn  
0.20 veh min  t 
n
e  0.20veh min t

n!

From HCM 2000


Example Calculations

Exactly 2: P2 
0.20  15 e  0.2015
2
 0.224  22.4%
2!
Less than 2: Pn  2  P0  P1
Less than 2
•P(0) = e-(0.20)(15) = 0.0498
•P(1) = 0.1494
•P(0) + P(1) = 0.0498 + 0.1494 = 0.1992=20%
More than 2: Pn  2  1  P0  P1  P2
More than 2
•P(n>2) = 1 – (0.1992 + 0.224) = 0.5768=57.7%
EXAMPLE
An observer counts 360 veh/h at a
specific highway location. Assuming that
the arrival of vehicles at this location is
Poisson distributed. Analyze the
probabilities of having 0, 1, 2, 3, 4, and 5
or more vehicles arriving over a 20
second time interval and sketch the
probability histogram.
SOLUTION
SOLUTION
Example Graph
0.25

0.20
Probability of Occurance

0.15

0.10

0.05

0.00
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
Example Graph
0.25

Mean = 0.2 vehicles/minute


0.20
Probability of Occurance

Mean = 0.5 vehicles/minute

0.15

0.10

0.05

0.00
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
Example: Arrival Intervals
1.0

0.9 Mean = 0.2 vehicles/minute


0.8 Mean = 0.5 vehicles/minute
Probability of Excedance

0.7

0.6

0.5

0.4

0.3

0.2

0.1

0.0
0 2 4 6 8 10 12 14 16 18 20
Time Between Arrivals (minutes)
Queue Notation
Number of
Arrival rate nature service channels

X /Y / N
Departure rate nature

• Popular notations:
An M/M/1 queue represents
– D/D/1, M/D/1, M/M/1, M/M/N the queue length in a system
having a single server, where
– D = deterministic distribution arrivals are determined by a
Poisson process and job
– M = exponential distribution service times have an
exponential distribution.
Queuing Theory Applications
• D/D/1
– Use only when absolutely sure that both arrivals and departures
are deterministic
• M/D/1
– Controls unaffected by neighboring controls
• M/M/1 or M/M/N
– General case
• Factors that could affect your analysis:
– Neighboring system (system of signals)
– Time-dependent variations in arrivals and departures
• Peak hour effects in traffic volumes, human service rate changes
– Breakdown in discipline
• People jumping queues! More than one vehicle in a lane!
– Time-dependent service channel variations
• Grocery store counter lines
Queue Analysis – Graphical
D/D/1 Queue
Departure
Rate
Delay of nth arriving vehicle Arrival
Rate
Maximum queue
Vehicles

Maximum delay

Total vehicle delay

Queue at time, t1

t1 Time
an M/D/1 queue represents the queue length in a system having a single server,

Queue Analysis – Numerical


where arrivals are determined by a Poisson process and job service times are fixed
(deterministic)


• M/D/1 

  1.0

– Average length of queue 2


Q
21   

1   
– Average time waiting in queue w  
2  1   

1 2  
t  
– Average time spent in system 2  1   

λ = arrival rate μ = departure rate


Queue Analysis – Numerical

• M/M/1 
   1.0

– Average length of queue 2


Q
1   

1  
– Average time waiting in queue w   
    

1
t
– Average time spent in system  

λ = arrival rate μ = departure rate


Queue Analysis – Numerical

  N  1.0

• M/M/N
– Average length of queue P0  N 1  1 
Q  
N! N  1   N 2 

 Q 1
– Average time waiting in queue w 
 

 Q
t
– Average time spent in system 

λ = arrival rate μ = departure rate


M/M/N – More Stuff

  N  1.0
– Probability of having no vehicles 
1
P0  N 1
n N

c


nc  0 nc ! N !1   N 

– Probability of having n vehicles


 P0
n  n P0
Pn  for n  N Pn  n N
for n  N
n! N N!

– Probability of being in a queue


N 1
P0 
Pn N 
N! N 1   N 
λ = arrival rate μ = departure rate
Example 1
You are entering UCSI Sport Arena at UCSI South
Campus 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.
Solution
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


Example 2
You are now in line to get into the Sport 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.
What is the probability of having exactly 5 people in
the system?
Solution
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

Since n > N (5 > 3)


•Pn = 25(0.1111)/(35-3*3!) = 0.0658 = 6.58%
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.
Solution
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
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.

Вам также может понравиться