![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Erlang fixed-point (reduced-load) approximation for a loss network. More...
#include <cmath>#include <cstddef>#include <functional>#include <vector>#include "line/api/da/da_fpi.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::lossn::ErlangFpResult< T > |
Namespaces | |
| namespace | line |
| namespace | line::lossn |
Functions | |
| template<class T> | |
| T | line::lossn::erlang_b (const T &nu, int C) |
| Erlang's loss formula B(nu, C), evaluated through logs as MATLAB does so the factorials stay in range for large C. | |
| template<class T> | |
| ErlangFpResult< T > | line::lossn::lossn_erlangfp (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< int > &C, const da::FpiOptions &options=da::FpiOptions()) |
| Erlang fixed-point (reduced-load) approximation for a loss network. | |
Erlang fixed-point (reduced-load) approximation for a loss network.
Templated port of matlab/src/api/lossn/lossn_erlangfp.m. Each link j carries an offered load rho_j = (1/(1-E_j)) sum_r nu_r A(j,r) prod_i (1-E_i)^A(i,r) and blocks it with Erlang's loss formula B(rho_j, C_j); the vector E is the fixed point of that map, reached by the shared damped iteration in line::da::da_fpi. Carried traffic and per-class loss follow from E.
MATLAB evaluates Erlang B through logs and exponentials to keep the factorials in range. The port keeps that form, and consequently the whole function is transcendental-gated: the fixed point is only defined to within the iteration tolerance anyway, so an exact instantiation would promise more than the algorithm delivers.
The recursive form B_k = rho B_{k-1} / (k + rho B_{k-1}) IS rational, and a future exact variant of the blocking formula alone could use it; the fixed point around it would still be inexact.
Definition in file lossn_erlangfp.h.