![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
PANACEA normal-usage asymptotic expansion of the normalizing constant (Ramakrishnan and Mitra, BSTJ 61(10):2849-2872, 1982). More...
#include <cmath>#include <cstddef>#include <vector>#include "line/api/pfqn/pfqn_asympt_common.h"#include "line/api/pfqn/pfqn_ca.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::pfqn::PanaceaResult< T > |
| Return value of pfqn_panacea, mirroring [Gn, lGn]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| PanaceaResult< T > | line::pfqn::pfqn_panacea (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z, int terms) |
| PANACEA normal-usage asymptotic expansion of the normalizing constant (Ramakrishnan and Mitra, BSTJ 61(10):2849-2872, 1982). | |
| template<class T> | |
| PanaceaResult< T > | line::pfqn::pfqn_panacea (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z) |
PANACEA normal-usage asymptotic expansion of the normalizing constant (Ramakrishnan and Mitra, BSTJ 61(10):2849-2872, 1982).
Templated port of matlab/src/api/pfqn/pfqn_panacea.m. In the normal usage regime, where alpha_r = 1 - sum_i N_i r_ir > 0 for every station, the constant admits the expansion
log G = -sum_r factln(N_r) + sum_r N_r log Z_r + log(sum_k I_k) - sum_i log alpha_i
whose coefficients I_2, I_3 are assembled from convolution-algorithm values of the scaled demand matrix gammatilde at small auxiliary populations. The expansion is available at 1, 2 or 3 terms, as in the original package.
NOT-NORMAL-USAGE. MATLAB returns NaN when min(alpha) < 0. The port reports it through a flag on the result rather than a NaN, so a caller that ignores the flag gets a value it can recognize as unusable instead of a quiet NaN travelling into a solver.
ARITHMETIC. The result is the logarithm of a truncated asymptotic series, so the routine is gated on num_traits<T>::has_transcendental. The pfqn_ca calls inside it are exact and would remain so at exact arithmetic; it is the expansion and the logarithms that are not.
Definition in file pfqn_panacea.h.