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

Serial Gillespie (serial, ssa, default) and next-reaction (nrm) simulation of a composition. More...

#include <line/lang/lal/solvers.h>

Collaboration diagram for line::lal::SolverSSA:

Public Member Functions

 SolverSSA (const Composition &model, SSAOptions options=SSAOptions())
 References model, which must outlive the solver (see SolverCTMC).
 SolverSSA (const Composition &&, SSAOptions=SSAOptions())=delete
std::pair< bool, std::optional< std::string > > supportsModelMethod (const std::string &method) const
SolverSSA & runAnalyzer ()
void reset ()
StateTable getAvgTable ()
ActionTable getActTable ()
ActionTable getActT ()
ActionTable getActionTable ()
const SSAResult & getResult ()
std::vector< Matrix< double > > getAvgTard ()
 getAvgTard(), inherited by the reference from NetworkSolver: mean class tardiness against the JobClass deadlines, as {Tard, SysTard}.
std::vector< Matrix< double > > get_avg_tard ()
double getAvgAct (const ActionSpec &action)
 Throughput estimate of one LAL action (named as in SolverCTMC::getAvgAct).
double getAvgAct (const std::string &node, lang::EventType event, const std::optional< std::string > &jobclass=std::nullopt, const std::optional< std::string > &mode=std::nullopt)
double getAvgAct (std::size_t node, lang::EventType event, std::size_t jobclass=0)
std::vector< double > getActAvg (const std::vector< ActionSpec > &actions)
 Throughput estimates of several actions, each named as in getAvgAct.
std::pair< std::vector< double >, std::vector< std::string > > getAvgReward ()
 Estimates of the rewards declared with Composition::setReward: (R, names).
double getTotalSimulatedTime ()
 getTotalSimulatedTime: the measured horizon of the LAL SSA run, the time its state and action estimates are averaged over (after warm-up); +inf when the run was absorbed, as the tables' duration attribute reads.
long getSampleCount ()
 getSampleCount: the measured events of the LAL SSA run (after warm-up), the tables' events attribute.
void getAvg () const
void sample () const

Static Public Member Functions

static bool supports (const Composition &)
static std::vector< std::string > listValidMethods ()
 listValidMethods: SolverSSA.m answers this solver's row of the method registry (doc/line-methods.json) whatever the model, a Composition included; supportsModelMethod then says which of them a composition takes (serial, ssa, default and nrm).
static std::vector< std::string > list_valid_methods ()

Public Attributes

SSAOptions options

Detailed Description

Serial Gillespie (serial, ssa, default) and next-reaction (nrm) simulation of a composition.

Definition at line 392 of file solvers.h.

Constructor & Destructor Documentation

◆ SolverSSA() [1/2]

line::lal::SolverSSA::SolverSSA ( const Composition & model,
SSAOptions options = SSAOptions() )
inlineexplicit

References model, which must outlive the solver (see SolverCTMC).

Definition at line 395 of file solvers.h.

References options.

Referenced by runAnalyzer().

◆ SolverSSA() [2/2]

line::lal::SolverSSA::SolverSSA ( const Composition && ,
SSAOptions = SSAOptions() )
delete

Member Function Documentation

◆ get_avg_tard()

std::vector< Matrix< double > > line::lal::SolverSSA::get_avg_tard ( )
inline

Definition at line 477 of file solvers.h.

References getAvgTard().

◆ getActAvg()

std::vector< double > line::lal::SolverSSA::getActAvg ( const std::vector< ActionSpec > & actions)
inline

Throughput estimates of several actions, each named as in getAvgAct.

Definition at line 490 of file solvers.h.

References getAvgAct().

◆ getActionTable()

ActionTable line::lal::SolverSSA::getActionTable ( )
inline

Definition at line 463 of file solvers.h.

References getActTable().

◆ getActT()

ActionTable line::lal::SolverSSA::getActT ( )
inline

Definition at line 462 of file solvers.h.

References getActTable().

◆ getActTable()

ActionTable line::lal::SolverSSA::getActTable ( )
inline

Definition at line 461 of file solvers.h.

Referenced by getActionTable(), getActT(), and getAvgAct().

◆ getAvg()

void line::lal::SolverSSA::getAvg ( ) const
inline

◆ getAvgAct() [1/3]

double line::lal::SolverSSA::getAvgAct ( const ActionSpec & action)
inline

Throughput estimate of one LAL action (named as in SolverCTMC::getAvgAct).

Definition at line 480 of file solvers.h.

References getActTable().

Referenced by getActAvg(), getAvgAct(), and getAvgAct().

◆ getAvgAct() [2/3]

double line::lal::SolverSSA::getAvgAct ( const std::string & node,
lang::EventType event,
const std::optional< std::string > & jobclass = std::nullopt,
const std::optional< std::string > & mode = std::nullopt )
inline

Definition at line 481 of file solvers.h.

References getAvgAct().

◆ getAvgAct() [3/3]

double line::lal::SolverSSA::getAvgAct ( std::size_t node,
lang::EventType event,
std::size_t jobclass = 0 )
inline

Definition at line 486 of file solvers.h.

References getAvgAct().

◆ getAvgReward()

std::pair< std::vector< double >, std::vector< std::string > > line::lal::SolverSSA::getAvgReward ( )
inline

Estimates of the rewards declared with Composition::setReward: (R, names).

Definition at line 497 of file solvers.h.

References line::lal::SSAResult::rewards.

◆ getAvgTable()

StateTable line::lal::SolverSSA::getAvgTable ( )
inline

Definition at line 460 of file solvers.h.

◆ getAvgTard()

std::vector< Matrix< double > > line::lal::SolverSSA::getAvgTard ( )
inline

getAvgTard(), inherited by the reference from NetworkSolver: mean class tardiness against the JobClass deadlines, as {Tard, SysTard}.

It solves first when no result is held (getAvgTard.m calls getAvg) and returns what the result carries. A composition declares no JobClass and no deadline, so no LAL result carries a tardiness and both matrices are empty, as the reference returns [] for them.

Definition at line 473 of file solvers.h.

Referenced by get_avg_tard().

◆ getResult()

const SSAResult & line::lal::SolverSSA::getResult ( )
inline

Definition at line 464 of file solvers.h.

◆ getSampleCount()

long line::lal::SolverSSA::getSampleCount ( )
inline

getSampleCount: the measured events of the LAL SSA run (after warm-up), the tables' events attribute.

The network counterpart is SsaSolution::samples.

Definition at line 519 of file solvers.h.

◆ getTotalSimulatedTime()

double line::lal::SolverSSA::getTotalSimulatedTime ( )
inline

getTotalSimulatedTime: the measured horizon of the LAL SSA run, the time its state and action estimates are averaged over (after warm-up); +inf when the run was absorbed, as the tables' duration attribute reads.

The network counterpart is SsaSolution::simulated_time.

Definition at line 513 of file solvers.h.

◆ list_valid_methods()

std::vector< std::string > line::lal::SolverSSA::list_valid_methods ( )
inlinestatic

Definition at line 410 of file solvers.h.

References listValidMethods().

◆ listValidMethods()

std::vector< std::string > line::lal::SolverSSA::listValidMethods ( )
inlinestatic

listValidMethods: SolverSSA.m answers this solver's row of the method registry (doc/line-methods.json) whatever the model, a Composition included; supportsModelMethod then says which of them a composition takes (serial, ssa, default and nrm).

Definition at line 409 of file solvers.h.

Referenced by list_valid_methods().

◆ reset()

void line::lal::SolverSSA::reset ( )
inline

Definition at line 459 of file solvers.h.

◆ runAnalyzer()

◆ sample()

void line::lal::SolverSSA::sample ( ) const
inline

◆ supports()

bool line::lal::SolverSSA::supports ( const Composition & )
inlinestatic

Definition at line 401 of file solvers.h.

◆ supportsModelMethod()

std::pair< bool, std::optional< std::string > > line::lal::SolverSSA::supportsModelMethod ( const std::string & method) const
inline

Definition at line 412 of file solvers.h.

References line::lal::has_discrete(), and line::lal::model_features().

Referenced by runAnalyzer().

Member Data Documentation

◆ options

SSAOptions line::lal::SolverSSA::options

Definition at line 399 of file solvers.h.

Referenced by runAnalyzer(), and SolverSSA().


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