Presentation is loading. Please wait.

Presentation is loading. Please wait.

Department of Industrial Engineering

Similar presentations


Presentation on theme: "Department of Industrial Engineering"โ€” Presentation transcript:

1 Department of Industrial Engineering
Lecture 3: Algorithmic Methods for M/M/1-type models: Quasi Birth Death Process Dr. Ahmad Al Hanbali Department of Industrial Engineering University of Twente

2 Lecture 3 This Lecture deals with continuous time Markov chains with infinite state space as opposed to finite space Markov chains in Lectures 1 and 2 Objective: To find equilibrium distribution of the Markov chain Lecture 3: M/M/1 type models

3 Background (1): M/M/1 queue
Customers arrive according to Poisson process of rate ๐œ†, i.e., the inter-arrival times are iid exponential random variables (rv) with rate ๐œ† Customers service times are iid exponential rv with rate ๐œ‡ inter-arrivals and service times are independent Service discipline can be Fisrt-In-First-Out (FIFO), Last-In-First-Out (LIFO), or Processor Sharing (PS) Under above assumptions, {๐‘(๐‘ก), ๐‘กโ‰ฅ 0}, the nbr of customers in M/M/1 queue at time ๐‘ก is continuous-time infinite space Markov chain Lecture 3: M/M/1 type models

4 Background (2): M/M/1 queue
i i+1 i-1 1 ฮป Let ๐‘๐‘– denote equilibrium probability of state ๐‘–, then โˆ’๐œ†๐‘0 +๐œ‡๐‘1 = 0, ๐œ† ๐‘ ๐‘–โˆ’1 โˆ’ ๐œ†+๐œ‡ ๐‘๐‘–+๐œ‡ ๐‘ ๐‘–+1 = 0, ๐‘–= 1,2, โ€ฆ Solving equilibrium equations for ๐œŒ=๐œ†/๐œ‡<1 (with ๐‘–โ‰ฅ0 ๐‘๐‘– =1) gives: ๐‘๐‘–= ๐‘ ๐‘–โˆ’1 ๐œŒ, ๐‘ 0 =1โˆ’๐œŒโ‡’ ๐‘๐‘–= 1โˆ’๐œŒ ๐œŒ ๐‘– , ๐‘–โ‰ฅ 0, This means N is geometrically distributed with parameter ๐œŒ Lecture 3: M/M/1 type models

5 Background (3) Stability condition, expected queue length is finite, load ฯ:= ฮป/ยต < 1โ‡’๐œ†<๐œ‡. This can be interpreted as drift to right is smaller than drift to left In stable case ฯ is probability the M/M/1 system is non-empty, i.e. , ๐‘ƒ(๐‘=0)=1โˆ’๐œŒ Q, the generator of M/M/1 queue, is a tridiagonal matrix, form has the form ๐‘„= โˆ’๐œ† ๐œ‡ 0 โ‹ฎ โ‹ฎ ๐œ† โˆ’๐œ†โˆ’๐œ‡ ๐œ‡ โ‹ฑ โ‹ฑ 0 ๐œ† โˆ’๐œ†โˆ’๐œ‡ ๐œ‡ โ‹ฑ โ€ฆ โ‹ฑ โ‹ฑ โ‹ฑ โ‹ฑ What happens if Q becomes ๐ต 00 ๐ต โ‹ฎ โ‹ฎ ๐ต 01 ๐ต 11 ๐ด 2 โ‹ฑ โ‹ฑ 0 ๐ด 0 ๐ด 1 ๐ด 2 โ‹ฑ โ€ฆ โ‹ฑ ๐ด 0 ๐ด 1 โ‹ฑ โ€ฆ โ‹ฑ โ‹ฑ โ‹ฑ โ‹ฑ Lecture 3: M/M/1 type models

6 M/M/1-type models: Quasi Birth Death Process
A 2-dimensional irreducible continuous time Markov process with states (๐‘–,๐‘—), where ๐‘–=0,โ€ฆ,โˆž and ๐‘—= 0,โ€ฆ,๐‘šโˆ’1 Subset of state space with common ๐‘– entry is called level ๐‘– (๐‘–>0) and denoted ๐‘™(๐‘–)={(๐‘–,0),(๐‘–,1),โ€ฆ,(๐‘–,๐‘šโˆ’1)}. ๐‘™(0)={(0,0),(0,1),โ€ฆ,(๐‘–,๐‘›โˆ’1)}. This means state space is โˆช ๐‘–โ‰ฅ0 ๐‘™(๐‘–) Transition rate from (๐‘–,๐‘—) to (๐‘–โ€ฒ,๐‘—โ€ฒ) is equal to zero for |๐‘–โˆ’๐‘–โ€ฒ| โ‰ฅ 2 For ๐‘–>0, transition rate between states in ๐‘™(๐‘–) and between states in ๐‘™(๐‘–) and ๐‘™(๐‘–ยฑ1) is independent of ๐‘– Lecture 3: M/M/1 type models

7 M/M/1-type models: Quasi Birth Death Process
Order the states lexicographically, i.e., 0,0 ,โ€ฆ, 0,๐‘›โˆ’1 0,๐‘›โˆ’1 , 1,0 ,โ€ฆ, 1,๐‘šโˆ’1 , 2,0 ,โ€ฆ, 2,๐‘šโˆ’1 ,โ€ฆ, the generator of the QBD has the following form: ๐‘„= ๐ต 00 ๐ต โ‹ฎ โ‹ฎ ๐ต 01 ๐ต 11 ๐ด 2 โ‹ฑ โ‹ฑ 0 ๐ด 0 ๐ด 1 ๐ด 2 โ‹ฑ ๐ด 0 ๐ด 1 โ‹ฑ โ€ฆ โ‹ฑ โ‹ฑ โ‹ฑ โ‹ฑ where ๐ด0 and ๐ด2 are nonnegative ๐‘š-by-๐‘š matrices; ๐ด1 and ๐ต 11 are ๐‘š-by-๐‘š matrix with strictly negative diagonal; ๐ต 00 is ๐‘›-by-๐‘› matrix with strictly negative diagonal; ๐ต 10 ๐‘›-by-๐‘š and ๐ต 01 ๐‘š-by-๐‘› nonnegative matrices. Note, ( ๐ต ๐ต 01 )๐‘’=0, ( ๐ต 10 + ๐ต 11 + ๐ด 0 )๐‘’=0, and ( ๐ด 2 +๐ด1+ ๐ด0)๐‘’=0 Lecture 3: M/M/1 type models

8 ๐œ‹๐ด0๐‘’<๐œ‹๐ด2๐‘’, (mean drift condition)
QBDs stability Theorem: The QBD is ergodic (i.e., mean recurrence time of the states is finite) if and only if ๐œ‹๐ด0๐‘’<๐œ‹๐ด2๐‘’, (mean drift condition) where ๐‘’ is the column vector of ones and ๐œ‹ is the equilibrium distribution of the irreducible Markov chain with generator ๐ด=๐ด0+๐ด1+๐ด2, ๐œ‹๐ด=0, ๐œ‹๐‘’=1 Interpretation: ๐œ‹๐ด0๐‘’ is mean drift from level ๐‘– to ๐‘–+1. ๐œ‹๐ด2๐‘’ is mean drift from level ๐‘– to ๐‘–โˆ’1. Generator ๐ด describes the behavior of QBD within level It is assumed here the A is a generator of an irreducible Markov chain. For less restrictive assumption on A see book of Latouche & Ramaswami Section 7.3 Lecture 3: M/M/1 type models

9 Equilibrium distribution of QBDs
Let ๐‘๐‘–=(๐‘(๐‘–,0),..,๐‘(๐‘–,๐‘šโˆ’1)) and ๐‘=(๐‘0,๐‘1,โ€ฆ) then equilibrium equation ๐‘๐‘„=0 reads ๐‘0 ๐ต 00 +๐‘1 ๐ต 10 = 0, ๐‘0 ๐ต 01 +๐‘1 ๐ต 11 +๐‘1 ๐ด 2 = 0 ๐‘ ๐‘–โˆ’1 ๐ด0+๐‘๐‘–๐ด1+ ๐‘ ๐‘–+1 ๐ด2 = 0, ๐‘–โ‰ฅ2 Theorem: if the QBD is ergodic the equilibrium probability distribution then reads ๐‘ ๐‘– =๐‘1 ๐‘… ๐‘–โˆ’1 , ๐‘–โ‰ฅ2, where ๐‘…=๐ด0๐‘, called rate matrix, and the matrix ๐‘ records the expected sojourn time in the states of ๐‘™(๐‘–), starting from ๐‘™(๐‘–), before the first visit to ๐‘™(๐‘–โˆ’1) The rate matrix is a non-negative matrix of unit less numbers. Note that if the row i of A_0 is a row of zeros this gives the ith row of R is also zero. This may simplies the finding of R computed iteratively. Lecture 3: M/M/1 type models

10 Proof On board. Based on proof of Latouche & Ramaswami in the book โ€œIntroduction to Matrix Analytic Methods in Stochastic Modelingโ€ Chap. 6 p ...... A direct result of the previous theorem is that spectral radius of ๐‘… is < 1 It remains to find ๐‘0, ๐‘1 , and ๐‘… ? Lecture 3: M/M/1 type models

