Lesson - 09
Lesson - 09
9
WAITING MODEL (QUEUING THEORY)
CONTENTS
9.0 Aims and Objectives
9.1 Introduction
9.2 Queuing Systems
9.3 Characteristics of Queuing System
9.3.1 The Arrival Pattern
9.3.2 The Service Mechanism
9.3.3 The Queue Discipline
9.3.4 The Number of Customers allowed in the System
9.3.5 The Number of Service Channels
9.3.6 Attitude of Customers
9.4 Poisson and Exponential Distribution
9.5 Symbols and Notations
9.6 Single Server Queuing Model
9.7 Solving the Problem Using Computer with TORA
9.8 Let us Sum Up
9.9 Lesson-end Activity
9.10 Keywords
9.11 Questions for Discussion
9.12 Terminal Questions
9.13 Model Answers to Questions for Discussion
9.14 Suggested Readings
9.1 INTRODUCTION
Queuing theory deals with problems that involve waiting (or queuing). It is quite common
that instances of queue occurs everyday in our daily life. Examples of queues or long
waiting lines might be
l Waiting for service in banks and at reservation counters.
272
l Waiting for a train or a bus.
l Waiting for checking out at the Supermarket. Waiting Model
(Queuing Theory)
l Waiting at the telephone booth or a barber's saloon.
Whenever a customer arrives at a service facility, some of them usually have to wait
before they receive the desired service. This forms a queue or waiting line and customers
feel discomfort either mentally or physically because of long waiting queue.
We infer that queues form because the service facilities are inadequate. If service facilities
are increased, then the question arises how much to increase? For example, how many
buses would be needed to avoid queues? How many reservation counters would be
needed to reduce the queue? Increase in number of buses and reservation counters
requires additional resource. At the same time, costs due to customer dissatisfaction
must also be considered.
In designing a queuing system, the system should balance service to customers (short
queue) and also the economic considerations (not too many servers). Queuing theory
explores and measures the performance in a queuing situation such as average number
of customers waiting in the queue, average waiting time of a customer and average
server utilization.
(x) Customers
S1
Customers Departure
S2 (x)
Arrival (x)
.
.
.
Sn.
(x) Customers
Departure
Queuing System
Served Customers
Customers
XXXX
Service Facility
Served Customers
Customers
XXXX
Served
Customer
Service Facilities
(λt)n e −λt
then, P (n, t) = (n = 0, 1, 2,……………) ..................(1)
n!
This is the Poisson probability distribution for the discrete random variable n, the number
of arrivals, where the length of time interval, t is assumed to be given. This situation in
queuing theory is called Poisson arrivals. Since the arrivals alone are considered (not
departures), it is called a pure birth process.
The time between successive arrivals is called inter-arrival time. In the case where
the number of arrivals in a given time interval has Poisson distribution, inter-arrival times
can be shown to have the exponential distribution. If the inter-arrival times are independent
random variables, they must follow an exponential distribution with density f(t) where,
f (t) = le –lt (t > 0) .................(2)
Thus for Poisson arrivals at the constant rate l per unit, the time between successive
arrivals (inter-arrival time) has the exponential distribution. The average Inter - arrival
time is denoted by I .
By integration, it can be shown that E(t) = I/ λ .................(3)
If the arrival rate l = 30/hour, the average time between two successive arrivals are
1/30 hour or 2 minutes.
For example, in the following arrival situations, the average arrival rate per hour, l and
the average inter arrival time in hour, are determined.
(i) One arrival comes every 15 minutes.
60
Average arrival rate , l = = 4 arrivals per hour.
15
(λt)n eλt
we know, P(n, t) =
n!
(6 × 0 . 5 ) e2 – 6× 0 . 5
P(6,2) = = 0.22404
2!
Similarly, when the time taken to serve different customers are independent, the probability
that no more than t periods would be required to serve a customer is given by exponential
distribution as follows:
p(not more than t time period) = 1 – e– mt where m = average service rate
Example 3: A manager of a fast food restaurant observes that, an average of 9 customers
are served by a waiter in a one-hour time period. Assuming that the service time has an
exponential distribution, what is the probability that
(a) A customer shall be free within 12 minutes.
(b) A customer shall be serviced in more than 25 minutes.
278
Solution: Waiting Model
(Queuing Theory)
(a) Given, m = 9 customers / hour
t = 15 minutes = 0.25 hour
Therefore, p (less than 15 minutes) = l – e– mt
= 1– e– 9 × 0.25
= 0.8946
(b) Given, m = 9 customers / hour
t = 25 minutes = 0.4166 hour
Therefore, P (more than 25 minutes) = l – e– mt
= 1– e– 9 × 0.4166
= 0.0235
To analyze queuing situations, the questions of interest that are typically concerned with
measures of queuing system performance include,
l What will be the waiting time for a customer before service is complete?
l What will be the average length of the queue?
l What will be the probability that the queue length exceeds a certain length?
l How can a system be designed at minimum total cost?
l How many servers should be employed?
l Should priorities of the customers be considered?
l Is there sufficient waiting area for the customers?
279
Quantitative Techniques
for Management 9.6 SINGLE SERVER QUEUING MODEL
a / FIFO)
Model 1: (MM1) : (a
This model is based on the following assumptions:
(i) The arrivals follow Poisson distribution, with a mean arrival rate l.
(ii) The service time has exponential distribution, average service rate m.
(iii) Arrivals are infinite population a.
(iv) Customers are served on a First-in, First-out basis (FIFO).
(v) There is only a single server.
α α
Ls = ∑
n=1
nPn = ∑ n(1 λ/µ )(λ/µ )
n= 1
n
λ ρ
= = ........................(2)
µ − λ 1− ρ
α
Ln = ∑ (n 1)P
n =1
n
α α
= ∑ nP ∑P
n =1
n
n =1
n
λ2 ρ2
= = ....................(3)
µ(µ λ ) 1 ρ
With an average arrival rate l, the average time between the arrivals is 1 / l. Therefore,
the mean waiting time in queue, wq is the product of the average time between the
280
arrivals and the average queue length,
Waiting Model
1 1 (Queuing Theory)
Wq = λ 1− ρ ....................(4)
1 µ
= λ µ − λ
λ2 ρ
=
µ(µ λ ) µ λ
Substituting
1 ρ
Ws = λ 1− ρ .......................(5)
putting Ls = l (m – l) , we get
1
Ws = µ − λ
Queuing Equations
The evaluation of Model I is listed below:
1. Expected number of customers in the system,
λ ρ
Ls = =
µ − λ 1− ρ
2. Expected number of customers in the queue,
λ2 ρ2
Lq = =
µ(µ − λ) 1− ρ
3. Average waiting time in the system,
1
Ws =
µ−λ
4. Average waiting time in the queue,
λ
Wq =
µ(µ − λ )
5. Average waiting time for a customer,
1 1
W(w / w > 0) = or
µ(1− ρ) µ−λ
6. Expected length of non-empty queue,
µ
L(m / m > 0) =
(µ − λ )
7. Probability that there are n customers in the system,
n n
λ λ λ
Pn = P0 = 1
µ µ µ
8. Probability that there is nobody in the system,
1− λ
P0 =
µ 281
Quantitative Techniques 9. Probability that there is at least one customer or queue is busy,
for Management
Pb = 1− P0
15
=
24(24 − 15)
= 0.069 × 60
= 4.16 minutes
Example 5: Trucks at a single platform weigh-bridge arrive according to Poisson
probability distribution. The time required to weigh the truck follows an exponential
probability distribution. The mean arrival rate is 12 trucks per day, and the mean service
rate is 18 trucks per day. Determine the following:
(a) What is the probability that no trucks are in the system?
(b) What is the average number of trucks waiting for service?
(c) What is the average time a truck waits for weighing service to begin?
282 (d) What is the probability that an arriving truck will have to wait for service?
Solution: Given l = 12 trucks per days, m = 18 trucks per day. Waiting Model
(Queuing Theory)
(a) Probability that no trucks are waiting for service,
λ
P0 = 1−
µ
12
= 1−
18
= 0.3333 or 33.33%
(b) Average number of trucks waiting for service,
λ λ
Lq = µ − λ
µ
12 12
=
18 18 − 12
= 1.33 trucks
(c) Average time a truck waits for weighing service to begin,
λ
Wq =
µ(µ − λ )
12
=
18(18 − 12)
= 0.1111 days or 53.3 minutes.
(d) Probability that an arriving truck will have to wait for service,
P0 = 1 – P0
= 1 – 0.333
= 0.6667 or 66.67%
ρ
(d) Pb (or) = 0.66667
C
In the same problem, to determine the probability that there are 2 trucks in the system,
we use the formula,
n
λ λ
Pn = 1−
µ µ
2
12 12
= 1−
18 18
= 0.4444 × 0.3333
= 0.14815 or 14.81%
This can also be read in the output screen for n=2 the probability P n = 0.14815,
Similarly, the probabilities for different values of n can be directly read.
Example 6: A TV repairman finds that the time spent on his jobs has a exponential
distribution with mean 30 minutes. If he repairs TV sets in the order in which they come
in, and if the arrivals follow approximately Poisson distribution with an average rate of
10 per 8 hour day, what is the repairman's expected idle time each day? How many jobs
are ahead of the average with the set just brought in?
Solution: Given l = 10 TV sets per day.
m = 16 TV sets per day.
(i) The Probability for the repairman to be idle is,
P0 = 1 – r
We know, r = l / 30 = 10 / 16 =0.625
P0 = 1 – r
= 1 – 0.625 = 0.375
Expected idle time per day = 8 × 0.375
= 3 hours.
(ii) How many jobs are ahead of the average set just brought in
λ
Ls =
µ−λ
10 10
= =
16 − 10 6
= 1.66 say 2 jobs.
Example 7: Auto car service provides a single channel water wash service. The incoming
arrivals occur at the rate of 4 cars per hour and the mean service rate is 8 cars per hour.
Assume that arrivals follow a Poisson distribution and the service rate follows an
exponential probability distribution. Determine the following measures of performance: 285
Quantitative Techniques (a) What is the average time that a car waits for water – wash to begin?
for Management
(b) What is the average time a car spends in the system?
(c) What is the average number of cars in the system?
Solution: Given l = 4 cars per hour, m = 8 cars per day.
(a) Average time that a car waits for water - wash to begin,
λ
Wq =
λ(µ − λ )
4
=
8(8 − 4)
= 0.125 hours or 7.5 mins.
(b) Average time a car spends in the system,
1
Ws =
µ−λ
1 1
= = = 0.25 hours or 15 mins.
8−4 4
(c) Average number of cars in the system,
λ 4
Ls = =
µ − λ 8− 4
4
= = 1 car.
4
Example 8: Arrivals at a telephone booth are considered to be Poisson distributed with
an average time of 10 minutes between one arrival and the next. The length of phone
call is assumed to be distributed exponentially, with mean 3 minutes.
(i) What is the probability that a person arriving at the booth will have to wait?
(ii) The telephone department will install a second booth when convinced that an arrival
would expect waiting for at least 3 minutes for phone call. By how much should the
flow of arrivals increase in order to justify a second booth?
(iii) What is the average length of the queue that forms from time to time?
(iv) What is the probability that it will take him more than 10 minutes altogether to wait
for the phone and complete his call?
(v) What is the probability that it will take him more than 10 minutes altogether to wait
for the phone and complete his call?
Solution: Given l = 1/10 = 0.10 person per minute.
m = 1/3 = 0.33 person per minute.
(i) Probability that a person arriving at the booth will have to wait,
P (w > 0) = 1 – P0
= 1 – (1 - l / m) = l / m
0.10
= = 0.3
0.33
(ii) The installation of second booth will be justified if the arrival rate is more than
the waiting time.
Expected waiting time in the queue will be,
λ
Wq =
µ(µ − λ )
286
Where, E(w) = 3 and l = l (say ) for second booth. Simplifying we get Waiting Model
(Queuing Theory)
l = 0.16
Hence the increase in arrival rate is, 0.16-0.10 =0.06 arrivals per minute.
(iii) Average number of units in the system is given by,
ρ 0.3
Ls = = = 0.43 customers
1− ρ 1− 0.3
l a
( – m –l)
P ( W ≥ 10) = Ú m (m – l ) e dt
10
a
=Ú
10
(0.3) (0.23) e – 0.23dt
a
È e -0.23t ˘
= 0.069 Í ˙
Î -0.23 ˚10
= 0.03
This shows that 3 percent of the arrivals on an average will have to wait for 10 minutes
or more before they can use the phone.
Example 9: A bank has decided to open a single server drive-in banking facility at its
main branch office. It is estimated that 20 customers arrive each hour on an average.
The time required to serve a customer is 3 minutes on an average. Assume that arrivals
follow a Poisson distribution and the service rate follows an exponential probability
distribution.
The bank manager is interested in knowing the following:
(a) What will be the average waiting time of a customer to get the service?
(b) The proportion of time that the system will be idle.
(c) The space required to accommodate all the arrivals, on an average, the space
taken by each car is 10 feet that is waiting for service.
60
Solution: l = 20 Customers per hour, m = = 2.4 customers per hour.
25
(a) Average waiting time of a customer to get the service,
λ
Wq =
µ(µ − λ )
20 20
= =
24 ( 24 − 20 ) 96
= 0.208 hour or 12.5 mins.
(b) The proportion of time that the system will be idle,
λ
P0 = 1−
µ
20
= 1−
24
= 0.166 hours or 10 mins.
287
Quantitative Techniques (c ) Average number of customers waiting in the queue,
for Management
λ2
Lq =
µ(µ − λ)
20 2 400
= =
24 ( 24 − 20 ) 96
= 4.66 customers.
10 feet is required for 1 customer. Hence, for 4.66 customers, the space required is
10 × 4.66 = 46.6 feet.
Example 10: In a Bank, customers arrive to deposit cash to a single counter server
every 15 minutes. The bank staff on an average takes 10 minutes to serve a customer.
The manager of the bank noticed that on an average at least one customer was waiting
at the counter. To eliminate the customer waiting time, the manager provided an automatic
currency counting machine to the staff. This decreased the service time to 5 minutes on
an average to every customer. Determine whether this rate of service will satisfy the
manager's interest. Also use computer with TORA for solving the problem.
Solution:
60 60
Case 1: λ = = 4 customers per hour, µ = = 60 = 6 customers per hour.
15 10
Average number of customers in the system,
λ
Ls =
µ−λ
4 4
= = = 2 customers.
6−4 2
60
Case 2: l = 4 , µ = = 12 customers per hour.
15
Average number of customers in the system,
4
Ls =
12 − 4
4 1
= = = 0.5, say, 1 customer.
8 2
Average number of customers in the queue
λ2
Lq =
µ(µ − λ)
42 16
= = = 0.01 customers.
12 ( 12 − 4 ) 96
Since no customers are standing in the queue the manager's interest is satisfied.
The problem is worked out using TORA. Enter the values as shown in the input screen
288 below in Figure 9.7.
Waiting Model
(Queuing Theory)
Figure 9.8: Comparative Analysis of Queuing Output Analysis Using TORA (Output Screen)
Now, on comparing scenario 1 and scenario 2, under Ls i.e., the average number of
customers in the system is 2 and 0.5 respectively. In the first scenario, it means that in
the entire system, one customer will be waiting in the queue while others are being
served. In scenario 2, only one customer is in the system and being served, where on an
average no customer will be waiting.
Example 11: 12 counters are available in a computerized railway reservation system.
The arrival rate during peak hours is 90 customers per hour. It takes 5 minutes to serve
a customer on an average. Assume that the arrivals joining in a queue will not be jockeying
(i.e., move to another queue). How many counters have to be opened if the customers
need not to wait for more than 15 minutes? 289
Quantitative Techniques Solution: The problem is to be solved as one system comprising of 'n' number of single
for Management
server queuing model.
Arrival rate, l =90 customers per hour
60
Service rate, m = =12 per hour
5
15
Average waiting time, Wq = = 0.25 hours
60
λ
Average waiting time, Wq = µ(µ − λ)
λ
i.e., 0.25 = µ(µ λ ) ................................(i)
90 / x
0.25 =
90
12 12
x
90
0.25 =
12(12x 90 )
360
x= = 10 counters
36
Hence, 10 counters are required so that an average arrival will wait less than 15 minutes.
Example 12: In a single pump petrol station, vehicles arrive at the rate of 20 customers
per hour and petrol filling takes 2 minutes on an average. Assume the arrival rate is
Poisson probability distribution and service rate is exponentially distributed, determine
(a) What is the probability that no vehicles are in the petrol station?
(b) What is the probability that 1 customer is filling and no one is waiting in the queue?
(c) What is the probability that 1 customer is filling and 2 customers are waiting in the
queue?
(d) What is the probability that more than 2 customers are waiting?
Solution : l = 20 vehicles per hour, m = 60/2 = 30 vehicles per hour.
290
(a) Probability that no vehicles are in the petrol station, Waiting Model
(Queuing Theory)
λ 20
P1 = 1 − = 1−
µ 30
= 0.3334 or 33.34%
(b) Probability that 1 customer is filling and no one is waiting in the queue,
n n
λ λ λ
Pn = P0 = 1 − µ
µ µ
1
20 20
P1 = 1−
30 30
= 0.6666 × 0.3334
= 0.2222 or 22.22%
(c) Probability that 1 customer is filling and 2 customers are waiting in the queue, i.e.,
there are 3 customers in the system,
3
20 20
P3 = 1−
30 30
= 0.2963 × 0.3334
= 0.09878 or 9.87 %
(d) Probability that more than 3 customers are in the system,
4
20 20
P4 = 1−
30 30
= 0.1975 × 0.334
= 0.6585 or 65.85%
The calculation made for the above problem is represented in the TORA output screen
shown below in Figure 9.9.
Balking : A customer may not like to join the queue seeing it very long
and he may not like to wait.
Reneging : He may leave the queue due to impatience after joining in
collusion several customers may collaborate and only one of
them may stand in queue.
Jockeying : If there are number of queues then one may leave one queue
to join another.
Queue length : No. of customers waiting in the queue.
Queuing system : System consisting arrival of customers, waiting in queue,
picked up for sevice according to a certain discipline, being
serviced and departure of customers.
Service station : Point where service is provided
Customer : Person or unit arriving at a station for service. Customer
may be a machine or person.
Waiting time : Time a customer spends in the queue before being serviced.
Exercise Problems
1. A Bank operates a single facility ATM machine. Customers arrive at the rate of
10 customers per hour according to Poisson probability distribution. The time taken
for an ATM transaction is exponential which means 3 minutes on an average. Find
the following:
(a) Average waiting time of a customer before service.
(b) Average number of customers in the system.
(c) Probability that the ATM is idle.
2. At an average 12 cars per hour arrive at a single-server, drive-in teller. The average
service time for each customer is 4 minutes, and the arrivals and services are
Poisson and exponentially distributed respectively. Answer the following questions:
(a) What is the proportion that the teller is idle?
(b) What is the time spent by a customer to complete his transaction?
(c) What is the probability that an arriving car need not wait to take-up service?
3. At a single facility security check at an airport, passengers arrive at the check-
point on an average of 8 passengers per minute and follows a Poisson probability
distribution. The checking time for a customer entering security check area takes
10 passengers per minute and follows an exponential probability distribution.
Determine the following:
(a) On an average, how many passengers are waiting in queue to enter the check-
point?
(b) On an average, what is the time taken by a customer leaving the check-
point?
4. In a college computer lab, computers are interconnected to one laser printer. The
printer receives data files for printing from these 25 computers interconnected to
it. The printer prints the files received from these 25 computers at the rate of 5
data files per minute. The average time required to print a data file is 6 minutes.
Assuming the arrivals are Poisson distributed and service times are exponentially
distributed, determine
(a) What is the probability that the printer is busy?
(b) On an average, how much time must a computer operator wait to take a
print-out?
(c) On an average, what is the expected number of operators that will be waiting
to take a print-out?
5. Skyline pizza is a famous restaurant operating a number of outlets. The restaurant
uses a toll-free telephone number to book pizzas at any of its outlets. It was found
that an average of 15 calls are received per hour and the average time to handle
each call is 2.5 minutes. Determine the following:
294
(a) What is the average waiting time of an incoming caller? Waiting Model
(Queuing Theory)
(b) What is the probability that a caller gets connected immediately?
(c) If the restaurant manager feels that average waiting time of a caller is more
than 5 minutes, will lead to customer loss and the restaurant will have to go in
for a second toll free facility, what should be the new arrival rate in order to
justify another facility?
6. From historical data, a two-wheeler service station observe that bikes arrive only
for water wash is at the rate of 7 per hour per 8 hour shift. The manager has a
record that it takes 5 minutes for water service and another 2 minutes for greasing
and general check. Assuming that one bike is washed at a time, find the following:
(a) Average number of bikes in line.
(b) Average time a bike waits before it is washed.
(c) Average time a bike spends in the system.
(d) Utilization rate of the bike wash.
(e) Probability that no bikes are in the system.
7. In a department at store, an automated coffee vending machine is installed.
Customers arrive at a rate of 3 per minute and it takes average time of 10 seconds
to dispense a cup of coffee:
(a) Determine the number of customers in the queue.
(b) Determine the waiting time of a customer.
(c) Find the probability that there are exactly 10 customers in the system.
8. In a toll gate, vehicles arrive at a rate of 120 per hour. An average time for a
vehicle to get a pass is 25 seconds. The arrivals follow a Poisson distribution and
service times follow an exponential distribution. (a) Find the average number of
vehicles waiting and the idle time of the check-post. (b) If the idle time of the
check post is less than 10%, the check-post authorities will install a second gate.
Suggest whether a second gate is necessary ?
9. A hospital has an X-ray lab where patients (both in-patient and out-patient) arrive
at a rate of 5 per minute. Due to variation in requirement, the time taken for one
patient is 3 minutes and follows an exponential distribution. (a) What is the probability
that the system is busy? and (b) What is the probability that nobody is in the system?
10. In the production shop of a company breakdown of the machine is found to be
Poisson with an average rate of 3 machines per hour. Breakdown time at one
machine costs Rs. 40 per hour to the company. There are two choices before the
company for hiring the repairmen, one of the repairmen is slow but cheap, the
other is fast but expensive. The slow-cheap repairman demands Rs. 20 per hour
and will repair the breakdown machine exponentially at the rate of 4 per hour. The
fast expensive repairman demands Rs. 30 per hour and will repair exponentially on
an average rate of Rs.6 per hour. Which repairman should be hired?
296