![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The shared surface of every solver, Python's NetworkSolver. More...
#include <line/solvers/solver.h>
Public Member Functions | |
| 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. | |
| const AvgTable & | avg_sys_table () |
| getAvgSysTable(): the per-class system columns of the same solve. | |
| 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. | |
Protected Member Functions | |
| NetworkSolver (Network &m, const std::string &name, const SolverOptions &o) | |
Protected Attributes | |
| Network * | model_ |
| std::string | name_ |
| SolverOptions | opts_ |
| AvgTable | table_ |
| bool | solved_ = false |
The shared surface of every solver, Python's NetworkSolver.
The solve is performed on first demand and cached, which is what hasResults/is_solved reports; reset() discards it.
|
inlinevirtual |
|
inlineprotected |
Definition at line 90 of file solver.h.
References model_, name_, and opts_.
Referenced by line::SolverBA::SolverBA(), line::SolverBA::SolverBA(), line::SolverCTMC::SolverCTMC(), line::SolverCTMC::SolverCTMC(), line::SolverFLD::SolverFLD(), and line::SolverFLD::SolverFLD().
|
inline |
getAvgSysTable(): the per-class system columns of the same solve.
Definition at line 77 of file solver.h.
References avg_table().
| const AvgTable & line::NetworkSolver::avg_table | ( | ) |
getAvgTable(): the average table, solving on first demand.
Definition at line 231 of file solver_facade.cpp.
References line::mva::AvgResult< T >::actualmethod, line::jmt::JmtResult< T >::avg, line::SolverOptions::fork_join, line::qn::Network< T >::get_struct(), line::SolverOptions::highvar, line::AvgTable::iter, line::SolverOptions::iter_max, line::SolverOptions::iter_tol, line::fluid::FluidSolution::iters, line::SolverOptions::keep, line::SolverOptions::level, line::AvgTable::method, line::fluid::FluidSolution::method, line::SolverOptions::method, line::ssa::SsaSolution::method, model_, line::SolverOptions::multiserver, name_, line::SolverOptions::np_priority, opts_, line::SolverOptions::samples, line::SolverOptions::seed, solved_, line::AvgTable::solver, line::ba::solver_ba_run_analyzer(), line::ctmc::solver_ctmc_run_analyzer_any(), line::fluid::solver_fluid_run_analyzer(), line::jmt::solver_jmt_run_analyzer(), line::ldes::solver_ldes(), line::mam::solver_mam_run_analyzer(), line::mva::solver_mva_run_analyzer(), line::nc::solver_nc_run_analyzer(), line::ssa::solver_ssa(), line::SolverOptions::state_space_gen, table_, line::SolverOptions::tol, line::UnsupportedError::UnsupportedError(), and line::SolverOptions::verbose.
Referenced by avg_sys_table(), method_used(), and run_analyzer().
|
inline |
|
inline |
| std::vector< std::string > line::NetworkSolver::list_valid_methods | ( | ) | const |
listValidMethods(): the methods this solver advertises on this model.
Definition at line 337 of file solver_facade.cpp.
References line::autosolver::auto_list_valid_methods(), line::fluid::fluid_list_valid_methods(), line::qn::Network< T >::get_struct(), line::jmt::jmt_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::ssa::list_valid_methods(), model_, name_, and line::UnsupportedError::UnsupportedError().
| std::string line::NetworkSolver::method_used | ( | ) |
getMethodUsed(): the method the solve actually resolved to.
Definition at line 335 of file solver_facade.cpp.
References avg_table(), and line::AvgTable::method.
|
inline |
|
inline |
|
inline |
|
inline |
runAnalyzer(): force the solve, returning the table it produced.
Definition at line 79 of file solver.h.
References avg_table().
|
protected |
Definition at line 93 of file solver.h.
Referenced by avg_table(), line::SolverBA::bounds_table(), line::SolverCTMC::cdf_respt(), line::SolverFLD::cdf_respt(), line::SolverCTMC::generator(), list_valid_methods(), line::SolverCTMC::marg_aggr(), model(), NetworkSolver(), line::SolverCTMC::prob_aggr(), line::SolverCTMC::state_space(), and line::SolverFLD::tran_avg().
|
protected |
Definition at line 94 of file solver.h.
Referenced by avg_table(), get_name(), list_valid_methods(), and NetworkSolver().
|
protected |
Definition at line 95 of file solver.h.
Referenced by avg_table(), line::SolverBA::bounds_table(), line::SolverCTMC::cdf_respt(), line::SolverFLD::cdf_respt(), line::SolverCTMC::generator(), line::SolverCTMC::marg_aggr(), NetworkSolver(), options(), line::SolverCTMC::prob_aggr(), line::SolverCTMC::state_space(), and line::SolverFLD::tran_avg().
|
protected |
Definition at line 97 of file solver.h.
Referenced by avg_table(), is_solved(), and reset().
|
protected |
Definition at line 96 of file solver.h.
Referenced by avg_table(), and reset().