0% found this document useful (0 votes)
36 views

07 PENTING QueueingTheoryPart3

This document discusses M/M/s queueing systems with variations, including the M/M/s, M/M/s//K, and M/M/s///N models. It provides the steady-state probabilities and equations to calculate key performance measures like expected number of customers (L), expected queue length (Lq), expected time in system (W), and expected wait time (Wq). An example is provided of an emergency room (ER) with 2 doctors (s=2) and average arrival/service rates. The performance is calculated with s=2 and compared to when it was s=1, showing lower utilization, wait times, and number of patients when more servers are available.

Uploaded by

L S
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)
36 views

07 PENTING QueueingTheoryPart3

This document discusses M/M/s queueing systems with variations, including the M/M/s, M/M/s//K, and M/M/s///N models. It provides the steady-state probabilities and equations to calculate key performance measures like expected number of customers (L), expected queue length (Lq), expected time in system (W), and expected wait time (Wq). An example is provided of an emergency room (ER) with 2 doctors (s=2) and average arrival/service rates. The performance is calculated with s=2 and compared to when it was s=1, showing lower utilization, wait times, and number of patients when more servers are available.

Uploaded by

L S
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/ 24

Queueing Theory

(Part 3)

M/M/s Queueing Systems with Variations


(M/M/s, M/M/s//K, M/M/s///N)

Queueing Theory-1
M/M/s Queueing System
•  We define
λ = mean arrival rate
µ = mean service rate
s = number of servers (s > 1)
ρ = λ / sµ = utilization ratio
•  We require λ < sµ , that is ρ < 1 in order to have a steady state

Rate Diagram

λ λ λ λ λ λ λ λ λ

… …
0 1 2 3 4 s-1 s s+1

µ 2µ 3µ 4µ 5µ (s-1)µ sµ sµ sµ

Queueing Theory-2
M/M/s Queueing System
Steady-State Probabilities

1 Use Birth Death Processes


P0 = s "1
Rate In = Rate Out
( ! / µ )n ( ! / µ )s Coefficients are easy to remember
# n! + s! ( 1"!1/ sµ ) if you think of rate diagram
n =0 Example: s = 3
λ λ λ λ λ

and Pn = CnP0 0 1 2 3 4 …
µ 2µ 3µ 3µ 3µ
n
$*+'
! (( %% # " &4 1 1
! )µ& C0 = 1
n = 1, 2, ..., s C4 = % (
! n! " $ µ ' 3 3!
C1 =
+ + ...+ ! µ # " &5# 1 &2 1
where Cn = µn ,1µ n ,2...µ 0 = # 2 C5 = % ( % (
n n ,1 1 ! n " " # "& 1 $ µ ' $ 3 ' 3!
!*+' C2 = =% (
µ 2µ $ µ ' 2!
! (( µ %%
! ) n&,s n = s + 1, s + 2, ... # " &3 1 # " & n # 1 & n)s 1
" s! s C3 = % ( Cn = % ( % (
$ µ ' 3! Queueing $ µ ' $ s ' s!
Theory-3

! !
M/M/s Queueing System
L, Lq, W, Wq
How to find L? W? Wq?
Use Lq to find Wq (Lq = λWq):
P0 (! / µ )s #
Lq = Wq = Lq/λ
s! (1 " #)2 Use Wq to find W:
W = Wq + 1/µ
P0 !s +1 Use L=λW to find L in terms
=
(s " 1)! µ s "1(sµ " ! )2 of Lq:
L = λW
s
& P ( . / µ ) , 1 - e - µt ( s -1-. / µ ) )# = λ(Wq + 1/µ)
P(0 > t ) = e - µt $1 + 0 ** ''! = λ(Lq/λ + 1/µ)
% s!(1 - / ) + s - 1 - . / µ (" = Lq + λ/µ

) s #1 & # sµ (1# ! )t
P("q > t ) = '1 # * Pn $e
( n =0 % If s – 1 – λ /µ = 0
then this term is (µt)
Queueing Theory-4
M/M/s Example: A Better ER
•  As before, we have
–  Average arrival rate = 1 patient every ½ hour
λ = 2 patients per hour
–  Average service time = 20 minutes to treat each patient
µ = 3 patients per hour
•  Now we have 2 doctors
s=2
•  Utilization
ρ = λ/2µ = 2/6 = 1/3 (Before s=1, ρ=2/3)

Queueing Theory-5
M/M/s Example: ER
Questions
In steady state, what is the…
1.  probability that both doctors are idle?

probability that exactly one doctor is idle?

2.  probability that there are n patients?

3.  expected number of patients in the ER? Queueing Theory-6


M/M/s Example: ER
Questions
In steady state, what is the…
1.  probability that both doctors are idle?
1 1 1
P0 = 0 1 2
= =
#"& #"& #"& 2 4 1 2
1+ +
% ( % ( % ( 3 9+ 2 2 3
$µ' $µ' $µ' 1
+ +
0! 1! 2! 1) *
probability that exactly one doctor is idle?
1

P=
( " µ) P0 =
21 1
=
! 1
1! 32 3
2.  probability that there are n patients?
, # " &n
! .% ( n
. $ µ ' P = # 2& 1 1 if 0 ) n < 2
. n! 0 %$ 3 (' n! 2
Pn = - n
.# "&
. %$ µ (' # 2 & n 1 # 1 & n*2 1 # 1 & n
. n*s P0 = % ( % ( =% ( if n + 2
/ s!s $ 3 ' 2! $ 2 ' 2 $ 3 '
3.  expected number of patients in the ER? Queueing Theory-7

L = "W = " ( Lq " + 1 µ) = Lq + " µ = 1 12 + 2 3 = 3 4


!
M/M/s Example: ER
Questions
In steady state, what is the…
4.  expected number of patients waiting for a doctor?

5. expected time in the ER?

6.  expected waiting time?

7.  probability that there are at least two patients waiting in queue?

probability that a patient waits more than 30 minutes?

Queueing Theory-8
M/M/s Example: ER
Questions
In steady state, what is the…
4.  expected number of patients waiting for a doctor?
s 2
P0 ( " µ) # (1 2)(2 /3) (1 3) 1
Lq = s = 2 =
s!(1$ # ) 2!(2 /3) 12
5. expected time in the ER?
W = L/λ = (3/4)/2 = 3/8 hour ≈ 22.5 minutes
!
6.  expected waiting time?
Wq = Lq/λ = (1/12)/2 = 1/24 hour ≈ 2.5 minutes
7.  probability that there are at least two patients waiting in queue?
P(≥ 4 patients in system) = 1 – P0 – P1 – P2 – P3
= 1 – ½ - 1/3 – 1/9 – 1/27 ≈ 0.0185
8.  probability that a patient waits more than 30 minutes?
% 1 1( 1
P (" q > t ) = (1# P0 # P1 )e#2 µ(1# $ ) t = '1# # *e#2(3)( 2 3) t = e#4 t
& 2 3) 6
% ( Queueing Theory-9
1
P (" q > 30min) = P'" q > hour * + 0.022
& 2 )
Performance s=1 s=2
Measurements
ρ 2/3 1/3

L 2 3/4

Lq 4/3 1/12

W 1 hr 3/8 hr

Wq 2/3 hr 1/24 hr

P(at least two patients waiting in 0.296 0.0185


queue)

P(a patient waits more than 30 0.404 0.022


minutes)

Queueing Theory-10
Travel Agency Example
•  Suppose customers arrive at a travel agency according to a
Poisson input process and service times have an exponential
distribution
•  We are given
–  λ= 0.10/minute, that is, 1 customer every 10 minutes
–  µ =0.08/minute, that is, 8 customers every 100 minutes
•  If there was only one server, what would happen?
λ/µ > 1
Customers would balk at long lines – never reach steady state
- lose customers
- go out of business?
•  How many servers would you recommend?
Calculate P0, Lq and Wq for s=2, s=3, and s=4

Queueing Theory-11
P(ω>t) =

P(ωq>t) =

Queueing Theory-12
P(ω>t) =

P(ωq>t) =

Queueing Theory-13
P(ω>t) =

P(ωq>t) =

Queueing Theory-14
Single Queue vs. Multiple Queues
•  Would you ever want to keep separate queues for separate
servers?

Single
queue

vs.

Multiple
queues

Queueing Theory-15
Bank Example
•  Suppose we have two tellers at a bank
•  Compare the single server and multiple server models
•  Assume λ = 2, µ = 3,

L Lq W Wq P0 ρ

λ/2µ
0.75 0.083 0.375 0.042 0.5
=1/3

λ`/µ
=(λ/µ)/3
1.0 0.334 0.5 0.167 0.4449
=1/3

Queueing Theory-16
Bank Example
Continued
•  Suppose we now have 3 tellers
•  Again, compare the two models

M/M/3 Three M/M/1 queues


λ=2, µ=3 λ’ = λ/3 = 2/3, µ=3
ρ=λ/(sµ) = 2/9 M/M/1: ρ=λ’/3 = 2/9 ρ is the same

L= 0.676 L=0.286 3L = 0.858


Lq = 0.009 Lq=0.063 3Lq = 0.189
W = 0.338 W = 0.429
Wq = 0.005 Wq = 0.095
P0 = 0.5122 P0 = 0.7778 (P0)3 = 0.47

Queueing Theory-17
M/M/s//K Queueing Model
(Finite Queue Variation of M/M/s)

•  Now suppose the system has a maximum capacity, K


•  We will still consider s servers
•  Assuming s ≤ K, the maximum queue capacity is K – s
•  Some applications for this model:
Trunk lines for phone – call center
Warehouse with limited storage
Parking garage
•  Draw the rate diagram for this problem:

λ λ λ λ λ λ λ 0

0 1 … s-1 s s+1 … K

µ 2µ (s-1)µ sµ sµ sµ sµ
Queueing Theory-18
M/M/s//K Queueing Model
(Finite Queue Variation of M/M/s)
λ λ λ λ λ λ 0

0 1 2 3=s 4 … K

µ 2µ 3µ 3µ 3µ 3µ
C0 = 1 1
Balance equations: Rate In = Rate Out P0 =
" K
C1 =
State 0: µP1 = λP0 µ !C n
State 1: λP0 + 2µP2 = (λ+µ)P1 "2 n=0
C2 = 2
State 2: λP1 + 3µP3 = (λ+2µ)P2 2µ Pn = Cn P0
3
State 3: λP2 + 3µP4 = (λ+3µ)P3 "
C3 = 3
(s = 3)
3!µ

4
$ 1 '$ " '
C4 = & )& )
State K-1: λPK-2 + 3µPK = (λ+3µ)PK-1 % 3!#3 (% µ (
State K: λPK-1 = 3µPK !
n
$ 1 '$ " '
Cn = & )& ) for s + n + K
% 3!#3( n*s) (% µ ( Queueing Theory-19

CK +1 = 0
M/M/s//K Queueing Model
(Finite Queue Variation of M/M/s)
Solving the balance equations, we get the following steady state
probabilities:

!n
n
P0
n! µ for n = 1, 2, ..., s
1 !n
P0 = s K Pn = n "s n
P0
n s n$s s s! µ for n = s, s + 1, ..., K
1+ # ( " /n!µ ) + ( " /s!µ ) #( ) "

n=1 n= s+1 0 n>K

Verify that these equations match those given in the text for the single
server case (M/M/1//K)

Queueing Theory-20
M/M/s//K Queueing Model
(Finite Queue Variation of M/M/s)

P0 (( / µ )s )
Lq = 2
[1 ' )K 's ' (K ' s ))K 's (1 ' ))], where ) = ( / sµ
s! (1 ' ))
s '1
& s '1 #
L = * nPn + Lq + s $$1 ' * Pn !!
n =0 % n =0 "

To find W and Wq:


Although L ≠ λW and Lq ≠ λWq because λn is not equal for all n,
$
L = ! W and Lq = ! Wq where " = # " n Pn = "(1 ! PK )
n =0

Also, because there is a finite number of states, the steady state


equations do hold, even if ρ>1
Queueing Theory-21
M/M/s///N Queueing Model
(Finite Calling Population Variation of M/M/s)

•  Now suppose the calling population is finite, N


•  We will still consider s servers
•  Assuming s ≤ N, the maximum number in the queue capacity is
N – s, so K ≥ N does not affect anything
If N is the entire population, then the maximum number in system is
N. Assume N ≤ K and s ≤ N
•  Application for this model:
Machine replacement
•  Draw the rate diagram for this problem:
Nλ (N-1)λ (N-(s-1))λ (N-s)λ (N-(s+1))λ λ 0

0 1 … s s+1 … N

µ 2µ sµ sµ sµ sµ
Queueing Theory-22
M/M/s///N Queueing Model
(Finite Calling Population Variation of M/M/s)
Nλ (N-1)λ (N-2)λ (N-3)λ (N-4)λ λ 0

0 1 2 3 4 … N

µ 2µ 3µ 3µ 3µ 3µ
Balance equations: Rate In = Rate Out
State 0: µP1 = λP0 è P1 = (Nλ/µ)P0
State 1: NλP0 + 2µP2 = ((N-1)λ+µ)P1 è P2 = (1/2)(Nλ/µ) ((N-1)λ/µ)P0

C0 = 1
# "&
C1 = N % (
$ µ'
2
N ( N )1) # " &
C2 = % (
2 $ µ'
3
N ( N )1)( N ) 2) # " & Queueing Theory-23
C3 = % (
3! $µ'
M/M/s///N Results
1
P0 = s "1 n N n
N! ()% N! ()%
!
n =0
& # +!
(N " n )! n! ' µ $ n =s (N " n )! s! s n "s
& #
'µ$

n
$ N! +,(
! )) && P0 for n = 0,1,..., s
! (N - n )! n! * µ '
! n
Pn = # N ! + , (
) & P for s %n%N
! (N - n )! s! s n -s )* µ &' 0
!
!
" 0 for n>N

s '1
N & s '1 #
Lq = ! (n " s )Pn L = ( nPn + Lq + s $$1 ' ( Pn !!
n =s n =0 % n =0 "
Queueing Theory-24

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy