Sergey Zeltyn January 2005 STAT 99. Service Engineering. The Wharton School. University of Pennsylvania. Based on: Classical Queueing Models. Mandelbaum A. Service Engineering course, Technion. http://iew3.technion.ac.il/serveng2005w General knowledge on classical queueing models. (E.g. Wolff. Stochastic Modelling and the Theory of Queues.) 4CallCenters software: examples of output.
Birth & Death Model of a Service Station λ i- λ 0 λ λ i 0 2 i- i i+ 2 i i+ i number-in-system; λ i arrival rate given i customers in system; i service rate given i customers in system. Cuts at i i + yield: π i λ i = π i+ i+, i 0, and π i+ = λ i i+ π i = λ iλ i i+ i π i = = λ 0λ... λ i 2... i+ π 0. Steady-state distribution exists iff Then i=0 π i π 0 = λ 0... λ i... i+ <. = λ 0...λ i... i π 0, i 0 [ i 0 λ 0...λ ] i... i+ 2
Additional assumptions (classical queues): n statistically identical servers; FCFS discipline First Come First Served; Work conservation: a server does not go idle if there are customers in need of service; Customers do not abandon. Measures of Performance L - number of customers at the service station; L q - number of customers in the queue; W - sojourn time of a customer at the service station; W q - waiting time of a customer in the queue. In steady state, E[L] = k 0 k π k = lim T T T 0 L(t)dt. E[L q ] = k=n+ (k n) π k. If λ arrival rate to system, Little s formula implies: E[L] = λ E[W ]; E[L q ] = λ E[W q ]. 3
4CallCenters Software. Service Engineering December 29, 2004 Calculations based on the M.Sc. thesis of Ofer Garnett. Will be extensively used in our course. Install at Recitation 8 Demonstration of the 4CallCenters Software. http://iew3.technion.ac.il/serveng2005w/4callcenters/downloads.htm Getting started Easy to download and install. 4
Poisson arrivals, rate λ; M/M/ queue Single exponential server, rate, E[S] = /. λ λ λ 0 2 i- i λ i+ λ i = λ, i 0; i = i. Cut equations: λπ i = π i+, i 0. Traffic intensity ρ = λ < (assumed for stability). Steady-state distribution Geom(p = ρ) (from 0): Properties: π i = ( ρ)ρ i, i 0. Sojourn time is exponentially distributed: W exp mean = ( ρ) = + Proof: Via moment generating functions. According to PASTA ρ ρ. W d = N i= X i, X i exp() i.i.d., N d = Geom( ρ) (from ). 5
Moment generating function: φ W (t) = E [exp{tw }] = E exp{t N N i= X i } = E E exp{t N X i } i= = (Moment generating function of Erlang r.v.) = E N = ( ρ)ρ k k t ( ρ) = t k=0 = φ exp(( ρ)) (t). Delay probability (PASTA) ρ k= k t = P{W q > 0} = ρ. Waiting time in queue, given delay, is exp: W q / d = Number-in-system E[L] = t ( ρ) ( ρ) t 0 wp ρ exp ( mean = ) ρ wp ρ ρ ρ ; E[L q] = ρ2 ρ. Server s utilization (occupancy) is ρ = λ/. (Little s formula, system = server.) Departure process in steady state is Poisson (λ) (Burke theorem) important in queueing networks. 6
M/M/. 4CallCenters output Note large waiting times: E[S] for ρ = 50%, 9 E[S] for ρ = 90%, 9 E[S] for ρ = 95%. 4CallCenters: performance measures. Average Speed of Answer = E[W q ] (will be different in queues with abandonment); %Answer within Target = P{W q < T }; Average Queue Length = E[L q ]. 7
M/M/ queue Poisson arrivals, rate λ; Infinite number of exponential servers, rate. λ λ λ λ 0 2 i- i i+ 2 i (i+) λ i = λ, i 0; i = i, i > 0. Cut equations: λπ i = (i + ) π i+, i 0. Always stable. Steady-state distribution is Poisson: π i = e R Ri i!, i 0, where R = λ is the offered load (measured in Erlangs). E[L] = E(# busy servers) = λ = R. (Little s formula, system = service.) Very useful: -server models provide bounds (next lecture: queues with abandonment). Results above valid for M/G/ generally distributed service times. 8
M/M/n (Erlang-C) queue Poisson arrivals, rate λ; n exponential servers, rate. Widely used in call centers. Erlang-C agents arrivals ACD queue Transition-rate diagram λ λ λ 0 2 2 n- n n Erlang-B λ j = λ, j 0, j = (j n), jagents. λ λ n+ n+2 n n Agents utilization arrivals ρ = λ n. Assume ρ < (R < n) to ensure stability (as in M/M/). Lost Calls 9
4CallCenters output: Instability, ρ Steady-state distribution: π i π 0 = = Ri π 0, i n, i! = nn ρ i π 0, i n, n! n j=0 R j j! + R n n!( ρ), where R = λ is the offered load. 0
Erlang-C Formula (97): Delay probability: P{W > 0} = E 2,n = π i = Rn n! i n ρ π 0. Erlang-C computation: recursion, see Erlang-B below. Number-in-queue: P{L q = i} = E 2,n ( ρ)ρ i, i > 0, or L q = 0 wp E 2,n Geom( ρ) wp E 2,n Waiting time distribution: W q / = Compare with M/M/! 0 wp E 2,n exp ( mean = n ρ) wp E2,n Departure process: Poisson(λ) in steady-state. Proof via reversibility.
M/M/n: derivation of waiting-time distribution P {W q > t} = k= P{L q = k } P{E k > t} (where E k Erlang(k, n)) = E 2,n k= ( ρ)ρ k t = E 2,n n( ρ) t = E 2,n n( ρ) t = E 2,n e n( ρ)t e nx n(nx) k (k )! k= e n( ρ)x dx e nx dx (nρx) k dx (k )! 2
Pooling Kleinrock, L. Vol. II, Chapter 5 (976) (Pelephone s Call Center) Resource Sharing Example: Kleinrock, L. Vol.II, Chapter 5 (976) (a) m m (d) C m C m C C (b) m (e) m m C m C m C C (c) m (f) m m C mc Simplest is Best! Do not model complicated undesirable scenarios! 4CallCenters output m M/M/ scale-up M/M/m technology M/M/ λ, mλ, mλ, m Combine: queues servers Saved inefficiency idleness lost capacity ( long queue, 2 idle) (rate m at all times) ( ) Remark EW q m, λ, m EWq (, λ, ) ( ) while EW s m, λ, m EWs (, λ, ) individual server s capacity (Explain, via P m (Wait > 0), noting W q W q > 0.) Summary (pg. 287) Large systems (scaling up input rate and system capacity) yield improvements (in average response-time) that are proportional to the scaling factor. For a given scale factor, the single-server (fast) system is superior to the multiple-server (slow) system, as far as total time a system in concerned. The opposite is true, however, when restricting to only waiting time. (See Homework). 3 27
2 3 n M/M/ pooling M/M/n technology M/M/ λ, nλ, nλ, n P{W q > 0} ρ E 2,n ρ E[W q ] E[S] E[W ] ρ ρ ρ E 2,n n( ρ) E 2,n n( ρ) + n n ρ ρ n ρ Statement: ρ < E 2,n < n( ρ). Proof: Consider M/M/n. ρ = P{server i idle}, for i =,..., n ; E 2,n = P{at least one server idle} = P n( ρ) = n i= P{server i idle} n i= {i idle} 4
Conclusions 2 : Pooling yields E[W q ] decrease by more than factor n; 3 : Fast server yields E[W ] and E[W q ] decrease by factor n; 2 3 : Fast server better for E[W ]; Pooling better for E[W q ]. 5
M/M/n/K queue Poisson arrivals, rate λ; n exponential servers, rate ; K trunks (K n); If all trunks busy, arriving customer blocked (busy signal). λ λ λ λ 0 n- n n+ K- K n n n λ j = λ, 0 j K, j = (j n), j K. Formulae straightforward but cumbersome (simply truncate M/M/n). Always reaches steady state. 6
4CallCenters output. Use Change Settings = Features = Trunks. Note new indicators: Average Trunks Utilized and %Blocked. 4CallCenters: Advanced Profiling Arrival rate varied from 900 to 07 per hour, in step 9. Excel interface: graphs and spreadsheets. 7
M/M/n/K vs. Erlang-C Average service time = 6 min, 00 agents, 50 trunks 400 350 Average Speed of Answer (secs) 300 250 200 50 00 50 0 900 920 940 960 980 000 Calls per Interval M/M/00/50 M/M/00 Similar performance for light loads. Erlang-C explodes as ρ = λ n. 8
M/M/n/n (Erlang-B) queue λ λ λ 0 2 2 n- n n λ i λ, 0 i n, i = i, i n. No queue no wait. π i = Ri i! / n j=0 R j j!, 0 i n. 9
M/M/n/K vs. Erlang-B l Average service time = 6 min, 00 agents 40% 35% 30% 25% %Block 20% 5% 0% 5% 0% 900 000 00 200 300 400 Calls per Interval M/M/00/50 M/M/00/00 Moderate load: additional trunks prevent blocking. Heavy load: % blocking /ρ ( fluid limit ). Erlang-B Formula (97): Loss probability E,n = π n = Rn n! / n j=0 R j j! (2) Follows from PASTA. (2) valid for M/G/n/n! (Generally distributed service time.) λπ n rate of lost customers, λ( π n ) effective throughput. 20
Erlang-B computation: via recursion E,n = RE,n n + RE,n = ρe,n + ρe,n E,0 =. Note: E,n = (n R)E 2,n n RE 2,n ; E 2,n = E 2,n > E,n, as expected: why? E,n ( ρ) + ρe,n ; 2
Schematic representation of a telephone call center arrivals retrials lost calls busy ACD 23 queue k agents 2 retrials abandonment n lost calls returns How to model Abandonment? 22