![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
LINE Agent Language (LAL): shared types and numerical helpers of the SolverMAM LAL paths (python/line_solver/solvers/solver_mam/lal_*.py). More...
#include <algorithm>#include <cmath>#include <cstdio>#include <limits>#include <map>#include <optional>#include <set>#include <string>#include <utility>#include <vector>#include "json.hpp"#include "line/api/mam/mmap_lambda.h"#include "line/api/mc/ctmc_solve.h"#include "line/lang/lal/builder.h"#include "line/lang/lal/core.h"#include "line/lang/lal/ctmc.h"#include "line/util/error.h"#include "line/util/linalg.h"#include "line/util/lu.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::lal::Traffic |
| The traffic dictionary of a MAM result (result.traffic). More... | |
| struct | line::lal::QueueRow |
| One row of getQueueTable(): Agent, QLen, Busy, Util, ArvR, Tput, RespT. More... | |
| struct | line::lal::QueueTable |
| struct | line::lal::MamResult |
| The union of Python's LAL MAM result dataclasses. More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::lal |
Typedefs | |
| typedef std::vector< Matrix< double > > | line::lal::MarkedMatrices |
| A marked process as Python's list [D0, D1, D1_1, ..., D1_K]. | |
LINE Agent Language (LAL): shared types and numerical helpers of the SolverMAM LAL paths (python/line_solver/solvers/solver_mam/lal_*.py).
Python returns one dataclass per lowering (LALQBDResult, LALInfiniteQBDResult, ...). Here a single MamResult derived from lal::Result carries the union of their fields; a field a lowering does not produce stays empty (std::nullopt, an empty vector or a null json), which is what Python's getattr(result, name, default) reads as absent.
Nothing here calls LAPACK. The two places where Python reaches for a spectral routine are replaced by routines that need none: the spectral radius of a NONNEGATIVE matrix (the rate matrix R and the routing matrices) is obtained from Gelfand's formula by log-scaled repeated squaring, and the symmetric eigenvalue test of the count covariances (numpy eigvalsh) uses a cyclic Jacobi iteration.
Definition in file mam_common.h.