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

The shared surface of every solver, Python's NetworkSolver. More...

#include <line/solvers/solver.h>

Inheritance diagram for line::NetworkSolver:
Collaboration diagram for line::NetworkSolver:

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

Detailed Description

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.

Definition at line 63 of file solver.h.

Constructor & Destructor Documentation

◆ ~NetworkSolver()

virtual line::NetworkSolver::~NetworkSolver ( )
inlinevirtual

Definition at line 65 of file solver.h.

◆ NetworkSolver()

line::NetworkSolver::NetworkSolver ( Network & m,
const std::string & name,
const SolverOptions & o )
inlineprotected

Member Function Documentation

◆ avg_sys_table()

const AvgTable & line::NetworkSolver::avg_sys_table ( )
inline

getAvgSysTable(): the per-class system columns of the same solve.

Definition at line 77 of file solver.h.

References avg_table().

◆ avg_table()

const AvgTable & line::NetworkSolver::avg_table ( )

getAvgTable(): the average table, solving on first demand.

Definition at line 399 of file solver_facade.cpp.

References line::mva::AvgResult< T >::actualmethod, line::jmt::JmtResult< T >::avg, line::qn::fluid_feature_set(), line::solvers::fluid_stage_fn(), 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::level, line::solvers::map_env_approx(), line::AvgTable::method, line::fluid::FluidSolution::method, line::SolverOptions::method, line::ssa::SsaSolution::method, model_, line::SolverOptions::multiserver, line::qn::mva_feature_set(), line::solvers::mva_stage_fn(), name_, line::qn::nc_feature_set(), line::solvers::nc_stage_fn(), line::solvers::MapEnvDecision::needed, line::solvers::needs_map_env(), line::SolverOptions::np_priority, opts_, line::mva::resolve_method(), line::solvers::run_avg(), 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().

◆ get_name()

const std::string & line::NetworkSolver::get_name ( ) const
inline

getName(): the solver's own name, e.g.

"MVA".

Definition at line 68 of file solver.h.

References name_.

◆ is_solved()

bool line::NetworkSolver::is_solved ( ) const
inline

isSolved() / hasResults(): whether a solve has been performed.

Definition at line 83 of file solver.h.

References solved_.

◆ list_valid_methods()

◆ method_used()

std::string line::NetworkSolver::method_used ( )

getMethodUsed(): the method the solve actually resolved to.

Definition at line 528 of file solver_facade.cpp.

References avg_table(), and line::AvgTable::method.

◆ model()

Network & line::NetworkSolver::model ( ) const
inline

The model this solver was built on.

Definition at line 72 of file solver.h.

References model_.

◆ options()

const SolverOptions & line::NetworkSolver::options ( ) const
inline

The options this solver was built with.

Definition at line 70 of file solver.h.

References opts_.

◆ reset()

void line::NetworkSolver::reset ( )
inline

reset(): discard the cached solve.

Definition at line 85 of file solver.h.

References solved_, and table_.

◆ run_analyzer()

const AvgTable & line::NetworkSolver::run_analyzer ( )
inline

runAnalyzer(): force the solve, returning the table it produced.

Definition at line 79 of file solver.h.

References avg_table().

Member Data Documentation

◆ model_

◆ name_

std::string line::NetworkSolver::name_
protected

Definition at line 94 of file solver.h.

Referenced by avg_table(), get_name(), list_valid_methods(), and NetworkSolver().

◆ opts_

◆ solved_

bool line::NetworkSolver::solved_ = false
protected

Definition at line 97 of file solver.h.

Referenced by avg_table(), is_solved(), and reset().

◆ table_

AvgTable line::NetworkSolver::table_
protected

Definition at line 96 of file solver.h.

Referenced by avg_table(), and reset().


The documentation for this class was generated from the following files: