![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of @@SolverMAM/getProb.m and @@SolverMAM/getProbMarg.m: the joint (level, phase) and marginal queue-length distributions at the model's single queue, plus @@SolverMAM/getMAMResult.m, which exposes the matrix-analytic internals themselves. More...
#include <algorithm>#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_assemble.h"#include "line/api/mam/mmapph1fcfs.h"#include "line/api/qsys/qsys_bmapm1.h"#include "line/lang/distribution.h"#include "line/lang/qn/network_struct.h"#include "line/solvers/mam/mam_types.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::mam::ProbTable< T > |
| The joint (level, phase) table getProb returns: rows levels, cols phases. More... | |
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T> | |
| ProbTable< T > | line::mam::solver_mam_getprob (const qn::NetworkStruct< T > &L, const MamOptions &opt, std::size_t node, const mva::AvgResult< T > &avg) |
| Port of @@SolverMAM/getProb.m. | |
| template<class T> | |
| std::vector< T > | line::mam::solver_mam_getprobmarg (const qn::NetworkStruct< T > &L, const MamOptions &opt, std::size_t ist, std::size_t jobclass, const mva::AvgResult< T > &avg) |
| Port of @@SolverMAM/getProbMarg.m: P(n jobs of class jobclass) at station ist, for n = 0..N(jobclass) closed, or over the whole cutoff range open. | |
| template<class T> | |
| qsys::BmapM1Result< T > | line::mam::solver_mam_getmamresult (const qn::NetworkStruct< T > &L) |
| Port of @@SolverMAM/getMAMResult.m: the matrix-analytic internals of a single-queue model, for a BMAP (or MAP) arrival stream into an exponential single server. | |
Port of @@SolverMAM/getProb.m and @@SolverMAM/getProbMarg.m: the joint (level, phase) and marginal queue-length distributions at the model's single queue, plus @@SolverMAM/getMAMResult.m, which exposes the matrix-analytic internals themselves.
THE SINGLE-QUEUE RESTRICTION IS THE REFERENCE'S OWN, and it is stated there in prose: "the MAM solver uses QBD analysis, which is fundamentally a single-queue method". A model with two or more Queue nodes is refused by both, naming SolverCTMC and SolverSSA as the alternatives. The port carries the same gate and the same advice.
WHAT getProb ACTUALLY RETURNS, and why the doc comment matters more than usual here. The reference computes the queue-length MARGINAL and multiplies it by an arrival-weighted average of the service-phase initial vectors:
P(level, phase) ~= P(level) * avgPie(phase)
That is a PRODUCT-FORM APPROXIMATION of the joint law, not the joint law of the QBD, and the reference says so at its line 155 ("For now, approximate by assuming phases are independent of level"). Reproduced exactly, including the fallback to a uniform phase distribution when the weighted average degenerates. The port does not silently improve it: a caller comparing against a CTMC joint distribution needs to know which object this is.
THE CLOSED BRANCH is likewise an approximation the reference is explicit about: the arrival process is a single-phase MMAP built from the CONVERGED PER-CLASS THROUGHPUTS, i.e. a Poisson surrogate at the fixed point, and getProbMarg then reads class r's marginal off the aggregate distribution truncated at N(r). Both are reproduced; neither is repaired.
Definition in file solver_mam_prob.h.