LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::autosolver Namespace Reference

Classes

struct  AutoChoice
 What a ranking resolved to, and what it had to skip to get there. More...
struct  AutoEnvChoice
struct  AutoLayeredChoice
struct  AutoToken
 resolveMethodToken, minus the unqualified-algorithm-name arm. More...
struct  AutoTraits
 The structural traits the rankings are keyed on. More...
struct  SolverCandidate
 One row of auto_find_solver: a (family, method) pair this model can be asked for, whether it runs, what kind of answer it returns and which measures it can report. More...

Enumerations

enum class  AutoSolver {
  MVA = 0 , NC , MAM , FLUID ,
  SSA , CTMC , LDES
}
 The Network candidate slots, in the reference's slot order (SolverAUTO.m:41-50), which is also the order the delegate retries in. More...
enum class  AutoLayered {
  LQNS = 0 , LN_NC , LN_MVA , LN_MAM ,
  LN_FLUID
}
 The LayeredNetwork candidate slots (SolverAUTO.m:52-56). More...
enum class  AutoEnv { ENV_MVA = 0 , ENV_NC , ENV_FLUID }
 The Environment candidate slots (SolverAUTO.m:58-60). More...
enum class  AutoMode {
  HEUR , EXACT , SIM , FAST ,
  ACCURATE
}
 The selection intents of SolverAUTO.selectionIntents, less 'bound'. More...

Functions

std::vector< std::string > auto_network_family_names ()
 The method families that solve a flat Network, in SolverAUTO.familyNames' own order – which is also the order an unqualified algorithm name is looked up in, so it is not arbitrary.
std::vector< std::string > auto_method_alias_prefixes (const std::string &family)
 The prefixes under which a family advertises a SECOND SPELLING of a method it already declares plainly.
bool auto_is_method_alias (const std::string &family, const std::string &name, const std::vector< std::string > &declared)
 Is name a second spelling of another method this family declares?
template<class T>
std::vector< std::string > auto_family_methods (const std::string &family, const qn::NetworkStruct< T > &sn)
 The methods a family declares ON THIS MODEL, empty when it declares none.
template<class T>
std::string auto_family_refusal (const std::string &family, const qn::NetworkStruct< T > &sn, const std::string &method)
 Solver.supportsModelMethod for a family method name: may THIS model run THIS method of THIS family?
template<class T>
bool auto_family_supports (const std::string &family, const qn::NetworkStruct< T > &sn, const std::string &method)
std::vector< std::string > auto_metric_groups ()
 The measure groups auto_find_solver reports on, in report order.
std::string auto_metric_group_of (const std::string &name)
 The measure group an accessor belongs to, "" when the name belongs to none.
std::vector< std::string > auto_family_metrics (const std::string &family)
 The measure groups a method family can answer.
bool auto_is_stochastic_method (const std::string &family, const std::string &method)
 Solver.isStochasticMethod for a family method name: does this method return seed-dependent estimates?
std::string auto_method_class (const std::string &family, const std::string &method, bool is_stochastic, bool is_product_form, bool is_qbd_shape, bool has_cache=false)
 What KIND of answer a method returns: "exact", "approx", "bound" or "simulation".
template<class T>
std::vector< SolverCandidateauto_find_solver (const qn::NetworkStruct< T > &sn, const std::string &metric=std::string(), bool show_all=false)
 SolverAUTO.findSolver: which solvers and solver methods can analyze this model, and for the ones that cannot, why not.
template<class T>
std::vector< SolverCandidateauto_find_method (const qn::NetworkStruct< T > &sn, const std::string &metric=std::string(), bool show_all=false)
 Alias of auto_find_solver: the same table, asked for by method.
template<class T>
std::vector< SolverCandidateauto_help (const qn::NetworkStruct< T > &sn, const std::string &metric=std::string(), bool show_all=false)
 Alias of auto_find_solver: what can this model be solved with?
std::string auto_find_solver_table (const std::vector< SolverCandidate > &rows)
 The rows as an aligned text table, the form the CLI and a console caller want.
template<class T>
std::vector< std::string > auto_list_valid_methods (const qn::NetworkStruct< T > &sn)
 SolverAUTO.listValidMethods: every method name this model can be asked for.
const char * auto_solver_name (AutoSolver s)
const char * auto_layered_name (AutoLayered s)
 The layered names are the CLI's own tokens, because that is what the choice is spent on: ln.comom runs the layers under NC and ln.mva under MVA.
const char * auto_env_name (AutoEnv s)
bool auto_solver_is_available (AutoSolver s)
 True when this port has an engine behind the slot at all.
bool auto_layered_is_available (AutoLayered s)
 The LN layer engines are the four --layer-solver takes (mva, nc, fluid, ssa), so there is no MAM-layer engine to select.
