1%{ @file lossn_erlangfp.m
2 % @brief Erlang fixed point approximation
for loss networks
4 % @author LINE Development Team
8 % @brief Computes performance metrics
for loss networks
using Erlang FP
11 % This function uses the Erlang fixed point approximation to compute
12 % performance metrics
for loss networks. Calls on route r arrive according
13 % to Poisson rate nu_r with unit mean service times. Link capacity
14 % requirements are: sum_r A(j,r) n(j,r) <= C(j)
for all links j.
18 % [QLen, Loss, E, niter] = lossn_erlangfp(nu, A, C)
23 % <tr><th>Name<th>Description
24 % <tr><td>nu<td>Arrival rate of route (
class) r (1xR vector)
25 % <tr><td>A<td>Capacity requirement of link j for route r (JxR matrix)
26 % <tr><td>C<td>Available capacity of link j (Jx1 vector)
31 % <tr><th>Name<th>Description
32 % <tr><td>QLen<td>Mean queue-length for route r
33 % <tr><td>Loss<td>Loss probability for route r
34 % <tr><td>E<td>Blocking probability for link j
35 % <tr><td>niter<td>Number of iterations required for convergence
38function [QLen,Loss,E,niter] = lossn_erlangfp(nu,A,C)
39% [QLen,Loss,E] = LOSS_ERLANGFP(rho,A,C)
40% Erlang fixed point approximation for loss networks
42% Calls (i.e., jobs) on route (i.e., class) r arrive according to Poisson
43% rate nu_r, r=1..R. Call service times on route r have unit mean.
45% Link capacity requirements are:
46% \sum_r A(j,r) n(j,r) <= C(j)
47% for all links j=1..J, where n(j,r) counts the calls on route r on link j.
50% nu (1xR): arv. rate of route (class) r = 1..R
51% A (J,R): capacity requirement of link j for route r = 1..R
52% C (J,1): available capacity of link j
55% Q (1xR): mean queue-length for route r = 1..R calls
56% L (1xR): loss probability for route r = 1..R calls
57% E (Jx1): blocking probability of for link j = 1..J
59% NOTE: nu_r may be replaced by a utilization rho_r=nu_r/mu_r, where mu_r
60%
is the service rate for route r.
67while norm(E-E_1,1)>1e-8 && niter<10000
77 termj=termj*(1-E_1(i))^A(i,r);
80 rhoj_1 = rhoj_1 + termj;
83 rhoj_1 = rhoj_1 / (1-E_1(j));
84 E(j) = ErlangB(rhoj_1,C(j));
90 QLen(r) = QLen(r)*(1-E(j))^A(j,r);
97function blockProb = ErlangB(nu,C)
99% blockProb = E(nu,C) = (nu^C/C!) / (sum_{i=1}^C nu^i/i!)
102 d = i*log(nu)-factln(i);
105blockProb = C*log(nu) -factln(C) -log(den);
106blockProb = exp(blockProb);