![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
SolverAUTO (aliases AUTO, SolverAuto, LINE): the solver that picks a solver, a port of matlab/src/solvers/AUTO/@SolverAUTO on a flat Network. More...
#include <line/solvers/solver.h>
Public Member Functions | |
| SolverAUTO (Network &m, const SolverOptions &o=SolverOptions()) | |
| SolverAUTO (Network &m, const std::string &method) | |
| std::string | selected_solver_name () |
| getSelectedSolverName(): the facade name ("MVA", "FLD", ...) of the delegate that answered the last request, or, before any, the one the ranking picks for the mean metrics; "" when no solver is feasible. | |
| std::string | selected_method () |
| getSelectedMethod(): the method FAMILY of that delegate, lowercase ("mva", "fld"). | |
| std::vector< std::string > | candidate_solver_names () const |
| getCandidateSolverNames(): the facade names of the feasible candidates, in slot order. | |
| std::string | choose_solver (const std::string &getter="getAvg") const |
| chooseSolver(getter): the facade name the configured method picks for that getter. | |
| std::vector< std::string > | proposed_solver_names (const std::string &getter="getAvg") const |
| delegate's retry order for that getter, as facade names; the chosen solver comes first. | |
| bool | is_stochastic () |
| isStochastic(): by the delegate that ran, else whether any candidate is a simulator. | |
| bool | is_composite () const |
| isComposite(): false, since this facade holds a flat Network. | |
| std::vector< std::string > | list_all_methods () const |
| listAllMethods(): every method name the constructor accepts, independent of the model. | |
| std::vector< AutoCandidate > | find_solver (const std::string &metric=std::string(), bool show_all=false) const |
| findSolver(metric, showAll): which (family, method) pairs answer metric on this model. | |
| std::vector< io::Citation > | citations () const |
| citations(): the selection policy's references, none. | |
| std::vector< std::vector< CdfCurve > > | cdf_respt () |
| getCdfRespT(), delegated through the 'getCdfRespT' ranking. | |
| TranAvg | tran_avg () |
| getTranAvg(), delegated through the 'getTranAvg' ranking. | |
| double | prob_aggr (std::size_t node, const std::vector< double > &state) |
| getProbAggr(node, state), delegated through the 'getProbAggr' ranking. | |
| SolverCTMC | ctmc_solver () const |
| ctmcSolver(): the SolverCTMC the generator and state-space calls go to, with these options. | |
| SolverFLD | fld_solver () const |
| fldSolver(): the SolverFLD the fluid-only calls go to. | |
| SolverNC | nc_solver () const |
| ncSolver(): the SolverNC the normalizing-constant calls go to. | |
| SolverBA | ba_solver () const |
| baSolver(): the SolverBA the bound calls go to, method 'auto' unless a bound method was named. | |
| Matrix< double > | state_space () |
| Matrix< double > | generator () |
| SymbolicSolution | symbolic_solution () |
| BoundsTable | bounds_table () |
| Public Member Functions inherited from line::NetworkSolver | |
| virtual | ~NetworkSolver () |
| const std::string & | get_name () const |
| getName(): the solver's own name, e.g. | |
| const SolverOptions & | options () const |
| The options this solver was built with. | |
| Network & | model () const |
| The model this solver was built on. | |
| const AvgTable & | avg_table () |
| getAvgTable(): the average table, solving on first demand. | |
| AvgSysTable | avg_sys_table () |
| getAvgSysTable(): per-chain system response time and throughput of the same solve. | |
| AvgMetricTable | avg_qlen_table () |
| getAvgQLenTable(): avg_table()'s Station, JobClass and QLen columns. | |
| AvgMetricTable | avg_util_table () |
| getAvgUtilTable(): avg_table()'s Station, JobClass and Util columns. | |
| AvgMetricTable | avg_respt_table () |
| getAvgRespTTable(): avg_table()'s Station, JobClass and RespT columns. | |
| AvgMetricTable | avg_tput_table () |
| getAvgTputTable(): avg_table()'s Station, JobClass and Tput columns. | |
| std::vector< double > | avg_sys_respt () |
| getAvgSysRespT(): the per-chain system response time column of avg_sys_table. | |
| std::vector< double > | avg_sys_tput () |
| getAvgSysTput(): the per-chain system throughput column of avg_sys_table. | |
| AvgChain | avg_chain () |
| getAvgChain(): the station table of the same solve aggregated by chain, (nstations x nchains). | |
| Matrix< double > | avg_qlen_chain () |
| getAvgQLenChain() and its siblings: one matrix of avg_chain() each. | |
| Matrix< double > | avg_util_chain () |
| Matrix< double > | avg_respt_chain () |
| Matrix< double > | avg_residt_chain () |
| Matrix< double > | avg_arvr_chain () |
| Matrix< double > | avg_tput_chain () |
| AvgChainTable | avg_chain_table () |
| getAvgChainTable(): avg_chain() as a labelled table, one row per (station, chain). | |
| const AvgTable & | run_analyzer () |
| runAnalyzer(): force the solve, returning the table it produced. | |
| std::vector< std::string > | list_valid_methods () const |
| listValidMethods(): the methods this solver advertises on this model. | |
| bool | is_solved () const |
| isSolved() / hasResults(): whether a solve has been performed. | |
| void | reset () |
| reset(): discard the cached solve. | |
| std::string | method_used () |
| getMethodUsed(): the method the solve actually resolved to. | |
| const solvers::CacheMetrics< double > & | cache_metrics () |
| What the same solve observed at each Cache node, the data behind getAvgCacheTable() and getAvgItemTable(). | |
| std::vector< double > | hit_ratio (const std::string &cache) |
| cache.getHitRatio() after the solve: the per-class hit probability at the named Cache, NaN for a class that does not read it. | |
| std::vector< double > | hit_ratio (const Node &cache) |
| std::vector< double > | miss_ratio (const std::string &cache) |
| cache.getMissRatio() after the solve, with hit_ratio's conventions. | |
| std::vector< double > | miss_ratio (const Node &cache) |
| const solvers::FjMetrics< double > & | avg_fj () |
| getAvgFJ(): the fork-join section metrics of the same solve, one row per Fork/Join pair (fj_sorted_pairs), one column per class. | |
| AvgFJTable | avg_fj_table () |
| getAvgFJTable() (aliases getAvgFJT, fjAvgT, aFJT): the same metrics as a labelled table. | |
| AvgFJTable | avg_fjt () |
| AvgFJTable | fj_avg_t () |
Static Public Member Functions | |
| static std::vector< std::string > | selection_intents () |
| selectionIntents(). | |
| static std::vector< std::string > | family_names () |
| familyNames(): the method families, in the order a bare method name is looked up. | |
| static std::vector< std::string > | metric_groups () |
| metricGroups(), metricGroupOf(name) and familyMetrics(family). | |
| static std::string | metric_group_of (const std::string &name) |
| static std::vector< std::string > | family_metrics (const std::string &family) |
| static std::vector< std::string > | feature_set () |
| getFeatureSet(): the union of the feature sets of SolverMVA, NC, CTMC, FLD, MAM, SSA, LDES and JMT, as registry names. | |
| static bool | supports (Network &model) |
| supports(model): whether the model uses only features some family declares. | |
Additional Inherited Members | |
| Protected Member Functions inherited from line::NetworkSolver | |
| NetworkSolver (Network &m, const std::string &name, const SolverOptions &o) | |
| Protected Attributes inherited from line::NetworkSolver | |
| Network * | model_ |
| std::string | name_ |
| SolverOptions | opts_ |
| AvgTable | table_ |
| solvers::CacheMetrics< double > | cache_ |
| solvers::FjMetrics< double > | fj_ |
| bool | solved_ = false |
SolverAUTO (aliases AUTO, SolverAuto, LINE): the solver that picks a solver, a port of matlab/src/solvers/AUTO/@SolverAUTO on a flat Network.
The METHOD is a selection intent (default/auto, heur, exact, sim, fast, accurate, bound), a family ('nc', 'nc.comom'), or a bare method name the first declaring family resolves ('comom' is 'nc.comom'). An intent picks a ranking (chooseSolver), keyed on the getter asked for, whose order is a RETRY LIST (delegate.m): the chosen solver, then every candidate the model's feature set admits. A family names its engine and bypasses the ranking.
WHAT IS DELEGATED. The average family (avg_table and every getter built on it: avg_sys_table, avg_chain*, avg_fj*, the cache ratios), the response-time CDF, the transient mean, the aggregate state probability, and, through the solver the reference names for each, the CTMC state space, generator and symbolic solution and the BA bounds. A getter whose ranked solvers expose no such call in this facade is skipped to the next candidate, never answered by a solver outside the ranking.
The selection policy cites nothing of its own (citations.m passes no method name), so citations() is empty; each delegate's references are its own solver's.
|
explicit |
Definition at line 1788 of file solver_facade.cpp.
References line::autosolver::auto_resolve_token(), line::qn::Network< T >::get_struct(), line::SolverOptions::method, and line::NetworkSolver::NetworkSolver().
Referenced by SolverAUTO().
| line::SolverAUTO::SolverAUTO | ( | Network & | m, |
| const std::string & | method ) |
Definition at line 1799 of file solver_facade.cpp.
References SolverAUTO().
| SolverBA line::SolverAUTO::ba_solver | ( | ) | const |
baSolver(): the SolverBA the bound calls go to, method 'auto' unless a bound method was named.
Definition at line 1959 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::SolverBA::SolverBA().
Referenced by bounds_table().
|
inline |
Definition at line 522 of file solver.h.
References ba_solver(), and line::SolverBA::bounds_table().
| std::vector< std::string > line::SolverAUTO::candidate_solver_names | ( | ) | const |
getCandidateSolverNames(): the facade names of the feasible candidates, in slot order.
Definition at line 1818 of file solver_facade.cpp.
References line::autosolver::auto_candidates(), line::qn::Network< T >::get_struct(), and line::NetworkSolver::model_.
Referenced by is_stochastic().
| std::vector< std::vector< CdfCurve > > line::SolverAUTO::cdf_respt | ( | ) |
getCdfRespT(), delegated through the 'getCdfRespT' ranking.
Definition at line 1884 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, line::SolverCTMC::SolverCTMC(), line::SolverFLD::SolverFLD(), line::SolverJMT::SolverJMT(), and line::SolverLDES::SolverLDES().
| std::string line::SolverAUTO::choose_solver | ( | const std::string & | getter = "getAvg" | ) | const |
chooseSolver(getter): the facade name the configured method picks for that getter.
Definition at line 1825 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::SolverOptions::method, line::NetworkSolver::model_, and line::NetworkSolver::opts_.
Referenced by selected_solver_name().
|
inline |
citations(): the selection policy's references, none.
| SolverCTMC line::SolverAUTO::ctmc_solver | ( | ) | const |
ctmcSolver(): the SolverCTMC the generator and state-space calls go to, with these options.
Definition at line 1947 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::SolverCTMC::SolverCTMC().
Referenced by generator(), state_space(), and symbolic_solution().
|
static |
Definition at line 1978 of file solver_facade.cpp.
References line::autosolver::auto_family_metrics().
|
static |
familyNames(): the method families, in the order a bare method name is looked up.
Definition at line 1968 of file solver_facade.cpp.
Referenced by list_all_methods().
|
static |
getFeatureSet(): the union of the feature sets of SolverMVA, NC, CTMC, FLD, MAM, SSA, LDES and JMT, as registry names.
AG is deliberately absent, as in the reference.
Definition at line 1999 of file solver_facade.cpp.
References line::qn::feature_name().
| std::vector< AutoCandidate > line::SolverAUTO::find_solver | ( | const std::string & | metric = std::string(), |
| bool | show_all = false ) const |
findSolver(metric, showAll): which (family, method) pairs answer metric on this model.
Definition at line 1867 of file solver_facade.cpp.
References line::autosolver::auto_find_solver(), line::qn::Network< T >::get_struct(), line::AutoCandidate::method, line::AutoCandidate::method_class, line::AutoCandidate::metrics, line::NetworkSolver::model_, line::AutoCandidate::reason, line::AutoCandidate::runnable, and line::AutoCandidate::solver.
| SolverFLD line::SolverAUTO::fld_solver | ( | ) | const |
fldSolver(): the SolverFLD the fluid-only calls go to.
Definition at line 1951 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, and line::SolverFLD::SolverFLD().
|
inline |
Definition at line 520 of file solver.h.
References ctmc_solver(), and line::SolverCTMC::generator().
|
inline |
| bool line::SolverAUTO::is_stochastic | ( | ) |
isStochastic(): by the delegate that ran, else whether any candidate is a simulator.
Definition at line 1833 of file solver_facade.cpp.
References candidate_solver_names(), line::AvgTable::method, line::NetworkSolver::solved_, line::AvgTable::solver, and line::NetworkSolver::table_.
| std::vector< std::string > line::SolverAUTO::list_all_methods | ( | ) | const |
listAllMethods(): every method name the constructor accepts, independent of the model.
Definition at line 1842 of file solver_facade.cpp.
References family_names(), line::method_registry::methods(), line::lqns::qnsolver_is_available(), and selection_intents().
|
static |
Definition at line 1974 of file solver_facade.cpp.
References line::autosolver::auto_metric_group_of().
|
static |
metricGroups(), metricGroupOf(name) and familyMetrics(family).
Definition at line 1972 of file solver_facade.cpp.
References line::autosolver::auto_metric_groups().
| SolverNC line::SolverAUTO::nc_solver | ( | ) | const |
ncSolver(): the SolverNC the normalizing-constant calls go to.
Definition at line 1955 of file solver_facade.cpp.
References line::NetworkSolver::model_, and line::NetworkSolver::opts_.
| double line::SolverAUTO::prob_aggr | ( | std::size_t | node, |
| const std::vector< double > & | state ) |
getProbAggr(node, state), delegated through the 'getProbAggr' ranking.
Definition at line 1914 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, line::SolverCTMC::SolverCTMC(), and line::SolverJMT::SolverJMT().
| std::vector< std::string > line::SolverAUTO::proposed_solver_names | ( | const std::string & | getter = "getAvg" | ) | const |
delegate's retry order for that getter, as facade names; the chosen solver comes first.
Definition at line 1829 of file solver_facade.cpp.
References line::qn::Network< T >::get_struct(), line::SolverOptions::method, line::NetworkSolver::model_, and line::NetworkSolver::opts_.
| std::string line::SolverAUTO::selected_method | ( | ) |
getSelectedMethod(): the method FAMILY of that delegate, lowercase ("mva", "fld").
Definition at line 1813 of file solver_facade.cpp.
References selected_solver_name().
| std::string line::SolverAUTO::selected_solver_name | ( | ) |
getSelectedSolverName(): the facade name ("MVA", "FLD", ...) of the delegate that answered the last request, or, before any, the one the ranking picks for the mean metrics; "" when no solver is feasible.
Definition at line 1802 of file solver_facade.cpp.
References choose_solver(), line::NetworkSolver::solved_, line::AvgTable::solver, and line::NetworkSolver::table_.
Referenced by selected_method().
|
static |
selectionIntents().
Definition at line 1964 of file solver_facade.cpp.
Referenced by list_all_methods().
|
inline |
Definition at line 519 of file solver.h.
References ctmc_solver(), and line::SolverCTMC::state_space().
|
static |
supports(model): whether the model uses only features some family declares.
Definition at line 2006 of file solver_facade.cpp.
References line::qn::feature_set_supports(), line::qn::Network< T >::get_struct(), line::NetworkSolver::model(), line::qn::SupportResult::ok, and line::qn::used_lang_features().
|
inline |
Definition at line 521 of file solver.h.
References ctmc_solver(), and line::SolverCTMC::symbolic_solution().
| TranAvg line::SolverAUTO::tran_avg | ( | ) |
getTranAvg(), delegated through the 'getTranAvg' ranking.
Definition at line 1901 of file solver_facade.cpp.
References line::NetworkSolver::model_, line::NetworkSolver::opts_, line::SolverFLD::SolverFLD(), and line::SolverJMT::SolverJMT().