Documente Academic
Documente Profesional
Documente Cultură
Reference:
AGNER K. ERLANG
Danish engineer, who, in 1909
experimented with fluctuating demand
in telephone traffic in Copenhagen.
In 1917, he published a report
addressing the delays in automatic
telephone dialing equipment.
At the end of World War II, his work
was extended to more general
problems, including waiting lines in
business.
Queueing Theory
It involves the mathematical study of waiting lines.
Service Served
Input Source Queue
Mechanism Customers
Queueing System
Balking – phenomenon when you see a long line and you don’t want to be there.
Renege – you are already in the line and you choose to leave.
Queueing Theory
The Queueing Cost Trade-off
Cost
Total Cost
Minimum Cost of Providing
Service
Total ( salaries + benefits )
Cost
Cost of Waiting
Time
( time x value of time )
𝑳= 𝝀𝑾
𝑳𝒒 = 𝝀 𝑾𝒒
𝟏
𝑾 = 𝑾𝒒 +
𝝁
Birth and Death Process
Birth – arrival
Death – completion of the system
Assumptions:
l0 l1 lN-2 lN-1 lN
𝑷𝒏 = 𝟏 𝑷𝟎 + 𝑷𝒏 = 𝟏 𝑷𝟎 + 𝑪𝒏 𝑷𝟎 = 𝟏
𝒏=𝟎 𝒏=𝟏 𝒏=𝟏
∞
𝟏
𝑷𝟎 𝟏 + 𝑪𝒏 = 𝟏 𝑷𝟎 =
𝟏 + σ∞
𝒏=𝟏 𝑪𝒏
𝒏=𝟏
Birth and Death Process
Given are the following information:
∞
𝑳 = 𝒏𝑷𝒏
𝒏=𝟎
∞
𝑳𝒒 = 𝒏 − 𝒔 𝑷𝒏
𝒏=𝒔
𝑳 = 𝝀ത 𝐰
𝑳𝒒 = 𝝀ത 𝑾𝒒
𝑤ℎ𝑒𝑟𝑒:
λത = 𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑟𝑎𝑡𝑒 𝑜𝑣𝑒𝑟 𝑡ℎ𝑒 𝑙𝑜𝑛𝑔 𝑟𝑢𝑛
∞
λത = λ𝑛 𝑃𝑛
𝑛=0
Queueing Theory
Notation:
(a / b / c) : (d / e / f)
where:
a – arrival distribution
b – service distribution
c – number of parallel servers
d – service discipline
e – maximum number of customers allowed in the system
f – size of the input source
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Single Server, Multiple Customers
Notations:
𝒏
𝝀 ∞
𝑷𝒏 = 𝑷𝟎 for n = 1,2,3,…
𝝁 𝑷𝒏 = 𝟏
or 𝒏=𝟎
∞
𝑷𝒏 = 𝝆𝒏 𝑷𝟎 𝑷𝟎 + 𝝆𝒏 𝑷𝟎 = 𝟏
𝒏=𝟎
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Single Server, Multiple Customers
𝑷𝟎 + 𝝆𝒏 𝑷𝟎 = 𝟏
𝒏=𝟎
𝟏 𝟏
𝑷𝟎 = ∞ =
∞ σ𝒏=𝟎 𝝆𝒏 𝟏
𝟏 − 𝝆
𝑷𝟎 𝟏 + 𝝆𝒏 = 𝟏
𝒏=𝟎
𝑷𝟎 = 𝟏 − 𝝆
∞
𝑷𝟎 𝝆𝒏 = 𝟏 provided ρ < 1
𝒏=𝟎
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Single Server, Multiple Customers
Formulas:
𝝀𝟐
𝑷𝒏 = 𝝆𝒏 𝑷𝟎 for n = 1,2,3,… 𝑳𝒒 =
𝝁 (𝝁 − 𝝀)
𝑷𝟎 = 𝟏 − 𝝆 provided ρ < 1
𝟏
𝑾=
𝝆 𝝀 𝝁 −𝝀
𝑳= =
𝟏 − 𝝆 𝝁 −𝝀 𝝀
𝑾𝒒 =
𝝁 (𝝁 − 𝝀)
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Example 1:
A fast food restaurant has one drive-in window. Cars arrive according to a
Poisson distribution at a rate of 2 cars every 5 minutes. The space in front
of the window can accommodate at most 10 cars, including the one being
served. Other cars can wait outside this space, if necessary. The service
time per customer is exponential, with a mean of 1.5 minutes. Determine
the following:
𝑷𝒊𝒅𝒍𝒆 = 𝟎. 𝟒𝟎 𝑳𝒒 = 𝟎. 𝟗 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓
Case 1. (M / M / 1) : (GD / ∞ / ∞)
S
c.) Wq
𝝀
𝑾𝒒 =
𝝁 (𝝁 − 𝝀)
𝟐ൗ
𝑾𝒒 = 𝟓
𝟏ൗ ( 𝟏ൗ − 𝟐ൗ )
𝟏. 𝟓 𝟏. 𝟓 𝟓
𝑾𝒒 = 𝟐. 𝟐𝟓 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
Case 1. (M / M / 1) : (GD / ∞ / ∞)
S
d.) Let Pexceed = probability that the working line will exceed 10-space
capacity
∞ 𝟏𝟎 𝟏𝟎
𝑷𝒆𝒙𝒄𝒆𝒆𝒅 = 𝑷𝒏 = 𝟏 − 𝑷𝒏 = 𝟏 − 𝑷𝟎 𝝆𝒏
𝒏=𝟏𝟏 𝒏=𝟎 𝒏=𝟎
𝟏𝟏
𝟐ൗ
𝟏 − 𝝆𝟏𝟏 𝟓
𝑷𝒆𝒙𝒄𝒆𝒆𝒅 = 𝟏 − 𝟏 − 𝝆 = 𝝆𝟏𝟏 = 𝟏𝟏
𝟏−𝝆 𝟏ൗ
𝟏. 𝟓
𝑷𝒆𝒙𝒄𝒆𝒆𝒅 = 𝟎. 𝟎𝟎𝟑𝟔
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Example 2:
Answers:
𝟒𝟎 𝒔𝒕𝒖𝒅𝒆𝒏𝒕𝒔 𝟒𝟎 𝟐
𝝆= 𝑳𝒒 =
𝟗𝟎 𝒄𝒐𝒑𝒊𝒆𝒔 𝟗𝟎 (𝟗𝟎 − 𝟒𝟎)
Answers:
(c) Average # of students in: (d) Average Time spent waiting in the
system (L): Queue (Wq):
𝝆 𝝀 𝝀
𝑳= = 𝑾𝒒 =
𝟏 − 𝝆 𝝁 −𝝀 𝝁 (𝝁 − 𝝀)
𝟒𝟎 𝟒𝟎
𝑳= 𝑾𝒒 =
𝟗𝟎 − 𝟒𝟎 𝟗𝟎 (𝟗𝟎 − 𝟒𝟎)
𝑳 = 𝟎. 𝟖 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔 𝑾𝒒 = 𝟎. 𝟓𝟑 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
Case 1. (M / M / 1) : (GD / ∞ / ∞)
Example 2: 𝜆 = 40 𝑠𝑡𝑢𝑑𝑒𝑛𝑡𝑠 𝜇 = 90 𝑐𝑜𝑝𝑖𝑒𝑠
Answers:
𝟏
𝑾=
𝝁 −𝝀
𝟏
𝑾=
𝟗𝟎 − 𝟒𝟎
𝑾 = 𝟏. 𝟐 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
Case 2. (M / M / 1) : (GD / N / ∞)
Single Server, Limited Number of Customers
𝑛𝜇, 𝑓𝑜𝑟 𝑛 = 1,2, … , 𝑠
Formulas: 𝜇𝑛 = ቊ
𝑠𝜇, 𝑓𝑜𝑟 𝑛 > 𝑠
𝑷𝒏 = 𝝆𝒏 𝑷𝟎 for n = 1,2,3,…
𝟏−𝝆
𝑷𝟎 = provided ρ ≠ 1
𝟏 − 𝝆𝑵+𝟏
𝟏
𝑷𝟎 = provided ρ = 1
𝑵+𝟏
𝝆 𝟏 − 𝑵 + 𝟏 𝝆𝑵 + 𝑵𝝆𝑵+𝟏
𝑳= provided ρ ≠ 1
(𝟏 − 𝝆)(𝟏 − 𝝆𝑵+𝟏 )
Case 2. (M / M / 1) : (GD / N / ∞)
Single Server, Limited Number of Customers
Formulas:
𝑵 𝝀ത = 𝝀 (𝟏 − 𝑷𝑵 )
𝑳= provided ρ = 1
𝟐
𝝀ത
𝑳𝒒 = 𝑳 −
𝝁
𝑳
𝑾=
𝝀ത
𝑳𝒒 𝟏
𝑾𝒒 = or 𝑾𝒒 = 𝑾 −
𝝀ത 𝝁
Case 2. (M / M / 1) : (GD / N / ∞)
Example 1:
(a) What is the probability that an arriving patient will not wait?
(b) What is the probability that an arriving patient will find a seat in the
room?
(c) What is the expected total time a patient spends in the clinic?
Case 2. (M / M / 1) : (GD / N / ∞)
Example 1: (M / M / 1): (GD / 15 / ∞)
𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠
𝜆 = 20 𝜇 = 7.5
ℎ𝑜𝑢𝑟 ℎ𝑜𝑢𝑟
𝟏−𝝆 𝟏
(a) Pnot wait = P0 𝑷𝟎 = 𝑷𝟎 =
𝟏 − 𝝆𝑵+𝟏 𝑵+𝟏
provided ρ ≠ 1 provided ρ = 1
* Check for what formula:
𝜆 20 𝟏 − 𝟐𝟎ൗ𝟕. 𝟓
𝜌= = = 𝟐. 𝟔𝟕 ≠ 1 𝑷𝟎 = 𝟏𝟓+𝟏
𝜇 7.5 𝟐𝟎
𝟏 − ൗ𝟕. 𝟓
𝟏−𝝆
𝑷𝟎 =
𝟏 − 𝝆𝑵+𝟏 𝑷𝒏𝒐𝒕 𝒘𝒂𝒊𝒕 = 𝟐. 𝟓𝟓 𝒙 𝟏𝟎−𝟕
Case 2. (M / M / 1) : (GD / N / ∞)
Example 1: (M / M / 1): (GD / 15 / ∞)
𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠
𝜆 = 20 𝜇 = 7.5
ℎ𝑜𝑢𝑟 ℎ𝑜𝑢𝑟
𝟏𝟒
(b) Paccomodate = 𝑷𝒏
𝒏=𝟎
Paccomodate = 𝟏 − 𝝆𝑵 𝑷𝟎
𝟐𝟎 𝟏𝟓
Paccomodate = 𝟏 − (𝟐. 𝟓𝟓 𝒙 𝟏𝟎−𝟕 )
𝟕.𝟓
𝑷𝒂𝒄𝒄𝒐𝒎𝒐𝒅𝒂𝒕𝒆 = 𝟎. 𝟑𝟕𝟓
Case 2. (M / M / 1) : (GD / N / ∞)
Example 1: (M / M / 1): (GD / 15 / ∞)
𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠
𝜆 = 20 𝜇 = 7.5
ℎ𝑜𝑢𝑟 ℎ𝑜𝑢𝑟
𝑳 𝝆 𝟏 − 𝑵 + 𝟏 𝝆𝑵 + 𝑵𝝆𝑵+𝟏
(c) W = ? 𝑾=
𝝀ത
𝑳=
(𝟏 − 𝝆)(𝟏 − 𝝆𝑵+𝟏 )
𝟏𝟓 𝟏𝟔
𝟐𝟎 𝟐𝟎 𝟐𝟎
𝟏 − 𝟏𝟓 + 𝟏 + 𝟏𝟓
𝟕. 𝟓 𝟕. 𝟓 𝟕. 𝟓
𝑳= 𝟏𝟔
𝟐𝟎 𝟐𝟎
(𝟏 − )(𝟏 − )
𝟕. 𝟓 𝟕. 𝟓
𝟏𝟒. 𝟒 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔
𝑳 = 𝟏𝟒. 𝟒 𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔 𝑾= 𝑾 = 𝟎. 𝟕𝟐 𝒉𝒐𝒖𝒓𝒔
𝒑𝒂𝒕𝒊𝒆𝒏𝒕𝒔ൗ
𝟐𝟎 𝒉𝒓
Case 2. (M / M / 1) : (GD / N / ∞)
Example 2:
A barber shop has one barber and two chairs for waiting. The expected
time a barber to cut customer’s hair is assumed to be 15 minutes.
Customers arrive on a Poisson distribution at a rate of two per hour
provided the barber shop is not full. However, if the barber shop is full (at
least three customers), potential customers go elsewhere.
Determine the following:
𝟏−𝝆 𝟏
𝑷𝟎 = 𝑷𝟎 =
𝟏 − 𝝆𝑵+𝟏 𝑵+𝟏
(a) Pno customer= P0
provided ρ ≠ 1 provided ρ = 1
* Check for what formula:
𝟏 − 𝟎. 𝟓𝟎
𝜆 1/30 𝑷𝟎 =
𝜌= = = 𝟎. 𝟓𝟎 ≠ 1 𝟏 − 𝟎. 𝟓𝟎𝟑+𝟏
𝜇 1/15
𝟏−𝝆
𝑷𝟎 =
𝟏 − 𝝆𝑵+𝟏 𝑷𝒏𝒐 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓 = 𝟎. 𝟓𝟑𝟑𝟑
Case 2. (M / M / 1) : (GD / N / ∞)
Example 2: (M / M / 1): (GD / 3 / ∞)
2 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 1 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟
𝜆 = 𝜇 =
ℎ𝑜𝑢𝑟 15 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝟐
Pfull system = 𝟏 − 𝝆 𝑵 𝑷𝟎
𝟏/𝟑𝟎 𝟑
Pfull system = 𝟏− (𝟎. 𝟓𝟑𝟑𝟑)
𝟏/𝟏𝟓
𝟎. 𝟓𝟎 𝟏 − 𝟑 + 𝟏 𝟎. 𝟓𝟎 𝟑 + (𝟑)(𝟎. 𝟓𝟎)𝟑+𝟏
𝑳=
(𝟏 − 𝟎. 𝟓𝟎)(𝟏 − (𝟎. 𝟓𝟎)𝟑+𝟏 )
𝝀ത = 𝟎. 𝟎𝟑𝟏𝟏
𝝀(bar) = 𝝀 1 − Pn
𝑳 = 𝟎. 𝟕𝟑𝟑𝟑 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔 𝝀(bar) = 1/30(1-P3)
𝝀(bar) = 1/30(1-((0.5)3(0.5333)
𝝀ത 𝝀(bar) = 1/30(1-0.0667)
𝝀(bar) = 0.0311
𝑳𝒒 = 𝑳 −
𝝁
𝟎. 𝟎𝟑𝟏𝟏
𝑳𝒒 = 𝟎. 𝟕𝟑𝟑𝟑 − 𝑳𝒒 = 𝟎. 𝟐𝟔𝟔𝟖 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔
𝟏/𝟏𝟓
Case 2. (M / M / 1) : (GD / N / ∞)
Example 2: (M / M / 1): (GD / 3 / ∞)
(c) Wq = ? 𝑳𝒒 𝟏 𝑳
𝑾𝒒 = or 𝑾𝒒 = 𝑾 − ; 𝑾=
𝝀ത 𝝁 𝝀ത
𝟎. 𝟕𝟑𝟑𝟑 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔
𝟎. 𝟐𝟔𝟔𝟖 𝒄𝒖𝒔𝒕𝒐𝒎𝒆𝒓𝒔 𝑾=
𝟎. 𝟎𝟑𝟏𝟏
𝑾𝒒 =
𝟎. 𝟎𝟑𝟏𝟏
𝑾 = 𝟐𝟑. 𝟓𝟕𝟖𝟖 𝒎𝒊𝒏𝒖𝒕𝒆𝒔
𝑾𝒒 = 𝟖. 𝟓𝟖 𝒎𝒊𝒏𝒖𝒕𝒆𝒔 𝟏
𝑾𝒒 = 𝟓. 𝟒𝟗𝟕𝟎 𝒎𝒊𝒏𝒔 −
𝟏/𝟏𝟓
𝑾𝒒 = 𝟖. 𝟓𝟖 𝒎𝒊𝒏𝒖𝒕𝒆𝒔