0% found this document useful (0 votes)
59 views28 pages

Notes-Queuing Theory

This document discusses queuing theory and queueing systems. It defines queuing theory as a branch of applied probability that analyzes queues and finds ways to minimize inconvenience. It then provides examples of common queueing situations and explains that queues form when demand for service exceeds service capacity. The key aspects of a queueing system are defined, including the input, queueing process, queue discipline, and service process. Performance measures like average wait time are also introduced. Finally, the document discusses the M/M/s infinite queue model and provides examples of calculating metrics like traffic intensity and wait times using that model's formulas.

Uploaded by

Saraunsh Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views28 pages

Notes-Queuing Theory

This document discusses queuing theory and queueing systems. It defines queuing theory as a branch of applied probability that analyzes queues and finds ways to minimize inconvenience. It then provides examples of common queueing situations and explains that queues form when demand for service exceeds service capacity. The key aspects of a queueing system are defined, including the input, queueing process, queue discipline, and service process. Performance measures like average wait time are also introduced. Finally, the document discusses the M/M/s infinite queue model and provides examples of calculating metrics like traffic intensity and wait times using that model's formulas.

Uploaded by

Saraunsh Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

Queuing Theory

Introduction

Queuing Theory is a branch of applied probability which tries to analyse this


phenomenon and find methods to minimise the inconvenience.
There are many situations in daily life when a queue is formed. For example,
machines waiting to be repaired, patients waiting in Doctor’s room, cars waiting for
a traffic signal, patients waiting to buy tickets, passengers waiting at bus stop etc.
A queue is formed when a customer does not get the service required immediately
that is when the current demand for service is more than capacity to provide the
service.
Queues may be decreased in size or prevented from forming by providing
additional service facilities which results in drop of the profit but excessively long
queues may result in lost sales and lost customers. Thus the problem is to find the
optimum size of queue such that the profit earned in giving the service is maximum
and cost involved is minimum.
16-04-2021 Deepti Saxena 2
Examples

16-04-2021 Deepti Saxena 3


Queueing System

• A Queueing System may be defined as any facility at which a customer


arrives, stays there for a certain period of time and departs after being
served.
• There are many Queueing Systems. Structure of Queueing System may be
given as follows:
(i) Calling Population/ input source: customers arriving per unit time
(ii) Queuing Process: The manner the customers arrive at the service facility
(iii) Queue Discipline: The method of admitting the customer for service
(iv) Service Process: Service facility given to the customer

16-04-2021 Deepti Saxena 4


(i)Calling Population/ input source

• Size-
finite (queue for doctor in government hospital)
Infinite (queue for specialist doctor where patients come through appointment)
• Behaviour-
Patient (customer arriving at service waits in the queue until served eg.
Machines for maintenance)
Impatient (customer waits in the queue for a certain time and leaves the service
system without getting service eg. Customer at crowded grocery shop )
• Pattern of arrival in the system-
Customers may arrive in batches (eg. Family at restaurant) or individually (eg.
Train at a platform) These customers may arrive at a service facility either on
scheduled time(by prior information) or on unscheduled time.

16-04-2021 Deepti Saxena 5


(ii) Queuing Process

• It refers to number of queues-single, multiple or priority ques


• In certain cases a service system is unable to accommodate more
than the required number of customers at a time.
• No further customers are allowed to enter until more space is made
available to accommodate new customers

16-04-2021 Deepti Saxena 6


(iii) Queue Discipline

• It is the order in which customers from a queue are selected for service.
For this there are a number of ways. Some of them are:
• Static Queue Discipline-
FCFS (first come first serve) eg prepaid taxi at airport
LCFS (last come first serve) eg cargo handling – last item loaded is
removed first
• Dynamic Queue Discipline- service at random
Priority service-payment by cheque or cash
Emergency service-hospitals
VIP priority

16-04-2021 Deepti Saxena 7


