![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The stage solver of SolverUQ, named rather than passed. More...
#include <cstddef>#include <string>#include <type_traits>#include <vector>#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/ba/solver_ba_runner.h"#include "line/solvers/ctmc/solver_ctmc_analyzer.h"#include "line/solvers/ctmc/solver_ctmc_waitq.h"#include "line/solvers/fluid/fluid_runner.h"#include "line/solvers/fluid/solver_fluid.h"#include "line/solvers/mam/solver_mam_runner.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/solvers/nc/solver_nc_runner.h"#include "line/solvers/ssa/ssa_dispatch.h"#include "line/solvers/uq/solver_uq.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::uq::UqStageOptions |
| The inner solver's knobs, carried through untranslated. More... | |
Namespaces | |
| namespace | line |
| namespace | line::uq |
Functions | |
| std::vector< std::string > | line::uq::uq_list_stage_solvers () |
| The solver method names uq_stage_solver accepts, for a caller that lists them. | |
| template<class T> | |
| UqStageSolver< T > | line::uq::uq_stage_solver (const UqStageOptions &o) |
| The stage solver named by o.solver. | |
The stage solver of SolverUQ, named rather than passed.
UQ(model, @@SolverMVA) gives the reference a factory; a caller who has a solver NAME – the CLI, a host bridge – needs that name turned into one, and this is where the turning happens. It is separate from solver_uq.h for the reason env_dispatch.h is separate from solver_env.h: the UQ machinery itself depends on nothing but the AvgResult contract, while this file pulls in every Network solver in the port, and a caller that already has a functor should not pay for that.
WHAT EACH TOKEN COSTS, since UQ multiplies it by the design size: mva, nc and ba are closed forms or short iterations; mam, ctmc, ssa and fluid are not, and a 121-point design over two continuous Priors under -s ctmc enumerates the state space 121 times. That is the intended behaviour – each design point IS a different model – and it is why the design cap exists.
THE ARITHMETIC RESTRICTIONS ARE THE INNER SOLVER'S, and they are enforced here at COMPILE time by if constexpr plus a run-time refusal: mam fits phase-type representations, ssa draws exponential clocks and fluid integrates with LSODA, so all three are double-only and an exact or high-precision instantiation of them would fail to compile rather than refuse.
ARVR AND RESIDT ON THE SIMULATION AND FLUID PATHS are filled exactly as line_cli.cpp fills them for -s ssa and -s fluid – residence time equals response time, arrival rate equals throughput except at a Source, which has no arrivals to itself. Those two solution types carry no separate AN/WN matrix, and inventing a different convention here would make the UQ expectation of a column disagree with the same column printed by the solver alone.
Definition in file uq_dispatch.h.