0% found this document useful (0 votes)
31 views34 pages

OR 122 -CH11

Uploaded by

randalshalan
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)
31 views34 pages

OR 122 -CH11

Uploaded by

randalshalan
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/ 34

College of Science

Department of Statistics & OR

OR 122
Biostatistics

Chapter 11:
Queuing Theory
Queues are common in everyday table.

Railway booking offices


Post offices
customers Bank counters
Doctor clinics, hospitals
Bus stop, etc

Queue means ⇒ customers waiting for a service in a line.


Queuing Theory:
It is defined as a quantitative technique useful for determining the optimum
number of service facilities.

Queuing System:
Can be completely described by:
1) The input process (Arrival pattern)
2) The service mechanism (service pattern)
3) Queue Discipline
4) Output of the queue (customer behavior)
◦ Generally, this factor is not important.
Arrival → Customer waiting → Unit is being → Unit leaving the
in line served queue after serving

Arival Process Unit being served


Length of queue Output or
Service Mech.
Wating time in queue Service time
element leaving อ
the queue

System length waiting


time in the system
Arrivals

Nature of arrivals 𝐶𝑎𝑝𝑎𝑐𝑖𝑡𝑦 𝑜𝑓 𝑡ℎ𝑒 𝑠𝑦𝑠𝑡𝑒𝑚 𝐶𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑏𝑒ℎ𝑎𝑖𝑣𝑜𝑟

Arrival time Balking


Size of arrivals Limited Unlimited Reneging
distrbution
Collosion
Jockeying

Constant Random
Finite Infinite
population population
Input process:
Describes the way in which the customers arrive and join the system.

The size of arrivals depends on whether the size of the population is finite or
infinite

The arrival pattern can be described in terms of probabilities and consequently


the probability distribution for interarrival time.
Interarrival time:
➢ The time between two successive arrivals or distribution of number of customers
arriving in unit time.

For example:
In a restaurant ⇒ arrival times of customer are distributed randomly.
In a clinic appointments ⇒ arrival times of patients are constant (specified
intervals of time).
Mean arrival rate:
➢ The average number of customers per unit of time
1
MAR =
𝜆

Capacity of the system:


➢ The space available for arrivals to wait before being taken for service may be
limited or unlimited.
Customer behavior:
Balking: The customer does not like to join the queue due to its long length.
Always, lengthy queue indicates insufficient service facility.

Reneging: Customer join the queue and often waiting for certain time loses his
patience and leaves the queue.

Collusion: Several customers collaborate and only one of them may stand in a
queue. One customer represents a group.

Jockeying: A customer leaves the long queue and join the shorter one hoping of
getting the service.
Service Mechanism:
(1) Single channel facility: One queue – one service station.

(2) One queue – several service stations: The customers wait in a single
queue until one of the service stations is ready to take them.

(3) Several queue – one service stations.

(4) Multi channel queues.


Queue Discipline:
(1) First in first out (FIFO) or first come first served (FCFS).

(2) Last in first out (LIFO) or last come first served (LCFS)

(3) Service in random order (SIRO)

(4) Service in propriety: A patient with stomach pain has less priority than a
patient with heart pain.
Note:
Ways of the queueing models assume that the interarrival time are independent
and identically distributed and that all service times are independent and
identically distributed.

⇒Some models conventionally are (Kendell-Lee) labeled as follows”


Distribution of Queueing Calling
service times discipline population size

_____ / _____ /_____ / _____ / _____ /_____

Distribution of Number of System capacity


interarrival times services
Examples:
M/M/1 ⇒ M/M/1/FCFS/∞/ ∞
Assumes that both interarrival times and services time have an exponential
distribution and the number of services is 1.

M/M/S ⇒ M/M/S/FCFS/∞/ ∞
Assumes that both interarrival times and services time have an exponential
distribution and the number of services is s (any positive integer).

M/G/1 ⇒ M/G/1/FCFS/∞/ ∞
Assumes that both interarrival times have an exponential distribution and the
services time have an arbitrary distribution.
Terminology and notation:
𝑁 𝑡 = number of customers in queuing system at time 𝑡 ≥ 0 including customers in service (State of
system at 𝑡).
𝑃𝑛 𝑡 = Probability that exactly 𝑛 customers are in the queuing system at 𝑡.
𝑆 = number of servers in the queuing system.
𝐿 𝑜𝑟 𝐿𝑠 = Expected number of customers in the queuing system.
𝐿𝑞 = Expected number of customers in the queue (excluding customers being served).
𝑤 = Waiting time in the queueing system (including service time) for each individual customer.
𝑊 𝑜𝑟 𝑊𝑠 = 𝐸 𝑤 = Expected of waiting time in the system.
𝑤𝑞 = Waiting time in the queuing (exclude service time)
𝑊𝑞 = 𝐸 𝑤𝑞 = Expecting of waiting time in the queuing system (exclude service time)
𝜆 = Mean arrival time.
𝜇 =The mean service rate.
Relationship between 𝐿 𝑜𝑟 𝐿𝑠 , 𝑤 𝑜𝑟 𝑤𝑠 , 𝐿𝑞 𝑎𝑛𝑑 𝑊𝑞 :

𝐿 = 𝜆𝑊
𝐿𝑞 = 𝜆𝑊𝑞
1
The mean service time is constant and is denoted by ∀ 𝑛≥1
𝜇
1
⇒ 𝑊𝑠 = 𝑊𝑞 +
𝜇
Note:
𝜌 = Traffic intensity or utilization factor which represents the proportion of time
𝜆
the severs are busy =
𝜇
Steady-State balance equation:
𝑅𝑎𝑡𝑒 𝑖𝑛 = 𝑅𝑎𝑡𝑒 𝑜𝑢𝑡
Calculate 𝑃𝑛 𝑡 for 𝑛 = 0,1,2, …
State:

𝜆 𝜆 𝜆 𝜆 𝜆 𝜆

0 1 2 3 … n-2 n-1 n n+1

𝜇 𝜇 𝜇 𝜇 𝜇 𝜇

𝜆
State 0 ⇒ 𝜇𝑃1 = 𝜆𝑃0 ⇒ 𝑃1 = 𝜇 𝑃0 (1)
State 1⇒ 𝜆𝑃0 + 𝜇𝑃2 = 𝜇𝑃1 + 𝜆𝑃1
= (𝜇 + 𝜆)𝑃1
⇒ 𝜇𝑃2 = (𝜇 + 𝜆)𝑃1 − 𝜆𝑃0
𝜆
= (𝜇 + 𝜆) 𝑃 − 𝜆𝑃0
𝜇 0
𝜆(𝜇+𝜆)
= − 𝜆 𝑃0
𝜇
𝜇𝜆+𝜆2 −𝜇𝜆 𝜆2
𝜇𝑃2 = 𝑃0 = 𝑃0
𝜇 𝜇

𝜆2 𝜆 2
⇒ 𝑃2 = 𝑃0 ⇒ 𝑃2 = 𝑃0
𝜇2 𝜇
State n:
𝜆 𝑛
𝑃𝑛 = 𝜇
𝑃0

𝜆
Since, the utilization factor 𝜌 = 𝜇

⇒ 𝑃𝑛 = 𝜌 𝑛 𝑃0
𝜆
𝑃0 = 1 − 𝜇
For the model M/M/1/FCFS/∞/ ∞ the following equations are obtained:
𝜆
𝐿𝑠 =
𝜇−𝜆
𝜆 𝜆 𝜆2
Non − empty queue length
𝐿𝑞 = 𝜌𝐿𝑠 = =
𝜇 𝜇−𝜆 𝜇(𝜇−𝜆)
1 𝐿𝑠 𝑞𝑢𝑒𝑢𝑒 𝑠𝑦𝑠𝑡𝑒𝑚
𝑊𝑠 = = 𝜇
𝜇−𝜆 𝜆 1 𝜆
𝜆 1 𝜆 𝜇−𝜆 +
𝑊𝑞 = 𝜌𝑊𝑠 = = 𝜇−𝜆 𝜇
𝜇 𝜇−𝜆 𝜇(𝜇−𝜆)

𝑃 𝑤 > 𝑡 = 𝑒 −𝜇 1−𝜌 𝑡

𝑃 𝑤𝑞 > 𝑡 = 𝜌 × 𝑒 −𝜇 1−𝜌 𝑡
⇒ 𝑃 𝑤𝑞 > 𝑡 = 𝜌 × 𝑃 𝑤 > 𝑡
Example 1
A supermarket has a single cashier. During the peak hours, customers arrive at a
rate of 20 customers per hour. The average number of customers that can be
processed by the cashier is 24 per hour.
Calculate :
(i) Find the probability that the cashier is idle (not busy)?
(ii) The average number of customers in the queuing system is?
(iii) The average time a customer spend in the system is?
(iv) The average number of customers in the queue is?
(v) The average time a customer spends in the queue waiting for service is?
Solution
𝜇 = 24, 𝜆 = 20
𝜆 20
(i) 𝑃0 = 1 − 𝜌 = 1 − = 1 − = 0.167
𝜇 24
𝜆 20 20
(ii) 𝐿𝑠 = = = = 5 customers
𝜇−𝜆 24−20 4
1 1 1
(iii) 𝑊𝑠 = = = hours or 15 minutes
𝜇−𝜆 24−20 4
𝜆 20 100
(iv) 𝐿𝑞 = 𝐿𝑠 = 5= = 4.167
𝜇 24 24
20 1 5
(v) 𝑊𝑞 = 𝜌𝑊𝑠 = = or 12.5 minutes
24 4 24
Note that when 𝜆 < 𝜇 this means that 𝜌 < 1 and hence the system reaches the
steady state.
Example 2:
Emergency cases arrive independently at random. Assume arrivals follow
Poisson input process (exponential interarrival time) and the time spent with the
ER doctor is exponentially distributed. Arrival rate is 1 patient every 0.5 hour and
the average service time is 20 minutes to treat a patient.