(iv) Service Process
• Service channels may be in series, in parallel or in mixed manner.

16-04-2021 Deepti Saxena 8


Symbolic Representation for Queuing Model -

• (a / b/ c):(d/e)
Where
a – type of distribution of the number of arrivals per unit time
b – type of distribution of the service time
c – number of services
d – capacity of system that is maximum queue size
e – queue discipline
For example (M/M/1):(∞,FCFS), (M/M/1):(N,FCFS), (M/M/s):(∞,FCFS), (M/M/s):(N,FCFS)
M stands for Markov indicating that the number of arrivals in time t and number of
completed services in time t follow Poisson distribution which is continuous time Markov
chain.

16-04-2021 Deepti Saxena 9


We will deal with only those Queueing Systems in which

(i) the number of customers arriving per unit time has a Poisson
distribution with mean (𝜆). This means the interval of time
between two consecutive customers has an exponential
1
distribution with mean .
𝜆
(ii) The number of customers serviced per unit time has a Poisson
distribution with mean 𝜇 . This means the time required to give
the full service to the customer is an exponential distribution with
mean 1/𝜇 .
(iii) Service discipline- This means the manner the customers form the
queue and they are selected for service. The most common
discipline are FCFS or FIFO.
16-04-2021 Deepti Saxena 10
Performance measures of Queuing System

𝑊𝑞 - average time an arriving customer has to wait in a queue before


being served
𝑊𝑠 - average time an arriving customer spends in the system including
waiting in queue and being served
𝐿𝑞 - average number of customers has to wait in a queue before being served
𝐿𝑠 - average number of customers in the system including waiting in queue
and being served

16-04-2021 Deepti Saxena 11


Other Notations
𝑛-number of customers in the system including waiting in queue and being served
𝑃𝑛 - probability of n customers in the system
𝑃0 - probability of no customers in the system (idle time)
1 − 𝑃0 - probability that an customer has to wait in the system (system is busy)
𝜆- average number of arrivals per unit time in the system
𝜇 - average number of customers served per unit time in the system
𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑠𝑒𝑟𝑣𝑖𝑐𝑒 𝑐𝑜𝑚𝑝𝑙𝑒𝑡𝑖𝑜𝑛 𝑡𝑖𝑚𝑒 1/𝜇 𝜆
𝜌= =
𝑎𝑣𝑒𝑟𝑎𝑔𝑒 𝑖𝑛𝑡𝑒𝑟𝑎𝑟𝑟𝑖𝑣𝑎𝑙 𝑡𝑖𝑚𝑒 1/𝜆 𝜇
= traffic intensity or service utilization factor
s – number of service channels (servers)
N – maximum number of customers allowed in the system

16-04-2021 Deepti Saxena 12


Model-1
Infinite Queuing Model
(M/M/s):(∞,FCFS)
This model is based on certain assumptions about the queuing system
• No limit on queue length (infinite capacity)
• First come first serve discipline
• Average service rate is more than the average arrival rate
(𝜇 > λ ⟹ 𝜌 < 1)

16-04-2021 Deepti Saxena 13


Formulae for (M/M/s):(∞,FCFS) model
𝜆
• 𝜌= = traffic intensity or service utilization factor
𝜇
• 𝑃0 = 1 − 𝜌 =probability of no customers in the system (idle time)
• 𝑃𝑛 = 𝜌𝑛 𝑃0 = 𝜌𝑛 (1 − 𝜌)
• 𝑃(𝑛 ≥ 𝑘) = 𝜌𝑘 and 𝑃(𝑛 > 𝑘) = 𝜌𝑘+1
𝜌
• 𝐿𝑠 =
1−𝜌
𝜌2
• 𝐿𝑞 = 𝐿𝑠 − 𝜌 =
1−𝜌
𝐿𝑠
• 𝑊𝑠 =
𝜆
𝐿𝑞
• 𝑊𝑞 =
𝜆

• 𝑃(𝑊𝑠 > 𝑡) = 𝑒 −𝜇 1−𝜌 𝑡

• 𝑃(𝑊𝑞 > 𝑡) = 𝜌 𝑒 −𝜇 1−𝜌 𝑡

1 𝜆
• We can derive that 𝑊𝑠 = 𝑊𝑞 + and 𝐿𝑠 = 𝐿𝑞 +
𝜇 𝜇

16-04-2021 Deepti Saxena 14


Ex 1 Find the average number of customers in the system and in the
queue if the system is (M/M/1/∞) and 𝜇 = 15, λ = 10

𝜆 10 2
𝜌= = = = service utilization factor
𝜇 15 3
𝐿𝑞 - average number of customers has to wait in a queue before being
𝜌2 4/9
served = = = 1.33 ≈ 1
1−𝜌 1−2/3
𝐿𝑠 - average number of customers in the system including waiting in
𝜌 2/3
queue and being served = = =2
1−𝜌 1−2/3

16-04-2021 Deepti Saxena 15


Ex 2 Find service utilization factor, the average waiting time per customer in the
queue and in the system for (M/M/1/∞) model if 𝜇 = 15, λ = 9 per hour. Also
find the probability that (i)a customer has to wait in the system (ii)there are more
than 8 customers in the system.
𝜆 9 3
𝜌= = = = service utilization factor
𝜇 15 5
𝑊𝑞 = average time an arriving customer has to wait in a queue before being served
𝐿𝑞 1 𝜌2 9/25
= = = = 0.1 ℎ𝑟𝑠.
𝜆 𝜆 (1−𝜌) 9(1−3/5)
𝑊𝑠 - average time an arriving customer spends in the system including waiting in queue and
being served
𝐿𝑠 1 𝜌 3/5 1
= = = = ℎ𝑟𝑠.
𝜆 𝜆 (1−𝜌) 9(1−3/5) 6
(𝑖)𝑃0 - probability of no customers in the system (idle time) = 1 − 𝜌
probability that a customer has to wait in the system = 1 − 𝑃0 = 𝜌 = 3/5
(ii) 𝑃(𝑛 > 𝑘) = 𝜌𝑘+1
3
𝑃 𝑛 > 8 = 𝜌9 = ( )9 = .01008
5

16-04-2021 Deepti Saxena 16


Ex 3 Find the traffic intensity of the system (M/M/1/∞) model if 𝜇 =
11 𝑝𝑒𝑟 ℎ𝑜𝑢𝑟, λ =8 per hour. Also find the probability that a customer
has to wait for more than 20 minutes to be out of the service station.
𝜆
𝜌 = traffic intensity or service utilization factor = = 8/11
𝜇
20
𝑡 = 20 𝑚𝑖𝑛 = ℎ𝑟𝑠
60
a customer has to wait for more than 20 minutes to be out of the
service station
= 𝑃(𝑊𝑠 > 𝑡) = 𝑒 −𝜇 1−𝜌 𝑡
8 1
−11 1−11 3
= 𝑃(𝑊𝑠 > 1/3) = 𝑒 = 0.3679

16-04-2021 Deepti Saxena 17


Ex 4 A customer arrives at a clinic according to a poisson process with a mean
interval of 25 minutes. The doctor needs on an average 20 minutes for a patient
to examine. Find
(i) the expected number of patients in the clinic and in the queue
(ii) percentage of patients who are not required to wait
(iii) on an average how much time is spent by a patient in the clinic
(iv) the doctor will appoint another doctor if the patient’s time in the clinic
exceeds 2 hours. How much must the rate of arrivals increase so that another
doctor is appointed?
(v) average time a patient has to be in queue before the doctor examines him.
(vi) probability that the total waiting time of patient in the system is greater than
1 hour.
(vii) percentage of patients who have to wait before they are called by the doctor
for examination
(viii) probability that there are more than 4 patients in the queue
(ix) it is desired that fewer than 5 patients are in the queue for 99% of the time.
How fast the service rate should be?
16-04-2021 Deepti Saxena 18
Given
𝜆- average number of arrivals per unit time in the system=1/25 patients per minute
𝜇 - average number of customers served per unit time in the system=1/20 patients per minute
𝜆
𝜌 = traffic intensity or service utilization factor = =4/5
𝜇

(i) the expected number of patients in the clinic and in the queue
𝜌 𝜌2
𝐿𝑠 = =4 𝐿𝑞 = == 3.2 ≈ 2
1−𝜌 1−𝜌
(ii) percentage of patients who are not required to wait
1
=prob(no patient in the system) = 𝑃0 = 1 − 𝜌 = = 0.2
5
(iii) on an average how much time is spent by a patient in the clinic
1 𝜌
𝑊𝑠 = =100 min
𝜆 (1−𝜌)
(iv) the doctor will appoint another doctor if the patient’s time in the clinic exceeds 2 hours. How
much must the rate of arrivals increase so that another doctor is appointed?
1 𝜌 1
New doctor is appointed if 𝑊𝑠 >2 hrs=120 min ⟹ >120 ⟹ >120
𝜆 (1−𝜌) 𝜇−𝜆
1
⟹ >120 ⟹ 𝜆>1/24 ⟹increase in arrival rate=1/24 – 1/25 =1/600 per min
1/20−𝜆

16-04-2021 Deepti Saxena 19


𝜆- average number of arrivals per unit time in the system=1/25 patients per minute
𝜇 - average number of customers served per unit time in the system=1/20 patients per
minute
𝜆
𝜌 = traffic intensity or service utilization factor = =4/5
𝜇

(v) average time a patient2has to be in queue before the doctor


1 𝜌
examines him. 𝑊𝑞 = =80 min
𝜆 (1−𝜌)
(vi) probability that the total waiting time of patient in the system is
greater than 1 hour = 𝑃(𝑊𝑠 > 𝑡) = 𝑒 −𝜇 1−𝜌 𝑡 , t=1 hr = 60 min
𝑃(𝑊𝑠 > 60) = 𝑒 −𝜇 1−𝜌 𝑡 = 0.5488
(vii) percentage of patients who have to wait before they are called by
the doctor for examination
=prob(system is busy) = 1 − 𝑃0 = 𝜌 = 0.8 = 80%
(viii) probability that there are more than 4 patients in the queue
𝑃(𝑛 > 𝑘) = 𝜌𝑘+1 ⟹ 𝑃(𝑛 > 4) =0.3277
16-04-2021 Deepti Saxena 20
𝜆- average number of arrivals per unit time in the system=1/25 patients per minute
𝜇 - average number of customers served per unit time in the system=1/20 patients per
minute
𝜆
𝜌 = traffic intensity or service utilization factor = =4/5
𝜇

(ix) it is desired that fewer than 5 patients are in the queue for 99% of
the time. How fast the service rate should be?
𝑃 𝑛 < 5 ≥ 99% ⟹ 𝑃(𝑛 ≤ 4) ≥ 99%
𝑃(𝑛 > 𝑘) = 𝜌𝑘+1 ⟹ 𝑃 𝑛 ≤ 𝑘 = 1 − 𝜌𝑘+1 ⟹ 1 − 𝜌5 ≥ 99%
5 5
𝜆 1 1
⟹ ≥ 0.01 ⟹ ≥ ⟹ 𝜇 ≥ 0.1105 patients per min
𝜇 25𝜇 100

16-04-2021 Deepti Saxena 21


Ex 5-Trucks arrival at a factory for collecting finished goods that are supposed to be transported to distant markets.
As and when they come they are required to join a waiting line and are served on first come, first served basis Trucks
arrive at the rate of 10 per hour whereas the loading rate is 15 per hour It is also given that arrivals are Poisson and
loading is exponentially distributed. Transporters have complained that their trucks have to wait for nearly 12
mins at the plant. Examine whether the complaint is justifiedAlso determine the probability that the loaders are idle
in the above problem.

