![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Quasi-birth-death processes with rational arrival process components, and the RAP/RAP/1 queue built on top of them. More...
#include <cmath>#include <cstddef>#include <string>#include <vector>#include "line/api/mam/map_moment.h"#include "line/api/mam/map_transform.h"#include "line/api/mam/mmap_lambda.h"#include "line/api/mam/qbd_r.h"#include "line/num/number.h"#include "line/util/eig.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::mam::QbdRapResult< T > |
| Everything qbd_rap returns. More... | |
| struct | line::mam::QbdRapRap1Result< T > |
| Everything qbd_raprap1 returns. More... | |
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T> | |
| QbdRapResult< T > | line::mam::qbd_rap (const Matrix< T > &A0, const Matrix< T > &A1, const Matrix< T > &A2, const Matrix< T > &B0, const Matrix< T > &B1, std::size_t numLevels) |
| Equilibrium analysis of a QBD with RAP components (qbd_rap.m). | |
| template<class T> | |
| QbdRapResult< T > | line::mam::qbd_rap (const Matrix< T > &A0, const Matrix< T > &A1, const Matrix< T > &A2) |
| qbd_rap with the reference defaults, B0 = A0, B1 = A1 and 20 levels. | |
| template<class T> | |
| QbdRapRap1Result< T > | line::mam::qbd_raprap1 (const Map< T > &arrival, const Map< T > &service_in, const T &util) |
| RAP/RAP/1 queue (qbd_raprap1.m). | |
| template<class T> | |
| QbdRapRap1Result< T > | line::mam::qbd_raprap1 (const Map< T > &arrival, const Map< T > &service) |
| qbd_raprap1 without rescaling the service process. | |
Quasi-birth-death processes with rational arrival process components, and the RAP/RAP/1 queue built on top of them.
Templated port of matlab/src/api/mam/qbd_rap.m (including its local qbd_rap_g) and matlab/src/api/mam/qbd_raprap1.m, following N. G. Bean and B. F. Nielsen, "Quasi-Birth-and-Death Processes with Rational Arrival Process Components", Stochastic Models 26(3), 2010, 309-334. The equilibrium construction is their Theorem 7 and the stability test their Corollary 8.
The process is given by its repeating blocks (A0, A1, A2) – A0 up, A1 local, A2 down – and its boundary blocks (B0, B1). Unlike a Markovian QBD the blocks need not be nonnegative; they are only required to be conservative, (A0 + A1 + A2) e = 0 and (B0 + B1) e = 0. The analysis rests on the prediction-process interpretation of a RAP, which is what lets a QBD argument survive the loss of nonnegativity.
Theorem 7, step by step:
COMPUTING G. The blocks are not nonnegative, so logarithmic and cyclic reduction carry no convergence guarantee, and the paper leaves the general case explicitly open (Section 6). Two paths, exactly as in the reference:
DIVERGENCES FROM THE REFERENCE, all in how a quantity is EXTRACTED rather than in what it is, and all tested:
ARITHMETIC. Gated on num_traits<T>::has_transcendental: the general G is a fixed-point iteration plus Newton driven to a tolerance, and Sp(R) is the modulus of an eigenvalue, which is algebraic and not rational. Sp(R) is computed by converting R to double and calling LAPACK (util/eig.h), so at Real<D> the STABILITY GATE is only double-accurate; every returned quantity is computed at the full working precision. The gate is a comparison against 1 - 1e-12 and any model that close to the null-recurrent boundary has an unbounded queue anyway, which is why the precision loss is confined there.
Definition in file qbd_rap.h.