![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Norlund-Rice inversion of the normalizing constant on a SADDLE-TILTED contour, with a second-order Edgeworth correction. More...
#include <cmath>#include <cstddef>#include <map>#include <vector>#include "line/api/pfqn/pfqn_asympt_common.h"#include "line/api/pfqn/pfqn_gld.h"#include "line/api/pfqn/pfqn_lldsingle.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/linalg.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::PfqnNreResult< T > |
| The reference's [lG,G,lGs,vsad]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| PfqnNreResult< T > | line::pfqn::pfqn_nre_full (const Matrix< T > &L0, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha0, const std::vector< T > &vfix) |
| Saddle-tilted Edgeworth approximation of log G for a limited load-dependent model: the full form of the reference's outputs, named alike in the JAR and the native python port. | |
| template<class T> | |
| T | line::pfqn::pfqn_nre (const Matrix< T > &L0, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha0) |
| Saddle-tilted Edgeworth approximation of log G for a limited load-dependent model. | |
Norlund-Rice inversion of the normalizing constant on a SADDLE-TILTED contour, with a second-order Edgeworth correction.
Templated port of matlab/src/api/pfqn/pfqn_nre.m. Two corrections separate it from pfqn_nrl and pfqn_nrp, which Laplace-approximate the same integral on the untilted contour X = 1:
NO COMPLEX ARITHMETIC. Every integrand evaluation sits at real positive demands, so unlike pfqn_nrl this routine only needs pfqn_lldsingle. It is still gated on num_traits<T>::has_transcendental: the cumulant generating function, the Gaussian curvature term and the tilt all take logs and exps.
OVERFLOW CEILING. The cumulant generating function is log(G) of the tilted single-class model, and this port's pfqn_lldsingle accumulates G itself rather than its logarithm (the MATLAB reference switches to the log domain). A double instantiation therefore loses the saddle search once log G passes ~709; a Real<D> instantiation does not.
WARNINGS. This layer has no warning channel, so the two conditions the reference warns about – a saddle search that runs out of iterations and a non-positive Edgeworth correction – take the same fallback silently: the current estimate, and the bare saddlepoint term respectively.
COST is O(I R^2 + R^4) evaluations of a single-class LLD constant, hence polynomial in the class count. The fourth-cumulant tensor caps the port at 8 classes, as in the reference.
Definition in file pfqn_nre.h.