Queueing Theory
Queueing Theory
Queueing Theory
edu
Tot Prob: P(B) = P(A1 ∩ B) + ... + P(An ∩ B) = P(A1 )P(B|A1 ) + ... + P(An )P(B|An )
Bayes: P(A|B) = P(B|A)P(A)
P(B)
P(B|A)P(A)
= P(B|A ) k P(A )
P
i i=1 i
ΛO I
πi T1i = πj T1j fj,i
P P P P P
i = Λi πi j λi,j = j πj λj,i πi λ i = j πj λj fj,i j πi = j πj fj,i (all Ti equal)
Little’s Result - ΛT = n̄ Λ = mean arrival rate to box, n̄ =mean entities in box, T =mean time in box
1
P∞1 λ ρ n̄
M/M/1 - πn−1 λ = πn µ, ∀n ≥ 1 π0 = n =1−ρ πn = (1 − ρ)ρn ρ= n̄ = T = = µ
n=0 ρ µ 1−ρ λ 1−ρ
P(no wait) = π0 P(leave empty system) = πλ1 µ = πλ0 λ = π0
Qn
M/M/1 (state dependent) - πn µn = πn−1 λn−1 , ∀n ≥ 1 πn = π0 k=1 λµk−1 k
π0 = P∞
1
Qn λk−1
1+ n=1 k=1 µk
PN
Finite Population N - Same except now n=1 πn = 1
λ λn ρn
Discouraged Arrivals λn = n+1 , µn is constant: πn = π0 n!µ n = π0 n! π0 = P∞1 ρn = 1
eρ = e−ρ
n=0 n!
ρn e−ρ ρ
Combined: πn = n! (poisson) n̄ = ρ λ̄ = µ(1 − e−ρ ) = µ(1 − π0 ) T = n̄
λ = µ(1−e−ρ ) limρ→0 T = 1
µ
n
Infinite Servers: µn = nµ: πn = π0 ρn! T = n̄λ = λρ = µ1
Finite Population: : mean arrival rate: nλ mean departure rate: µ (except in state N when it’s 0)
Finite Buffer Space: πn = λn−1
µ πn−1 mean conditional rate of loss: πN λN Total arrival rate of customers:
PN πN λN
n=0 πn λn Fraction lost customers:
P N . λn = λ, ∀n =⇒ this reduces to πN
n=0 πn λn
Transient Analysis
Q(0)
= [100]
3 2 4
Q(1) Q(0)
∗P = 93 29 94
=
P = 9 9
1
9
1
Q(2) Q(1)
∗P = 91 27
5 19
0 2 2 = 27
19 8
0 0 1 P[N > 2] = 1 − P [N ≤ 2] = 1 − 27 = 27
V = V P to solve for visit ratios to markov chain. Use V to solve for π, the fraction of time spent in each state.
πi = P4vi Tvi T
i=1 i i
Semi Markov 2
Sojourn Times
1
P[(B, a)] = µ+λ b
1
P[(B, b)] = µ+λa
RT
P[(I, a)] = 0 λa e−λa t ∗ tdt + T ∗ (e−λa T
RT
P[(I, b)] = 0 λb e−λb t ∗ tdt + T ∗ (e−λa T
P[(S, a)] = λ1a
P[(S, b)] = λ1b
Probabilities:
B, a → I, a = p ∗ [1 − e−λa T ] B, a → B, b = λBλB+µ B, b → B, a = λaλ+µ
a
B, b → I, b = λaµ+µ I, a → B, a = p ∗ [1 − e−λa T )
] I, a → B, b = (1 − p) ∗ [1 − e−λa T ]
I, a → S, a = e−λa T I, b → B, a = (p) ∗ [1 − e−λb T ] I, b → B, b =
I, b → S, b = e−λb T S, a → B, a =p S, a → B, b =1−p
S, b → B, a =p S, b → B, b =1−p
PDF:
R Rb R∞
P(X ∈ B) = B
fX (x)dx P(a ≤ X ≤ b) = a
fX (x)dx P(−∞ < X < ∞) = −∞
fx (x)dx = 1
R∞ R∞ R∞
E[X] = −∞
xfX (x)dx E[g(X)] = −∞
g(x)fX (x)dx Var(X) = E[(X − E[X])2 ] = −∞
(x = E[X])2 fX (x)dx
∞ ∞
fX (x) = −∞ fX,Y (x, y)dy fY (x) = −∞ fX,Y (x, y)dx.
P P
E[X] = x x · pX (x) Y = g(x) =⇒ E[Y ] = x g(x) · PX (x)