![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The PH/PH/1 FCFS queue. More...
#include <cstddef>#include <vector>#include "line/api/qsys/qsys_mapmap1.h"#include "line/api/qsys/qsys_mapph1.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| MapMap1Result< T > | line::qsys::qsys_phph1 (const std::vector< T > &alpha, const Matrix< T > &Tm, const std::vector< T > &beta, const Matrix< T > &S, std::size_t dist_size) |
| PH/PH/1 by the exact QBD solution of the equivalent MAP/MAP/1 queue. | |
| template<class T> | |
| MapMap1Result< T > | line::qsys::qsys_phph1 (const std::vector< T > &alpha, const Matrix< T > &Tm, const std::vector< T > &beta, const Matrix< T > &S) |
| qsys_phph1 with 100 materialized levels, the reference's numQLProbs. | |
The PH/PH/1 FCFS queue.
ALGORITHM, AND HOW IT DIFFERS FROM THE MATLAB REFERENCE. matlab/src/api/qsys/qsys_phph1.m converts the arrival PH to a MAP and then calls BUTools' MMAPPH1FCFS, which is not transcribed here. This port computes the SAME quantities from the port's own QBD machinery. Both the arrival PH (alpha, T) and the service PH (beta, S) become renewal MAPs,
arrival: D0 = T, D1 = (-T e) alpha, service: D0 = S, D1 = (-S e) beta,
and the resulting MAP/MAP/1 queue is solved as the level-independent QBD described in qsys_mapmap1.h. Different algorithm, same quantity. Both processes are renewal by construction, so the reference and the port model the identical stochastic system; only the numerical route differs.
MEASURED AGREEMENT (MATLAB R2025a, T = double). Metric order is meanQueueLength / meanWaitingTime / meanSojournTime / utilization.
The port reproduces the BUTools reference to machine precision throughout this family; the residual is the reference's own rounding, not a truncation, because these level distributions decay fast enough that the reference's numQLProbs = 100 cutoff is not visible. The slower-decaying instances in qsys_mapph1.h expose the reference's truncation floor instead.
ARITHMETIC. Gated on num_traits<T>::has_transcendental, inherited from qsys_mapmap1 and ultimately from the cyclic reduction that produces R; see qbd_r.h. The two PH-to-MAP conversions are exact matrix algebra.
Definition in file qsys_phph1.h.