4 - Elementary Queuing Theory
4 - Elementary Queuing Theory
1
Queuing Theory
One of the major issues in the analysis of any traffic
system is the analysis of delay
Delay is the difference between the actual travel
time on a given segment and some ideal travel time
of that segment.
In practice, the ideal travel time chosen will depend
on the situation; in general, however, there are two
particular travel times that seem best suited as
benchmarks for comparison with the actual
performance of the system. These are the travel time
under free flow conditions and travel time at
capacity.
Queuing System
Input parameters:
1. Mean arrival rate
2. Mean service rate
3. Number of servers
4. Queue discipline
Queuing Theory
Mean arrival rate (λ) is the rate at which vehicles arrive at a service
facility:
3600
𝜆=
ℎ
Mean departure rate (μ) is the rate at which vehicles depart from a
service facility:
3600
𝜇=
ℎ
Queuing Theory
• Number of servers – are the number of servers or stations that are
being utilized that influences formation of a queue.
• Queue discipline – parameter that explains how the vehicles arrive
at a service facility. There are 5 types of queue disciplines:
• Fist in, first out (FIFO)
• First in, last out (FILO)
• Served in random order (SIRO)
• Priority scheduling
• Processor/time sharing
Queue Disciplines
Served in random Processor/time
First in, first out First in, last out order Priority service
sharing
• If the vehicles are • If the vehicles are • Under this rule • Under this rule • The server is
served in the serviced in the customers are customers are switched
order of their reverse order of selected for grouped in between all the
arrival their entry, so service at priority classes queues for a
that the ones random, based on some predefined slice
who join the last irrespective of attributes such as of time (quantum
are served first. their arrivals in service time or time) in a round-
the service urgency or robin manner
system. according to
some identifiable
characteristic,
and FIFO rule is
used within each
class to provide
service.
Poisson Distribution
It is assumed that the vehicles arrive at a specific interval following a
Poisson distribution. If that’s the case, then the probability of having n
arrivals in any interval of time t sec can be obtained by:
𝜆𝑡 𝑛 𝑒 −𝜆𝑡
𝑃 𝑋 = 𝑛 = 𝑝(𝑥; 𝜇) =
𝑛!
Where:
𝑃(𝑋 = 𝑛) is the probability of exactly n vehicles arriving over time t
𝜆 is the average arrival rate (veh/hr). Note that 𝜇 = 𝜆𝑡
In a certain toll booth, it is found that vehicles arrived at a fixed rate of 2.5 veh/hr. Assuming that
the vehicles follow Poisson distribution, determine the following:
a. Probability of exactly 4 vehicles arriving every hour
b. Probability of less than 4 vehicles arriving every hour
c. Probability of 4 or more vehicles arriving every hour
a. Probability of exactly 4 vehicles arriving every hour c. Probability of 4 or more vehicles arriving every
𝑣𝑒ℎ hour:
(𝜇 = 𝜆𝑡 = 2.5 1 ℎ𝑟
ℎ𝑟
𝑃 𝑋 ≥ 4 = 1 − 𝑃 𝑋 < 4 = 1 − 0.8912 = 0.1088
𝑒 −2.5 2.54
𝑃 𝑋=4 = = 0.1336
4!
𝜆𝑡 0 𝑒 −𝜆𝑡
𝑃 0 =𝑃 ℎ≥𝑡 =
0!
= 𝑒 −𝜆𝑡 = 𝑒 −𝑞𝑡/3600
Number of
Arrival rate nature service channels
X /Y / N
Departure rate nature
Popular notations:
• D/D/1, M/D/1, M/M/1, M/M/N
• D = deterministic
• M = random / Markov
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
D/D/1 Example
Vehicles arrive at an entrance to a recreational park. There is a single gate at which all vehicles must stop,
where a park attendant distributes a free brochure. The park opens at exactly 8:00 AM, at which the time
vehicles begin to arrive at a rate of 480 veh/hr. After 20 minutes the arrival flow rate declines to 120
veh/hr and it continues at that level for the remainder of the day. If the time required to distribute the
brochure is 15 seconds, and assuming D/D/1 queuing, describe the operational characteristics of the
queue formed.
Converting arrival and departure
rates to common units:
(B)
Quantity Formula
Average length of queue (vehicles) 𝜌2
𝑄ത =
2(1 − 𝜌)
Average waiting time (unit time per 𝜌
𝑤
ഥ=
vehicle) 2𝜇(1 − 𝜌)
Average time spent in the system (unit 2−𝜌
𝑡ҧ =
time per vehicle) 2𝜇(1 − 𝜌)
𝜆
Take note that 𝜌 = , is known as the utilization factor, or traffic intensity.
𝜇
Example
Consider the entrance to the recreational park previously described. However, let the
average arrival rate be 180 veh/hr and Poisson-distributed over the entire period from the
park opening time until closing at dusk. Compute the average length of queue (in vehicles),
average waiting time in the queue, and the average time spent in the system, assuming
M/D/1 queuing. Utilizing M/D/1 formulas:
Converting arrival and departure
rates to common units:
(Average length of queue)
Quantity Formula
Average length of queue (vehicles) 𝜌2
𝑄ത =
1−𝜌
Average waiting time (unit time per vehicle) 𝜆
𝑤
ഥ=
𝜇(𝜇 − 𝜆)
Average time spent in the system (unit time 1
ҧ𝑡 =
per vehicle) 𝜇−𝜆
𝜆
Take note that 𝜌 = , is known as the utilization factor, or traffic intensity.
𝜇
Example
Assume that the park attendant in the same recreational park takes an average of
15 seconds to distribute brochures, but the distribution time varies depending on
whether park patrons have questions or not relating to park operating policies, or
some other matters. Given an average arrival rate of 180 veh/hr, compute the
average length of queue (in vehicles), average waiting time in the queue, and the
average time spend in the system, assuming M/M/1 queuing.
Quantity Formula
Average length of queue (vehicles) 𝑃0 𝜌𝑁+1 1
𝑄ത = 2
𝑁! 𝑁 𝜌
1−
𝑁
Average waiting time (unit time per 𝜌 + 𝑄ത 1
vehicle) 𝑤
ഥ= −
𝜆 𝜇
Average time spent in the system 𝜌 + 𝑄ത
ҧ𝑡 =
(unit time per vehicle) 𝜆
Where 𝑛𝑐 is the departure channel number
𝜆
Take note that 𝜌 = , is known as the utilization factor, or traffic intensity.
𝜇
M/M/N Queuing
• Probability of no vehicles in the system (𝑃0 ): Where:
1 𝑃0 = probability of having no vehicles
𝑃0 =
𝑁−1 𝜌 𝑛𝑐 𝜌𝑁 in the system
σ𝑛=0 +
𝑛𝑐 ! 𝑁! 1 − 𝜌 𝑃𝑛 = probability of having n vehicles in
𝑁 the system
• Probability of having n vehicles in the system 𝑃𝑛>𝑁 = probability of waiting in a
(𝑃𝑛 ):
𝜌𝑛 𝑃0
queue (the probability that the
when n ≤ N: 𝑃𝑛 = number of vehicles in the system is
𝑛!
𝜌𝑛 𝑃0
when n > N: 𝑃𝑛 = greater than the number of departure
𝑁𝑛−𝑁 𝑁!
channels)
• Probability that there are n vehicles waiting
in a queue: 𝑛 = number of vehicles in the system
𝑃0 𝜌𝑁+1 𝑁 = number of departure channels
𝑃𝑛>𝑁 = 𝜌 𝑛𝑐 = departure channel number
𝑁! 𝑁 1 − 𝜌 = traffic intensity (𝜆/𝜇)
𝑁
Example
At an entrance to a toll bridge, four toll booths are open. Vehicles arrive at
the bridge at an average rate of 1200 veh/hr, and at the booths, drivers take
an average of 10 seconds to pay their tolls. Both the arrival and departure
rates can be assumed to be exponentially distributed. How would the
average queue length, time in the system, and probability of waiting in a
queue change if a 5th toll booth is opened?
Given:
𝜇 = 6 veh/min Average queue length:
𝜌 = 3.333
𝜌/𝑁 = 0.833 (less than 1)
Probability of having to
wait in a queue:
Example
At an entrance to a toll bridge, four toll booths are open. Vehicles arrive at
the bridge at an average rate of 1200 veh/hr, and at the booths, drivers take
an average of 10 seconds to pay their tolls. Both the arrival and departure
rates can be assumed to be exponentially distributed. How would the
average queue length, time in the system, and probability of waiting in a
queue change if a 5th toll booth is opened?
Given:
𝜇 = 6 veh/min Average queue length:
𝜌 = 3.333
𝜌/𝑁 = 0.667 (less than 1)
Probability of having to
wait in a queue: