Queueing Models (1)
Queueing Models (1)
Model: I : (𝑴 ∕ 𝑴 ∕ 𝟏) ∶ (∞⁄𝑭𝑰𝑭𝑶)
1. In a railway marshalling yard goods trains arrive at a rate of 30 trains per
day. Assume that the inter arrival time follows exponential distribution and
the service time distribution is also exponential with an average of 36 minutes.
Calculate the following
(i) The mean queue size.
(ii) The probability that the queue size is atleast 10.
(iii) If the input of the trains increases to an average of 33 per day, what
will be the change in the above quantities.
Solution:
Mean arrival rate: 𝝀
⇒1day – 30 arrivals
24 hours – 30 arrivals
30
1 hour – arrivals
24
30
60 min – arrivals
24
30
1 min – arrivals
24∗60
1
1 min – arrivals
48
𝝀 𝟏⁄ 𝟑
To find 𝝆 = = 𝟏 𝟒𝟖 =
𝝁 ⁄𝟑𝟔 𝟒
(i)Mean line length:
𝜆2 (1⁄48)2
𝐿𝑞 = =
𝜇(𝜇 − 𝜆) 1⁄ (1⁄ − 1⁄ )
36 36 48
0.000434
= = 2.27 trains
0.0277(0.0277−0.0208)
𝜆 11⁄ 33
480
To find 𝜌 = = 1⁄ =
𝜇 36 40
𝜆2 (11⁄480)2
𝐿𝑞 = =
𝜇(𝜇 − 𝜆) 1⁄ (1⁄ − 11⁄
36 36 480)
𝐿𝑞 = 3.889 trains
Change in mean line length = 3.889 − 2.27 = 1.619
(ii)P(queue size exceeds 10) = 𝑃(𝑁 > 10)
𝑃(𝑁 > 𝐾) = 𝜌𝐾+1
⇒ 𝑃(𝑁 > 10) = 𝜌10+1
10+1
33 11
⇒ 𝑃(𝑁 > 10) = 𝜌 = ( ) = 0.1205
40
Change in queue size = 0.1205 − 0.0422 = 0.0783
2. Customers arrive at a watch repair shop according to a Poisson process at a
rate of one per every 10 minutes and the service time is an exponential
random variable with mean 8 minutes. Find (i) the average number of
customers in the shop (ii) the average waiting time of a customer spends in the
shop (iii) the average time a customer spends in waiting for service (iv)
utilization factor.
Solution:
Mean arrival rate: 𝝀
10 min – 1 arrivals
1
1 min – arrivals
10
To find 𝝆:
𝜆 1⁄ 4
10
⇒𝜌= = 1⁄ =
𝜇 8 5
1⁄ 1⁄
10 10
𝑊𝑞 = 1 =1 = 32
⁄8(1⁄8−1⁄10) ⁄320
𝑊𝑞 = 32 minutes
𝜆
(iv)utilization factor 𝜌 =
𝜇
4
⇒𝜌=
5
3. In a store there is only one cashier at its counter. Nine customers arrive on
an average 5 minutes while the cashier can serve 10 customers in 5 minutes.
Assuming Poisson distribution for arrival rate and exponential distribution
for service rate, find
(i) The average number of customers in the system.
(ii) The average number of customers in queue or average queue length.
(iii) The average time a customer waits before being served.
(iv)The average time a customer spends in the system
(v) The traffic intensity
Solution:
Mean arrival rate: 𝝀
5 min – 9 arrivals
9
1 min – arrivals
5
⇒λ = 9/5 per min
Mean service rate : 𝝁
5 mins – 10 service
⇒ μ = 2/ min
(i)Average number of customers in the system 𝐿𝑠
𝜆 9⁄
5
𝐿𝑠 = =
𝜇−𝜆 2−9⁄5
𝐿𝑠 = 9 customers
(ii)average number of customers in the queue 𝐿𝑞
𝜆2 (9⁄5)2
𝐿𝑞 = = = 8.1
𝜇(𝜇−𝜆) 2(2−9⁄5)
𝐿𝑞 = 8 customers
(iii)Average time a customer waits before being served 𝑊𝑞
𝐿𝑞
𝑊𝑞 =
𝜆
8.1
𝑊𝑞 = 9 = 4.5 minutes
⁄5
To find 𝝆:
1⁄
= 1 5 = 2⁄5
𝜆
𝜌=
𝜇 ⁄2
= 8⁄125 = 0.064
(iv) Prob that a customer is being served and nobody is waiting = Prob exactly
one customer at the counter getting the service
𝑃1 = 6⁄25 = 0.24
⇒ 𝑃1 = 0.24
5. A T.V. repairman finds that the time spend on his job has an exponential
distribution with mean 30 minutes. If he repair sets in the order in which they
came in and if the arrival of sets is approximately Poisson with an average
rate of 10 per 8 – hour day,
(i)What is the repairman’s expected idle time each day?
(ii) What is the average queue length?
(iii)Find the average number of jobs in the system.
Solution:
Mean arrival rate: 𝝀
⇒ 8 hours – 10 arrivals
10
1 hour – arrivals
8
10
60 mins – arrivals
8
10
1 min – arrivals
8∗60
1
1 min – arrivals
48
To find 𝝆:
1⁄
= 5⁄8
𝜆 48
𝜌= = 1⁄
𝜇 30
= 𝑃0 = 1 − 𝜌 = 1 − 5⁄8 = 3⁄8
𝜆2 (1⁄48)2
𝐿𝑞 = = = 25⁄24 = 1.04 𝑇𝑉
𝜇(𝜇 − 𝜆) 1⁄ (1⁄ − 1⁄ )
30 30 48
(iii)Average no. of jobs in the system 𝐿𝑠
1⁄
= 5⁄3 = 1.667
𝜆 48
𝐿𝑠 = =1
𝜇−𝜆 ⁄30−1⁄48
(i)To find 𝝆:
1⁄
= 1⁄3
𝜆 6
𝜌= =
𝑠𝜇 2∗1⁄4
1⁄
= 1 6 = 2⁄3
𝜆
Let
𝜇 ⁄4
−1
1 𝜆 𝑛 1 𝜆 𝑠 1
𝑃0 = [∑𝑠−1
𝑛=0 ( ) + 𝑠! (𝜇) ]
𝑛! 𝜇 1−𝜌
−1
1⁄ 𝑛 1⁄ 2
2−1 1 1 1
= [ 𝑛=0 𝑛! (1 6)
∑ + ( 1
2! ⁄4
6
) (1−1⁄3)
]
⁄4
−1
1 2 0 1 2 1 1 2 2
=[ ( ) + ( ) + 2 ( ) ]
0! 3 1! 3 2(3) 3
2
= 1 + ( ) + 0.33 = 1.996
3
(ii)Prob. of a customer has to wait for the service
1 𝜆 𝑠 1
𝑃[𝑁 ≥ 𝑠] = ( ) . 𝑃0
𝑠! 𝜇 1−𝜌
1 2 2 1
= ( ) ∗ 1.996
2! 3 1−1⁄3
= 0.222 ∗ 2.994
𝑃[𝑁 ≥ 𝑠] = 0.6658
(iii)Average queue length 𝐿𝑞
1 𝜆 𝑠+1 1
𝐿𝑞 = ( ) (1−𝜌)2
𝑃0
𝑠. 𝑠! 𝜇
1 2 2+1 1
= ( ) 2 ∗ 1.996
2∗ 2! 3 (1−1⁄3)
= 0.111 ∗ 4.4991
𝐿𝑞 = 0.4994
(iv)Average time spend by a customer in the queue 𝑊𝑞
𝐿𝑞 0.4994
𝑊𝑞 = = 1⁄
𝜆 6
𝑊𝑞 = 2.9964 𝑚𝑖𝑛𝑠.
(v)Idle time = 1 − 𝜌
i)To find 𝜌: 𝑠 = 3
1⁄
= 5⁄2
𝜆 4
Let =1
𝜇 ⁄10
1⁄
= 5⁄6
𝜆 4
𝜌= =
𝑠𝜇 3∗1⁄10
−1
1 𝜆 𝑛 1 𝜆 𝑠 1
𝑃0 = [∑𝑠−1
𝑛=0 ( ) + 𝑠! (𝜇) ]
𝑛! 𝜇 1−𝜌
−1
3−1 𝑛 3
1 5 1 5 1
= [∑ ( ) + ( ) ]
𝑛! 2 3! 2 (1 − 5⁄ )
𝑛=0 6
−1
1 5 0 1 5 1 1 5 2 1
= [ ( ) + ( ) + ( ) + (15.625)]
0! 2 1! 2 2! 2 1
5 25 −1
= [1 + + + 15.625] = 0.0449
2 8
𝑃0 = 0.0449
(i)P(all the typists are busy) = P(arrival has to wait)
1 𝜆 𝑠 1
𝑃[𝑁 ≥ 𝑠] = ( ) . 𝑃0
𝑠! 𝜇 1−𝜌
1 5 3 1
= ( ) ∗ 0.0449
3! 2 1−5⁄6
= 2.6041 ∗ 0.2694
𝑃[𝑁 ≥ 𝑠] = 0.7015
(ii)Average no. of letters waiting to be typed
1 𝜆 𝑠+1 1
𝐿𝑞 = ( ) (1−𝜌)2
𝑃0
𝑠. 𝑠! 𝜇
1 5 3+1 1
= ( ) 2 ∗ 0.0449
3∗3! 2 (1−5⁄6)
𝐿𝑠 = 𝐿𝑞 + = 3.50 + 5⁄2 = 6
𝜆
𝜇
6
𝑊𝑠 = 1 = 24 minutes
⁄4
(iv)P(that a letter will take longer than 20 minutes waiting to be typed and being
typed) , 𝑡 = 20 minutes
𝜆
𝜆 𝑠 −𝜇𝑡(𝑠−1− )
𝜇 ]𝑃
( ) [1−𝑒 0
𝜇
𝑃[𝑊𝑠 > 𝑡] = 𝑒 −𝜇𝑡 [1 + 𝜆 𝜆 ]
𝑠!(1− )(𝑠−1− )
𝜇𝑠 𝜇
𝜆
5 𝑠 −𝜇𝑡(𝑠−1− )
𝜇 ]𝑃
( ) [1−𝑒 0
1⁄ ∗20 2
= 𝑒− 10 [1 + 𝜆 𝜆 ]
𝑠!(1− )(𝑠−1− )
𝜇𝑠 𝜇
1 − 2.7182
= 0.1353 [1 + 15.625 × × 0.0449]
−0.5
= 0.4614
3. Four counters are being run on the frontier of a country to check the
passports and necessary papers of the tourists. The tourist chooses a counter a
random. If the arrival at the frontier is Poisson at the rate of 𝝀, and the
𝝀
service time is exponential , what is the steady – state average queue at each
𝟐
counter.
Solution:
Given, 𝑠 = 3 + 1 = 4
Mean arrival rate: 𝝀
𝜆=1
Mean service rate : 𝝁
𝜇 = 1⁄2
To find 𝜌: 𝑠 = 4
𝜆 1
Let =1 =2
𝜇 ⁄2
𝜆 1
𝜌= = = 1⁄2
𝑠𝜇 4∗1⁄2
−1
1 𝜆 𝑛 1 𝜆 𝑠 1
𝑃0 = [∑𝑠−1
𝑛=0 ( ) + 𝑠! (𝜇) ]
𝑛! 𝜇 1−𝜌
4−1 −1
1 1 1
= [∑ (2)𝑛 + (2)4 ]
𝑛! 4! (1 − 1⁄ )
𝑛=0 2
−1
1 1 1 1 1
=[ (2)0 + (2)1 + (2)2 + (2)3 + 4
(2) ]
0! 1! 2! 3! 4!∗1⁄2
4 8 2 −1
= [1 + 2 + + + ( ∗ 16)]
2 6 24
23 −1
=[ ] = 0.1304
3
𝑃0 = 0.1304
(i)Average queue at each counter 𝐿𝑞
1 𝜆 𝑠+1 1
𝐿𝑞 = ( ) (1−𝜌)2
𝑃0
𝑠. 𝑠! 𝜇
1 1
= (2)4+1 2 ∗ 0.1304
4∗ 4! (1−1⁄2)
= 0.3333 ∗ 0.5216
𝐿𝑞 = 0.1738
4. A telephone exchange has two long distance operators. The telephone
company finds that during the peak load, long distance calls arrive in a
Poisson fashion at an average rate of 15 per hour. The length of service on
these calls is approximately exponentially distributed with mean length 5
minutes (i) what is the probability that a subscriber will have to wait for his
long distance call during peak hours of the day. (ii) If the subscribers will wait
and are served in turn, what is the expected waiting time.
Solution:
Mean arrival rate: 𝝀
1 hour – 15 arrivals
60 mins – 15 arrivals
15
1 min – arrivals
60
1
1 min – arrivals
4
(i)To find 𝜌: 𝑠 = 2
1⁄
= 1 4 = 5⁄4
𝜆
Let
𝜇 ⁄5
1⁄
= 5⁄8
𝜆 4
𝜌= =
𝑠𝜇 2∗1⁄5
−1
1 𝜆 𝑛 1 𝜆 𝑠 1
𝑃0 = [∑𝑠−1
𝑛=0 𝑛! (𝜇) + ( ) ]
𝑠! 𝜇 1−𝜌
−1
1 5 𝑛 1 5 2 1
= [∑2−1
𝑛=0 𝑛! (4) + ( ) ]
2! 4 (1−5⁄8)
−1
1 5 0 1 5 1 1 5 2
=[ ( ) + ( ) + 3 ( ) ]
0! 4 1! 4 2!∗ 4 ⁄8
5 −1
= [1 + + (1.3333 ∗ 1.5625)] = 0.2320
4
𝑃0 = 0.2320
(i)P(that an arrival has to wait)
1 𝜆 𝑠 1
𝑃[𝑁 ≥ 𝑠] = ( ) . 𝑃0
𝑠! 𝜇 1−𝜌
1 5 2 1
= ( ) ∗ 0.2320
2! 4 1−5⁄8
1 𝜆 𝑠+1 1
𝐿𝑞 = ( ) (1−𝜌)2
𝑃0
𝑠. 𝑠! 𝜇
1 5 2+1 1
= ( ) 2 ∗ 0.2320
2 ∗ 2! 4
(1 − 5⁄8)
1
= ∗ 1.9531 ∗ 1.6497
4
𝐿𝑞 = 0.8054
5
𝐿𝑠 = 0.8054 + = 2.0554
4
2.0554
𝑊𝑠 = 1⁄ = 8.2216 minutes
4
𝑊𝑠 = 8.2216 minutes
To find 𝝆:
𝜆 1⁄12 5
𝜌= = = ⁄4
𝜇 1⁄
15
(i)% of time the barber idle= system empty= 𝑃0
1−𝜌
𝑃0 = ,𝜆 ≠ 𝜇
1 − 𝜌𝑘+1
1 − 5⁄4
= = 0.0888
1 − (5⁄4)5+1
To find 𝝀′ :
𝜆′ = 𝜇(1 − 𝑃0 )
2. At a railway station, only one train is handled at a time. The 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/hr and the railway
station can handle them on an average of 6/hr. Assuming Poisson arrivals and
exponential service distribution.
(i) Find the probabilities for the numbers of trains in the system.
(ii) Find the average waiting time of a new train coming into the yard.
(iii) If the handling rate is doubled then what about (i) and (ii).
Solution:
Mean arrival rate: 𝜆
1 hour – 6 arrivals
60 mins – 6 arrivals
6
1 min – arrivals
60
1
1 min – arrivals
10
To find 𝝆:
𝜆 1⁄
𝜌= = 1 10 = 1, 𝑘 = 2 + 1 = 3
𝜇 ⁄10
𝑃𝑛 = 0.25
(ii)average time a new train coming into the yard 𝑊𝑠
𝐿𝑠
𝑊𝑠 = 𝑤ℎ𝑒𝑟𝑒 𝜆′ = 𝜇(1 − 𝑃0 )
𝜆′
𝑘
𝐿𝑠 = , 𝜆 = 𝜇
2
3
𝐿𝑠 = = 1.5 𝑡𝑟𝑎𝑖𝑛𝑠
2
To find 𝝀′
𝜆′ = 𝜇(1 − 𝑃0 )
𝐿𝑠
(ii) 𝑊𝑠 = 𝑤ℎ𝑒𝑟𝑒 𝜆′ = 𝜇(1 − 𝑃0 )
𝜆′
𝜌 (𝑘+1)𝜌𝑘+1
𝐿𝑠 = −
1−𝜌 1−𝜌𝑘+1
1⁄ 4
2 4∗(1⁄2)
𝐿𝑠 = − = 0.7334 trains
1−1⁄2 1−(1⁄2)
4
To find 𝝀′
𝜆′ = 𝜇(1 − 𝑃0 )
𝑊𝑠 = 7.86 𝑚𝑖𝑛𝑢𝑡𝑒𝑠.
3. Patients arrive at a clinic according to Poisson distribution at a rate of 30
patients per hour the waiting room does not accommodate more than 14
patients. Diagnosis time per patient is exponential with mean rate of 20 per
hour. Find out (i)The effective arrival rate at the clinic. (ii) The probability
that an arriving patient will not have to wait. (iii) the expected waiting time
until a patient is discharged from the clinic.
Solution:
Mean arrival rate:𝝀
1 hour – 30 arrivals
60 mins – 30 arrivals
30
1 min – arrivals
60
1
1 min – arrivals
2
To find 𝝆:
1⁄
= 1 2 = 3⁄2
𝜆
𝜌=
𝜇 ⁄3
3⁄ 15+1
2 15∗(3⁄2)
𝐿𝑠 = 3 − 15+1 = 12.022 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
1− ⁄2 1−(3⁄2)
𝐿𝑠 = 12.022 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
𝐿𝑠 12.022
𝑊𝑠 = = = 36.09 𝑚𝑖𝑛𝑠
𝜆′ 0.33308
4. A car park contains 5 cars. The arrival of cars is Poisson at a mean rate of
10/hr. The length of time each car spends in the car park is exponential
distribution with mean of 2hrs. how many cars are in the car park on
average? Probability of a newly arriving customer finding the car park full
and leaving to park his car elsewhere.
Solution:
Mean arrival rate: 𝝀
1 hour – 10 arrivals
60 mins – 10 arrivals
10
1 min – arrivals
60
1
1 min – arrivals
6
To find 𝝆:
1⁄
= 1 6 = 1⁄3
𝜆
𝜌=
𝜇 ⁄2
Given, 𝑘 = 5
(i)Average no. of cars in the car park 𝐿𝑠
𝜌 (𝑘+1)𝜌𝑘+1
𝐿𝑠 = − , 𝜆≠𝜇
1−𝜌 1−𝜌𝑘+1
1⁄ 5+1
3 6∗(1⁄3)
𝐿𝑠 = − = 0.4972
1−1⁄3 1−(1⁄3)
5+1
(ii)P(of a newly arriving customer finding the car park full and leaving to park
his car elsewhere) 𝑃𝑛
𝑃𝑛 = 𝜌𝑛 ∗ 𝑃0 , 𝜆 ≠ 𝜇
(1−𝜌) (1−1⁄3)
𝑃0 = = 6 = 0.6675
1−𝜌𝑘+1 1−(1⁄3)
5
𝑃5 = 𝜌5 ∗ 0.6675 = (1⁄3) ∗ 0.6675 = 0.00274
To find 𝝆:
1⁄
= 1 15 = 11⁄5
𝜆
𝜌=
𝜇 ⁄33
Given, 𝑘 = 4
(i)P( the yard is empty) 𝑃0
(1−𝜌) (1−11⁄5)
𝑃0 = = 5 = 0.02374
1−𝜌𝑘+1 1−(11⁄5)
11⁄ 5
5 5∗(11⁄5)
𝐿𝑠 = 11 − 5 = 3.26 𝑡𝑟𝑎𝑖𝑛
1− ⁄5 1−(11⁄5)
To find 𝜌:
1⁄
= 2⁄5
𝜆 15
𝜌= =
𝜇𝑠 2∗1⁄12
1⁄
= 1 15 = 4⁄5
𝜆
𝜇 ⁄12
−1
1 𝜆 𝑛 1 𝜆 𝑠 𝜆 𝑛−𝑠
(i) 𝑃0 = [∑𝑠−1
𝑛=0 𝑛! (𝜇 ) + (𝜇) 𝑘
∑𝑛=𝑠 ( ) ]
𝑠! 𝑠𝜇
−1
1 𝜆 𝑛 1 𝜆 𝑠 𝜆 𝑛−2
𝑃0 = [∑2−1
𝑛=0 𝑛! (𝜇) +
𝑠!
(𝜇) 7
∑𝑛=2 ( ) ]
𝑠𝜇
1 4 0 1 4 1
={ ( ) + ( )
0! 5 1! 5
−1
1 4 2 2 0 2 1 2 2 2 3 2 4 2 5
+ ( ) [( ) + ( ) + ( ) + ( ) + ( ) + ( ) ]}
2! 5 5 5 5 5 5 5
4 8 2 4 8 16 32 −1
= {1 + + [1 + + + + + ]}
5 25 5 25 125 625 3125
𝑃0 = 0.4289
1 𝜆 𝑛
𝑃𝑛 = ( ) 𝑃0 , 𝑛 ≤ 𝑠, 𝑛 = 1, 𝑠 = 2
𝑛! 𝜇
1 4 1
(ii) 𝑃1 = ( ) ∗ 0.4289 = 0.34312
1! 5
1 𝜆 𝑛
𝑃𝑛 = ( ) 𝑃0 𝑓𝑜𝑟 𝑠<𝑛≤𝑘
𝑠! 𝑠 𝑛−𝑠 𝜇
1 4 𝑛7
(iii) 𝑃7 = ( ) ∗ 0.4289 = 0.00140, 2<𝑛≤𝑘=7
2! 27−2 5
𝐿𝑠
(iv) 𝑊𝑠 = where 𝜆′ = 𝜇[𝑠 − ∑𝑠−1
𝑛=0(𝑠 − 𝑛) 𝑃𝑛 ]
𝜆′
To find 𝜆′
𝜆′ = 1⁄12 [2 − ∑2−1
𝑛=0(2 − 𝑛) 𝑃𝑛 ]
𝜆′ = 0.0666
𝜌 𝜆 𝑠
𝐿𝑞 = ( ) [1 − 𝜌𝑘−𝑠 − (𝑘 − 𝑠)(1 − 𝜌)𝜌𝑘−𝑠 ]𝑃0
𝑠! (1−𝜌)2 𝜇
16
= ∗ (0.98976 − 0.03072) ∗ 0.4289
45
𝐿𝑞 = 0.1462 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
𝜆′ 0.0666
𝐿𝑠 = 𝐿𝑞 + = 0.1462 + 1⁄
𝜇 12
𝐿𝑠 = 0.9454 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠.
𝐿𝑠 0.9454
𝑊𝑠 = = = 14.195 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜆′ 0.0666
𝑊𝑠 = 14.195 𝑚𝑖𝑛𝑢𝑡𝑒𝑠.