Advanced Markovian queues Bulk input queue M [X] /M/ Bulk service queue M/M [Y] / Erlangian queue M/E k /
Bulk input queue M [X] /M/ Batch arrival, Poisson process, arrival rate λ number of customers in each arrival is an integer random number X Probability of X is c n =Pr[X=n] State transition rate diagram X={,2} as example, pp.8 of textbook 2
Balance equation of M [X] /M/ Global balance equation 0 = ( λ+ μ ) p + μ p + λ p c, n 0 = λp + μp 0 n n n+ n k k k = To solve these equations, use Z transforms of c and p 3
Balance equation of M [X] /M/ Multiply z n on both sides and sum all 0 μ = λ μ + + λ We have n n n n n pnz pnz + pnz + pn kckz n= 0 n= z n= n= k= μ 0 = λp( z) μ[ P( z) p0] + [ P( z) p0] + λc( z) P( z) z Thus, μ p ( ) 0 z Pz ( ) =, z μ( z) λz[ C( z)] 4
Average metrics of M [X] /M/ Let z=, obtain the average metrics p = ρ, r = λ / μ, ρ = re[ X] 0 rex EX rex L = = 2( ρ ) 2( ρ ) 2 2 ( [ ] + [ ]) ρ + [ ] L = L ( p ) = L ρ q W = L/ μ, W = L / μ 0 q q 5
Example of M [X] /M/ X is a constant K, apply the results we have L ρ + K ρ K + ρ, K λ = = ρ = 2( ρ) 2 ρ μ What s the difference from M/M/ with Kλ? Equivalent to M/M/ with Kλ and a scale factor (K+)/2 Worse performance metrics Why? more bursty 6
Example of M [X] /M/ X is a geometric r.v. with parameter a z( a λ C( n ) ( ) ( ) n z = a a z =, ρ = az μ( a) n= Thus, Pz ( ) μ p ( ) 0 z = μ( z) λz[ C( z)] az = ( ρ ) za [ + ( a) ρ ] za [ + ( a)] ρ The steady state probability is n p = ( ρ)[ a+ ( a) ρ] ( a) ρ n 7
Bulk service queue M/M [Y] / Similar to M/M/, except the server serves K customers at a time, called M/M [K] /. K is a constant. Two model for different service mode Partial batch Start service no matter n<k Full batch Start service until n>=k 8
Partial batch model of M/M [K] / Global balance equation 0 = ( λ+ μ ) p + μ p + λ p, n n n + K n 0 = λp + μp + μp +... + μp 0 2 rewritten in operation form [ μ K + ( λ+ μ) + λ] = 0 D D p n K root of characteristic equation above, we have K μrr ( ) λ( r ) = 0 K K ( r )[ μr μr... μr λ] 0 + + + = p n K + = Cr i= n i i 9
Partial batch model of M/M [K] / Only one root r 0 within (0,) p n = Cr n 0 With the law of total probability, C= r 0 pn = ( r ) r n 0 0 Similar to M/M/, r 0 instead of ρ r0 L r0 λ L=, W = = Lq = L, Wq = W r λ λ ( r ) μ μ 0 0 For M/M/, let K=, how is the above result? 0
M/M [K] / v.s. vs M/M/ formulas of metrics are similar Formulas for distribution, L, W, L q q, W q are similar similar to M/M/ with service rate Kμ r 0 is the root of characteristic i equation ρ=λ/kμ, is the utilization factor of M/M/ which one is bigger? Guess: r 0 > ρ (because M/M [K] / is more bursty more crowded) Metrics of M/M [K] / is worse than those of M/M/ /
Example of M/M [K] / Drive Thr Car wash λ=20/h, /, μ=2/h, /, K=2 Characteristic equation 2r 3 32r+20=3r 20 3 3 8r+5=0, 8 5 0 roots are r =, r = ( 3± 69)/6 So, r 0 =0.884 and L=7.6, L q =5.9, W=38min, W q =33min 0 q q Compare the equivalent M/M/ with λ=20 and μ=24 ρ=5/6=0.833 and L=5,LL q =4.67,W=5min,W W q =2.5min M/M [K] / is worse than M/M/ 2
Erlangian queues Exponential distribution Memoryless property, p simplify the analysis Limitation, more general cases El Erlang distribution ib ti for service time and interarrival time Sum of K stage exponential distributions More general model Other distributions PH, Coxian, hyperexponential, etc. 3
Erlang distribution k stage Erlang distribution, each stage is exponentially distributed with rate kμμ By convolution, pdf is f ( x) = EX [ ] =, VarX [ ], c 2 X μ = k μ = k kμ( kμx) ( k )! k e kμx kμ kμ kμ kμ 2 i k 4
Erlang distribution Distribution with 2 parameters, c x <, to model smooth stochastic process Approximate empirical distribution, use the mean and variance to match μ and k If c x >, we can use other distribution model, such as hyperexponential p distribution 5
Phase Type distribution A generalization of concept of phases PH distribution: the time to enter an absorbing state in Markov process For example, Erlang 2 El distribution: ib i μ μ μ μ 0 2 3 0 Q = μ μ 0 0 0 6
PH distribution Coxian distribution μp μ μ μ p μ p Q = 0 μ μ 2 3 μ(-p ) Hyerexponential distribution 2 μ 0 3 μ μ Q = 0 μ μ 0 0 0 μ 2 2 2 ( ) 0 0 0 with an initial distribution p(0)=(q,-q) 7
The calculation of pdf of PH distribution Use the C K equation and matrix calculation of Q Calculate the transient behavior of absorbing state, p n (t). p n (t)=p{t<t}, so p n (t) is cdf of PH and p n (t) is pdf. Chalk writing, use hyperexponential distribution as example For any PH distribution, we can similarly analyze by its Q matrix of Markov process 8
M/E k / queue Service time is Erlang k distribution k stage, g, each stage is exponential with kμμ State definition (n,i): n customers and customer in service is in phase i, i=,2,,k. (k is the first phase and is the last phase) Global balance equation 9
Average metrics of M/E k / Consider equivalent queue with state (n )k+i, # of phase requests Equivalent to M [k] /M/, average # of customer k + ρ is average # of phase requests L =, ρ = So, 2 k+ ρ k+ ρ Wq =, Lq = λ Wq = 2 k μ( ρ) 2 k ( ρ) 2 ρ λ μ W = Wq +, L= Lq + ρ μ Can we use PASTA to do mean value analysis? 20
Example of M/E k / Suppose a queuing system λ=6/h, /, Poisson arrival Mean service time 2.5min, std. deviation is.25min not exponentially distribution Use Erlang k to approximate, C X =0.5=(/k) 0.5, k=4 M/E 4 / queue, with λ=4/5/min, μ=0.4/min, ρ=2/3 So, L q=5/6, W q=25/8min 2