![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Norlund-Rice inversion of the normalizing constant, in its logistic (NRL) and probit (NRP) substitutions. More...
#include <cmath>#include <cstddef>#include <functional>#include <vector>#include "line/api/pfqn/infradius_h.h"#include "line/api/pfqn/laplaceapprox.h"#include "line/api/pfqn/pfqn_asympt_common.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| T | line::pfqn::pfqn_nrl (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha) |
| Norlund-Rice logit approximation of log G. | |
| template<class T> | |
| T | line::pfqn::pfqn_nrp (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha) |
| Norlund-Rice probit approximation of log G. | |
Norlund-Rice inversion of the normalizing constant, in its logistic (NRL) and probit (NRP) substitutions.
Templated port of matlab/src/api/pfqn/pfqn_nrl.m and pfqn_nrp.m. Both scale the demands column-wise into [0,1], apply the Laplace approximation of laplaceapprox.m to the corresponding infradius integrand at the origin, and undo the scaling with sum_r N_r log Lmax_r. The two differ only in the change of variable, so they are ported together.
THE CURVATURE TERM IS HALF THE LOG-DETERMINANT, and it is the single thing most worth checking when a ported value disagrees with MATLAB here. Both routines consume laplaceapprox's logI, which is log(I) and therefore carries -(1/2) log det(-H); using the full log-determinant instead shifts every value by (1/2) log det(-H) with no other symptom. On the single-class model L = [1/2, 1/3, 1/5], N = 5, Z = 0 that shift is 0.347 nats, turning the correct -2.1159 into -1.7694, both of which look plausible next to the exact -1.9951.
DELAY. A non-zero think time is appended as one more station whose rate row is 1, 2, ..., Ntot, i.e. an infinite server, exactly as in the reference.
ARITHMETIC. A Laplace approximation of a contour integral, so gated on num_traits<T>::has_transcendental. pfqn_nrp additionally carries the double-precision ceiling of the normal CDF; see infradius_h.h.
Definition in file pfqn_nrl.h.