![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Accumulated state probabilities L(t) = int_0^t pi(s) ds of a CTMC by uniformisation (Reibman and Trivedi 1989; Haverkort 1998, section 15.2.4). 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::AccumulatedResult< T > |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::mc |
Functions | |
| template<class T> | |
| AccumulatedResult< T > | line::mc::ctmc_accumulated (const std::vector< T > &pi0, const Matrix< T > &Q, const std::vector< T > &t, double tol=1e-12, long maxiter=-1) |
| Accumulated state probabilities int_0^t pi(s) ds at each time point. | |
| template<class T> | |
| AccumulatedResult< T > | line::mc::ctmc_accumulated (const std::vector< T > &pi0, const Matrix< T > &Q, const T &t, double tol=1e-12, long maxiter=-1) |
| Single time point overload. | |
Accumulated state probabilities L(t) = int_0^t pi(s) ds of a CTMC by uniformisation (Reibman and Trivedi 1989; Haverkort 1998, section 15.2.4).
Templated port of matlab/src/api/mc/ctmc_accumulated.m, twin of jline.api.mc.Ctmc_accumulated and line_solver.api.mc.ctmc.ctmc_accumulated. With P = I + Q/q, q = 1.1 max|q_ii| and Poisson weights w_j at q h,
int_0^h pi0 exp(Q s) ds = (1/q) sum_j (1 - W_j) pi0 P^j, W_j = sum_{i<=j} w_i
so L(t) r is the expected reward accumulated over [0, t] for a rate reward r, and L(t) r / t its time average. Successive time points are marched interval by interval, so a grid costs one series per gap. The series is truncated at the first K whose Poisson tail 1 - W_K is below tol and whose neglected integral mass q h - sum_{j<=K}(1 - W_j) is below tol q h. An interval with q h > 500 is split into equal segments, as in ctmc_uniformization.h, and each segment end is rescaled to the mass of its start so the truncation loss does not compound across segments.
The weights involve exp(-q h): no exact instantiation.
Definition in file ctmc_accumulated.h.