E. Queuing Theory
E. Queuing Theory
E. Queuing Theory
Queuing theory, a branch of operation research that studies how lines form, how they function,
and why they malfunction. It can be applied in construction management to analyze and
optimize the flow of resources, such as labor, equipment, and materials, through construction
processes. Queuing theory helps in understanding and improving the efficiency of construction
operations by studying the characteristics of waiting lines and queues.
Fig. 1.
Figure 1: shows a single-channel, single-server queue, which has three customers waiting in
the queue (line) and one being served.
Characteristics of the queuing system:
(a) Input source: One characteristic of the input source is the size. The size is the total
number of units that might require service from time to time. It may be assumed to be
finite or infinite. The customer assumption is that they generate according to ‘Poisson
Distribution’ at a certain average rate. Therefore, the equivalent assumption is that
they generate according to exponential distribution between consecutive arrivals. To
solve the problems, use & assume customer population as ∞
(b) Queue discipline: A queue is characterized by a maximum permissible number of units
that it contains. Queues are called finite or infinite, according to whether number is
finite or infinite. The service discipline refers to the order in which number of queues
are selected for service.
(c) Service mechanism: This consists of one or more service facilities, each of which
contains one or more parallel service channel. If there is more than one service facility,
the arrival unit may receive the service from a sequence of service channels.
At a given facility, the arrival enters the service facility and is completely served by
that server. The time elapsed from the commencement of the service to its completion
for a unit at the service facility is known as service time usually, service time follows
as exponential distribution.
1
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
Key Concepts:
1. Arrival Rate (λ): Represents the rate at which entities (e.g., tasks, trucks, workers)
arrive at the construction process.
2. Service Rate (μ): Represents the rate at which entities are serviced or processed by the
construction process.
3. Number of Servers in Parallel (c): number of servers in parallel.
4. Utilization (ρ):
𝜆
• Represents the ratio of the service rate to the arrival rate (𝜌 = 𝑐𝜇).
2
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
3
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
4
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
11. Customer Behavior: The behavior of customers, including their tolerance for waiting,
preferences for service options, and reactions to delays, can significantly impact
queuing dynamics.
12. Arrival Pattern: The pattern or distribution of arrivals over time can affect queuing
behavior. For example, sporadic bursts of arrivals may lead to temporary congestion.
13. Service Variability: Variability in service times and the unpredictability of how long
each entity will take to be served contribute to the complexity of queuing systems.
14. Information Availability: The availability of information regarding wait times, service
status, and other relevant details can influence customer decisions and behaviors in the
queue.
15. Technology and Automation: The use of technology, such as self-service kiosks or
online queuing systems, can impact the efficiency and management of queues.
Two Moment Approximations:
The basics of two-moment approximations are very popular in industry for obtaining queueing
estimates, i.e., the mean waiting time in a queue and the mean length of a queue. These
approximations can usually only provide means of outputs, i.e., waiting times and queue
lengths, based on three inputs in a standard queue:
• the mean and variance of the inter-arrival time,
• the mean and variance of the service time, and
• the number of servers.
This situation arises frequently in factories, airports, and hospitals, where limited data, i.e.,
only means and variances of the inputs, are available.
Note that the ‘mean’ is the so-called first moment. Thus, if a random variable is denoted by X,
the first moment, E[X], is the mean, while the variance is E[X2] - (E[X])2, where E[X2] is the
so-called second moment. Thus, the variance is not the second moment, but rather the second
moment minus the square of the mean.
Basic Queueing Formulas:
Little's rule provides the following results:
𝐿𝑞
𝐿𝑠 = 𝜆𝑊𝑠 ; 𝐿𝑞 = 𝜆𝑊𝑞 = 𝑊𝑞 =
𝜆
The first of the above applies to the system and the second to the queue, which is a part of the
system. Another useful relationship in the queue is:
1
𝑊𝑠 = 𝑊𝑞 +
𝜇
5
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
The above equation says the mean wait in the system is the sum of the mean wait in the queue
1
and the service time (𝜇).
6
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
𝜆
𝜌=
𝜇
Where λ = Mean arrival rate; μ= mean service rate
Note: μ > λ in single server model only
2. Probability that exactly zero units are in the system
𝜆
𝑃0 = 1 −
𝜇
3. Probability that exactly ‘n’ units in the system
𝜆 𝑛
𝑃𝑛 = 𝑃0 ( )
𝜇
4. Probability that n or more units in the system
𝜆 𝑛
𝑃𝑛 𝑜𝑟 𝑚𝑜𝑟𝑒 =( )
𝜇
more than ‘n’ means n should be n + 1
5. Expected number of units in the queue/queue length
𝜆2
𝐿𝑞 =
𝜇(𝜇 − 𝜆)
6. Expected waiting time in the queue
𝐿𝑞
𝑊𝑞 =
𝜆
7. Expected number of units in the system
𝜆
𝐿 = 𝐿𝑞 +
𝜇
8. Expected waiting time in the system
1
𝑊 = 𝑊𝑞 +
𝜇
9. Expected number of units in queue that from time to time – (OR) non - empty queue
size
𝜇
𝐷=
𝜇−𝜆
10. Probability that an arrival will have to wait in the queue for service
Probability = 1 – Po
11. Probability that an arrival will have to wait in the queue more than w (where w > o),
the waiting time in the queue
7
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
𝜆
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 = ( ) 𝑒(𝜆−𝜇)𝑤
𝜇
12. The probability that an arrival will have to wait more than v (v > o) waiting time in the
𝑣
system is 𝑒(𝜆−𝜇)
13. Probability that arrival will not have to wait in the queue for service = Po
8
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
(m) What is the probability that a truck will have to wait more than 8 minutes in the system?
(n) The construction company will install a second unloading bay when convinced that a truck
would have to wait at least 6 minutes in the queue for unloading. By how much should the flow
of arrivals be increased to justify a second unloading bay?
Solution:
The mean arrival rate = λ = 1/8 x 60 = 7.5/hour.
The mean service = μ = 1/4 x 60 = 15/hour.
(a) Expected fraction of the day that the unloading bay will be in use: 0.5 (or 50%)
7.5
𝜌= = 0.5
15
(b) Expected number of trucks in the queue: 0.5 trucks
7.52
𝐿𝑞 = = 0.5 𝑡𝑟𝑢𝑐𝑘𝑠
15(15 − 7.5)
(c) Expected waiting time in the queue: 4.0 minutes
0.5
𝑊𝑞 = = 0.066ℎ𝑟𝑠(4 𝑚𝑖𝑛𝑢𝑡𝑒𝑠)
7.5
(d) Expected number of trucks in the system: 1.0 truck
𝜆
𝐿 = 𝐿𝑞 + = 0.5 + 0.5 = 1 𝑡𝑟𝑢𝑐𝑘
𝜇
(e) Expected waiting time in the system: 8.0 minutes
1 1
𝑊 = 𝑊𝑞 + = 0.066 + = 0.133ℎ𝑟𝑠(8 𝑚𝑖𝑛𝑢𝑡𝑒𝑠)
𝜇 15
(f) Expected number of trucks in the queue from time to time: 2 trucks
𝜇 15
𝐷= = = 2 𝑡𝑟𝑢𝑐𝑘𝑠
𝜇 − 𝜆 15 − 7.5
(g) Probability that a truck will have to wait in the queue for unloading: 0.5 (or 50%)
𝑃𝑟𝑜 = 1 − 𝑃0
𝜆 7.5
𝑃0 = 1 − =1− = 0.5
𝜇 15
𝑃𝑟𝑜 = 1 − 0.5 = 0.5
(h) Probability that exactly 3 trucks are in the system: 0.0625 (or 6.25%)
𝜆 𝑛 7.5 3
𝑃𝑛=3 = 𝑃0 ∗ ( ) = 0.5 ∗ ( ) = 0.0625
𝜇 15
(i) Probability that a truck will not have to wait in the queue for unloading: 0.5 (or
50%)
9
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
𝜆 7.5
𝑃0 = 1 − =1− = 0.5
𝜇 15
(j) Probability that there are 3 or more trucks in the system: 0.125 (or 12.5%)
𝜆 𝑛 7.5 3
𝑃𝑛=3 𝑜𝑟 𝑚𝑜𝑟𝑒 = ( ) = ( ) = 0.125
𝜇 15
(k) Probability that a truck will have to wait more than 6 minutes in the queue for
unloading: 0.236 (or 23.6%)
7.5 (7.5 6
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 = ( ) 𝑒 −15)60 = 0.236
15
6
𝜔 = 6 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 = ℎ𝑟𝑠
60
(l) Probability that there are more than 5 trucks in the system: 0.015625 (or 1.5625%)
𝜆 𝑛 7.5 6
𝑃 𝑚𝑜𝑟𝑒 𝑡ℎ𝑎𝑛 5 𝑡𝑟𝑢𝑐𝑘𝑠 = ( ) = ( ) = 0.015625
𝜇 15
(m) Probability that a truck will have to wait more than 8 minutes in the system: 0.3679
(or 36.79%)
8
𝑉 = 8 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 = ℎ𝑟𝑠
60
8
(7.5−15)
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 = 𝑒 60 = 0.3679
(n) Increase in the flow of arrivals to justify a second unloading bay: To justify a second
booth should be increased from 7.5 to 9 per hour.
6
𝑊𝑞 = ℎ𝑟𝑠 = 0.1 ℎ𝑟𝑠
60
𝐿𝑞 𝜆2 𝜆 𝜆
𝑊𝑞 = = = =
𝜆 𝜇(𝜇 − 𝜆)𝜆 𝜇(𝜇 − 𝜆) 15(15 − 𝜆)
𝜆
0.1 =
15(15 − 𝜆)
𝜆 = 9 𝑝𝑒𝑟 ℎ𝑜𝑢𝑟
Example 2: Consider the following single-server queue: the inter-arrival time is exponentially
distributed with a mean of 10 minutes and the service time is also exponentially distributed
with a mean of 8 minutes, find the following:
A. mean wait in the queue,
B. mean number in the queue,
C. the mean wait in the system,
D. mean number in the system and
10
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
Similarly, given that the service time is exponentially distributed with a mean of 8 minutes, we
1
can calculate the service rate (μ) using the formula 𝜇= =
mean service time
1
𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠 𝑝𝑒𝑟 𝑚𝑖𝑛𝑢𝑡𝑒
8
Once we have λ and μ, we can use the following formulas for an M/M/1 queue:
𝐿𝑞 𝜆 0.1
Mean Wait in the Queue (Wq): 𝑊𝑞 = = 𝜇(𝜇−𝜆) = 0.125(0.125−0.1) = 32𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜆
𝜆2 0.12
Mean Number in the Queue (Lq): 𝐿𝑞 = 𝜇(𝜇−𝜆) = 0.125(0.125−0.1) = 3.2
1 1
Mean Wait in the System (Ws): 𝑊𝑠 = 𝑊𝑞 + 𝜇 = 32 + 1/8 = 40𝑚𝑖𝑛𝑢𝑡𝑒𝑠
1
10
𝜆
Mean Number in the System (Ls): 𝐿𝑠 = 𝜆𝑊𝑠 = 𝐿𝑞 + = 3.2 + 1
=4
𝜇 8
𝜆 8
Proportion of Time the Server is Idle (P0): 𝑃0 = 1 − 𝜇 = 1 − 𝜌 = 1 − 10 = 0.2
Example 3: Consider the following single-server queue: the inter-arrival time is exponentially
distributed with a mean of 10 minutes and the service time has the uniform distribution with a
maximum of 9 minutes and a minimum of 7 minutes, find the (i) mean wait in the queue, (ii)
mean number in the queue, (iii) the mean wait in the system, (iv) mean number in the system
and (v) proportion of time the server is idle.
1
Solution: We have an M/G/1 system. We also have: 𝜆 = 10; the mean service time will be (7 +
1 (9−7)2 1 8
9)/ 2 = 8, i.e., 𝜇 = 8. The variance of the service time, σ𝟐𝐬 will equal = 3. Also, 𝜌 = 10.
12
Then:
𝜆2 σ𝟐𝐬 + 𝜌2
𝑁𝑢𝑚𝑏𝑒𝑟 𝑖𝑛 𝑡ℎ𝑒 𝑞𝑢𝑒𝑢𝑒, 𝐿𝑞 = = 1.608
2(1 − 𝜌)
𝐿𝑞
𝑊𝑎𝑖𝑡 𝑖𝑛 𝑡ℎ𝑒 𝑞𝑢𝑒𝑢𝑒, 𝑊𝑞 = = 16.08𝑚𝑖𝑛𝑠
𝜆
1
𝑊𝑎𝑖𝑡 𝑖𝑛 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚, 𝑊𝑠 = 𝑊𝑞 + = 24.08𝑚𝑖𝑛𝑠
𝜇
11
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
Where:
• Ca2 is the squared coefficient of variation of the inter-arrival time.
• Cs2 is the squared coefficient of variation of the service time.
Calculations:
σ2a Variance of inter − arrival time 20
𝐶𝐚𝟐 = = = 2 = 0.2
1 2
( )2 (mean of inter − arrival time) 10
𝜆
σ2s Variance of service time 25
𝐶𝐬𝟐 = = = = 0.3906
1 2 (mean of service time)2 82
(𝜇 )
12
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
−2(1−𝜌)(1−𝐶𝑎2 )2
𝑔 = 𝑒𝑥𝑝 ( ) when 𝐶𝑎2 ≤ 1, we use the given equation.
3𝜌(𝐶𝑎2 +𝐶𝑠2 )
• Since ρ = 1, the average number of trucks in the system is infinite. This implies
that the system is not in a steady state.
1 2
3. Average Time a Truck Spends in the System (W): 𝑊 = 𝜇−𝜆 = 2−2 = −∞
• Similarly, since ρ = 1, the average time a truck spends in the system is infinite.
Interpretation: In this scenario, the pouring crew is fully utilized, indicating that they are
continuously occupied with concrete pouring. However, the queuing model suggests that the
system is not in a steady state, and the average number of trucks in the system and the average
time a truck spends in the system are infinite. This might imply that the crew is unable to keep
up with the incoming rate of trucks, leading to congestion and an unmanageable queue.
13
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
Action: Construction managers may need to address the situation by considering additional
resources, such as increasing the number of pouring crews or optimizing the pouring process,
to bring the system into a more manageable state.
Example 6: Let's consider a simple queuing system, often referred to as the M/M/1 queue,
where entities arrive according to a Poisson process with rate λ and are served according to an
exponential service time distribution with rate μ. The notation M/M/1 indicates a single server
(1), with exponential arrival and service processes (M stands for memoryless or exponential).
Formulation:
• Arrival Process (Poisson): λ = 4 entities per hour.
• Service Process (Exponential): μ = 5 entities per hour.
• Queue Discipline: First-come-first-served (FCFS).
• Queueing System Capacity: Unlimited (M/M/1).
Performance Measures:
𝜆
1. Utilization Factor (ρ): The fraction of time the server is busy. 𝜌 = 𝜇
𝜆
2. Average Number of Entities in the System (L): 𝐿 = 𝜇−𝜆
1
3. Average Time an Entity Spends in the System (W): 𝑊 = 𝜇−𝜆
4. Calculate Probability of Having 0 Entities in the System (P0): Pn = (1−0.8) * 0.80 = 0.2
Interpretation:
• The server is busy 80% of the time, indicating a high utilization factor.
• On average, there are 4 entities in the system.
• An entity spends, on average, 1 hour in the system.
• There is a 20% chance that there are no entities in the system.
Multiple-Server Queues:
We will only consider the identical (homogenous) server case in which there are c identical
servers in parallel and there is just one waiting line (i.e., the queue is a single-channel queue).
Let c denote the number of identical servers.
14
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
Or
1
𝑃0 = 𝑛
1 𝜆 1 𝜆 𝐾 𝑘𝜇
[∑𝐾−1
𝑛=0 ( ) ]+ ( )
𝑛! 𝜇 𝐾! 𝜇 (𝑘𝜇 − 𝜆)
Note that P0 denotes the probability that there are 0 customers in the system.
Hence, Wq can be obtained as follows:
𝐿𝑞
𝑊𝑞 =
𝜆
1
𝑊 = 𝑊𝑞 +
𝜇
𝜆
𝐿 = 𝐿𝑞 +
𝜇
Then, for the G/G/c queue, we have the following approximation (Whitt, 1976; Medhi, 2003):
15
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
16
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
server has uniform distribution with a maximum of 20 minutes and a minimum of 10minutes,
find the
A. mean wait in the queue,
B. mean number in the queue,
C. the mean wait in the system,
D. mean number in the system and
E. proportion of time the server is idle.
Results from discrete-event simulation, which are known to be very accurate, show that the
mean waiting time in the queue is 9.5693 minutes. Compute the error in the G/G/c
approximation.
Solution:
This is an M/G/2 system. We have 𝜆 = 1/10; the 𝐶𝑎2 = 1 as a result. The mean service time
will be (10 + 20)/2 = 15, i.e., 𝜇 = 1/15. The variance of the service time, σ2s will equal
(20−10)2 15
= 8.33. Also, 𝜌 = 2∗10 = 0.75. Then:
12
σ2s 8.33
𝐶𝐬𝟐 = = = 0.03
1 2
(𝜇 )2 15
Using the G/G/c approximation, we first assume the queue to be an M/M/c queue and compute
its Lq: Now using the following formula.
1
𝑃0 = = 0.1453
(𝑐𝑝)𝑚 (𝑐𝑝)𝑐
[∑𝑐−1
𝑚=0 + ]
𝑚! 𝑐! (1 − 𝜌)
𝜆 𝑐
𝑃0 (𝜇 ) 𝜌
𝐿𝑞 = = 1.929
𝑐! (1 − 𝜌)2
𝐿𝑞
𝑊𝑞 = = 1.929 ∗ 10 = 19.29
𝜆
Now, we need to transform this to a G/G/2 queue using the approximation equation.
17
Department of Civil Engineering, Faculty of Engineering, Bayero University, Kano - Nigeria
Quantitative Techniques (CIV 8341) prepared by Engr. Dr. A. D. Rafindadi
1. Wayne L Winston, Operations Research: Applications and Algorithms, 2nd edition, PWS-Kent
Publishing, Boston, 1991.
2. Kahraman and A. Gosavi. On the distribution of the number stranded in bulk-arrival, bulk-service queues
of the M/G/1 form. European Journal of Operational Research, 212(2):352–360, 2011.
3. W. Kraemer and M. Langenbach-Belz. Approximate formulae for the delay in the queueing system
GI/G/1. In Proceedings of the 8th International Telegraphic Congress, volume 2(3), page 235/1 235/8,
Melbourne, Australia, 1976.
4. V. Gupta, M. Harchol-Balter, J.G. Dai and B. Zwart. On the inapproximability of M/G/K: why two
moments of job size distribution are not enough. Queueing Systems, 64(1): 5{48, 2010.
5. W.G. Marchal. An approximation formula for waiting times in single-server queues. AIIE Transactions,
8: 473, 1976.
6. J. Medhi. Stochastic Models in Queueing Theory. Academic Press, Amsterdam, Second edition, 2003.
7. S. M. Ross. Introduction to Probability Models. Academic Press, San Diego, CA, USA, Eleventh edition,
2014.
8. W. Whitt. The queueing network analyzer. Bell System Technical Journal, 62(9):2779-2815, 1983.
9. Taha H A, Operation Research - An Introduction, Prentice Hall of India, 7th edition, 2003
10. Ravindran, Phillips and Solberg, Operations Research: Principles and Practice, John Wiely & Sons, 2nd
Edition
11. D.S.Hira, Operation Research, S.Chand & Company Ltd., New Delhi, 2004
18