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 SolverOptionsoptions () const
 The options this solver was built with.
Networkmodel () const
 The model this solver was built on.
const AvgTableavg_table ()
 getAvgTable(): the average table, solving on first demand.
const AvgTableavg_sys_table ()
 getAvgSysTable(): the per-class system columns of the same solve.
const AvgTablerun_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

Networkmodel_
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()

◆ 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 335 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: