0% found this document useful (0 votes)
33 views25 pages

4 - Elementary Queuing Theory

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views25 pages

4 - Elementary Queuing Theory

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

ELEMENTARY QUEUEING 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!

b. Probability of less than 4 vehicles arriving every


hour
3 3
𝑒 −2.5 2.5𝑥
𝑃 𝑋 < 4 = ෍ 𝑝 𝑥; 2.5 = ෍ = 0.8912
𝑥!
𝑥=0 𝑥=0
Poisson Distribution
The probability of having zero (0) vehicle arriving in time t:

𝜆𝑡 0 𝑒 −𝜆𝑡
𝑃 0 =𝑃 ℎ≥𝑡 =
0!

= 𝑒 −𝜆𝑡 = 𝑒 −𝑞𝑡/3600

Also, by definition, 𝑃 ℎ < 𝑡 = 1 − 𝑃(ℎ ≥ 𝑡)


Example
An observer counts 360 veh/hr at a specific highway location. Assuming that the
arrival of vehicles at this highway location is Poisson-distributed, estimate the
probabilities of having 0, 1, 2, 3, 4, and 5 or more vehicles arriving over a 20-second
time interval. What is the probability that the headway between successive
vehicles will be less than 8 seconds, and what is the probability that the headway
between successive vehicles will be between 8 and 10 seconds?
Queue Notation

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)

Equations for the total number of vehicle arrivals (C)


at a specified time t (t – number of minutes after (A)
8:00AM:
(A)
(B)
(C)
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.
(A)
When the arrival curve is above the departure
curve, a queue exists. To determine the time (B)
when queue no longer exists, we must locate (C)
the point of queue dissipation:
(B)

Therefore, the queue will dissipate 60 minutes (C)


(A)
after 8:00AM (which is 9:00AM), at which
time, 240 vehicles have already arrived and
departed (4 veh/min x 60 minutes)
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.
(A)
The delay of an individual vehicle is the
horizontal distance between arrival and (B)
departure curves starting from the vehicle’s (C)
arrival in the queue.
(B)
The 160th vehicle to arrive will have the
longest delay by 20 minutes
(C)
(A)
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.
(A)
The total length of queue at a specified time,
expressed as the number of vehicles, is the (B)
vertical distance between the arrival and (C)
departure curves at that time.
(B)
The longest queue (longest vertical distance
between arrival and departure curves) will
occur at t = 20 minutes and is 80 vehicles (C)
long. (A)
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.
(A)
The total vehicle delay is the summation of
the delays for the individual vehicles, given by (B)
the total area between the arrival and (C)
departure curves (in vehicle-minutes).
(B)
The area between the arrival and departure From here, 240
curves can be determined by summing vehicles encounter
triangular areas, giving the total delay: delay: (average delay
(C) per vehicle is 10
(A)
minutes – 2400 veh-
min/240 veh) and the
average length is 40
vehicles (2400 veh-
min/60 min)
M/D/1 Queuing (when 𝜌 < 1)
The assumption of exponentially distributed times between the arrivals of successive vehicles (Poisson arrivals)
will, in some cases, give a more realistic representation of the traffic flow than the assumption of uniformly
distributed arrival times.

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)

(Average waiting time in queue)

(Average time spent in the system)


M/M/1 Queuing (when 𝜌 < 1)
A queueing model that assumes one departure channel and exponentially distributed departure times in
addition to exponentially distributed arrival rates (an M/M/1 queue) is applicable in some traffic
applications. Under standard M/M/1 assumptions, it can be shown that the following queuing performance
equations apply:

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.

(Average length of queue)


Utilizing M/M/1 formulas:

(Average waiting time in queue)

(Average time spent in the system)


M/M/N Queuing
A more general formulation of the M/M/1 queue is the M/M/N queue, where N is the total number of
departure channels. M/M/N queueing is a reasonable assumption at locations where there is more than one
departure channel available (more than one toll booth open).

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 no vehicles in Average time spent in


the system (4 booths): the system:

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 no vehicles in Average time spent in


the system (fifth booth open): the system:

Probability of having to
wait in a queue:

You might also like