![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Discrete-time transient distributions, hitting times and uniformization. More...
#include <cmath>#include <cstddef>#include <limits>#include <set>#include <vector>#include "line/api/mc/ctmc_solve.h"#include "line/api/mc/ctmc_uniformization.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.
Namespaces | |
| namespace | line |
| namespace | line::mc |
Functions | |
| template<class T> | |
| Matrix< T > | line::mc::dtmc_transient (const Matrix< T > &P, const std::vector< T > &pi0, std::size_t steps) |
| Trajectory of the law over steps transitions, row k holding pi0 P^k. | |
| template<class T> | |
| Matrix< T > | line::mc::dtmc_transient (const Matrix< T > &P) |
| Uniform initial law and one step, matching the one-argument MATLAB call. | |
| template<class T> | |
| std::vector< T > | line::mc::dtmc_hitting_time (const Matrix< T > &P, const std::vector< std::size_t > &target) |
| Expected number of steps to reach the target set, zero on the target set itself. | |
| template<class T> | |
| UniformizationResult< T > | line::mc::dtmc_uniformization (const std::vector< T > &pi0, const Matrix< T > &P, const T &t, double tol=1e-12, long maxiter=-1) |
| Transient law of a DTMC through the uniformized generator of P. | |
Discrete-time transient distributions, hitting times and uniformization.
Templated port of matlab/src/api/mc/dtmc_transient.m, matlab/src/api/mc/dtmc_hitting_time.m and matlab/lib/kpctoolbox/mc/dtmc_uniformization.m.
dtmc_transient returns the WHOLE trajectory, steps+1 rows with row 0 the initial law, not just the distribution at the last step.
dtmc_hitting_time solves (I - P_TT) h = 1 on the non-target states only. A state that cannot reach the target set makes that system singular, and the right answer there is an INFINITE hitting time, not the least-squares solution of the singular system: the code detects the singularity and reports infinity for the unreachable block rather than a finite fabricated number.
Definition in file dtmc_transient.h.