Operational Research UNIT-IV NOTES
Operational Research UNIT-IV NOTES
UNIT- IV
QUEUEING MODELS
Introduction:
One of the most useful areas of application of
probability theory is that of queueing theory or the study of
waiting line phenomena. Queues are found everywhere in our
day to day life.
For example, In industries, school, colleges, hospitals,
libraries, banks, post offices, theatres, ticket booking counters
etc.
Queueing problems arises in the following cases,
(i) The demand for service is more than the capacity to
provide service.
For example, Ticket booking counters in railway
stations, queues are always formed.
(ii) The demand for service is less than the capacity to serve
so that there is lot of idle facility time.
For example, In a petrol bunk, if there is no vehicle for
refilling petrol then the system is idle, both the pump and
the workers are idle.
Queueing theory is used to achieve an optimum balance
between the cost associated with waiting time of
customers and idle time of the service facilities so that
the profit is maximized.
In arrival
per hr (or) per min (or) per sec given
directly.
1
hr (or) min (or) sec given directly.
In service
per hr (or) per min (or) per sec given
directly.
1
hr (or) min (or) sec
given directly.
Use and in one mode hr (or) min (or) sec.
E Wq Wq 0
1
0 1 n
n-2
0 1 2 ……. n-1 n
1 2 n-1 n
Little’s formula:
Ls Lq
1) Ls 2) Lq Ls 3) Ws 4) Wq
, , ,
PROBLEMS UNDER SINGLE SERVER INFINITE CAPACITY
(M|M|1) :( ∞|FIFO)
1) Automatic car wash facility operates with only one bay. Cars
arrive according to a Poisson process, with mean of 4 cars
per hour and may wait in the facility’s parking lot if the bay
is busy. If the service time for all cars is constant and equal
to 10 minutes, determine Ls, Lq, Ws and Wq.
Sol:
Given: Number of server = One
System capacity = Infinity (∞)
1 1 1
10 min (60) per hr
10 min 10
6 perhr
4 4
1) Ls 2 cars
64 2
4
2) Lq Ls 2 1.333 cars
6
Ls 2
3) Ws 0.5 hrs
4
Lq 1.333
4) Wq 0.333 hrs
4
2) A supermarket has a single cashier. During peak hours,
customers arrive at a rate of 20 per hour. The average
number of customers that can be processed by the cashier
is 24 per hour. Calculate
(i) The probability that the cashier is idle.
(ii) The average number of customers in the Queueing
system.
(iii) The average time a customer spends in the system.
(iv) The average number of customers in the queue.
(v) The average time a customer spends in the queue
waiting for service.
Sol:
Sol:
1 1
Service time: 8 min
8
1
per min 0.125
8
0.1
(i) Ls 4
0.125 0.1
Ls 4
(ii ) Ws 40 min
0.1
0.1
iii ) Lq Ls 4 3.2
0.125
0.1
(iv ) p0 1 1 0.2
0.125
1 1
20 per min per min 0.05
20
1 1
Service time: 15 min
15
1
0.067
15
0.05
(i) p0 1 1 0.2537
0.067
0.05
(ii ) Ls 2.941 3
0.067 0.05
Ls 3
(iii ) Ws 60 min 1hr
0.05
0.05
Lq Ls 3 2.254
0.067
Lq 2.254
(iv ) Wq 45.08 min 0.75hr
0.05
k
(v) p ( N k ) here k 6
6
0.05
p ( N 6) 0.173
0.067
(vi) P(W t ) e ( )t
P(W 30) e ( 0.0670.05)30 0.6005
Sol:
s ! s n s p 0 , ns
s 1
Lq
1 p0
2
2. s !s
1
s
3.
Ls Lq
Ls
4. W
s
Lq
5. Wq
1
p0
s
s 1 1 n
6. n 0 n !
s! 1
s
s
P0
7. P N s
s! (1 )
s
8. Probability of busy = traffic intensity = s
9. Probability of idle =
1
s
10. % of idle =
1 (100)
s
……. …….
……. n-1
0 1 2 c n
2 c c c c
1
p0 (1)
s
s 1 1
n
n 0 n !
s!
1
s
Consider
n
s 1
1
n
2
1 15 2
n! 2.5
1 1 1 1
(2.5) 0 (2.5)1 (2.5) 2
n
n 0 n ! n 0 n ! 6 n 0 0! 1! 2!
n
s 1
1
6.625
n 0 n !
s
2. 5
3
15.625
15.625
3!1 15 1
s!1
s 18
From equation (1),
1
p0 0.045
(6.625 15.625)
s 1
Lq
1 p0
1 2.5
4
(0.045)
s !s
2
3!3 1 0.8332
1
s
1.758
Lq 3.502 3.5
0.502
Ls Lq 3.5 2.5 6
Ls 6
Ws 0.4 hr
15
Lq 3.5
Wq 0.233 hr
15
(a) The fraction of the time all the typists will be busy
s
P0
P[ N s ]
s!1
s
P[ N 3]
2.5 (0.045) 0.703
3
0.703
3!1 0.833 1
(c) The average time a letter has to spend for waiting and for
being typed
Ls 6
2. A petrol pump station has 4 pumps. The service times follow the
exponential distribution with a mean of 6 min and cars arrive for
service in a Poisson process at the rate of 30 cars per hour.
(a) What is the probability that an arrival would have to wait in
line?
(b) Find the average waiting time in the queue, average time
spent in the system and the average no. of cars in the system.
Sol:
1
p0 (1)
s
s 1 1
n
n 0 n !
s!
1
s
Consider
n
s 1
1
n
3
1 30 3
n
s 1
1
13
n 0 n !
s
3
4
81
13.5
30 6
s!1 4!1
s 40
From equation (1),
1
p0 0.038
(13 13.5)
s 1
Lq
1 p0
1 3
5
(0.038)
s !s
2
4 ! 4 1 0.752
1
s
9.234
Lq 1.53
6
Ls Lq 1.53 3 4.53
Ls 4.53
Ws 0.151 hr
30
Lq 1.53
Wq 0.051hr
30
(a) The probability that an arrival would have to wait
in line
s
P0
P[ N s ]
s!1
s
P[ N 4]
3 (0.038) 3.078
4
0.513
4! 1 0.75 6
(b) The average waiting time in the queue = 0.051hr
Average time spent in the system = 0.151 hr
The average no. of cars in the system = 4.53
% of time would a pump be idle on an average =
1
(100) (1 0.75)(100) 25%
s
3. A super market has two girls attending to sales at the counters.
If the service time for each customer is exponential with mean 4
minutes and if people arrive in Poisson fashion at the rate of 10
per hour,
(a)What is the probability that a customer has to wait for service?
Sol:
1 1
Service time:
4 min (60) per hr
4
15 per hr
1
p0 (1)
s
s 1 1
n
n 0 n !
s!
1
s
Consider
n
s 1
1
n
1
1 10 1
n! 0.667
1 1 1
(0.667) 0 (0.667)1
n
n 0 n ! n 0 n ! 15 n 0 0! 1!
n
s 1
1
1.667
n 0 n !
s
0.667
2
0.445
0.334
2!1 10 1.333
s!1
s 30
1
p0 0.499 0.5
(1.667 0.334)
P[ N 2]
0.667 (0.5) 0.222
2
0.166
2!1 0.333 1.334
1
(100) (1 0.333)(100) 66.7%
s
MODEL - 3 SINGLE SERVER FINITE CAPACITY
(M|M|1) :( k|FIFO)
n 1
1. p n , if
k 1
1
n
1
pn , if
k 1
1
p0 k 1
if
1
1
p0 , if
k 1
k
Ls , if
2
k 1
(k 1)
Ls , if
k 1
1
L
3. q L (1 p0 )
Where is the effective arrival rate
s
k
L Lq
4.
Ws s 5. Wq & P[ N k ] P0
PROBLEMS UNDER SINGLE SERVER FINITE CAPACITY
(M|M|1) :( k|FIFO)
1. The local one person barber shop can accommodate a maximum
of 5 people at a time (4 waiting and 1 getting hair-cut).
Customers arrive according to a Poisson distribution with mean 5
/ hr. The barber cuts hair at an average rate of 4/hr.(exponential
service time)
(a) What % of time is the barber idle?
(b) What fraction of the potential customers are turned
away?
(c) What is the expected number of customers waiting for a
hair-cut?
(d) How much time can a customer expect to spend in the
barber shop?
Sol: Given: Number of server = One
(k 1)
Ls , if
k 1
1
5 (6) 1.25
6
Ls 6
5 8.131 3.131
4 5 1 1.25
3.645
Lq Ls 3.131 2.219
4
Ls 3.131
Ws 0.859hr
3.645
Lq 2.219
Wq 0.609 hr
3.645
n
pn P0 & P5 1.25 (0.0888) 0.271
5
Hair-cut Lq 2.219
Ws 0.859hr
2. Patients arrive at a clinic according to Poisson distribution at rate
of 30 patients per hour. The waiting room does not accommodate
more than 14 patients. Examination time per patient is
exponential with mean rate of 20 per hour.
(a) Find the effective arrival rate at the clinic.
(b) What is the probability that an arriving patient does not
have to wait?
(c) What is the expected waiting time until a patient is
discharged from the clinic?
Sol:
Given: Number of server = One
System capacity (k) = 14+1=15
The given problem is (M|M|1) :( k|FIFO) model.
Arrival rate: 30 per hr
Service rate: 20 per hr
1
p0 k 1
for
1
30
(d) 1
20 0.5
p0 0.00076
30
16
655.84
1
20
(f)
30 (16) 1.5
16
Ls 16
3 16.024 13.024
20 30 1 1.5
19.985
Lq Ls 13.024 12.025
20
Ls 13.024
Ws 0.652hr
19.985
Lq 12.025
Wq 0.602 hr
19.985
19.985
(ii) The probability that an arriving patient does not
4 per hr
1
p0 k 1
for
1
3
(g) 1
4 0.25
p0 8
0.278
3 0.899
1
4
(h)
k 1
(k 1)
Ls , if
k 1
1
3 (8) 0.75
8
Ls 8
3 0.89 2.11
4 3 1 0.75
2.888
Lq Ls 2.11 1.388
4
Ls 2.11
Ws 0.731hr
2.888
Lq 1.388
Wq 0.481 hr
2.888
(a) The probability that a customer can get directly into the
k
P[ N k ] P0 P[ N 7] 0.75 (0.278) 0.037
7
Trains arrive at the yard every 15 minutes and the service time
4.
is 33 minutes. If the line capacity of the yard is limited to 5
trains, find the probability that the yard is empty and the
average number of trains in the system, given that the inter
arrival time and service time are following exponential
distribution.
Sol:
Given: Number of server = One
System capacity (k) = 5
The given problem is (M|M|1) :( k|FIFO) model.
1 1
Arrival time: 15 min (60)
15
4 per hr
1 1
Service time: 33 min (60) hr
33
1.82 per hr
1
p0 k 1
for
1
4
(i) 1
1.82 1.198
p0 0.011
4
6
111.702
1
1.82
(j)
k 1
(k 1)
Ls , if
k 1
1
4 (6) 2.198
6
Ls 6
1.835 6.054 4.22
1. 82 4 1 2.198
calling units per hour, the expected service time is 0.25 hours
s n
p0 , ns
n !
s s ns
1) pn p0 , snk
s! where
.
s
0 , nk
k
2) Ls nPn
n 0
s1
3) Lq Ls where s ( s n) pn 1 pk
n0
Ls
4) Ws
Lq
5) Wq Where is the effective arrival rate.
1
6) P0
s1 s n s s
1 2
3
...... k s
n 0 n! s!
PROBLEMS UNDER MULTIPLE SERVER FINITE
CAPACITY (M|M|s) : (k|FIFO)
1) A car servicing station has 2 bays where service can be
offered simultaneously. Because of space limitations,
only 4 cars are accepted for servicing. The arrival
pattern is Poisson with 12 cars per day. The service
time in both the bays is exponentially distributed with
8 cars per day. Find
(i) The average number of cars in the service station.
(ii) The average number of cars waiting for service.
(iii) The average time a car spends in the system.
Sol:
Given: Number of server (s) = 2
System capacity (k) = 4
The given problem is (M|M|s) :( k|FIFO) model.
Arrival rate: 12 per day
Service rate: 8 per day
12 s s 1.5
2
0.75 1.125
s 16 s! 2!
1
P0
s 1 s n s s
1 2
3
...... k s
n 0 n! s!
1
P0
1 1.5n
(1.125) 1 2
n 0 n!
1
P0
1.50 1.51
(1.125)(1 0.75 0.75 )
2
0! 1!
1
P0 0.196 P0 0.196
2.5 2.602
We know that,
s n
p0 , ns
n !
s s n s
pn p0 , snk
s!
0 ,nk
for n s n 2
P1
s 1 P0
1.5
(0.196) 0.294
1! 1
P2
s 2 P0
(1.5) 2
(0.196) 0.0.221
2! 2
for s n k 2 n 4
P3
s
2
3 2 P0
(1.5) 2
(0.75)(0.196) 0.165
2! 2
P4
s
2
P0
42 (1.5) 2
(0.75) 2 (0.196) 0.124
2! 2
k
Ls nPn 0 P0 1P1 2 P2 3P3 4 P4
n0
Ls 1.727
Lq 0.413
Ls 1.727
Ws 0.164day 0.164( 24) hr
10.512
Ws 3.936 hr
Lq 0.413
Wq 0.0136 day 0.0136(24) hr
10.512
Wq 0.3264 hr
Sol:
Given: Number of server (s) = 2
System capacity (k) = 5+2=7
The given problem is (M|M|s) :( k|FIFO) model.
Arrival rate: 4 per hr
1 1
Service time: 12 min (60) hr
12
5 per hr
4 s s 0.8
2
0.4 0.32
s 10 s! 2!
1
P0
s 1 s n s s
1 ......
2 3 k s
n 0 n! s!
1
P0
1 0.8n
( 0. 32) 1 2
3
4
5
n 0 n !
1
P0
0.80 0.81
(0.32)(1 0.4 0.4 0.4 0.4 0.4 )
2 3 4 5
0! 1!
1
P0 0.429 P0 0.429
1.8 0.5311
We know that,
s n
p0 , ns
n !
s s n s
pn p0 , snk
s!
0 ,nk
for n s n 2
P1
s 1 P0
0.8
(0.429) 0.3432
1! 1
P2
s 2 P0
(0.8) 2
(0.429) 0.1373
2! 2
for s n k 2 n 7
P3
s
2
3 2 P0
(0.8) 2
(0.4)( 0.429) 0.0549
2! 2
P4
s
2
P0
42 (0.8) 2
(0.4) 2 (0.429) 0.0219
2! 2
P5
s
2
P0
5 2 (0.8) 2
(0.4)3 (0.429) 0.0088
2! 2
P6
s
2
P0
62 (0.8) 2
(0.4) 4 (0.429) 0.0035
2! 2
P7
s
2
P0
72 (0.8) 2
(0.4)5 (0.429) 0.0014
2! 2
k
Ls nPn 0 P0 1P1 2 P2 3P3 4 P4 5 P5 6 P6 7 P7
n 0
Ls 0.9449
Lq 0.1460
Ls 0.9449
Ws 0.2366 hr
3.9944
Ws 0.2366 hr
Lq 0.1460
Wq 0.0366 hr
3.9944
Wq 0.0366 hr
Sol:
Given: Number of server (s) = 4
System capacity (k) = 6
The given problem is (M|M|s) :( k|FIFO) model.
1
Arrival rate: per hr
2
1
Service rate: per hr
10
0! 1! 2! 3!
1
P0 0.0072 P0 0.0072
39.333 99.2851
We know that,
s n
p0 , ns
n !
s s n s
pn p0 , snk
s!
0 ,nk
for n s n 4
P1
s 1 P0
5
(0.0072) 0.036
1! 1
P2
s 2 P0
(5) 2
(0.0072) 0.09
2! 2
P3
s 3 P0
(5)3
(0.0072) 0.15
3! 6
P4
s 4 P0
(5) 4
(0.0072) 0.1875
4! 24
for s n k 4 n 6
P5
s 5 4
4
P
(5) 4
(1.25)(0.0072) 0.2344
0
4! 24
P6
s
4
6 4 P0
(5) 4
(1.25) 2 (0.0072) 0.2930
4! 24
k
Ls nPn 0 P0 1P1 2 P2 3P3 4 P4 5 P5 6 P6
n 0
Ls 4.3460
Lq 0.8110
Ls 4.3460
Ws 12.2942 hr
0.3535
Ws 12.2942hr
Lq 0.8110
Wq 2.2942 hr
0.3535
Wq 2.2942 hr
P6 0.2930
Average arrival rate at the overflow facility
(average arrival at the port ) P6
(0.5)(0.2930)
14.24 per hr
n n & n n
0 1 2 ......n1
pn p
By birth and death process
0 1 2 .... n1 0
.......n times
p
........n times 0
n
n
p
p0
n 0
Now sum of all probabilities = 1
p0 p1 p2 ......... 1
2 3
p0 p0 p0 p0 ...... 1
2
3
p0 1 ......... 1
1
p0 1 1 p0 1
To find L s
Ls E ( N ) n p n
0. p 0 1. p1 2. p 2 ........
2 3
1. p 0 2. p 0 3 p 0 .......
2
p0 . 1 2. 3. .......
2 2
p0 . 1 1 . 1
Ls
Lq
To find
Using little’s formula Lq Ls
To find
Ws
Ls
Using little’s formula Ws
Wq
To find
Lq
Using little’s formula Wq
2. Derive p0 , Ls , Lq ,Ws ,Wq for ( M / M / s) : ( / FIFO) queueing
model
(or)
Sol:
For ( M / M / s ) : ( / FIFO)
n ,ns
n n & n
s ,n s
0 1 2 ......n1
pn p
By birth and death process
1 2 3 .... n 0
.......n times
1 2 3 ........n p0 , ns
.......n times
p0 ,n s
1 2 3 .....s s s ....n s times
n
n ! n p0 , ns
n
p0 ,n s
s ! s ns
n
Lq
To find
Lq ( n s ) pn
ns
0. ps 1. ps 1 2. ps 2 ......
s 1 s 2
p0 p0 .....
s ! s s 1 s ! s 2 s2
s 1
p 0 1 2. ......
s! s s 1
s
2
s 1 s 1 1
p0 1 p0 Using
s ! s s 1 s s ! s s 1
2
1
s
little’s formula.
Ls Lq
Ls Lq , Ws , Wq
To find
p0
p0 p1 p2 ..... ps ps 1 ps 2 .... 1
2 s s 1
p0 p0 p0 ..... p0 p0 ..... 1
1! 2! 2 s ! s s .s ! s 1
s 1
n
1
s
2
p0 p0. 1 .... 1
n 0 s! s s
s 1 n 1 s 1
p0 1
n 0 s! 1
s
1
p0
s 1 s
1 1
n
n 0 s!
1
s
3. Derive p 0 , Ls , Lq , Ws , Wq for ( M / M / 1) : (k / FIFO) (Or )
M / M / 1 : GD / N / queueing model.
Sol:
,nk
n , and n n
0 ,n k
0 1 2 ......n 1
pn p0
1 2 3 .... n
n
p ,n k
n 0
0 ,n k
To find
p0
p 0 p1 p 2 ......... 1
2 k
p 0 p 0 2 p 0 ..... k p 0 1 (1)
Case(i)
k 1
1
p0 1
1
1
p0
k 1
1
To find
Ls
k
Ls n pn
n 0
0. p0 1. p1 2. p2 ........ k . pk
2 3 k
1. p0 2. p0 3 p0 ....... k p0
p0 .x 1 2.x 3.x 2 ....... k .x k 1 where x
p 0 .x
d
dx
x x 2 x 3 ....... .x k
p 0 .x
d
dx
1 x x 2 x 3 ....... .x k 1
d 1 x k 1
p 0 .x 1
dx 1 x
(1 x )0 ( k 1x k 1 x k 1 ( 1)
p 0 .x
1 x 2
(1 x )( k 1x k
p 0 .x
p 0 .x
1 x k 1
1 x 2
1 x 2
1 x (1 x )( k 1x k
1 x 1 x k 1
x
1 x k 1
1 x 2
1 x
k 1
1 x 2
k 1x k x
1 x k 1
1 x
, sub x
k 1
k 1
k 1
1
1 is ,
Case (ii) when
Substitute in (1)
p 0 p 0 p 0 .....ktimes 1
( k 1) p 0 1
1
p0
k 1
k
Ls n p n
n 0
0. p 0 1. p1 2. p 2 ........ k . p k
2 3 k
1. p 0 2. p 0 3 p 0 ....... k p 0
p 0 2 p 0 3 p 0 ........ kp0
p 0 1 2 ....... k
k (k 1)
p0
2
Using little’s formula
Lq Ls
where is the effective arrival rate (1 p0 )
Ls Lq
Ws Wq