![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
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. | |
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.
|
inline |
Definition at line 274 of file solver_ssa_nrm_spn.h.
|
inline |
The immediate-mode count, likewise.
Definition at line 285 of file solver_ssa_nrm_spn.h.
|
inline |
The reaction count, for the tests that assert the builder.
Definition at line 283 of file solver_ssa_nrm_spn.h.
| 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.