bool auto_env_is_available (AutoEnv s)
 SolverENV solves a stage with the fluid analyzer under every coupling but the state-vector one, which uniformizes a CTMC; neither an MVA nor an NC stage solver exists here, so those two slots have no engine.
bool auto_is_selection_intent (const std::string &token)
 SolverAUTO.selectionIntents, less 'bound'.
AutoMode auto_mode_of_token (const std::string &token)
std::string auto_family_alias (const std::string &name)
 SolverAUTO.familyAlias: the canonical family of a method name, or "" when the method name names none.
AutoToken auto_resolve_token (const std::string &raw)
template<class T>
AutoTraits auto_traits (const qn::NetworkStruct< T > &sn)
template<class T>
double auto_ctmc_state_space_logsize (const qn::NetworkStruct< T > &sn, double cutoff=-1.0)
 Worst-case log-size of the CTMC state space induced by sn, summed in log space over the reference's four factors: job placements (stars and bars, per class, open classes truncated at the cutoff, over the stations that keep no ordered buffer), the class-sequence multiplicity of every order-preserving buffer, service phases, and one routing pointer per round-robin (node, class).
template<class T>
bool auto_ctmc_is_tractable (const qn::NetworkStruct< T > &sn, double cutoff=-1.0)
template<class T>
bool auto_supports (AutoSolver s, const qn::NetworkStruct< T > &sn, const std::string &token)
 Solver.supports(model) for a candidate slot, tightened by the two method-level rules a flat feature set cannot express.
template<class T>
bool auto_ranked (const std::vector< AutoSolver > &order, const qn::NetworkStruct< T > &sn, const std::string &token, AutoChoice &out)
 chooseSolverRanked: the first slot in ORDER that exists and accepts the model.
template<class T>
std::vector< AutoSolverauto_candidates (const qn::NetworkStruct< T > &sn)
 The candidate pool in slot order, filtered by supports: what the delegate retries through after the chosen solver fails (SolverAUTO.m:139-147).
template<class T>
AutoChoice auto_choose_avg_solver_ex (const qn::NetworkStruct< T > &sn)
 chooseAvgSolverHeur, the Network arm: exact first at small populations, then the trait-keyed ranking, then the whole pool in the global order.
template<class T>
AutoSolver auto_choose_avg_solver (const qn::NetworkStruct< T > &sn)
template<class T>
AutoChoice auto_choose_solver_heur (const qn::NetworkStruct< T > &sn, const std::string &method)
 chooseNetworkSolver in chooseSolverHeur.m: the getter names the metric family, the family names a ranking, and the average family alone consults the feature tree.
template<class T>
AutoChoice auto_choose_solver_exact (const qn::NetworkStruct< T > &sn, const std::string &method)
 chooseSolverExact: the ranking restricted to solvers that answer exactly.
template<class T>
AutoChoice auto_choose_solver_sim (const qn::NetworkStruct< T > &sn, const std::string &method)
 chooseSolverSim: the ranking restricted to simulators.
template<class T>
AutoChoice auto_choose_solver_mode (const qn::NetworkStruct< T > &sn, const std::string &method, AutoMode mode)
 chooseSolver: the selection mode picks the ranking, and every mode but the two learned ones keeps the heuristic as its floor.
template<class T>
AutoSolver auto_choose_solver (const qn::NetworkStruct< T > &sn, const std::string &method)
 The heuristic Network arm, by getter name.
template<class T>
std::vector< AutoSolverauto_proposed_solvers (const qn::NetworkStruct< T > &sn, const std::string &method, AutoMode mode)
 delegate's proposed order: the chosen solver, then every feasible candidate in slot order.
AutoLayeredChoice auto_choose_layered_solver (const std::string &method, bool has_cache_task, AutoMode mode=AutoMode::HEUR)
 chooseLayeredSolver plus the LayeredNetwork arm of chooseAvgSolverHeur.
AutoEnvChoice auto_choose_env_solver (const std::string &method, AutoMode mode=AutoMode::HEUR)
 The Environment arm of chooseSolverHeur / chooseSolverExact / chooseSolverSim.

Variables

const double kAutoExactPopulationMax = 5.0
 Population at or below which an exact solver is preferred (EXACT_POPULATION_MAX).
const double kAutoCtmcStateCap = 3000000.0
 The cap reachable_space_generator enforces (solver_ctmc.h, maxst).

Enumeration Type Documentation

◆ AutoEnv

enum class line::autosolver::AutoEnv
strong

The Environment candidate slots (SolverAUTO.m:58-60).

Enumerator
ENV_MVA 
ENV_NC 
ENV_FLUID 

Definition at line 106 of file solver_auto.h.

◆ AutoLayered

enum class line::autosolver::AutoLayered
strong

The LayeredNetwork candidate slots (SolverAUTO.m:52-56).

Enumerator
LQNS 
LN_NC 
LN_MVA 
LN_MAM 
LN_FLUID 

Definition at line 103 of file solver_auto.h.

◆ AutoMode

enum class line::autosolver::AutoMode
strong

The selection intents of SolverAUTO.selectionIntents, less 'bound'.

Enumerator
HEUR 
EXACT 
SIM 
FAST 
ACCURATE 

Definition at line 109 of file solver_auto.h.

◆ AutoSolver

enum class line::autosolver::AutoSolver
strong

The Network candidate slots, in the reference's slot order (SolverAUTO.m:41-50), which is also the order the delegate retries in.

There is no JMT slot: the reference removed it as a candidate.

Enumerator
MVA 
NC 
MAM 
FLUID 
SSA 
CTMC 
LDES 

Definition at line 100 of file solver_auto.h.

Function Documentation

◆ auto_candidates()

template<class T>
std::vector< AutoSolver > line::autosolver::auto_candidates ( const qn::NetworkStruct< T > & sn)

The candidate pool in slot order, filtered by supports: what the delegate retries through after the chosen solver fails (SolverAUTO.m:139-147).

Definition at line 591 of file solver_auto.h.

References auto_candidates(), auto_solver_is_available(), auto_supports(), CTMC, FLUID, LDES, MAM, MVA, NC, and SSA.

Referenced by auto_candidates(), and auto_proposed_solvers().

◆ auto_choose_avg_solver()

template<class T>
AutoSolver line::autosolver::auto_choose_avg_solver ( const qn::NetworkStruct< T > & sn)

◆ auto_choose_avg_solver_ex()

template<class T>
AutoChoice line::autosolver::auto_choose_avg_solver_ex ( const qn::NetworkStruct< T > & sn)

chooseAvgSolverHeur, the Network arm: exact first at small populations, then the trait-keyed ranking, then the whole pool in the global order.

The INF branch of avgOrder consults has_homogeneous_scheduling, which is nstations == 1 here and in MATLAB alike; see the header note.

Definition at line 664 of file solver_auto.h.

References auto_choose_avg_solver_ex(), auto_ranked(), auto_traits(), CTMC, FLUID, line::autosolver::AutoTraits::has_cache, kAutoExactPopulationMax, LDES, MAM, MVA, NC, SSA, and line::autosolver::AutoTraits::total_jobs.

Referenced by auto_choose_avg_solver(), auto_choose_avg_solver_ex(), and auto_choose_solver_heur().

◆ auto_choose_env_solver()

AutoEnvChoice line::autosolver::auto_choose_env_solver ( const std::string & method,
AutoMode mode = AutoMode::HEUR )
inline

The Environment arm of chooseSolverHeur / chooseSolverExact / chooseSolverSim.

Fluid leads the heuristic ranking because the blending method is transient: it restarts each stage from the mean state the previous one left, and an inner solver without a transient analysis returns zeros for every blended metric. That is also the only stage engine this port builds.

Definition at line 1036 of file solver_auto.h.

References auto_choose_env_solver(), auto_env_is_available(), ENV_FLUID, ENV_MVA, ENV_NC, EXACT, HEUR, SIM, line::autosolver::AutoEnvChoice::skipped, line::autosolver::AutoEnvChoice::solver, and line::UnsupportedError::UnsupportedError().

Referenced by auto_choose_env_solver().

◆ auto_choose_layered_solver()

AutoLayeredChoice line::autosolver::auto_choose_layered_solver ( const std::string & method,
bool has_cache_task,
AutoMode mode = AutoMode::HEUR )
inline

chooseLayeredSolver plus the LayeredNetwork arm of chooseAvgSolverHeur.

There is no feature-set gate on this path: the reference gates a layered candidate with SolverLN.supports(model), a LayeredNetwork-level check this port does not carry, so availability is the only screen. A cache task is what inverts the analytical order – the cache layer is where NC beats MVA.

Definition at line 977 of file solver_auto.h.

References auto_choose_layered_solver(), EXACT, HEUR, LN_FLUID, LN_MAM, LN_MVA, LN_NC, LQNS, SIM, line::autosolver::AutoLayeredChoice::solver, and line::UnsupportedError::UnsupportedError().

Referenced by auto_choose_layered_solver().

◆ auto_choose_solver()

template<class T>
AutoSolver line::autosolver::auto_choose_solver ( const qn::NetworkStruct< T > & sn,
const std::string & method )

The heuristic Network arm, by getter name.

Definition at line 922 of file solver_auto.h.

References auto_choose_solver(), auto_choose_solver_heur(), and line::autosolver::AutoChoice::solver.

Referenced by auto_choose_solver().

◆ auto_choose_solver_exact()

template<class T>
AutoChoice line::autosolver::auto_choose_solver_exact ( const qn::NetworkStruct< T > & sn,
const std::string & method )

