LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::ssa::NrmSpnEngine< T > Class Template Reference

The SPN Next-Reaction-Method engine, solver_ssa_nrm_spn of the reference. More...

#include <line/solvers/ssa/solver_ssa_nrm_spn.h>

Public Member Functions

 NrmSpnEngine (const qn::NetworkStruct< T > &sn, const SsaOptions &opt)
SsaSolution run ()
 Run opt.samples firings and return the time-averaged metrics.
std::size_t nreactions () const
 The reaction count, for the tests that assert the builder.
std::size_t nimmediate () const
 The immediate-mode count, likewise.

Detailed Description

template<class T>
class line::ssa::NrmSpnEngine< T >

The SPN Next-Reaction-Method engine, solver_ssa_nrm_spn of the reference.

DOUBLE ONLY, for the reason NrmEngine is: the sample path is generated from exponential clocks, which are logarithms of uniform draws, so there is no exact value a wider arithmetic could carry. The analyzer refuses a non-double backend by name before this class is instantiated.

Definition at line 272 of file solver_ssa_nrm_spn.h.

Constructor & Destructor Documentation

◆ NrmSpnEngine()

template<class T>
line::ssa::NrmSpnEngine< T >::NrmSpnEngine ( const qn::NetworkStruct< T > & sn,
const SsaOptions & opt )
inline

Definition at line 274 of file solver_ssa_nrm_spn.h.

Member Function Documentation

◆ nimmediate()

template<class T>
std::size_t line::ssa::NrmSpnEngine< T >::nimmediate ( ) const
inline

The immediate-mode count, likewise.

Definition at line 285 of file solver_ssa_nrm_spn.h.

◆ nreactions()

template<class T>
std::size_t line::ssa::NrmSpnEngine< T >::nreactions ( ) const
inline

The reaction count, for the tests that assert the builder.

Definition at line 283 of file solver_ssa_nrm_spn.h.

◆ run()

template<class T>
SsaSolution line::ssa::NrmSpnEngine< T >::run ( )

Run opt.samples firings and return the time-averaged metrics.

The Next-Reaction-Method run loop over the tangible markings.

EVERY PROPENSITY IS REFRESHED after a firing rather than a dependency subset: a firing plus its immediate cascade can change any place, and the reaction count of a Petri net is small, so refreshing all of them removes any dependency-graph blind spot at no cost worth measuring.

A PLACE IS AN INF STATION, so its utilization IS its mean token count – the SPN convention the CTMC analyzer also reports – and its throughput is the summed firing rate of the modes consuming from it, counted once per firing.

Definition at line 633 of file solver_ssa_nrm_spn.h.

References line::ssa::SsaSolution::CN, line::util::LineConsole::iter(), line::util::LineConsole::loop(), line::ssa::SsaSolution::method, line::NumericError::NumericError(), line::ssa::SsaSolution::PreemptN, line::ssa::SsaSolution::QN, line::ssa::SsaSolution::RN, line::ssa::SsaSolution::samples, line::ssa::SsaSolution::simulated_time, line::ssa::SsaSolution::StartN, line::ssa::SsaSolution::TN, line::ssa::SsaSolution::UN, and line::ssa::SsaSolution::XN.


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