![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The SolverMAM class surface: @@SolverMAM/runAnalyzer.m and the gates around it. More...
#include <algorithm>#include <cmath>#include <string>#include <vector>#include "line/lang/qn/network_struct.h"#include "line/lang/qn/solver_feature_sets.h"#include "line/api/sn/sn_is_discrete_time.h"#include "line/api/sn/sn_nonmarkov_toph.h"#include "line/solvers/mam/mam_dispatch.h"#include "line/solvers/mam/mam_types.h"#include "line/solvers/mam/solver_mam_fj.h"#include "line/solvers/mam/solver_mam_ldqbd_transient.h"#include "line/solvers/mam/solver_mam_passage_time.h"#include "line/solvers/mam/solver_mam_prob.h"#include "line/solvers/mam/solver_mam_transient_qbd.h"#include "line/solvers/mva/solver_mva_runner.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| std::vector< std::string > | line::mam::list_valid_methods () |
| Port of SolverMAM.listValidMethods. | |
| bool | line::mam::rcat_moved_to_ag (const std::string &method, std::string &why) |
| True for the four RCAT names that moved to SolverAG, with the redirect message. | |
| void | line::mam::check_method (const std::string &method) |
| An unlisted method is refused; one that MOVED is redirected by name. | |
| template<class T> | |
| std::string | line::mam::mam_model_method_refusal (const qn::NetworkStruct< T > &L, const std::string &method) |
| check_model_method asked WITHOUT raising: the same verdict as a sentence. | |
| template<class T> | |
| MamSolution< T > | line::mam::solver_mam_solve (const qn::NetworkStruct< T > &L, const MamOptions &opt) |
| The gates and the dispatch of @@SolverMAM/runAnalyzer.m, without the metric filter. | |
| template<class T> | |
| mva::AvgResult< T > | line::mam::solver_mam_run_analyzer (const qn::NetworkStruct< T > &L, const MamOptions &opt) |
| Port of @@SolverMAM/runAnalyzer.m for the lang='matlab' path: solve, then apply the metric filter @@NetworkSolver/getAvg puts between the analyzer and the caller. | |
| template<class T> | |
| ProbTable< T > | line::mam::solver_mam_get_prob (const qn::NetworkStruct< T > &L, const MamOptions &opt, std::size_t node, const mva::AvgResult< T > &avg) |
| @@SolverMAM/getProb.m: the joint (level, phase) table at a node. | |
| template<class T> | |
| std::vector< T > | line::mam::solver_mam_get_prob_marg (const qn::NetworkStruct< T > &L, const MamOptions &opt, std::size_t ist, std::size_t jobclass, const mva::AvgResult< T > &avg) |
| @@SolverMAM/getProbMarg.m: P(n jobs of one class) at a station. | |
| template<class T> | |
| qsys::BmapM1Result< T > | line::mam::solver_mam_get_mam_result (const qn::NetworkStruct< T > &L) |
| @@SolverMAM/getMAMResult.m: the M/G/1-type internals of a single queue. | |
| template<class T> | |
| std::vector< RespTCdf< T > > | line::mam::solver_mam_get_cdf_respt (const qn::NetworkStruct< T > &L, const MamOptions &opt) |
| @@SolverMAM/getCdfRespT.m: the response-time CDF per class. | |
| template<class T> | |
| std::vector< RespTCdf< T > > | line::mam::solver_mam_get_sjrn_t (const qn::NetworkStruct< T > &L, const MamOptions &opt) |
| @@SolverMAM/getSjrnT.m and sjrnT.m, both aliases of getCdfRespT. | |
| template<class T> | |
| bool | line::mam::mam_has_fj_percentiles (const qn::NetworkStruct< T > &L, const MamOptions &opt) |
| Whether getPerctRespT reads the FJ_codes table rather than inverting a CDF. | |
| template<class T> | |
| std::vector< std::vector< T > > | line::mam::solver_mam_get_perct_respt (const qn::NetworkStruct< T > &L, const MamOptions &opt, const std::vector< double > &percentiles) |
| @@SolverMAM/getPerctRespT.m: response-time percentiles per class. | |
| template<class T> | |
| TranResult< T > | line::mam::solver_mam_get_tran_avg (const qn::NetworkStruct< T > &L, const MamOptions &opt_in) |
| Port of @@SolverMAM/getTranAvg.m: transient queue length, utilization and throughput. | |
The SolverMAM class surface: @@SolverMAM/runAnalyzer.m and the gates around it.
Everything that happens BEFORE and AFTER one inner solve lives here: the method whitelist (SolverMAM.listValidMethods), the per-method structural gates (SolverMAM.supportsModelMethod), the process gate, and the metric filter. runAnalyzer's Finite Capacity Region rejection needs no counterpart: the C++ NetworkStruct has no region field, so such a model cannot be built.
THE METRIC FILTER IS SHARED WITH SolverMVA AND SolverNC VERBATIM (filter_metric, sn_get_residt_from_respt, sn_get_arvr_from_tput in solver_mva_runner.h), because @@NetworkSolver/getAvg is solver-independent: it is literally the same code path for all three in the reference.
NON-MARKOVIAN SERVICE IS CONVERTED, NOT REFUSED (since 2026-08-01). solver_mam_analyzer.m:40 runs sn_nonmarkov_toph on its own copy of the struct, and so does solver_mam_solve here: a Gamma, Weibull, Lognormal, Pareto or Uniform is replaced by the two-moment concentrated-ME fit, or by the 20-phase Bernstein density fit under phfit_cme = false, and a Det by a 20-phase Erlang when preserve_det is off. The conversion runs AFTER the slotted test, which would otherwise see a continuous fit where a Geometric was declared. What survives the conversion and still reaches check_processes is NHPP / MAPt / PHt, whose content is a schedule that no homogeneous surrogate can carry, and those are refused by name.
TWO GATES REMAIN STRICTER HERE THAN IN THE REFERENCE, and both are the honest outcome rather than a limitation:
Definition in file solver_mam_runner.h.