chooseSolverExact: the ranking restricted to solvers that answer exactly.

Definition at line 854 of file solver_auto.h.

References auto_choose_solver_exact(), auto_ranked(), auto_traits(), CTMC, line::autosolver::AutoTraits::has_multi_server, line::autosolver::AutoTraits::is_product_form, LDES, NC, and SSA.

Referenced by auto_choose_solver_exact(), and auto_choose_solver_mode().

◆ auto_choose_solver_heur()

template<class T>
AutoChoice line::autosolver::auto_choose_solver_heur ( const qn::NetworkStruct< T > & sn,
const std::string & method )

chooseNetworkSolver in chooseSolverHeur.m: the getter names the metric family, the family names a ranking, and the average family alone consults the feature tree.

A ranking that yields nothing falls back to the average heuristic, as the reference does, rather than refusing.

Definition at line 800 of file solver_auto.h.

References auto_choose_avg_solver_ex(), auto_choose_solver_heur(), auto_ranked(), CTMC, FLUID, line::InputError::InputError(), LDES, MVA, NC, and SSA.

Referenced by auto_choose_solver(), auto_choose_solver_heur(), and auto_choose_solver_mode().

◆ auto_choose_solver_mode()

template<class T>
AutoChoice line::autosolver::auto_choose_solver_mode ( const qn::NetworkStruct< T > & sn,
const std::string & method,
AutoMode mode )

chooseSolver: the selection mode picks the ranking, and every mode but the two learned ones keeps the heuristic as its floor.

Definition at line 895 of file solver_auto.h.

References ACCURATE, auto_choose_solver_exact(), auto_choose_solver_heur(), auto_choose_solver_mode(), auto_choose_solver_sim(), auto_ranked(), CTMC, EXACT, FAST, FLUID, HEUR, LDES, MAM, MVA, NC, and SIM.

Referenced by auto_choose_solver_mode(), and auto_proposed_solvers().

◆ auto_choose_solver_sim()

template<class T>
AutoChoice line::autosolver::auto_choose_solver_sim ( const qn::NetworkStruct< T > & sn,
const std::string & method )

chooseSolverSim: the ranking restricted to simulators.

Definition at line 880 of file solver_auto.h.

References auto_choose_solver_sim(), auto_ranked(), LDES, and SSA.

Referenced by auto_choose_solver_mode(), and auto_choose_solver_sim().

◆ auto_ctmc_is_tractable()

template<class T>
bool line::autosolver::auto_ctmc_is_tractable ( const qn::NetworkStruct< T > & sn,
double cutoff = -1.0 )

◆ auto_ctmc_state_space_logsize()

template<class T>
double line::autosolver::auto_ctmc_state_space_logsize ( const qn::NetworkStruct< T > & sn,
double cutoff = -1.0 )

Worst-case log-size of the CTMC state space induced by sn, summed in log space over the reference's four factors: job placements (stars and bars, per class, open classes truncated at the cutoff, over the stations that keep no ordered buffer), the class-sequence multiplicity of every order-preserving buffer, service phases, and one routing pointer per round-robin (node, class).

cutoff negative selects the analyzer's own default for open and mixed models, ceil(6000^(1/(M*K))).

MATLAB reads sn.phasessz; this port reads phases_of, which is the same quantity floored at one – a single-phase representation contributes no factor either way.

Definition at line 395 of file solver_auto.h.

References auto_ctmc_state_space_logsize().

Referenced by auto_ctmc_is_tractable(), and auto_ctmc_state_space_logsize().

◆ auto_env_is_available()

bool line::autosolver::auto_env_is_available ( AutoEnv s)
inline

SolverENV solves a stage with the fluid analyzer under every coupling but the state-vector one, which uniformizes a CTMC; neither an MVA nor an NC stage solver exists here, so those two slots have no engine.

Definition at line 187 of file solver_auto.h.

References auto_env_is_available(), and ENV_FLUID.

Referenced by auto_choose_env_solver(), and auto_env_is_available().

◆ auto_env_name()

const char * line::autosolver::auto_env_name ( AutoEnv s)
inline

Definition at line 142 of file solver_auto.h.

References auto_env_name(), ENV_FLUID, ENV_MVA, and ENV_NC.

Referenced by auto_env_name().

◆ auto_family_alias()

std::string line::autosolver::auto_family_alias ( const std::string & name)
inline

SolverAUTO.familyAlias: the canonical family of a method name, or "" when the method name names none.

A family method name is not a selection intent – it asks for a named engine and bypasses the ranking, as -s auto --method nc.comom does.

Definition at line 222 of file solver_auto.h.

References auto_family_alias().

Referenced by auto_family_alias(), and auto_resolve_token().

◆ auto_family_methods()

template<class T>
std::vector< std::string > line::autosolver::auto_family_methods ( const std::string & family,
const qn::NetworkStruct< T > & sn )

