Notes-Queuing Theory
Notes-Queuing Theory
Introduction
• 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.
• 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
• (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.
(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
1 𝜆
• We can derive that 𝑊𝑠 = 𝑊𝑞 + and 𝐿𝑠 = 𝐿𝑞 +
𝜇 𝜇
𝜆 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
(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−𝜆
(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
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
1−𝜌
𝑁+1
𝑖𝑓𝜌 ≠ 1
1−𝜌
𝑃0 =
1
𝑖𝑓𝜌 = 1
𝑁+1
𝜆
• 𝜌= = 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−𝑃𝑁 )
= 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.