Ex 6-At what average rate must a clerk at a super market work in order to ensure a probability of 0.90 so that the
customer will not have to spend more than 12 min.? It is assumed that there is only one counter at which customers
arrive in a Poisson fashion at an average rate of 15 per hour The length of service by the clerk has an exponential
distribution

16-04-2021 Deepti Saxena 22


Model II
finite Queuing Model
(M/M/1):(N,FCFS)
This model is also based on the same assumptions of model 1cxcept a limit on the
capacity of the system to accommodate only N customers.
In this model, 𝑃0 - probability of no customers in the system is given by

1−𝜌
𝑁+1
𝑖𝑓𝜌 ≠ 1
1−𝜌
𝑃0 =
1
𝑖𝑓𝜌 = 1
𝑁+1

16-04-2021 Deepti Saxena 23


Formulae for (M/M/s):(N,FCFS) model

𝜆
• 𝜌= = traffic intensity or service utilization factor
𝜇
1−𝜌
𝑖𝑓𝜌 ≠ 1
1−𝜌𝑁+1
• 𝑃0 = ൞ 1 =probability of no customers in the system (idle time)
𝑖𝑓𝜌 = 1
𝑁+1

• 𝑃𝑛 = 𝜌𝑛 𝑃0
𝜌 (𝑁+1)𝜌𝑁+1
− 𝑖𝑓𝜌 ≠ 1
1−𝜌𝑁+1
• 𝐿𝑠 = ൞1−𝜌
𝑁
𝑖𝑓𝜌 = 1
2

• 𝐿𝑞 = 𝐿𝑠 − 𝜌
𝐿𝑠
• 𝑊𝑠 =
𝜆(1−𝑃𝑁 )
𝐿𝑞
• 𝑊𝑞 =
𝜆(1−𝑃𝑁 )

• 𝜆𝑒𝑓𝑓 =effective arrival rate= 𝜆/(1 − 𝑃𝑁 )


𝜆𝑒𝑓𝑓
• 𝜌𝑒𝑓𝑓 =
𝜇

16-04-2021 Deepti Saxena 24


Ex 1- Consider a single server queuing system with Poisson input and exponential service times.
Suppose the mean arrival rate is 3 calling units per hour, the exponential service time is 0.25 hrs and a
maximum permissible calling units I the system is 2.Derive a steady state probability distribution of
the number of calling units in the system and then calculate the expected number of calling units in
the system
• Transient state and steady state
At the beginning of service operations a queuing system is influenced by initial conditions such as
no of customers waiting for service and the time when the servers are busy etc. This initial state is
termed as Transient state. However after a certain period of time the system becomes independent
of initial conditions and enters into steady state.
Given
𝜆- average number of arrivals per unit time in the system= 3 units per hour
𝜇 - average number of customers served per unit time in the system=1/0.25=4 units per hour
𝜆 3
𝜌 = traffic intensity or service utilization factor = = ≠ 1, N=2.
𝜇 4
steady state probability distribution of the number of calling units in the system
𝑛 𝜌𝑛 (1−𝜌) 0.75 𝑛 (1−0.75)
= 𝑃𝑛 = 𝜌 𝑃0 = = , n = 0, 1, 2
1−𝜌𝑁+1 1−(0.75)3
𝑃0 =0.431, 𝑃1 = 0.3243, 𝑃2 = 0.2432
𝜌 𝑁+1 𝜌𝑁+1
expected number of calling units in the system = 𝐿𝑠 = − = 0.81 ≈ 1
1−𝜌 1−𝜌𝑁+1

16-04-2021 Deepti Saxena 25


Ex 2 The local one person barber shop can accommodate maximum of 5 people at a
time (4 waiting and 1 getting haircut). Customers arrive according to a PD with mean
5 per hour. The barber cuts hair according to a ED at an average rate of 4 per hour.
(i) What percentage of time is the barber idle?
(ii) What fraction of potential of customers are turned away?
(iii) What is the expected number of customers waiting for a haircut?
(iv) How much time can a customer expect to spend in the barber shop?
SOLUTION
𝜆 5
𝜆 = 5 customers per hour, 𝜇 = 4 customers per hour, 𝜌 = = ≠ 1, N=5
𝜇 4
1−𝜌
(i) Idle time of barber = 𝑃0 = = 0.088 ≈ 8.8%
1−𝜌𝑁+1
(ii) P(customers are turned away)= potential customer loss= 𝑃𝑛 = 𝜌𝑛 𝑃0 for n=N =0.2711
𝜌 𝑁+1 𝜌𝑁+1
(iii) expected number of customers waiting for a haircut = 𝐿𝑞 = 𝐿𝑠 − 𝜌 = − −𝜌
1−𝜌 1−𝜌𝑁+1

= 1.88
𝐿𝑠
(iv) time a customer expect to spend in the barber shop = 𝑊𝑠 = =0.9466
𝜆(1−𝑃𝑁 )
16-04-2021 Deepti Saxena 26
Ex 3- At a railway station, only one train is handled at a time Railway yard is sufficient only
for 2 trains to wait while the other is given signal to leave the station. Trains arrive at the
station at an average rate of 6 per hour and railway station can handle them on an average
of 6 per hour. Assuming Poisson input and exponential service distribution, find the
probabilities for the number of trains in the system. Also find the average waiting time of
the new train coming to the yard. If the handling rate is doubled, how will the above results
get modified?
𝜆 6
(i) 𝜆 = 6 trains per hour, 𝜇 = 6 trains per hour, 𝜌 = = = 1, N=2+1=3
𝜇 6
1 1 𝑛 1
• 𝑃0 = = , 𝑃𝑛 = 𝜌 𝑃0 , n ≤ 𝑁 = ∀𝑛
𝑁+1 4 4
𝐿𝑠 𝑁/2
• 𝑊𝑠 = = = 0.33ℎ𝑟𝑠
𝜆(1−𝑃𝑁 ) 𝜆(1−𝑃𝑁 )
(ii) If the handling rate is doubled
𝜆 6 1
• 𝜇 = 6 × 2 = 12 trains per hour ∴ 𝜌 = = = ≠1
𝜇 12 2
1−𝜌
• 𝑃0 = =8/15=0.53, 𝑃𝑛 = 𝜌𝑛 𝑃0 , n ≤ 𝑁 ∴ 𝑃1 = 0.27, 𝑃2 = 0.13, 𝑃3 = 0.07
1−𝜌𝑁+1
𝜌 (𝑁+1)𝜌𝑁+1

𝐿𝑠 1−𝜌 1−𝜌𝑁+1
• 𝑊𝑠 = = =0.13 hrs or 7.9 min
16-04-2021 𝜆(1−𝑃𝑁 ) 𝜆(1−𝑃𝑁 ) Deepti Saxena 27
Ex 4 Patients arrive at a clinic according to a PD at a rate of 30 patients per hour.
The waiting room does not accommodate mora than 14 patients. Examination time
per patient is exponential with mean rate of 20 per hour. Find (i) effective arrival
rate at a clinic and effective traffic intensity (ii) probability that an arriving patient
will not wait (iii) expected waiting time until a patient is discharged from the clinic.

Ex 5 If in a period of 2 hours, in a day (08:00 to 10:00 am), trains arrive at the yard
every 20 min. but the service time continues to remain 36 min. then calculate, for
this period
(a) The probability that the yard is empty, and
(b) The average number of trains in the system, on the assumption that the line
capacity of the yard is only limited to 4 trains.

16-04-2021 Deepti Saxena 28

You might also like