The methods a family declares ON THIS MODEL, empty when it declares none.

The registries are asked rather than copied: mva::list_valid_methods and ba::list_valid_methods take the struct and narrow themselves, and a second copy of either shape rule here is how the two drift apart.

Definition at line 234 of file auto_methods.h.

References auto_family_methods(), line::fluid::fluid_list_valid_methods(), line::jmt::jmt_list_valid_methods(), line::ag::list_valid_methods(), line::ba::list_valid_methods(), line::ctmc::list_valid_methods(), line::ldes::list_valid_methods(), line::mam::list_valid_methods(), line::mva::list_valid_methods(), line::nc::list_valid_methods(), line::qns::list_valid_methods(), and line::ssa::list_valid_methods().

Referenced by auto_family_methods(), and auto_find_solver().

◆ auto_family_metrics()

std::vector< std::string > line::autosolver::auto_family_metrics ( const std::string & family)
inline

The measure groups a method family can answer.

Every family answers "avg", which is what a solver is for; the rest is the capability declaration this header owns.

SOURCES, so that a claim here can be checked rather than trusted: "tran" is the reference's supportsTransientAnalysis, which FLD, CTMC, LDES and JMT override to true and no one else does. "cdf", "prob", "tranprob" and "sample" are the families that carry an implementation of the corresponding accessor rather than inheriting the base refusal. The remaining five groups are computed from a solver's own results, so no per-solver entry point marks them: their lists are the reference chooseSolverHeur's rankings for the same accessors, which is where AUTO already records who can serve them.

A family that gains or loses a measure must be edited here in the same change, the way a solver that gains a feature is edited into its feature set: an omission here does not fail, it silently hides the family from a caller asking for that measure.

Definition at line 525 of file auto_methods.h.

References auto_family_metrics().

Referenced by auto_family_metrics(), and auto_find_solver().

◆ auto_family_refusal()

template<class T>
std::string line::autosolver::auto_family_refusal ( const std::string & family,
const qn::NetworkStruct< T > & sn,
const std::string & method )

Solver.supportsModelMethod for a family method name: may THIS model run THIS method of THIS family?

The seven ranked slots defer to auto_supports, which is the same call chooseSolverRanked makes and already carries the product-form rule, the CTMC state-space screen and the LDES engine probe. The three families with no slot are gated on their own declared set, since they are reachable by explicit token and by no ranking.

Definition at line 261 of file auto_methods.h.

References auto_family_refusal(), auto_solver_is_available(), auto_solver_name(), auto_supports(), CTMC, line::qn::feature_set_supports(), line::fluid::fluid_qsys_horizon_supports(), line::jmt::jmt_method_refusal(), line::mam::mam_model_method_refusal(), line::ba::method_refusal(), line::qns::method_refusal(), MVA, NC, line::nc::nc_method_refusal(), line::qn::SupportResult::ok, line::qn::SupportResult::reason, line::qn::sn_fj_supports(), line::ctmc::solver_ctmc_cftp_supports(), line::ctmc::solver_ctmc_mdd_supports(), and line::qn::used_lang_features().

Referenced by auto_family_refusal(), auto_family_supports(), and auto_find_solver().

◆ auto_family_supports()

template<class T>
bool line::autosolver::auto_family_supports ( const std::string & family,
const qn::NetworkStruct< T > & sn,
const std::string & method )

Definition at line 396 of file auto_methods.h.

References auto_family_refusal(), and auto_family_supports().

Referenced by auto_family_supports().

◆ auto_find_method()

template<class T>
std::vector< SolverCandidate > line::autosolver::auto_find_method ( const qn::NetworkStruct< T > & sn,
const std::string & metric = std::string(),
bool show_all = false )

Alias of auto_find_solver: the same table, asked for by method.

Definition at line 771 of file auto_methods.h.

References auto_find_method(), and auto_find_solver().

Referenced by auto_find_method().

◆ auto_find_solver()

template<class T>
std::vector< SolverCandidate > line::autosolver::auto_find_solver ( const qn::NetworkStruct< T > & sn,
const std::string & metric = std::string(),
bool show_all = false )

SolverAUTO.findSolver: which solvers and solver methods can analyze this model, and for the ones that cannot, why not.

THE GATE IS NOT A SECOND ONE. It is auto_family_supports, the gate auto_choose_solver applies before delegating, asked of every candidate instead of of the first feasible one – which is exactly what auto_list_valid_methods already did; that function is now the method column of the runnable rows, so the two cannot disagree. What is new is that the REASON is kept rather than discarded, and that the answer carries the two facts a caller needs in order to choose among the survivors: whether the method is exact on this model, and which measures it can report.

metric narrows the report to the pairs that answer one measure, named either by its group ("cdf") or by the accessor that returns it ("getCdfRespT"); "" or "any" keeps every pair. show_all keeps the refused pairs too; by default only the runnable ones are listed, since a caller asking what it can run has no use for the rows that say it cannot.

Definition at line 689 of file auto_methods.h.

References auto_family_methods(), auto_family_metrics(), auto_family_refusal(), auto_find_solver(), auto_is_method_alias(), auto_is_stochastic_method(), auto_method_class(), auto_metric_group_of(), auto_metric_groups(), auto_network_family_names(), line::InputError::InputError(), line::qn::NodeDef::nodetype, line::qn::Station< T >::nodetype, and line::lang::Source.

Referenced by auto_find_method(), auto_find_solver(), auto_help(), auto_list_valid_methods(), and find_solver_report().

◆ auto_find_solver_table()

std::string line::autosolver::auto_find_solver_table ( const std::vector< SolverCandidate > & rows)
inline

The rows as an aligned text table, the form the CLI and a console caller want.

The reason column is last and unpadded, since it is the only one whose width is unbounded.

Definition at line 790 of file auto_methods.h.

References auto_find_solver_table().

Referenced by auto_find_solver_table(), and find_solver_report().

◆ auto_help()

template<class T>
std::vector< SolverCandidate > line::autosolver::auto_help ( const qn::NetworkStruct< T > & sn,
const std::string & metric = std::string(),
bool show_all = false )

Alias of auto_find_solver: what can this model be solved with?

Definition at line 779 of file auto_methods.h.

References auto_find_solver(), and auto_help().

Referenced by auto_help().

◆ auto_is_method_alias()

bool line::autosolver::auto_is_method_alias ( const std::string & family,
const std::string & name,
const std::vector< std::string > & declared )
inline

Is name a second spelling of another method this family declares?

The remainder has to be declared too, which is what keeps the rule from eating a genuine method that merely starts with the prefix: it is an alias only when the thing it aliases is there beside it.

Definition at line 147 of file auto_methods.h.

References auto_is_method_alias(), and auto_method_alias_prefixes().

Referenced by auto_find_solver(), and auto_is_method_alias().

◆ auto_is_selection_intent()

bool line::autosolver::auto_is_selection_intent ( const std::string & token)
inline

SolverAUTO.selectionIntents, less 'bound'.

'bound' IS accepted, but it is not a ranking mode: the reference sets selectionMode='bound' and options.method='auto', i.e. it names SolverBA outright. auto_resolve_token therefore rewrites it to the 'ba' family before this test runs, which is why it is absent here.

Definition at line 201 of file solver_auto.h.

References auto_is_selection_intent().

Referenced by auto_is_selection_intent(), and auto_resolve_token().

◆ auto_is_stochastic_method()

bool line::autosolver::auto_is_stochastic_method ( const std::string & family,
const std::string & method )
inline

Solver.isStochasticMethod for a family method name: does this method return seed-dependent estimates?

SSA and LDES are simulators outright; JMT is one except through its analytical JMVA engine, whose own sampling variants are stochastic again; NC has the Monte Carlo, importance-sampling and MCMC routes, and answers for itself through nc::is_stochastic_method rather than through a second copy of that token list here.

Definition at line 555 of file auto_methods.h.

References auto_is_stochastic_method(), and line::nc::is_stochastic_method().

Referenced by auto_find_solver(), and auto_is_stochastic_method().

◆ auto_layered_is_available()

bool line::autosolver::auto_layered_is_available ( AutoLayered s)
inline

The LN layer engines are the four --layer-solver takes (mva, nc, fluid, ssa), so there is no MAM-layer engine to select.

LQNS IS AVAILABLE ONLY WHERE ITS BINARY IS. That makes this choice machine-dependent, and deliberately so: chooseAvgSolverHeur.m gates its LQNS candidate on SolverLQNS.isAvailable() for the same reason, because LINE ships no LQNS binary. A port that answered "never" here would silently disagree with the reference on every machine that has one installed.

Definition at line 177 of file solver_auto.h.

References auto_layered_is_available(), LN_MAM, LQNS, and line::lqns::lqns_is_available().

Referenced by auto_layered_is_available().

◆ auto_layered_name()

const char * line::autosolver::auto_layered_name ( AutoLayered s)
inline

The layered names are the CLI's own tokens, because that is what the choice is spent on: ln.comom runs the layers under NC and ln.mva under MVA.

Definition at line 131 of file solver_auto.h.

References auto_layered_name(), LN_FLUID, LN_MAM, LN_MVA, LN_NC, and LQNS.

Referenced by auto_layered_name().

◆ auto_list_valid_methods()

template<class T>
std::vector< std::string > line::autosolver::auto_list_valid_methods ( const qn::NetworkStruct< T > & sn)

SolverAUTO.listValidMethods: every method name this model can be asked for.

