Slide set 23 Stat 330 (Spring 2015) Last update: March 22, 2015

advertisement
Slide set 23
Stat 330 (Spring 2015)
Last update: March 22, 2015
Stat 330 (Spring 2015): slide set 23
The M/M/c queue
Again, X(t) the number of individuals in the queueing system can be
modeled as a birth & death process.
The transition state diagram for the X(t) is:
Clearly, the critical thing here in terms of whether or not a steady state
exists is whether or not λ/(cµ) < 1.
Let a = λ/µ and ρ = a/c = λ/(cµ).
The balance equations for steady state are:
1
Stat 330 (Spring 2015): slide set 23
The M/M/c queue: balance equations
p1
p2
p3
...
pc
c
= ap0
a2
= 2·1 p0
3
= a3! p0
=
pc+1 = ρ · ac! p0
...
c
pn
= ρn−c · ac! p0
for n ≥ c.
ac
c! p0
In order to get an expression for p0, we use the condition, that the overall
sum of probabilities must be 1. This gives:

1=
∞
X
k=0
pk = p0
c−1
X
k=0
∞
cX
ak a
+
k!
c!
k=c
!
ρk−c

c−1 k
X
a
ac 1 


= p0 
+
.
k!
c! 1 − ρ 

k=0
|
{z
}
=:S
2
Stat 330 (Spring 2015): slide set 23
This system has a steady state, if ρ < 1; in that case,
p0 = S −1.
The other probabilities pn are given as:
(
pn =
an
n! p0
an
p
c!cn−c 0
for 0 ≤ n ≤ c − 1
for n ≥ c
A key descriptor for the system is the probability that an entering customer
must queue for service - this is equal to the probability that all servers are
busy.
The formula for this probability is known as Erlang’s C formula or Erlang’s
delay formula and written as C(c, a).
3
Stat 330 (Spring 2015): slide set 23
The M/M/c queue: Erlang’s C Formula
Obviously, in a M/M/c queue, an entering individual must queue for service
exactly when c or more individuals are already in the system.
lim P (X(t) ≥ c) = C(c, a) =
t→∞
∞
X
pk = 1 −
k=c
= p0
1
−
p0
c−1
X
k=0
c−1
X
pk =
k=0
ak
k!
!
=
ac
= p0
.
c!(1 − ρ)
4
Stat 330 (Spring 2015): slide set 23
The M/M/c queue: properties
The steady state expected number of individuals in the queue Lq is
Lq
=
∞
X
k=c
(k − c)pk =
∞
X
k=c
ak
(k − c) k−c p0 =
c!c
∞
ac
ρ
ac X k
= p0
kρ = p0
c!
c! (1 − ρ)2
k=1
| {z }
P
k )0
ρ( ∞
ρ
k=1
ρ
=
C(c, a).
1−ρ
5
Stat 330 (Spring 2015): slide set 23
By Little’s Law, the expected waiting time in the queue Wq is
Wq = Lq /λ =
ρ
1
1
·
C(c, a) =
C(c, a).
λ 1−ρ
cµ(1 − ρ)
Thus the expected overall time in system is then
1
W = Wq + W s = Wq + ,
µ
and the expected overall number of individuals in the system is on average
L=W ·λ=a+
ρ
C(c, a).
1−ρ
6
Stat 330 (Spring 2015): slide set 23
Example
Bank: A bank has three tellers. Customers arrive at a rate of 1 per minute
and stay in a single queue. Each teller needs on average 2 min to deal with
a customer. What are the specifications of this queue?
For this queue, λ = 1, µ = 0.5, c = 3, a =
λ
µ
= 2, and ρ =
a
c
= 2/3
The probability that no customer is in the bank then is
−1 −1
P
c
3
k
c−1 a
a 1
4
2
1
1
+
=
1
+
2
+
+
·
=
p0 =
k=0 k!
c! 1−ρ
2
3! 1−ρ
9.
c
ρ
Thus expected length of the queue is Lq = p0 · ac! · (1−ρ)
2 = 8/9
Calculate the expected waiting time in the queue: Wq = Lq /λ = 8/9 min.
Expected service time is Ws =
distribution.
1
µ
= 2 minutes using the service time
This gives the total waiting time as W = Ws + Wq = 26/9 min.
Hence the expected number of people in the bank is L = W λ = 26/9
7
Download