![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of solver_ctmc_analyzer.m and the parts of @@SolverCTMC/runAnalyzer.m that surround one solve: the method gate, the open-model CUTOFF, the state space and synchronization construction, the stationary solve with its reducible-generator handling, and the mapping onto the AvgTable columns. More...
#include "line/util/line_console.h"#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <map>#include <string>#include <vector>#include "line/api/mc/ctmc_memory_gate.h"#include "line/api/mc/ctmc_solve.h"#include "line/api/mc/ctmc_state_space_logsize.h"#include "line/api/fes/fes_aggregate.h"#include "line/api/fes/fes_compute_metrics.h"#include "line/api/sn/sn_aggregate_chains.h"#include "line/lang/qn/fj_tag.h"#include "line/api/sn/sn_nonmarkov_toph.h"#include "line/lang/qn/network_struct.h"#include "line/lang/qn/solver_feature_sets.h"#include "line/lang/qn/state.h"#include "line/lang/qn/state_events.h"#include "line/solvers/cache_metrics.h"#include "line/solvers/ctmc/ctmc_stationary.h"#include "line/solvers/ctmc/solver_ctmc.h"#include "line/solvers/ctmc/solver_ctmc_fcr.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/solvers/tr/fj_tag_transform.h"#include "line/solvers/tr/transform_solve.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::ctmc::CtmcOptions |
| The SolverCTMC knobs this port honours. More... | |
| struct | line::ctmc::CtmcSolution< T > |
| Everything one CTMC solve produces. More... | |
Namespaces | |
| namespace | line |
| namespace | line::ctmc |
Functions | |
| std::vector< std::string > | line::ctmc::list_valid_methods () |
| Port of SolverCTMC.listValidMethods. | |
| bool | line::ctmc::is_stateless_method (const std::string &method) |
| True for a method whose analyzer is not the explicit-generator one. | |
| void | line::ctmc::check_method (const std::string &method) |
| Port of runAnalyzerChecks' method gate. | |
| std::string | line::ctmc::method_fallback_warning (const std::string &method) |
| The reference's fallback warning, or empty when the method needs none. | |
| template<class T> | |
| void | line::ctmc::ctmc_check_support (const NetworkStruct< T > &sn) |
| Refuse the constructs this port generates a chain for but does not MODEL. | |
| template<class T> | |
| CtmcSolution< T > | line::ctmc::solve_struct (const NetworkStruct< T > &sn_in, const CtmcOptions &opt, const std::vector< qn::FjSync< T > > &fjsync) |
| Build the chain of ONE struct, solve it, reduce it. | |
| template<class T> | |
| CtmcSolution< T > | line::ctmc::solver_ctmc_analyzer (const NetworkStruct< T > &sn_in, const CtmcOptions &opt) |
| Port of solver_ctmc_analyzer.m plus the fork-join wrapper of @@SolverCTMC/runAnalyzer.m. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_avg_table (const NetworkStruct< T > &sn, const CtmcSolution< T > &d, const std::string &method) |
| Port of @@SolverCTMC/runAnalyzer.m's result assembly: solve, then apply the metric filter @@NetworkSolver/getAvg puts between the analyzer and the caller, so the table is the same shape SolverMVA and SolverNC print. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_run_analyzer (const NetworkStruct< T > &sn, const CtmcOptions &opt) |
| Solve and format in one call, for a caller with no use for the chain. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_chain_aggregation (const NetworkStruct< T > &sn, const CtmcOptions &opt) |
| Solve the CHAIN-AGGREGATED model and map its metrics back to the classes. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_load_concealment (const NetworkStruct< T > &sn, const CtmcOptions &opt) |
| Solve by LOAD CONCEALMENT, the iterated transformation. | |
| template<class T> | |
| mva::AvgResult< T > | line::ctmc::solver_ctmc_fes_aggregation (const NetworkStruct< T > &sn, const CtmcOptions &opt) |
| Solve with a station subset replaced by a FLOW-EQUIVALENT SERVER, then recover the collapsed stations' own metrics by conditioning. | |
Variables | |
| constexpr std::size_t | line::ctmc::CTMC_DEFAULT_CUTOFF = 10 |
| SolverOptions.m:107: the per-class state-space cutoff SolverCTMC defaults an open or mixed model to. | |
Port of solver_ctmc_analyzer.m and the parts of @@SolverCTMC/runAnalyzer.m that surround one solve: the method gate, the open-model CUTOFF, the state space and synchronization construction, the stationary solve with its reducible-generator handling, and the mapping onto the AvgTable columns.
WHAT THE CUTOFF IS, AND WHY IT IS NOT A TOLERANCE. A closed class carries its own population, so its lattice is finite. An open class does not, so the chain is infinite and the reference TRUNCATES it at options.cutoff jobs per class. The answer is therefore the exact stationary law of a DIFFERENT chain, one the truncation defined, and it converges to the model's only as the cutoff grows. That is why the reference prints a warning on every open model and why the banner here reports the cutoff it used: a CTMC number for an open model is not a number without it.
REDUCIBILITY. space_generator enumerates every state the ENCODING admits, and the dynamics need not reach all of them; the generator is then reducible and pi is not unique. The reference resolves this by keeping the weakly connected component of the INITIAL state, and falling back to the largest component when the initial state is not in the space at all. Solving the whole generator instead – which is what ctmc_solve does on its own, splitting per component and renormalizing – spreads mass over states the model can never occupy and moves every reported mean.
Definition in file solver_ctmc_analyzer.h.