The selection intents come first and unconditionally: they name a RANKING and not an algorithm, and finding a family that supports the model is the ranking's own job. bound is the one that is not quite a ranking – it names SolverBA with method 'auto' – and it is listed unconditionally all the same, because MATLAB and the JAR list it that way and a caller reading 'bound' as "give me bounds" should get SolverBA's own refusal rather than a missing method name. Then each family in auto_network_family_names order, bare method name first and its qualified methods after it.

Definition at line 824 of file auto_methods.h.

References auto_find_solver(), and auto_list_valid_methods().

Referenced by auto_list_valid_methods(), and line::NetworkSolver::list_valid_methods().

◆ auto_method_alias_prefixes()

std::vector< std::string > line::autosolver::auto_method_alias_prefixes ( const std::string & family)
inline

The prefixes under which a family advertises a SECOND SPELLING of a method it already declares plainly.

THIS IS A DECLARATION, not a derivation, and belongs beside auto_family_metrics and auto_method_class for the same reason: the knowledge lives in the solver's own dispatch (the mva registry strips a leading "amva." before selecting an algorithm) and nothing exposes it, so a family that gains or loses an alias spelling must be edited into all four copies in the SAME change. An omission does not fail; it puts the same algorithm in the report twice.

Definition at line 135 of file auto_methods.h.

References auto_method_alias_prefixes().

Referenced by auto_is_method_alias(), and auto_method_alias_prefixes().

◆ auto_method_class()

std::string line::autosolver::auto_method_class ( const std::string & family,
const std::string & method,
bool is_stochastic,
bool is_product_form,
bool is_qbd_shape,
bool has_cache = false )
inline

What KIND of answer a method returns: "exact", "approx", "bound" or "simulation".

"simulation" is not decided here: is_stochastic is the solver's own verdict, which already tokenizes qualified and runtime-resolved names.

"exact" IS CLAIMED ONLY WHERE IT IS TRUE OF THIS MODEL, never of the algorithm in the abstract. Exactness of a normalizing constant or of mean value analysis is a property of the product-form model it is computed on, and of the QBD shape for the matrix analytic methods, so both conditions are passed in and a method that needs one reports "approx" without it. The bias is deliberate: an under-claimed "approx" costs a user a better method they could have had, an over-claimed "exact" costs them a wrong number they trusted.

A CACHE IS THE THIRD CONDITION, and it was the over-claim the bias above exists to prevent. has_product_form answers about the QUEUEING network and knows nothing of a cache: the hit/miss split is a class switch whose probabilities are not routing data but the output of a cache model, so a network holding one reads as product form and "mva.exact" was labelled exact on it. Measured on the tut06 shape with an LRU cache: exact MVA returns QLen 0.2516 at the hit station where the CTMC returns 0.3022 and simulation 0.3023, a 17% error under a label that says there is none. The analytic families are conditioned on it; SolverCTMC is NOT, because its state space carries the cache contents and it is exact there, which is what the two numbers show.

Definition at line 612 of file auto_methods.h.

References auto_method_class().

Referenced by auto_find_solver(), and auto_method_class().

◆ auto_metric_group_of()

std::string line::autosolver::auto_metric_group_of ( const std::string & name)
inline

The measure group an accessor belongs to, "" when the name belongs to none.

A group name maps to itself, so auto_find_solver(sn, "cdf") and auto_find_solver(sn, "getCdfRespT") ask the same question.

THIS IS NOT auto_choose_solver'S TABLE, although both are keyed by accessor name. That one maps an accessor to a RANKING, i.e. which candidate should be preferred; this one maps it to a CAPABILITY question, i.e. which candidates can answer it at all. The two differ wherever a family can serve a measure but is never the one AUTO would pick for it.

Definition at line 463 of file auto_methods.h.

References auto_metric_group_of(), and auto_metric_groups().

Referenced by auto_find_solver(), and auto_metric_group_of().

◆ auto_metric_groups()

std::vector< std::string > line::autosolver::auto_metric_groups ( )
inline

The measure groups auto_find_solver reports on, in report order.

A group is a family of accessors that stand or fall together: a solver that returns getCdfRespT returns getCdfPassT and getPerctRespT as well, because all three read the same passage time, so listing the three separately would say nothing extra.

Definition at line 432 of file auto_methods.h.

References auto_metric_groups().

Referenced by auto_find_solver(), auto_metric_group_of(), and auto_metric_groups().

◆ auto_mode_of_token()

AutoMode line::autosolver::auto_mode_of_token ( const std::string & token)
inline

◆ auto_network_family_names()

std::vector< std::string > line::autosolver::auto_network_family_names ( )
inline

The method families that solve a flat Network, in SolverAUTO.familyNames' own order – which is also the order an unqualified algorithm name is looked up in, so it is not arbitrary.