(i) Find the probability that the doctor is idle (not busy)?
(ii) Find the probability that there are 3 patients?
(iii) Find the probability that there are at least 4 patients waiting to see the
doctor (waiting to be served =waiting in the system)?
(iv) Expected number of patients in the ER?
(v) Expected number of patients in the queue?
(vi) Expected waiting time in the ER?
(vii) Expected waiting time in the queue?
(viii) Find the probability that the patient waits more than 30 minutes in the queue?
(x) Find the probability that the patient waits more than 30 minutes in the ER?
Solution
Patient Arrive in hour
1
Arrival rate ⇒ 1 ⇒ 𝜆 = 2 persons/hour.
2
𝜆 1

Patient Arrive in hour


20
Service rate ⇒ 1 ⇒ 𝜇 = 3 persons/hour.
60
𝜇 1

𝜆 2
Utilization factor ⇒ ρ = = < 1 ⇒ the system reaches the steady state.
𝜇 3
𝜇 = 3, 𝜆 = 2
2 1
(i) 𝑃0 = 1 − 𝜌 = 1 − =
3 3
𝜆 𝑛 𝜆 3 2 31
(ii) 𝑃𝑛 = 𝑃0 ⇒ 𝑃3 = 𝑃0 = = 0.09876
𝜇 𝜇 3 3

(iii) 𝑃 # 𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 ≥ 4 = 1 − 𝑃 #𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 < 4 = 1 − 𝑃 #𝑝𝑎𝑡𝑖𝑒𝑛𝑡𝑠 ≤ 3


= 1 − (𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 )
1 2 1 2 21 2 31
=1− + + + = 0.19753
3 3 3 3 3 3 3
𝜆 2
(iv) 𝐿𝑠 = = = 2 patients/hour.
𝜇−𝜆 3−2
2 4
(v) 𝐿𝑞 = 𝜌 𝐿𝑠 = 2 = patients/hour.
3 3
1 1
(vi) 𝑊𝑠 = = = 1 hours .
𝜇−𝜆 3−2
2 2
(vii) 𝑊𝑞 = 𝜌𝑊𝑠 = 1 = hour
3 3
2 1
30 1 2 −3 1−
(vii) 𝑃 𝑤𝑞 > = 𝑃 𝑤𝑞 > = 𝜌 𝑒 −𝜇 1−𝜌 𝑡
= 𝑒 3 2 = 0.4043
60 2 3
2 1
30 1 −𝜇 1−𝜌 𝑡 −3 1−
(x) 𝑃 𝑤𝑠 > = 𝑃 𝑤𝑠 > =𝑒 =𝑒 3 2 = 0.6065
60 2
Example 3
XYZ Tailoring house has one tailor specialized in men’s shirts. The number of
customers requiring stitching of shirts appears to follow Poisson distribution
with mean arrival rate of 12 per hour. Customers are attended to by tailor on a
first-come-first served basis, and the they are willing to wait for service if there
be queue. The time the tailor takes to attend a customer is exponentially
distributed with a mean of 4 minutes. Required:
(i) The utilization parameter (busy tailor)?
(ii) The probability that the queueing system is idle (non-busy)?
(iii) The average time the tailor is free on 8-hour working day?
(iv) What is the probability that there shall be 5 customers in the shop (at a point
of time)?
(v) What is the number of customers in the shop (queueing system)?
(vi) What is the expected number of customers waiting for tailor’s service?
(Waiting in queue before service).
(vii) What is the expected length of non-empty queue?
(viii) How much time a customer should expect to spend in the queue?
(ix) How much time a customer should expect to spend in the shop?
(x) What is the probability that a customer shall spend more than 10 minutes for
the tailor’s service?
Solution
𝜆 = 12 customers/hour
Persons hour
4
𝜇 =? ? ⇒ 1 ⇒ 𝜇 = 15 customers/hour.
60
𝜇 1
𝜆 12
(i) 𝜌 = = = 0.8 < 1 the system reaches the steady state.
𝜇 15
(ii) 𝑃0 = 1 − 𝜌 = 1 − 0.8 = 0.2 (not busy = free)
(iii) AT = 0.2 8 = 1.6 hours (free)
𝜆 5 𝜆 5
(iv) 𝑃5 = 1− = 1 − 0.8 0.8 = 0.066
𝜇 𝜇
𝜆 12
(v) 𝐿𝑠 = = = 4 customers
𝜇−𝜆 15−12
(vi) 𝐿𝑞 = 𝜌 𝐿𝑠 = 0.8 4 = 3.2 customers.
𝜇 15 15
(vii) 𝐿𝑞′ = = = = 5 customers.
𝜇−𝜆 15−12 3
𝜆 12 4
(viii) 𝑊𝑞 = = = hours .
𝜇(𝜇−𝜆) 15(15−12) 15
1 1 1
(ix) 𝑊𝑠 = = = hours .
𝜇−𝜆 15−12 3
10 1
10 −15 1−0.8 −
(x) 𝑃 𝑤𝑞 > = 𝜌 𝑒 −𝜇 1−𝜌 𝑡
= 0.8𝑒 60 = 0.8𝑒 2 = 0.49.
60

You might also like