Lecture Notes - Queuing Theory-1
Lecture Notes - Queuing Theory-1
Lecture Notes
Introduction
Waiting lines, or queues, are common occurrence both in everyday life and in a
variety of business and industrial situations. The formation of waiting lines
occurs whenever the demand for service from a facility exceeds the capacity of
that facility.
The three basic components of a queuing process are arrivals, service facilities,
and the actual waiting line.
The objective of queuing theory is the provision of an adequate but not excessive
service facility. The analytical models of waiting lines can help managers
evaluate the cost and effectiveness of service systems.
One of the goals of queuing analysis is finding the best level of service for an
organization.
Supermarket must decide how many cash register checkout positions
should be opened.
Petrol stations must decide how many pumps should be opened and how
many attendants should be on duty.
Banks must decide how many teller windows to keep open to service
customers during various hours of the day.
Manufacturing plants must determine the optimal number of mechanics to
have on duty each shift to repair machines that break down.
Managers must deal with the trade–off between the cost of providing good
service and the cost of customer waiting time. Determining the cost of customer
waiting time may be hard, for example, the loss of goodwill.
One means of evaluating a service facility is thus to look at a total expected cost.
Total expected cost is the sum of the expected service costs and the expected
waiting costs. These costs can be illustrated graphically as shown below:
Service cost
Expected Cost
Waiting cost
Note:
Queuing models are categorized as stochastic or probabilistic models.
The two stochastic elements of a queuing model are the arrivals and the
operation of the service facility.
There are many types of queuing models.
Only the more important and useful results will be dealt with in this topic.
Focus will be on the applicability of the results of queuing theory rather
than on its rigorous mathematical framework.
2
Characteristics of a queuing system (Basic structures of queuing systems):
Arrival characteristics
The input source that generates arrivals or customers for the service
system has three major characteristics:
Size of the calling population
Pattern of arrivals at the system
Behaviour of the arrivals.
3
A queue is limited when it cannot, by law of physical restrictions,
increase to an infinite length, for example, a small restaurant that
has only 10 tables and can serve no more than 50 diners an
evening.
The models treated in this topic assume unlimited queue length.
A queue is unlimited when its size is unrestricted, as in the case of
the tollbooth serving arriving automobiles.
4
(ii) Single – Channel, Multiphase System
Type 1 Type 2
Arrivals service service Departures
facility facility after service
Queue
Queue
Service Facility 3 service
Type 1 Type 2
Service Service Departures
Facility Facility
1 1 after
Arrivals
Type 1 Type 2
Queue Service Service
Facility Facility service
2 2
5
Queue Notation (Identification of Models)
Queues are concisely described using the Kendall notation, which specifies:
Arrival process for customers (or jobs): {M, D, G}
Service time distribution: {M, D, G}
Number of servers: {1, m}
Storage capacity (buffers): {B, infinite}
Service discipline: {FIFO, PS, …}
Note:
M describes arrivals or services having Poisson or exponential probability
distribution.
D describes a constant (deterministic) rate.
G describes services having a general probability distribution with mean
and variance known.
Examples:
M/M/1 represents a single channel (single server) queuing model with
Poisson arrivals, exponential service times, FIFO service discipline, infinite
capacity, with no loss.
M/M/2 represents a two channel queuing model with Poisson arrivals,
exponential service times, FIFO service discipline, infinite capacity, with
no loss.
M/M/m represents a queuing model with multiple channels, Poisson
arrivals, exponential service times, FIFO service discipline, infinite
capacity, with no loss.
M/D/1 represent a queuing model with single channel, Poisson arrivals,
deterministic (constant) service times, FIFO service discipline, infinite
capacity, with no loss..
M/G/1 represent a queuing model with single channel, Poisson arrivals,
general service times, FIFO service discipline, infinite capacity, with no
loss.
G/G/1 represent a queuing model with single channel, general arrival
process, general service times, FIFO service discipline, infinite capacity,
with no loss.
6
(i) Arrivals are served on a FIFO (or FCFS) basis.
(ii) Every arrival waits to be served regardless of the length of the line; that
is, there is no balking or reneging.
(iii) Arrivals are independent of preceding arrivals, but the average number
of arrivals (the arrival rate) does not change over time.
(iv) Arrivals are described by a Poisson probability distribution and come
from an infinite or very large population.
(v) Service times also vary from one customer to the next and are
independent of one another, but their average rate is known.
(vi) Service times occur according to the exponential probability
distribution.
(vii) The average service rate is greater than the average arrival rate.
When these seven conditions are met, we can develop a series of equations that
define the queue’s operating characteristics (queue’s performance).
NB: The arrival rate ( ) and the service rate ( ) must use the same time
period.
5. The utilization factor for the system, (the Greek letter rho), that is, the
probability that the service facility is being used:
7
(also known as system load, 0 1).
6. The percent idle time, Po, that is, the probability that no one is in the
system:
Po = 1 - .
Example 1
Consider the case of KB Muffler shop in Unga Limited, Arusha. KB’s mechanic,
Ndeliso, is able to install new mufflers at an average rate of 3 per hour, or about
1 every 20 minutes.
Customers needing this service arrive at the shop on the average rate of 2 per
hour. KB, the shop owner, studied queuing models in an ADA programme and
feels that all seven of the conditions for a single-channel model are met.
Calculate the numerical values of the preceding operating characteristics.
Required Calculations:
2 2
L = = = = 2 cars in the system on the average.
3 1 1
1 1
W = = = 1 hour that an average car spends in the system.
32
2 22 4
Lq = = = = 1.33 cars waiting on line on the average.
( ) 3(3 2) 3
2 2
Wq = = = hour = 40 minutes = average waiting time per car.
( ) 3(3 2) 3
8
NB: W and W q are in hours, since λ is defined as the number of arrivals per
hour.
2
= = = 0.67 = percent of time mechanic is busy, or the probability
3
that the server is busy.
2
Po = 1 - =1- = 0.33 = probability that there are 0 cars in the system.
3
k 1
2
k Pn>k =
3
0 0.667 Note that this is equal to
1 - Po = 1 -0.33 = 0.667
1 0.444
2 0.296
3 0.198 Implies that there is a 19.8%
chance that more than 3 cars
are in the system
4 0.132
5 0.088
6 0.058
7 0.039
The waiting line model helped in predicting potential waiting times, queue
lengths, idle times and so on. But it did not identify optimal decisions or consider
cost factors.
If the waiting time cost is based on time in the queue, the equation becomes.
Note: These costs are based on whatever time units (often hours) are used in
determining .
Adding the total service cost to the total waiting cost, we have total cost of the
queuing system. When the waiting cost is based on the time in the system, then
When the waiting cost is based on time in the queue, the total cost is:
If we wish to determine the daily cost then we simply find the total number of
arrivals per day.
Example 2:
Solution:
2
= (8) (2) (10,000)
3
= Tsh. 106,666.67
Example 3
KB finds out through the muffler grapevine, a cross town competitor, employ a
mechanic named Samanya who can efficiently install new mufflers at the rate of
4 per hour. KB contacts Samanya and inquires as to his interest in switching
employers. Samanya says that he would consider leaving the MP muffler but
only if he were paid a Tsh. 9000 per hour salary. KB, being a crafty
businessman, decides that it may be worthwhile to fire Ndeliso and replace him
with the speedier but more expensive Samanya. What would you advise KB?
Solution
λ = 2
= 4
2
L = = = 1 car in the system on the average
42
1 1 1
W = = = hour in the system on the average
42 2
2 22 4 1
Lq = = = = cars waiting on line on the average.
( ) 4( 4 2) 8 2
2 2 1
Wq = = = = hour = 15 minutes average waiting time
( ) 4( 4 2) 8 4
per car.
2
…… = = = 0.5 = percent of time mechanic is busy
4
Po = 1 - = 1 – 0.5 = 0.5 = probability that there are 0 cars in the system.
11
k 1
2
k Pn>k =
4
0 0.5
1 0.25
2 0.125
3 0.062
4 0.031
5 0.016
6 0.008
7 0.004
Because the total daily expected cost with Ndeliso as mechanic was Tsh.
162,666.67, we recommended KB to hire Samany and reduce costs by Tsh.
162,666.67 – Tsh. 112, 000 = Tsh. 50,666.67 per day.
One way of reducing the overall cost of waiting is by reducing the time spend
waiting (based on W or W q) and the cost of waiting (Cw). However, reducing the
total cost by lowering W or W q may be difficult, and managers may need other
ways to reduce the cost of waiting. Enhancing the queuing environment by
making the wait less unpleasant may reduce Cw as customers will not be done in
various ways as mentioned below:
Place magazines in the waiting rooms for customers to read while waiting
Playing music, e.g. music is often played while telephone callers are
placed on hold
Use video screens and televisions in some of the queue lines to make the
wait more interesting, etc.
All of these things are designed to keep the customer busy and to enhance the
conditions surrounding the waiting so that it appears that time is passing more
12
quickly than it actually is. Consequently, the cost of waiting (Cw) becomes lower
and the total cost of the queuing system is reduced.
The multi – channel system discussed here assumes that arrivals follow a
Poisson probability distribution and that service times are distributed
exponentially. The queue discipline is FIFO, and all servers are assumed to
perform at the same rate. Other assumptions mentioned earlier for the single –
channel model apply as well.
(i) The probability that there are zero customers or units in the system:
1
Po = for m >λ
n m 1 1 1 m m
n
n 0 n! m m
(ii) The average number of customers or units in the system
m
L = Po +
m 1!m 2
(iii) The average time a unit spends in the waiting line or being serviced
(namely, in the system):
m
W = P +
1
OR W =
Lq
+
1
m 1!m
o
2
(iv) The average number of customers or units in line waiting for service:
Lq = L -
13
(v) The average time a customer or unit spends in the queue waiting for
service:
1 Lq
Wq = W - =
(vi) Utilization rate:
m
(vii) The probability of exactly n customers in the system:
n
Pn = Po, for 0 ≤ n ≤ m
n!
n
Pn = Po, for n ≥ m
m!m n m
(viii) The probability that the number of customers in the system is greater that
m, Pn>m:
m m
Pn≥m = Po
m! m
These equations are used in exactly the same fashion and provide the same type
of information as did the simpler model.
Example 4:
KB finds that at minimal after tax cost he can open a second garage bay in which
mufflers can be installed. Instead of firing his first mechanic, Ndeliso, he would
hire a second worker. The new mechanic would be expected to install mufflers
at the same rate as Ndeliso – about = 3 per hour. Customers, who would still
arrive at the rate of λ = 2 per hour, would wait in a single line until one of the two
mechanic is free. Find out how this option compares with the old single –
channel waiting line system.
14
Solution:
Level of Service
Operating One Mechanic Two One fast Mechanic
Characteristic (Ndeliso) = 3 Mechanics (Samanya) = 4
= 3 for each
15