"ag" SITS AFTER "mam", whose RCAT names it took over, and is a family for the METHOD NAME and REPORT tables only: --method ag.inap and the model help reach SolverAG through it. It is deliberately NOT one of the ranked AutoSolver slots and NOT in the feature-set union the automatic ranking takes, so a G-network is still refused by "default" and has to be asked for by name; see _kb/06-solver-catalog.md, "SolverAG owns the RCAT methods".

Definition at line 119 of file auto_methods.h.

References auto_network_family_names().

Referenced by auto_find_solver(), and auto_network_family_names().

◆ auto_proposed_solvers()

template<class T>
std::vector< AutoSolver > line::autosolver::auto_proposed_solvers ( const qn::NetworkStruct< T > & sn,
const std::string & method,
AutoMode mode )

delegate's proposed order: the chosen solver, then every feasible candidate in slot order.

Duplicates are dropped, since the reference retries the chosen solver only once in practice.

Definition at line 932 of file solver_auto.h.

References auto_candidates(), auto_choose_solver_mode(), auto_proposed_solvers(), and line::autosolver::AutoChoice::solver.

Referenced by auto_proposed_solvers().

◆ auto_ranked()

template<class T>
bool line::autosolver::auto_ranked ( const std::vector< AutoSolver > & order,
const qn::NetworkStruct< T > & sn,
const std::string & token,
AutoChoice & out )

chooseSolverRanked: the first slot in ORDER that exists and accepts the model.

Returns false when none qualifies, so the caller can fall back.

Definition at line 569 of file solver_auto.h.

References auto_ranked(), auto_solver_is_available(), auto_supports(), line::autosolver::AutoChoice::method, line::autosolver::AutoChoice::skipped, and line::autosolver::AutoChoice::solver.

Referenced by auto_choose_avg_solver_ex(), auto_choose_solver_exact(), auto_choose_solver_heur(), auto_choose_solver_mode(), auto_choose_solver_sim(), and auto_ranked().

◆ auto_resolve_token()

◆ auto_solver_is_available()

bool line::autosolver::auto_solver_is_available ( AutoSolver s)
inline

True when this port has an engine behind the slot at all.

THE LDES SLOT IS MACHINE-DEPENDENT, like the LQNS one below and for the same reason: the simulator is a client of an engine LINE ships beside the binary (common/ldes, common/ldes.jar), and ldes_is_available answers whether this machine has one. A port that answered "never" would silently disagree with the reference wherever the engine IS present – LDES leads the loss-metric, aggregate-sampling and sim rankings, so the disagreement would be a different engine answering, not a missing option.

Definition at line 162 of file solver_auto.h.

References auto_solver_is_available(), LDES, and line::ldes::ldes_is_available().

Referenced by auto_candidates(), auto_family_refusal(), auto_ranked(), auto_solver_is_available(), and auto_supports().

◆ auto_solver_name()

const char * line::autosolver::auto_solver_name ( AutoSolver s)
inline

Definition at line 114 of file solver_auto.h.

References auto_solver_name(), CTMC, FLUID, LDES, MAM, MVA, NC, and SSA.

Referenced by auto_family_refusal(), auto_solver_name(), and auto_supports().

◆ auto_supports()

template<class T>
bool line::autosolver::auto_supports ( AutoSolver s,
const qn::NetworkStruct< T > & sn,
const std::string & token )

Solver.supports(model) for a candidate slot, tightened by the two method-level rules a flat feature set cannot express.

method name is the method the slot would run: "" or "default" for the solver's own default, "exact" for the exactness-gated request.

Definition at line 516 of file solver_auto.h.

References auto_ctmc_is_tractable(), auto_solver_is_available(), auto_solver_name(), auto_supports(), CTMC, line::qn::ctmc_feature_set(), line::qn::feature_set_supports(), FLUID, line::qn::fluid_feature_set(), LDES, line::qn::ldes_feature_set(), MAM, line::qn::mam_feature_set(), MVA, line::qn::mva_feature_set(), NC, line::qn::nc_feature_set(), line::qn::Station< T >::sched, SSA, line::qn::ssa_feature_set(), and line::qn::used_lang_features().

Referenced by auto_candidates(), auto_family_refusal(), auto_ranked(), and auto_supports().

◆ auto_traits()

Variable Documentation

◆ kAutoCtmcStateCap

const double line::autosolver::kAutoCtmcStateCap = 3000000.0

The cap reachable_space_generator enforces (solver_ctmc.h, maxst).

It is this port's budget, standing in for the reference's memory model.

Definition at line 497 of file solver_auto.h.

Referenced by auto_ctmc_is_tractable().

◆ kAutoExactPopulationMax

const double line::autosolver::kAutoExactPopulationMax = 5.0

Population at or below which an exact solver is preferred (EXACT_POPULATION_MAX).

Definition at line 112 of file solver_auto.h.

Referenced by auto_choose_avg_solver_ex().