![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The MAP/M/1 FCFS queue, the single-server case of MAP/M/c. More...
#include <cstddef>#include <vector>#include "line/api/mam/map_moment.h"#include "line/api/qsys/qsys_mapmc.h"#include "line/num/number.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| MapMcResult< T > | line::qsys::qsys_mapm1 (const mam::Map< T > &arrival, const T &mu, std::size_t dist_size) |
| MAP/M/1 by the matrix-geometric solution, i.e. | |
| template<class T> | |
| MapMcResult< T > | line::qsys::qsys_mapm1 (const mam::Map< T > &arrival, const T &mu) |
| qsys_mapm1 with 100 materialized levels. | |
The MAP/M/1 FCFS queue, the single-server case of MAP/M/c.
ALGORITHM, AND HOW IT DIFFERS FROM THE MATLAB REFERENCE. matlab/src/api/qsys/qsys_mapm1.m is a one-line wrapper for qsys_mapmc with c = 1, which in turn calls Q-MAM's Q_CT_MAP_M_C, which is not transcribed here. This port keeps the same delegation and calls this port's own qsys_mapmc (see qsys_mapmc.h), which builds the quasi-birth-death process directly: at c = 1 the level blocks are A0 = D1, A1 = D0 - mu I, A2 = mu I with a single boundary level, and R comes from cyclic reduction. Different algorithm, same quantity.
At c = 1 this is also exactly a MAP/MAP/1 queue with an exponential service MAP, so qsys_mapmap1(arrival, {[-mu], [mu]}) must return the same numbers by a completely different route (cyclic reduction on the Kronecker-product QBD rather than cyclic reduction on the arrival-phase QBD). That cross-check is one of the assertions in the test file, and holds to 1e-13.
MEASURED AGREEMENT (MATLAB R2025a, T = double). Metric order is meanQueueLength / meanWaitingTime / meanSojournTime / utilization.
The cross-check against qsys_mapmap1 mentioned above was run on both non-Poisson instances and agrees to 5e-16 on meanQueueLength and meanWaitingTime, which identifies the 1e-9 residuals above as the reference's truncation rather than this port's error.
ARITHMETIC. Gated on num_traits<T>::has_transcendental, inherited from qsys_mapmc: cyclic reduction drives R to a tolerance and never terminates in a finite number of field operations. See qbd_r.h.
Definition in file qsys_mapm1.h.