Queuing Notes
Queuing Notes
Queuing Notes
LESSON 6
Queuing theory
Learning Outcomes
By the end of this topic you should be able to;
• Define Queue
1. Introduction
Queuing theory deals with problems which involve queuing (or waiting). Typ-
ical examples might be:
2. Queuing systems
In essence all queuing systems can be broken down into individual sub-systems
consisting of entities queuing for some activity (as shown below).
Standard terms used in Waiting Line Models.
Customer
Persons or units (machines or other items
Server#1
Customers arriving Queue Customers departing
Server#2
Server#3
©CUCK-DCeL
Queue#1
Server#1
Customers arriving Customer in service Customers departing
Queue#2
Server#2
Service Station
Point where service is provided.
Queuing Model
It is a suitable model used to represent a service oriented problem, where
customers arrive randomly to receive some service, the service time being
also a random variable.
Arrival
The statistical pattern of the arrival can be indicated through the proba-
©CUCK-DCeL
Service Time
The time taken by a server to complete service is known as service time.
Server
It is a mechanism through which service is offered.
Queue Discipline
It is the order in which the members of the queue are offered service.
Poisson Process
It is a probabilistic phenomenon where the number of arrivals in an interval
of length t follows a Poisson distribution with parameter lt, where l is the
rate of arrival.
Queue
A group of items waiting to receive service, including those receiving the
service.
Queue length
Number of customers in the system at any time.
Jockeying
©CUCK-DCeL
Reneging
Joining the queue and leaving it afterwards.
Queuing System
System consisting of arrival of customers, waiting in the queue, picked up
for service according to a certain discipline, being serviced and departure
of the customers.
2. Service mechanism
3. Queue discipline
Customer’s Behaviour
Balking : A customer may not like to join the queue due to long waiting line.
Reneging : A customer may leave the queue after waiting for sometime due
to impatience.
Collusion : Several customers may cooperate and only one of them may
stand in the queue.
Jockeying : When there are a number of queues, a customer may move from
one queue to another in hope of receiving the service quickly.
Server’s Behaviour
Failure : The service may be interrupted due to failure of a server (machin-
ery).
2.2. Notations
The following notations are used while dealing with queues
(a) λ = the mean (or average) number of arrivals per time period, i.e.
the mean arrival rate
(b) µ = the mean (or average) number of customers served per time
period, i.e. the mean service rate
(c) nq = number of customers in the queue ;
(d) ω = time an arrival must wait in the queue :
(e) ν = time an arrival must spend it the system ;
3. Queue Discipline
The queue discipline is the order in which customers are served. It can be
First In, First Out (FIFO), Last In, First Out (LIFO),a random basis or even
based on priority.
• The mean arrival rate is less than the mean service rate, i.e., λ < µ.
λ
E(n) =
µ−λ
Expected number of units (or customers )in the queue is:
λ2
E(nq) =
µ(µ − λ)
The average waiting time in the queue of an arrival is:
E(nq) λ2 λ
E(w) = = /λ =
λ µ(µ − λ) µ(µ − λ)
The average time on arrival spends in the system is:
1
E(v) =
(µ − λ)
The probability that the number in the queue and being serviced is greater
than k is
k+1
λ
P (n > k) =
µ
The expected proportion of time a facility will be idle:
λ
E(idle) = 1 −
µ
The probability that a given time the exact number of customers say n, in
the system is;
©CUCK-DCeL
n
λ λ
P (n) = 1−
µ µ
This is also the probability of exactly (n − 1) customers waiting in the queue.
Given the following information:
Solution
λ2 82 64
E(nq) = = = = 3.2
µ(µ − 1) 10(10 − 8) 20
Thus there will be an average of 3.2 customers waiting for service
• Average time a customer must wait in the queue can be worked out as
follows:
E(nq) 3.2
E(w) = = = 0.4 hours
λ 8
• Average time for a customer to be in the system can be ascertained as
under;
1 1 1
E(v) = = = = 0.5 hours(or thirty minutes)
µ−λ 10 − 8 2
©CUCK-DCeL
λ
E(n) =
(µ − λ)
Cost of idle machine hour=KES 15.
With repairman A we have the following :
Servicing rate i.e µ= 7 per minute
Hourly charge =KES 8
λ 5 5
E(n) = = = = 1.25
(µ − λ) (7 − 5) 4
This that 2.5 machine minutes are lost in an minute (because 2.5 machines
remain in the queuing system in a minute). The workshift of 8 minutes being
given the total machine time lost will be equal to 2.5×8 = 20 machine minutes.
Hence the total cost in this case will come as follows:
Hire charges of repairman =8 × 8 = 64
Cost of idle machine = 20 × 15 = 300
total cost =364
With repairman B we have the following ;
Servicing rate i.e µ = 9 per minute
Hourly charge =KES 10
λ 5 5
E(n) = = = = 1.25
(µ − λ) (9 − 5) 4
This means that there is a loss of 1.25 machine minutes in a minute and hence
there is a total of 1.25 × 8 = 10 machine minutes in a workshift of 8 minutes.
Total cost with the second repairman will be;
Hire charges of repairman =8 × 10 = 80
©CUCK-DCeL
λ2 7.52
E(nq) = = = 0.5
µ(µ − λ) 15(15 − 7.5)
(b) What would be be the average number of customers in the queuing
system?
Solution: Average number of customers in the queuing system is:
λ 7.5
E(n) = = =1
(µ − λ) (15 − 7.5)
(c) How long on an average does a customer does wait in the queue?
Solution: Average waiting time of a customer in the queue is:
λ 7.5
E(w) = = = 0.067hour = 4 minutes
µ − λ) 15(15 − 7.5)
©CUCK-DCeL
(d) How much time on average does a customer spend in the system?
Solution: Average time spent by a customer in the queuing system
is
1 1
E(v) = = = 0.133 hour = 8 minutes
µ−λ (15 − 7.5)
(e) What should be the flow of customers to justify the opening of a
second service point if the management is willing to open the same
provided the customer has to wait for 12 minute for the service?
Solution: Management is willing to open the second service point
only if a customer has to wait for 12 minutes i.e E(w) = 12 minutes.
Let the corresponding mean arrival rate be λ′
E(w) = 12 = 12/60 hour
λ λ
E(w) = ⇒ 12/60 =
µ(µ − λ) 15(15 − λ′ )
⇒ 2700/60 − 180/60λ) = λ
⇒ λ′ = 11.25
Hence the mean arrival rate should increase from the present rate
of 7.5 per hour to 11.25 per hour in order to justify the opening of
a second service point.
(f) What should be new service rate that would reduce the current
customer waiting time by 50%
Solution: New waiting time is 2 minutes i.e E(w) = 2 minutes. Let
the corresponding mean service rate be µ′
E(w) = 2 = 2/60 hour
λ 7.5
E(w) = ⇒ 2/60 = ′ ′
µ′ (µ′ − λ) µ (µ − 7.5)
⇒ µ′ = 19.21
Hence the mean service rate should be increased from the present
©CUCK-DCeL
rate of 15 per hour to 19.21 per hour in order to reduce the waiting
time by 50%.
(g) What is the probability that there are less than 4 customers in the
queue at any given time?
Solution: The probability that the number in the queue and being
serviced is greater than k is
k+1
λ
P (n > k) =
µ
and the probability that a given time the exact number of customers
say n, in the system is;
n
λ λ
P (n) = 1−
µ µ
This is also the probability of exactly (n − 1) customers waiting in
the queue. It follows that the probability that there are less than n
customers must be;
P (n < k) = 1 − P (n ≥ k)
Now
k k+1
λ λ λ
P (n ≥ k) = P (n = k) + P (n > k) = 1− +
µ µ µ
4 5
7.5 7.5 7.5
= 1− + = 1/32 + 1/32 = 0.0625
15 15 15
therefore
(a) What is the average number of ships waiting to deliver crude oil?
(b) What is the average time a ship must wait before it is taken for
service?
(c) What is the average total time that a ship spends at the refinery?