You are on page 1of 12

©CUCKeL OPERATIONS RESEARCH

LESSON 6
Queuing theory

Learning Outcomes
By the end of this topic you should be able to;

• Define Queue

• Describe various queuing disciplines

• Carry out computations using queuing theory

1. Introduction
Queuing theory deals with problems which involve queuing (or waiting). Typ-
ical examples might be:

• Customers in banks/supermarkets waiting for service


©CUCK-DCeL

• computers waiting for a response

• Passengers in public transport waiting for a train or a bus

As we know queues are a common every-day experience. Queues form


because resources are limited. In fact it makes economic sense to have queues.
For example how many buses or trains would be needed if queues were to be
avoided/eliminated?
In designing queuing systems we need to aim for a balance between service
to customers (short queues implying many servers) and economic considera-
tions (not too many servers).

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

CUCK, The ultimate leader in Cooperative Education! 1


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

Source of customer Queueing System

Customers arriving Queue Customer in service Customers departing


Server

Figure 6.1: Single queue, single server

Source of customer Queueing System

Server#1
Customers arriving Queue Customers departing
Server#2
Server#3
©CUCK-DCeL

Figure 6.2: Single queue, multiple servers in parallel

Source of customer Queueing System

Queue#1
Server#1
Customers arriving Customer in service Customers departing
Queue#2

Server#2

Figure 6.3: Multiple queues, multiple servers in parallel

arriving at a station for service.

Service Station
Point where service is provided.

CUCK, The ultimate leader in Cooperative Education! 2


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

Source of customers Queueing System

Customers arriving Queue Queue Customers departing


Server#1 Server#2

Figure 6.4: Single queue, multiple servers in series

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

bility distribution of the number of the arrivals in an interval.

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.

CUCK, The ultimate leader in Cooperative Education! 3


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

Queue
A group of items waiting to receive service, including those receiving the
service.

Waiting time in queue


Time spent by a customer in the queue before being served.

Waiting time in the system


It is the total time spent by a customer in the system.

Waiting time in the system = Waiting time in queue + Service time

Queue length
Number of customers in the system at any time.

Jockeying
©CUCK-DCeL

Joining the other queue and leaving the first one.

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.1. Elements of a Queuing System


1. The arrivals

2. Service mechanism

3. Queue discipline

4. Output of the queue

CUCK, The ultimate leader in Cooperative Education! 4


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

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).

Changing service rates : A server may speed up or slow down, depending


on the number of customers in the queue. For example, when the queue
©CUCK-DCeL

is long, a server may speed up in response to the pressure. On the


contrary, it may slow down if the queue is very small.

Batch processing : A server may service several customers simultaneously,


a phenomenon known as batch processing.

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 ;

CUCK, The ultimate leader in Cooperative Education! 5


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

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.

3.1. Underlying assumptions


If the rate at which customers arrive for service is greater than the rate at
which they are served, then the queue will forever grow. The standard queue
system is the one in which the length of the queue is expected to diminish
with time. Some of the assumptions for a standard queuing system are;

• The source population has infinite size.

• The inter-arrival time has an exponential probability distribution with


a mean arrival rate of λ customer arrivals per unit time.

• There is no unusual customer behaviour.


©CUCK-DCeL

• The service discipline is FIFO.

• The service time has an exponential probability distribution with a mean


service rate of µ service completions per unit time.

• The mean arrival rate is less than the mean service rate, i.e., λ < µ.

• There is no unusual server behaviour.

3.2. Standard formulas


Expected number of units (customer)in the waiting line or being serviced (i.e,
the expected number of customers in the system) is:

λ
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:

CUCK, The ultimate leader in Cooperative Education! 6


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

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:

• Arrivals and services follow poisson process.

• Customers arrive at a rate of 8 per hour.

• Service rate is 10 customers per hour.

Answer the following questions:

1. What is the average number of customers waiting for service?

2. What is the average time of a customer must wait in a queue ?

3. What is the average time for a customer to be in the system?

Solution

• Mean arrival rate of customers (or λ) = 8 per hour.

CUCK, The ultimate leader in Cooperative Education! 7


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

• Mean service rate (or µ ) = 10 per hr.

• Expected number of customers waiting for the service is as follows:

λ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

Example . A certain type of machines break-down at an average rate of 5


minute. The breakdowns are in accordance of in poisson process. Cost of idle
machine minute comes to KES 15 per minute. Two repairmen A and B have
been interviewed . A charges KES 8 per minute and he services break-down
machines at the rate of 7 per minute whereas B charges KES 10 per minute
and he services the said machines at an average rate of 9 per minute. which
repairmen’s services should be used and why?
Solution:
Average breakdown of machines (or the mean arrival rate i.e λ) = 5 per minute
Expected number of breakdown machines in the queuing system is

λ
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

CUCK, The ultimate leader in Cooperative Education! 8


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

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

Cost of idle machine = 10 × 15 = 150


total cost =230
This analysis shows that it is more economical to use repairman B.


Example . At a certain petrol pump, customers arrive in a poisson process


with an inter-arrival time of 8 minutes between arrivals. The time intervals
between services at the pump follow exponential and as such the mean time
taken to service a unit is 4 minutes.

(a) What would be the expected average queue length ?


Solution: Mean of the inter-arrival time 1/λ = 8 minutes
1
Mean arrival rate per minutes (or λ) = = 0.125
8
Hence units arrived per hour =l × 60 = 7.5
1
Mean service time (or ) = 4minutes
µ
Units served per minute (or µ) = 0.25
Hence units served per hour =0.25 × 60 = 15
Expected average queue length is :

CUCK, The ultimate leader in Cooperative Education! 9


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

λ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λ) = λ

CUCK, The ultimate leader in Cooperative Education! 10


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

⇒ λ′ = 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)

⇒ 0.033µ′2 − 0.25µ′ − 7.5 = 0

⇒ µ′ = 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)

CUCK, The ultimate leader in Cooperative Education! 11


◭◭ ◮◮
◭ ◮
Back Close
©CUCKeL OPERATIONS RESEARCH

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

P (n < 4) = 1 − P (n ≥ 4) = 1 − 0.0625 = 0.9375

Example . A certain petroleum company is considering expansion of its


unloading facility. Ships arriving at the refinery to unload crude oil arrive
according to poisson distribution with mean rate 5 ships per week. Service
rate is also poisson with average rate of 10 ships per week
©CUCK-DCeL

(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?

CUCK, The ultimate leader in Cooperative Education! 12


◭◭ ◮◮
◭ ◮
Back Close

You might also like