![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The solver API a user writes, spelled as its Python twin. More...
#include <cstddef>#include <functional>#include <string>#include <vector>#include "line/io/line_citations.h"#include "line/lang/qn/network_builder.h"#include "line/solvers/avg_table.h"#include "line/solvers/cache_metrics.h"#include "line/solvers/fj_metrics.h"#include "line/solvers/solver_options.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::AvgChain |
| getAvgChain(): the station x chain matrices, @NetworkSolver/getAvgChain.m's outputs. More... | |
| class | line::StateView |
| One CTMC state as a state-set predicate sees it, the reference's RewardState: the AGGREGATE row of state_space_aggr(), per-(station, class) job counts in (ist-1)*K + k order. More... | |
| struct | line::FirstPassage |
| getCdfFirstPassT(A, B, C, tset): the curve, the reach probabilities and the resolved sets. More... | |
| struct | line::FirstPassageMoments |
| getFirstPassTMoments(A, B, nmax, C): [m, mall, p] with the resolved sets. More... | |
| class | line::NetworkSolver |
| The shared surface of every solver, Python's NetworkSolver. More... | |
| class | line::SolverJMT |
| SolverJMT: the Java Modelling Tools client, which also answers a transient, a response-time law, a state probability and a trajectory. More... | |
| class | line::SolverCTMC |
| SolverCTMC: the average table plus the chain it was computed from. More... | |
| class | line::SolverLDES |
| SolverLDES: the discrete-event simulator, which also answers the empirical response-time law. More... | |
| class | line::SolverFLD |
| SolverFLD: the fluid solver, which also answers a transient. More... | |
| class | line::SolverBA |
| SolverBA: the bounding solver, whose result is a bounds table. More... | |
| struct | line::AutoCandidate |
| One row of SolverAUTO::find_solver: a (family, method) pair and whether this model can run it. More... | |
| class | line::SolverAUTO |
| SolverAUTO (aliases AUTO, SolverAuto, LINE): the solver that picks a solver, a port of matlab/src/solvers/AUTO/@SolverAUTO on a flat Network. More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
Macros | |
| #define | LINE_DECLARE_SOLVER(Cls, tag) |
| Every solver takes the model and either a method name or a full option set, mirroring Python's SolverX(model, method_or_options=None, **kwargs). | |
Typedefs | |
| typedef qn::Network< double > | line::Network |
| Network as a user names it: the double model, Python's Network. | |
| typedef qn::RoutingMatrix< double > | line::RoutingMatrix |
| model.init_routing_matrix()'s type, Python's RoutingMatrix. | |
| typedef std::function< bool(const StateView &)> | line::StatePredicate |
| A STATE SET named by a predicate, the reference's function-handle form, e.g. | |
| typedef SolverMVA | line::MVA |
| typedef SolverNC | line::NC |
| typedef SolverCTMC | line::CTMC |
| typedef SolverSSA | line::SSA |
| typedef SolverFLD | line::FLD |
| typedef SolverFLD | line::SolverFluid |
| typedef SolverMAM | line::MAM |
| typedef SolverJMT | line::JMT |
| typedef SolverLDES | line::LDES |
| typedef SolverAUTO | line::AUTO |
| typedef SolverAUTO | line::SolverAuto |
| typedef SolverAUTO | line::LINE |
| typedef SolverBA | line::BA |
Functions | |
| line::LINE_DECLARE_SOLVER (SolverMVA, "MVA") | |
| line::LINE_DECLARE_SOLVER (SolverNC, "NC") | |
| line::LINE_DECLARE_SOLVER (SolverMAM, "MAM") | |
| line::LINE_DECLARE_SOLVER (SolverSSA, "SSA") | |
The solver API a user writes, spelled as its Python twin.
SolverMVA s(model, "lin"); AvgTable t = s.avg_table();
against Python's
s = MVA(model, method='lin') t = s.avg_table()
NAMING. A multi-word getter drops the get_ prefix (avg_table, tran_avg, cdf_respt), because line_solver/_aliasing.py resolves exactly that spelling onto Python's own getAvgTable/getTranAvg/getCdfRespT; a SINGLE-word getter keeps it (get_name), because that same module deliberately refuses to expand a bare lowercase word and Python has no name(). So every name here is a name that also resolves in Python.
IT IS A FACADE, NOT A SOLVER. Every method forwards to the runner the CLI calls, so a program written against this header and line-cli on the same model answer with the same numbers.
THESE CLASSES ARE double-ONLY AND NOT TEMPLATES, deliberately. The solver templates are a heavy instantiation and the multiprecision arithmetic has no Python counterpart, so the bodies are compiled ONCE into line_mp_api and a translation unit including this header pays for none of it. Reach for line::mva::solver_mva_run_analyzer and its siblings directly when you want another arithmetic.
Definition in file solver.h.
| #define LINE_DECLARE_SOLVER | ( | Cls, | |
| tag ) |
Every solver takes the model and either a method name or a full option set, mirroring Python's SolverX(model, method_or_options=None, **kwargs).