Professional Documents
Culture Documents
Theory
Examples
Suppose we have a single server in a shop and customers arrive in
the shop with a Poisson arrival distribution at a mean rate of
lamda=0.5 customers per minute, i.e. on average one customer
appears every 1/lamda = 1/0.5 = 2 minutes. This implies that the
interarrival times have an exponential distribution with an average
interarrival time of 2 minutes. The server has an exponential
service time distribution with a mean service rate of 4 customers
per minute, i.e. the service rate =4 customers per minute. As we
have a Poisson arrival rate/exponential service time/single server
we have a M/M/1 queue in terms of the standard notation.
Lambda = 0.5 (customers per minute arrival)
Mu = 4 (customers per minute departure)
Rho = 0.5 / 4 = 0.125
(utilization)
Rho = lamba * Ts = 0.5 * 0.25 = 0.125
r = Rho/(1-Rho) = 0.125/(1-0.125) = 0.1429 (average number in
system)
w = Rho*Rho/(1-Rho) = 0.125*0.125/(1-0.125) = 0.179 (average
number in queue)
Tr = Ts/(1-Rho) = 0.25/(1-0.125) = 0.2857 min (average time in
system)
Tw = Rho * Ts/(1-Rho) = 0.125*0.25/(1-0.125) = 0.357 min
(average time waiting)
P0 = (1-Rho)*Rho^n = (1-0.125)*0.125^0 = 0.875 = 87.5%
(probability of zero in queue)
P1 = (1-Rho)*Rho^n = (1-0.125)*0.125^1 = 0.109 = 10.9%
(probability of 1 in queue)
What is probability of waiting?
Probability of waiting is probability of having 1 or more in the
queue.
All probs have to add to 1 so Prob of 1 or more = 1 Prob of zero
1 0.875 = 0.125 = 12.5%
Versus
M/M/4
Lambda = 0.5
Mu = 4 per min per server = 4 * 4 = 16
Rho = 0.5/16 = 0.03125
Rho is also lambda * Ts / N = 0.5 * 0.25 / 4 = 0.03125
Need to calculate Erlang-C = (1-K)/(1- Rho * K)
Need to calculate K = A / B
A = sum(N*Rho)^i / i! for all i < N
B = sum(N*Rho)^i / i! for all i <= N
A = (4 * 0.03125)^0/0! + (4 * 0.03125)^1/1! + (4 * 0.03125)^2/2!
+ (4 * 0.03125)^3/3!
A = 1 + 0.125/1 + 0.125^2/2 + 0.125^3/6
A = 1 + 0.125 + 0.0078125 + 0.00032552 = 1.133138
B = A + 0.125^4/4! = 0.133138 + 0.125^4/24 = 1.133148
K = A / B = 1.133138 / 1.133148 = 0.99999118
Erlang-C = (1 0. 99999118)/(1 0. 03125*0. 99999118) =
0.00000882 / (1 0.03124972) = 0. 00000882 / 0.96875 =
0.0000091
One server
Tw
Tr
0.357
0.2857
Tw
Tr
One server
twice as fast
0.0083
0.1333
1 Queue
2 servers
0. 00097
0. 25097
4 Queues
4 servers
0.0081
0.258
1 Queue
4 servers
0. 00000059
0. 25000059