![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Transient distribution of a CTMC by uniformization with Fox-Glynn Poisson weights. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <vector>#include "line/api/mc/ctmc_uniformization.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::mc::FoxGlynnResult< T > |
Namespaces | |
| namespace | line |
| namespace | line::mc |
Functions | |
| template<class T> | |
| FoxGlynnResult< T > | line::mc::ctmc_foxglynn (const std::vector< T > &pi0, const Matrix< T > &Q, const T &t, double tol=1e-12, long maxiter=-1) |
| Transient distribution of a CTMC by uniformization with Fox-Glynn Poisson weights. | |
Transient distribution of a CTMC by uniformization with Fox-Glynn Poisson weights.
Templated port of matlab/src/api/mc/ctmc_foxglynn.m and jar/src/main/java/jline/api/mc/Ctmc_foxglynn.java. The mixing distribution Poisson(q t) is truncated to a window [L, R] carrying all but tol of its mass, and the weights on that window are built by the two-sided recursion w(k-1) = w(k) k / lambda, w(k+1) = w(k) lambda / (k+1) anchored at the mode with w(mode) = 1 and normalized at the end, so neither exp(-lambda) nor lambda^k / k! is ever evaluated and the method is free of the overflow and underflow that force ctmc_uniformization to split long horizons into segments.
The window estimate is the Fox-Glynn (1988) one with Jansen's (2011) correction factor 1/(1 - exp(-(2/9) s)) on the right tail, and it is then certified in every regime by tightening or growing R (and L) against the Chernoff exponent lambda h(k/lambda), h(u) = u log u - u + 1. The estimate itself is asymptotic and valid only for lambda >= 25; the certification is what makes the result correct below that.
GATED ON TRANSCENDENTAL ARITHMETIC: the truncation window is defined by a logarithmic tail bound and the whole construction is an approximation of exp(Qt) controlled by tol, so there is nothing exact to preserve. The window is located in double precision, exactly as the reference does – it is an integer pair, and computing it in extended precision would move it by nothing – while the weights and the vector-matrix recursion run in T, which is what a high-precision instantiation buys.
Definition in file ctmc_foxglynn.h.