11 Equilibrium Distribution (cnt'd)
Lemma: The matrix ๐‘… is the minimal nonnegative solution of ๐ด0+ ๐‘…๐ด1+๐‘…2๐ด2 = 0 Lemma: The stationary probability vectors ๐‘0 and ๐‘1 are the unique solution of ๐‘0 ๐ต 00 + ๐‘ 1 ๐ต 10 =0 ๐‘0 ๐ต 01 + ๐‘ 1 (๐ต 11 +๐‘… ๐ด 2 )=0 ๐‘ 0 ๐‘’ ๐‘› + ๐‘1 ๐ผโˆ’๐‘… โˆ’1 ๐‘’ ๐‘š =1 (Normalization condition) where ๐‘’ ๐‘› and ๐‘’ ๐‘š are column vectors of ones with size ๐‘› and ๐‘š, respectively - Note that B_00 is invertible because eventually the process will leave level 0. Therefore ๐‘0=โˆ’ ๐‘ 1 ๐ต 10 ๐ต 00 โˆ’1 . Inserting in the second equation we get that: ๐‘ 1 โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐ต 01 + ๐ต 11 +๐‘… ๐ด 2 =0. The normalization condition can be rewritten as ๐‘ 1 (โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐‘’ ๐‘› + ๐ผโˆ’๐‘… โˆ’1 ๐‘’ ๐‘š )=1. Let matrix X be โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐ต 01 + ๐ต 11 +๐‘… ๐ด 2 โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐ต 01 + ๐ต 11 +๐‘… ๐ด 2 but with column i โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐‘’ ๐‘› + ๐ผโˆ’๐‘… โˆ’1 ๐‘’ ๐‘š โˆ’ ๐ต 10 ๐ต 00 โˆ’1 ๐‘’ ๐‘› + ๐ผโˆ’๐‘… โˆ’1 ๐‘’ ๐‘š . Then we get that ๐‘ 1 = ๐‘’ ๐‘– ๐‘‹ โˆ’1 , ๐‘’ ๐‘– a row vector with i-th entry 1 and rest zero. - Note it possible that p_0 has a different size than p_1 in this case the vectors e in the normalization condition will be different and have the size of p_0 and p_1 respectively. - A way to verify that R is correct is to check that ๐ต 10 e n + ๐ต 11 +๐‘… ๐ด 2 ๐‘’ ๐‘š =0 Lecture 3: M/M/1 type models

12 ๐‘… ๐‘˜+1 =โˆ’( ๐ด 0 + ๐‘… ๐‘˜ 2 ๐ด 2 ) ๐ด 1 โˆ’1 , with ๐‘…0=0
Compute R Rearrange the quadratic equation of the rate matrix: ๐‘…=โˆ’ ๐ด0+๐‘…2๐ด2 ๐ด 1 โˆ’1 ๐ด1 is invertible since it is a generator of a transient Markov chain l(n) of states, n>0 Fixed point equation solved by successive substitution ๐‘… ๐‘˜+1 =โˆ’( ๐ด 0 + ๐‘… ๐‘˜ 2 ๐ด 2 ) ๐ด 1 โˆ’1 , with ๐‘…0=0 It can be shown that ๐‘…๐‘˜โ†’ ๐‘… for ๐‘˜โ†’โˆž A way to check the correctness of ๐‘… is by verifying that: ๐ต 10 ๐‘’ ๐‘› + ๐ต 11 +๐‘… ๐ด 2 ๐‘’ ๐‘š =0 Note that Latouche and Ramaswami in their book proposed to find the matrix G which satisfies: ๐ด 0 ๐บ 2 + ๐ด 1 ๐บ+ ๐ด 2 =0; Note that G is a nonnegative stochastic matrix (sum of its rows equal to one). Then R is simply found as ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 0 ๐บ โˆ’1 . In their book, G is computed iteratively. (i,j) entry G records the probability starting in level n in state (n,i) to visit for the first time level (n-1) in state (n-1,j), n>=2. Lecture 3: M/M/1 type models

13 Special cases For ๐ด 2 =๐‘ฃ.๐›ผ is a product of two vectors where ๐‘ฃ is column vector and ๐›ผ is row vector with ๐‘—=0 ๐‘š ๐›ผ ๐‘— =1, the rate matrix reads, ๐‘’ is a column vector of ones, ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 0 ๐‘’๐›ผ โˆ’1 , For ๐ด 0 =๐‘ค. ๐›ฝ is a product of two vectors where ๐‘ค is column vector and ๐›ฝ is row vector with ๐‘—=0 ๐‘š ๐›ฝ ๐‘— =1, the rate matrix reads ๐‘…=๐‘ค.๐‘Žโ‡’ ๐‘… ๐‘– = ๐œ‚ ๐‘–โˆ’1 ๐‘… where ๐‘Ž is some row and ๐œ‚= ๐‘Ž.๐‘ค (a number). ๐œ‚ is spectral radius of ๐‘… and can be found as the root (0,1) of det ๐ด 0 +๐‘ฅ ๐ด 1 + ๐‘ฅ 2 ๐ด 2 =0 * Make a plot on the board: what it means v.\alpha? It means that given state i in a level n, with n>2, rate to jump to state j in level n-1 is nothing than v_i*\alpha_j. So, given that chain starts in level n in state i the probability to go first time reach j in level n-1 is equal \alpha_j. This means that G=e.\alpha. R follows right away from that. * Starting with R=0 in the recursion ๐‘… ๐‘˜+1 =โˆ’( ๐ด 0 + ๐‘… ๐‘˜ 2 ๐ด 2 ) ๐ด 1 โˆ’1 , it is easily found that ๐‘… ๐‘˜ = ๐‘ค๐‘Ž ๐‘˜ . * Why ฮท is unique? Since R is non-negative matrix this follows from Perron-Frobenius proposition Lecture 3: M/M/1 type models

14 Spectral expansion method
The balance equation can be seen as a difference equation with a basis solution of form ๐‘ ๐‘› =๐‘ฆ ๐‘ฅ ๐‘› , ๐‘ฆ= ๐‘ฆ 0 ,โ€ฆ,๐‘ฆ ๐‘š โ‰ 0 ๐‘Ž๐‘›๐‘‘ ๐‘ฅ <1 Inserting this solution in the balance equation ๐‘ ๐‘›โˆ’1 ๐ด0+ ๐‘๐‘›๐ด1+ ๐‘ ๐‘›+1 ๐ด2 = 0, ๐‘›โ‰ฅ2 yields ๐‘ฆ ๐ด 0 +๐‘ฅ ๐ด 1 + ๐‘ฅ 2 ๐ด 2 =0โ‡’ det ๐ด 0 +๐‘ฅ ๐ด 1 + ๐‘ฅ 2 ๐ด 2 =0 This latter equation has ๐‘š+1 roots in the unit disk and ๐‘ ๐‘› = ๐‘—=0 ๐‘š ๐‘ ๐‘— ๐‘ฆ ๐‘— ๐‘ฅ ๐‘— ๐‘›โˆ’1 , ๐‘›=1,2,โ€ฆ The constants ๐‘ ๐‘— ,๐‘—=0,โ€ฆ,๐‘š, are found using the boundary equations and the normalization condition Lecture 3: M/M/1 type models

15 Spectral expansion method
The roots ๐‘ฅ 0 ,โ€ฆ, ๐‘ฅ ๐‘š+1 are eigenvalue of the rate matrix ๐‘… with corresponding left eigenvectors ๐‘ฆ 0 ,โ€ฆ, ๐‘ฆ ๐‘š+1 If it appears some these roots are of a multiplicity higher than a more complicated basis solution should be considered No probabilistic interpretation is available for ๐‘ฅ ๐‘– โ€™s and ๐‘ฆ ๐‘– โ€™s Numerically it has been found that Matrix geometric methods is more stable than the spectral expansion Lecture 3: M/M/1 type models

16 M/M/1 Type models Machine with set-up times Unreliable machine
M/Er/1 model Er/M/1 model PH/PH/1 model Lecture 3: M/M/1 type models

17 Machine with set-up times (1)
In addition to assumptions of M/M/1 system, further assume that the system is turned off when it is empty System is turned on again when a new customer arrives The set-up time is exponentially distributed with mean 1/๐œƒ Lecture 3: M/M/1 type models

18 Machine with set-up time (2)
Number of customers in system is not a Markov process Two-dimensional process of state (๐‘–,๐‘—) where ๐‘– is number of customers and ๐‘— is system state (๐‘— =0, sys. is off, ๐‘— =1, sys. is on) is Markov process Lecture 3: M/M/1 type models

19 Machine with set-up time (3)
Let ๐‘(๐‘–,๐‘—) denote equilibrium prob. of state (๐‘–,๐‘—), ๐‘– โ‰ฅ 0, ๐‘—=0,1. Equilibrium equations read ๐‘(0,0)๐œ† = ๐‘(1,1)๐œ‡ ๐‘(๐‘–,0)(๐œ†+๐œƒ) = ๐‘(๐‘–โˆ’1,0)๐œ†, ๐‘–โ‰ฅ1 ๐‘(๐‘–,1)(๐œ†+๐œ‡) = ๐‘(๐‘–,0)๐œƒ+๐‘(๐‘–+1,1)๐œ‡+๐‘(๐‘–โˆ’1,1)๐œ†, ๐‘–โ‰ฅ1 Let ๐‘๐‘–=(๐‘(๐‘–,0),๐‘(๐‘–,1)), then Equilibrium eqs read ๐‘0๐ต1+ ๐‘1๐ต2 = 0, ๐‘ ๐‘–โˆ’1 ๐ด0+ ๐‘ ๐‘– ๐ด1+ ๐‘ ๐‘–+1 ๐ด2 = 0, ๐‘–โ‰ฅ1 Lecture 3: M/M/1 type models

20 Machine with set-up time (4)
where ๐ด 0 = ๐œ† 0 0 ๐œ† , ๐ด 2 = ๐œ‡ , ๐ด 1 = โˆ’ ๐œ†+๐œƒ ๐œƒ 0 โˆ’ ๐œ†+๐œ‡ , ๐ต 1 = โˆ’๐œ† 0 0 โˆ’๐œ† , ๐ต 2 = ๐œ‡ We shall use the Matrix geometric to the find the equilibrium probability It can be easily checked that ( ๐ด 0 + ๐ด 1 + ๐ด 2 )๐‘’=0. Lecture 3: M/M/1 type models

21 Matrix Geometric Method (1)
Global balance equations are given by equating flow from level ๐‘– to ๐‘–+1 with flow from ๐‘–+1 to ๐‘– which gives, ๐‘ ๐‘–,0 +๐‘ ๐‘–,1 ๐œ†=๐‘ ๐‘–+1,1 ๐œ‡, ๐‘–โ‰ฅ1 In matrix notation this gives ๐‘ ๐‘–+1 ๐ด2= ๐‘ ๐‘– ๐ด3, where ๐ด 3 = ๐œ† 0 ๐œ† 0 This gives, ๐‘–โ‰ฅ1, ๐‘ ๐‘–โˆ’1 ๐ด0+ ๐‘ ๐‘– ๐ด1+๐ด3 =0โ‡’ ๐‘ ๐‘– =โˆ’ ๐‘ ๐‘–โˆ’1 ๐ด 0 ๐ด 1 + ๐ด 3 โˆ’1 โ‡’ ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 3 โˆ’1 = ๐œ† / ๐œ†+๐œƒ ๐œ†/๐œ‡ 0 ๐œ†/๐œ‡ Note that ๐ด 2 =๐‘ฃ.๐›ผ= 0 ๐œ‡ This is one of special cases that we saw earlier we can conclude directly that: ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 0 ๐‘’๐›ผ โˆ’1 Lecture 3: M/M/1 type models

22 Matrix Geometric method (2)
Stability condition: absolute values of eigenvalues of R should be strictly smaller than 1 ๐œ†<๐œ‡ and ๐œƒ>0 Normalization condition gives ๐‘ 0 ๐ผ+๐‘…+ ๐‘… 2 +โ‹ฏ ๐‘’=1โ‡’ ๐‘ 0 ๐ผโˆ’๐‘… โˆ’1 ๐‘’=1 Note 0,1 is a transient state thus ๐‘ 0,1 =0. Normalization gives that ๐‘ 0,0 = ๐œƒ ๐œƒ+๐œ† 1โˆ’ ๐œ† ๐œ‡ Mean number of customers ๐ธ[๐ฟ] = โˆ‘๐‘–โ‰ฅ1 ๐‘– ๐‘ ๐‘– ๐‘’= ๐‘0 ๐‘… ๐ผโˆ’๐‘… โˆ’2 ๐‘’ Note that the drift condition for stability is not applicable here because A=( ๐ด 0 + ๐ด 1 + ๐ด 2 ) is not irreducible. Lecture 3: M/M/1 type models

23 Lecture 3: M/M/1 type models
Unreliable machine (1) customers arrive according to Poisson process of rate ๐œ† Service times is exponentially distributed of rate ๐œ‡ Up time of the machine is exp. distributed with rate 1/๐œ‚ Repair time is exp. dist. with rate 1/๐œƒ Stability condition: load is smaller than capacity of the machine: ๐œ†/๐œ‡<๐‘ƒ(๐‘š๐‘Ž๐‘โ„Ž๐‘–๐‘›๐‘’ ๐‘–๐‘  ๐‘ข๐‘)=๐œƒ/(๐œƒ+๐œ‚) Lecture 3: M/M/1 type models

24 Unreliable machine (2) Under the above assumption the two-dimensional process of state (๐‘–,๐‘—), where ๐‘– nbr of customers, ๐‘— the state of machine (๐‘—=1 machine up, ๐‘—=0 machine down), Then Lecture 3: M/M/1 type models

25 Unreliable machine (3) Note ๐ด 2 =๐‘ฃ๐›ผ, matrix geometric method gives
๐‘๐‘– = ๐‘0 ๐‘… ๐‘– , ๐‘–โ‰ฅ1, ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 0 ๐‘’๐›ผ โˆ’1 = ๐œ† ๐œ‡ ๐œ‚+๐œ‡ ๐œ†+๐œƒ 1 ๐œ‚ ๐œ†+๐œƒ 1 Note in this case we have that ๐‘ 0 ๐ผโˆ’๐‘… โˆ’1 = 1โˆ’ ๐‘ ๐‘ข ๐‘ ๐‘ข , where ๐‘ ๐‘ข is probability that the machine is up ๐œƒ/(๐œ‚+๐œƒ). We find ๐‘ 0 = 1โˆ’ ๐‘ ๐‘ข ๐‘ ๐‘ข ๐ผโˆ’๐‘… = ๐‘ ๐‘ข โˆ’ ๐œ† ๐œ‡ ๐œ‚ ๐œ†+๐œƒ 1 Spectral expansion method gives ๐‘๐‘–=๐‘1๐‘ฆ1 ๐‘ฅ 1 ๐‘– +๐‘2๐‘ฆ2 ๐‘ฅ 2 ๐‘– where ๐‘ฅ1 and ๐‘ฅ2 are roots of (eigenvalues of ๐‘…): ๐œ‡ ๐œ†+๐œƒ ๐‘ฅ 2 โˆ’๐œ† ๐œ†+๐œ‡+๐œ‚+๐œƒ ๐‘ฅ+ ๐œ† 2 =0 ๐ด 2 = ๐œ‡ = 0 ๐œ‡ =๐‘ฃ๐›ผ, with ๐‘ฃ= 0 ๐œ‡ and ๐›ผ= Lecture 3: M/M/1 type models

26 M/Er/1 model (1) Poisson arrivals with rate ฮป
Service times is Erlang distributed of r phases of mean r/ฮผ, i.e., is sum r exponentially distributed rv each of rate ฮผ Stability is offered load is smaller than 1 ฯ = ฮป.r/ฮผ < 1 Two dimensional process of state (i,j) where i is nbr of customers in the system (excluding the customer in service) and j remaining phases of customer in service is Markov process Lecture 3: M/M/1 type models

27 M/Er/1 model (2) State diagram:
๐ด 0 =๐œ†๐ผ, ๐ด 2 = 0 โ‹ฏ โ‹ฎ 0 ๐œ‡ โ‹ฎ 0 โ‹ฏ โ‹ฎ โ‹ฏ 0 , ๐ด 1 =๐œ‡ โˆ’1 0 1 โˆ’1 โ€ฆ 0 โ‹ฑ 0 โ‹ฎ โ‹ฑ 0 โ‹ฏ โ‹ฑ 0 1 โˆ’1 โˆ’๐œ†๐ผ Note that ๐ด 2 = ๐œ‡ 0 โ‹ฎ โ€ฆ =๐‘ฃ๐›ผ, with ๐‘ฃ= ๐œ‡ 0 โ‹ฎ and ๐›ผ= 0 โ€ฆ Note this is a very simple queue. First, all stable single server queues satisfying Littleโ€™s law have that p(0,0)=1-๐œ†๐ธ ๐‘† =1โˆ’ ๐œ†๐‘Ÿ ๐œ‡ . Note ๐œ‡ ๐‘ 0,1 =๐œ† ๐‘ 0,0 , ๐œ†+๐œ‡ ๐‘ 0,1 =๐œ‡๐‘ 0,2 ,โ‹ฏ, ๐œ†+๐œ‡ ๐‘ 0,๐‘Ÿโˆ’1 =๐œ‡๐‘ 0,๐‘Ÿ , ๐œ†+๐œ‡ ๐œ†+๐œ‡ ๐‘ 0,๐‘Ÿ =๐œ†๐‘ 0,0 +๐œ‡๐‘ 1,1 , โ€ฆ. So basically all probability can be found. Lecture 3: M/M/1 type models

28 M/Er/1 model (2) Matrix geometric method gives
๐‘ ๐‘– =๐‘0 ๐‘… ๐‘– , ๐‘–โ‰ฅ1, ๐‘…=โˆ’ ๐ด 0 ๐ด 1 + ๐ด 0 ๐‘’๐›ผ โˆ’1 =โˆ’๐œ† ๐ด 1 +๐œ†๐‘’๐›ผ โˆ’1 Sherman-Morrison formula gives that, ๐‘ฅ=๐œ‡/(๐œ†+๐œ‡), ๐‘…= 1โˆ’๐‘ฅ ๐‘ฅ 1 โ€ฆ 0 โ‹ฑ 0 โ‹ฎ โ‹ฑ ๐‘ฅ ๐‘Ÿโˆ’1 โ‹ฏ โ‹ฑ 0 ๐‘ฅ โˆ’๐‘ฅ ๐‘ฅ ๐‘Ÿ 1โˆ’๐‘ฅ 1โˆ’ ๐‘ฅ 2 โ‹ฎ 1โˆ’ ๐‘ฅ ๐‘Ÿ ๐‘ฅ ๐‘Ÿโˆ’1 โ€ฆ 1 Note for any M/PH/1 queue we have that ๐ด 2 is a rank one matrix (product of a column and row vector). So, ๐‘… can be found in closed form Sherman-Morrison for inverse of a sum of a nonsingular matrix and a rank one matrix ๐ด + ๐‘ข ๐‘ฃ ๐‘‡ โˆ’1 = ๐ด โˆ’1 โˆ’ ๐ด โˆ’1 ๐‘ข ๐‘ฃ ๐‘‡ ๐ด โˆ’ ๐‘ฃ ๐‘‡ ๐ด โˆ’1 ๐‘ข . Similarly to finding R. The inverse of I-R can be found in closed form. Lecture 3: M/M/1 type models

29 Phase-Type Distribution
Consider a continuous time absorbing Markov chain (AMC) with {1,โ€ฆ,๐‘š} transient states and one absorption state ๐‘š+1, i.e., ๐‘ž ๐‘š+1๐‘š+1 =0. Let ๐‘‡ denote the transition rate matrix between transient states, and ๐›ผ the initial state probability. Let ๐‘‡ 0 denote the transition rate vector of the transient states to absorption state. ๐‘‡๐‘’+ ๐‘‡ 0 =0โ‡’ โˆ’ ๐‘‡ โˆ’1 ๐‘‡ 0 =๐‘’ Definition: A probability distribution ๐น(.) on [0,โˆž) is a phase type distribution (PH-distribution) if it is the distribution of the time to absorption of AMC. The pair (๐›ผ,๐‘ป) is called a representation ๐น(.) Let Ta denote the time until absorption occurs, given initial distribution ฮฑ, then ๐‘ƒ(๐‘‡๐‘Ž<๐‘ฅ)=1โˆ’๐›ผexp(๐‘‡๐‘ฅ)๐‘’, ๐ธ[๐‘‡๐‘Ž]=โˆ’๐›ผ๐‘‡โˆ’1๐‘’, Lecture 3: M/M/1 type models

30 Phase-Type Distribution
Examples of phase-type distribution are Erlang-n, Hyper-exponential, and Coxian distributions Hyper-exponential distribution of n phases each of rate ๐œ‡๐‘– with ๐›ผ= ๐‘1,โ€ฆ,๐‘๐‘› Coxian distribution of ๐‘› phases each of rate ๐œ‡๐‘–, where ๐‘๐‘–+๐‘ž๐‘–=1, ๐‘–=1,..,๐‘›โˆ’1, and ๐‘ž๐‘›=1, and ๐›ผ=(1,0,โ€ฆ,0) 1 2 n ฮผ1 ฮผ2 ฮผn pn p2 p1 Let Ta denote the time until absorption occurs, given initial distribution ฮฑ, then ๐‘ƒ(๐‘‡๐‘Ž<๐‘ฅ)=1โˆ’๐›ผexp(๐‘‡๐‘ฅ)๐‘’, ๐ธ[๐‘‡๐‘Ž]=โˆ’๐›ผ๐‘‡โˆ’1๐‘’, 1 2 n p1ฮผ1 q1ฮผ1 p2ฮผ2 pn-1ฮผn-1 q2ฮผ2 ฮผn Lecture 3: M/M/1 type models

31 PH/PH/1 queue Inter-arrival times distribution is phase-type with n phases denoted ๐›ผ,๐‘‡ and with mean โˆ’๐›ผ ๐‘‡ โˆ’1 ๐‘’. Let ๐‘‡ 0 =โˆ’๐‘‡๐‘’ Service time distribution is of Phase type with ๐œˆ phases denoted (๐›ฝ,๐‘†) and with mean โˆ’๐›ฝ ๐‘† โˆ’1 ๐‘’. Let ๐‘† 0 =โˆ’๐‘†๐‘’ Assume that customers are served as FIFO The queue is stable if โˆ’๐›ผ ๐‘‡ โˆ’1 ๐‘’> โˆ’๐›ฝ ๐‘† โˆ’1 ๐‘’ Let ๐‘ ๐‘ก , ๐ด ๐‘ก , and ๐‘† ๐‘ก denote number of jobs in the system, phase of inter-arrival, and phase of job in service at time t Lecture 3: M/M/1 type models

32 PH/PH/1 model The process ๐‘ ๐‘ก , ๐ด ๐‘ก , ๐‘† ๐‘ก is continuous-time Quasi-Death- Process For Cox2/Cox2/1 queue, transitions between level ๐‘– states, level ๐‘– to ๐‘–+1, and level ๐‘– to ๐‘–โˆ’1 are as follows: In this figure we consider ๐‘‡= โˆ’ ๐œ‡ 1 ๐‘ ๐œ‡ โˆ’๐œ‡ 2 and S= โˆ’ ๐œ‚ 1 ๐‘ ๐‘  ๐œ‚ โˆ’๐œ‚ Note p+q=1 and p_s+q_s=1 Lecture 3: M/M/1 type models

33 PH/PH/1 model Note if Q is generator of joint process of two independent Markov chains of size ๐‘1and ๐‘2. Then, Q is sum of two kronecker products, i.e., ๐‘„= ๐‘„ 1 โŠ— ๐ผ ๐‘1 + ๐ผ ๐‘2 โŠ— ๐‘„ 2 where ๐ดโŠ—B means every element of A is multiplied by B whole. The generator of the PH/PH/1 ๐‘„= ๐ต 00 ๐ต โ‹ฎ โ‹ฎ ๐ต 01 ๐ด 1 ๐ด 2 โ‹ฑ โ‹ฑ 0 ๐ด 0 ๐ด 1 ๐ด 2 โ‹ฑ ๐ด 0 ๐ด 1 โ‹ฑ โ€ฆ โ‹ฑ โ‹ฑ โ‹ฑ โ‹ฑ , where ๐ด 1 =๐‘‡โŠ— ๐ผ ๐œˆ + ๐ผ ๐‘› โŠ—๐‘†, ๐ด 0 = ๐‘‡ 0 ๐›ผโŠ— ๐ผ ๐œˆ , ๐ด 2 = ๐ผ ๐‘› โŠ— ๐‘† 0 ๐›ฝ, ๐ต 00 =๐‘‡, ๐ต 01 = ๐‘‡ 0 ๐›ผโŠ—๐›ฝ, and ๐ต 10 =๐ผโŠ— ๐‘† 0 . ๐ดโŠ—B: means every element of A is multiplied by matrix B as whole. Lecture 3: M/M/1 type models

34 The iterative scheme needs about 40 iterations for 10 โˆ’5 precision
PH/PH/1 model The rate matrix ๐‘… is the minimal solution of the quadratic equation ๐ด 0 +๐‘… ๐ด 1 + ๐‘… 2 A 2 =0, ๐‘‡ 0 ๐›ผโŠ— ๐ผ ๐œˆ +๐‘…(๐‘‡โŠ— ๐ผ ๐œˆ + ๐ผ ๐‘› โŠ—๐‘†)+ ๐‘… 2 ๐ผ ๐‘› โŠ— ๐‘† 0 ๐›ฝ=0, Example: consider the Cox2/Cox2/1 queue with mean inter- arrival time 6/5, mean service time 5/6, ๐›ผ= , ๐‘‡= โˆ’ โˆ’2 and ๐›ฝ= , ๐‘†= โˆ’ โˆ’2 The iterative scheme needs about 40 iterations for 10 โˆ’5 precision ๐‘…= ๐‘ 0 = , ๐ธ ๐‘ = For kronecker product you can use the built-in function in Matlab kron(X,Y) Lecture 3: M/M/1 type models

35 References R. Nelson. Matrix geometric solutions in Markov models: a mathematical tutorial. IBM Technical Report 1991. G. Latouche and V. Ramaswami (1999), Introduction to Matrix Analytic Methods in Stochastic Modeling. SIAM. I. Mitrani and D. Mitra, A spectral expansion method for random walks on semi-infinite strips, in: R. Beauwens and P. de Groen (eds.), Iterative methods in linear algebra. North-Holland, Amsterdam (1992), 141โ€“149. M.F. Neuts (1981), Matrix-geometric solutions in stochastic models. The John Hopkins University Press, Baltimore. Lecture 3: M/M/1 type models


Download ppt "Department of Industrial Engineering"

Similar presentations


Ads by Google