Erlang Hyperexponential and Coxian distributions l Mixture of
Erlang, Hyper-exponential, and Coxian distributions l Mixture of exponentials l Combines a different # of exponential distributions l Erlang l Hyper-exponential μ P 1 P 2 μ μ E 4 Service mechanism μ 1 μ 2 μ H 3 P 3 μ 3 l Coxian μ μ C 4 1
Erlang distribution: analysis 1/2μ E 2 l Mean service time l l E[Y] = E[X 1] + E[X 2] =1/2μ + 1/2μ = 1/μ Variance l Var[Y] = Var[X 1] + Var[X 2] = 1/4μ 2 v + 1/4μ 2 = 1/2μ 2 2
Squared coefficient of variation: analysis constant 0 exponential Erlang C 2 1 Hypo-exponential l X is a constant l X = d => E[X] = d, Var[X] = 0 => C 2 =0 l X is an exponential r. v. l E[X]=1/μ; Var[X] = 1/μ 2 => C 2 = 1 l X has an Erlang r distribution l E[X] = 1/μ, Var[X] = 1/rμ 2 => C 2 = 1/r l f. X *(s) = [rμ/(s+rμ)]r 3
Probability density function of Erlang r l Let Y have an Erlang r distribution l r=1 l l Y is an exponential random variable r is very large l The larger the r => the closer the C 2 to 0 l Er tends to infintiy => Y behaves like a constant l E 5 is a good enough approximation 4
Generalized Erlang Er l l Classical Erlang r l E[Y] = r/μ l Var[Y] = r/μ 2 rμ Generalized Erlang r l Phases don’t have same μ rμ … rμ Y μ 1 μ 2 … μr Y 5
Generalized Erlang Er: analysis l If the Laplace transform of a r. v. Y l Has this particular structure l Y can be exactly represented by l An Erlang Er l Where the service rates of the r phase § Are minus the root of the polynomials 6
Hyper-exponential distribution P 1 P 2 Pk μ 1 μ 2. . μk l P 1 + P 2 + P 3 +…+ Pk =1 l Pdf of X? X 7
Hyper-exponential distribution: 1 st and 2 nd moments l Example: H 2 8
Hyper-exponential: squared coefficient of variation l C 2 = Var[X]/E[X]2 l C 2 is greater than 1 l Example: H 2 , C 2 > 1 ? 9
Coxian model: main idea l Idea l l Instead of forcing the customer l to get r exponential distributions in an Er model l The customer will have the choice to get 1, 2, …, r services Example l C 2 : when customer completes the first phase l He will move on to 2 nd phase with probability a § Or he will depart with probability b (where a+b=1) a b 10
Coxian model μ 1 b 1 a 1 μ 2 b 2 a 2 μ 3 a 3 μ 4 b 3 μ 1 b 1 a 1 b 2 μ 1 a 2 b 3 μ 1 a 2 a 3 μ 1 μ 2 μ 3 μ 4 11
Coxian distribution: Laplace transform l Laplace transform of Ck l Is a fraction of 2 polynomials l l The denominator of order k and the other of order < k Implication l A Laplace transform that has this structure l Can be represented by a Coxian distribution § Where the order k = # phases, § Roots of denominator = service rate at each phase 12
Coxian model: conclusion l Most Laplace transforms l Are rational polynomials l => Any distribution can be represented l Exactly or approximately l By a Coxian distribution 13
Coxian model: dimensionality problem l A Coxian model can grow too big l And may have as such a large # of phases l To cope with such a limitation l Any Laplace transform can be approximated by a c μ 1 l a μ 2 b=1 -a To obtain the unknowns (a, μ 1, μ 2) § Calculate the first 3 moments based on Laplace transform § And match these against those of the C 2 14
C 2 : first three moments 15
Rational polynomials approximated by Coxian-2 (C 2) l The Laplace transforms of most pdfs l Have the following shape l Can be exactly represented by l l A Coxian k (Ck) distribution § The # stages = the order of the denominator § Service rates given by the roots of the denominator If k is very large => dimensionality problem l Solution: collapse the Ck into a C 2 μ 1 a μ 2 b=1 -a 16
3 moments method l The first way of obtaining the 3 unknowns (μ 1 μ 2 a) l 3 moments method l Let m 1, m 2, m 3 be the first three moments § of the distribution which we want to approximate by a C 2 l The first 3 moments of a C 2 are given by l by equating m 1=E(X), m 2=E(X 2), and m 3 = E(X 3), you get 17
3 moments method: solution l The following expressions will be obtained l However, l The following condition has to hold: X 2 – 4 Y >= 0 l => 3 < 2 m 1 m 3 l => the 3 moments method applies to the case where § c 2 > 1 for the original distribution 18
Two-moment fit l If the previous condition does not hold l You can use the following two-moment fit l General rule l Use the 3 moments method l If it doesn’t do => use the 2 moment fit approximation 19
M/C 2/1 queue μ a μ C 2 b l What is the state of the system? l How many variables are needed to l l Describe the state of this queue? A 2 -dimensional state (n 1 , n 2) is needed l n 1 represents the number of customers in the queue l n 2 is the state of the server l 0 => server is idle; 1 => the server is busy in phase 1 l 2 => server is busy in phase 2 20
M/C 2/1 queue: analysis l To analyze this queue, one must go thru l Rate diagram that depicts state transition l Steady state equations l l Based on these equations l l Derive the balance equations Obtain the generating functions Using a recursive scheme l Solve the M/C 2/1 queue and l Determine P(n) = Pn = prob of having n customers in system 21
M/C 2/1: state diagram l (n 1 , n 2) l Where n 1 is the # customers in the queue l l Excluding the one in service n 2 is the state of the server (0: idle, 1: phase 1, 2: phase 2) 0, 0 λ bμ 1 aμ 1 0, 1 λ bμ 1 1, 1 μ 2 aμ 1 μ column: λ bμ 1 aμ 2 1 States where 2, 1 system in. phase 1. . 1 st 0, 2 λ 1, 2 λ 2 nd column: states of the system where server busy in phase 2 2, 2. . . 22
M/C 2/1: steady state equations l Steady state equations l 1 st set of equations (1 st column) 23
Balance equations 2 nd set of steady state equations (2 nd column) l l We are interested in finding Pn l Prob of having n customers in the system l that can be obtained based on Pn 1, n 2 24
Generating functions l Let us define l generating function g 1 (z) involving all probabilities Pi 1 l l generating function g 2 (z) based on {P 02, P 12, P 22, …} l l Where i customers are in the queue and 1 st phase is busy Where the server is busy in phase 2 generating function g(z) based on Pn l The probability of having n customers in the system 25
Expressions for the generating functions l Using the 2 set of balance equations, we get (1) (2) (3) l (1), (2), and (3) => 26
Finding P 00 l g 1 (1) = P 01 + P 11 + P 21 +…=prob stage 1 is busy l l This is equal to traffic intensity for stage 1 => ρ1 g (z) = f(g 1 (z), g 2 (z)) 27
Pn : recursive scheme l The general expression of probability Pn 28
- Slides: 28