![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Limiting distribution of a reducible CTMC by direct block decomposition of the generator. More...
#include <algorithm>#include <cstddef>#include <vector>#include "line/api/mc/ctmc_solve.h"#include "line/api/mc/stronglyconncomp.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/lu.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::mc::BlkDecompResult< T > |
Namespaces | |
| namespace | line |
| namespace | line::mc |
Functions | |
| template<class T> | |
| BlkDecompResult< T > | line::mc::ctmc_solve_reducible_blkdecomp (const Matrix< T > &Qin, const std::vector< T > &pin, double reachTol=1e-15, double zeroColTol=1e-12) |
| Limiting distribution of a reducible CTMC by direct block decomposition of the generator. | |
| template<class T> | |
| BlkDecompResult< T > | line::mc::ctmc_solve_reducible_blkdecomp (const Matrix< T > &Q, double reachTol=1e-15, double zeroColTol=1e-12) |
| Overload without an initial vector. | |
Limiting distribution of a reducible CTMC by direct block decomposition of the generator.
Templated port of matlab/src/api/mc/ctmc_solve_reducible_blkdecomp.m and jar/src/main/java/jline/api/mc/Ctmc_solve_reducible_blkdecomp.java. Unlike ctmc_solve_reducible it never uniformizes: the states are split into transient and recurrent classes by strong connectivity, the expected sojourn of the transient part is obtained from sojourn Q_tt = -p0_t (Q_tt is Hurwitz, so this is a plain non-singular solve), the absorption probabilities follow as hit = sojourn Q_ta + p0_r, and each recurrent class contributes its own stationary vector scaled by the probability of reaching it.
EXACT, AND THE EXACTNESS IS THE POINT. Every step is a finite linear solve over the field of the rates: strong connectivity is combinatorial, Q_tt is inverted once per starting class, and each recurrent class goes through ctmc_solve. At Rational the absorption probabilities are exact rationals, where the reference computes them in double precision on a matrix that is ill-conditioned precisely when the transient class is nearly closed – the regime the routine exists to handle.
The two thresholds MATLAB uses are structural tests on the input, not convergence criteria, and are exposed as parameters: a reachability probability below 1e-15 is treated as unreachable, and a state whose column of |Q| sums below 1e-12 is treated as having no incoming rate.
Definition in file ctmc_solve_reducible_blkdecomp.h.