= ac c! p0 = ap0 a2 = 2·1 p0 3 = a3! p0 c pc+1 = ρ · ac! p0 ... c pn = ρn−c · ac! p0 1= k=0 ∞ p k = p0 k=0 ∞ k=c ac k−c ρ + k! c! c−1 ak =:S ⎞ c−1 k ⎜ ac 1 ⎟ a ⎜ ⎟ = p0 ⎜ + ⎟. k! c! 1 − ρ ⎠ ⎝ k=0 ⎛ 2 In order to get an expression for p0, we use the condition, that the overall sum of probabilities must be 1. This gives: p1 p2 p3 ... pc for n ≥ c. Stat 330 (Spring 2015): slide set 23 The M/M/c queue: balance equations Last update: March 22, 2015 Stat 330 (Spring 2015) Slide set 23 Stat 330 (Spring 2015): slide set 23 an n! p0 an p c!cn−c 0 for n ≥ c for 0 ≤ n ≤ c − 1 Stat 330 (Spring 2015): slide set 23 1 3 The formula for this probability is known as Erlang’s C formula or Erlang’s delay formula and written as C(c, a). 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. pn = The other probabilities pn are given as: p0 = S −1. This system has a steady state, if ρ < 1; in that case, The balance equations for steady state are: Let a = λ/μ and ρ = a/c = λ/(cμ). Clearly, the critical thing here in terms of whether or not a steady state exists is whether or not λ/(cμ) < 1. The transition state diagram for the X(t) is: Again, X(t) the number of individuals in the queueing system can be modeled as a birth & death process. The M/M/c queue Stat 330 (Spring 2015): slide set 23 = p0 = p0 1 − p0 k=0 k! = 1 ρ 1 · C(c, a) = C(c, a). λ 1−ρ cμ(1 − ρ) ρ C(c, a). L=W ·λ=a+ 1−ρ 6 and the expected overall number of individuals in the system is on average 1 W = Wq + W s = Wq + , μ Thus the expected overall time in system is then Wq = Lq /λ = k=c ∞ (k − c)pk = k=c ∞ (k − c) ak p0 = c!ck−c λ μ = 2, and ρ = a c = 2/3 1 μ Hence the expected number of people in the bank is L = W λ = 26/9 7 = 2 minutes using the service time This gives the total waiting time as W = Ws + Wq = 26/9 min. Expected service time is Ws = distribution. Calculate the expected waiting time in the queue: Wq = Lq /λ = 8/9 min. ρ Thus expected length of the queue is Lq = p0 · ac! · (1−ρ) 2 = 8/9 c The probability that no customer is in the bank then is −1 −1 3 c−1 ak ac 1 1 p0 = = 1 + 2 + 42 + 23! · 1−ρ = 19 . k=0 k! + c! 1−ρ For this queue, λ = 1, μ = 0.5, c = 3, a = 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? Example ∞ ac k ac ρ kρ = p0 = p0 c! c! (1 − ρ)2 k=1 k ρ( ∞ k=1 ρ ) ρ = C(c, a). 1−ρ = Stat 330 (Spring 2015): slide set 23 Lq Stat 330 (Spring 2015): slide set 23 pk = The steady state expected number of individuals in the queue Lq is 5 k=0 c−1 Stat 330 (Spring 2015): slide set 23 The M/M/c queue: properties 4 pk = 1 − c−1 k a ac . c!(1 − ρ) k=c ∞ By Little’s Law, the expected waiting time in the queue Wq is t→∞ lim P (X(t) ≥ c) = C(c, a) = 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. The M/M/c queue: Erlang’s C Formula