![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
One sample path, in the shape solver_ssa.m returns it. More...
#include <line/solvers/ssa/solver_ssa_serial.h>
Public Attributes | |
| std::vector< qn::NetState< T > > | space |
| The DISTINCT states visited, in first-visit order (the reference's u). | |
| std::vector< std::vector< std::vector< std::size_t > > > | buf |
| The region token FIFOs of each of those states, the reference's fcrBuf. | |
| std::vector< double > | pi |
| pi: the fraction of simulated time spent in each of them. | |
| Matrix< T > | ssq |
| SSq: the per-(station, class) job counts of each distinct state. | |
| std::vector< std::vector< std::vector< double > > > | arv_rates |
| arvRates / depRates, indexed [distinct state][stateful-1][class-1]. | |
| std::vector< std::vector< std::vector< double > > > | dep_rates |
| std::vector< std::vector< std::vector< double > > > | start_rates |
| The DERIVED rates per state, laid out like arv_rates: how fast the transitions enabled in that state START a class-r service at a stateful node, and how fast they PUSH a class-r job in service back into the buffer there. | |
| std::vector< std::vector< std::vector< double > > > | preempt_rates |
| std::vector< std::vector< std::vector< double > > > | dly_rates |
| The rate of the cache MERGE transitions, i.e. | |
| std::vector< double > | tran_time |
| tranSysState{1}: the cumulative time at each firing. | |
| std::vector< std::size_t > | tran_sync |
| tranSync: which synchronization fired, sync.size() + g for a global one. | |
| std::vector< std::size_t > | tran_state |
| The row of space the path OCCUPIED over [t-dt, t], one per firing. | |
| double | simulated_time = 0.0 |
| std::size_t | samples = 0 |
| firings actually performed | |
| std::size_t | warmup = 0 |
| leading firings excluded from pi | |
| unsigned long | seed = 0 |
| the stream this path came from | |
One sample path, in the shape solver_ssa.m returns it.
Definition at line 133 of file solver_ssa_serial.h.
| std::vector<std::vector<std::vector<double> > > line::ssa::SsaSerialRun< T >::arv_rates |
arvRates / depRates, indexed [distinct state][stateful-1][class-1].
They are a deterministic function of the state, so one sample per state is the exact value and not an estimate – which is what lets the analyzer multiply them by pi and get a throughput rather than a sample mean. The reference says as much where it keeps arvRatesSamples(ui(s),...).
Definition at line 158 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<std::vector<std::vector<std::size_t> > > line::ssa::SsaSerialRun< T >::buf |
The region token FIFOs of each of those states, the reference's fcrBuf.
Empty (one empty vector per region, or no vectors at all) on every model without a WAITQ region. A parked job is in NO station, so it appears in no queue length and is visible only here – the JMT report convention, which ctmc_waitq_parked states for the exact solver and SsaSerialSolution::parked for this one.
Definition at line 145 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<std::vector<std::vector<double> > > line::ssa::SsaSerialRun< T >::dep_rates |
Definition at line 158 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<std::vector<std::vector<double> > > line::ssa::SsaSerialRun< T >::dly_rates |
The rate of the cache MERGE transitions, i.e.
of the delayed hits, in the same [state][stateful-1][class-1] shape and by the same argument.
A delayed hit is invisible in dep_rates: the merged request is released later, in the HIT class, and is indistinguishable there from a true hit. The merge itself is the only cache transition that EMPTIES the node – it decrements the read class and adds nothing – which is what identifies it.
Definition at line 176 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<double> line::ssa::SsaSerialRun< T >::pi |
pi: the fraction of simulated time spent in each of them.
Definition at line 147 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::solver_ssa_serial_on_struct(), line::ssa::ssa_prob(), line::ssa::ssa_prob_aggr(), line::ssa::ssa_prob_sys(), and line::ssa::ssa_prob_sys_aggr().
| std::vector<std::vector<std::vector<double> > > line::ssa::SsaSerialRun< T >::preempt_rates |
Definition at line 166 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::size_t line::ssa::SsaSerialRun< T >::samples = 0 |
firings actually performed
Definition at line 192 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::solver_ssa_serial_on_struct(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| unsigned long line::ssa::SsaSerialRun< T >::seed = 0 |
the stream this path came from
Definition at line 194 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| double line::ssa::SsaSerialRun< T >::simulated_time = 0.0 |
Definition at line 191 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<qn::NetState<T> > line::ssa::SsaSerialRun< T >::space |
The DISTINCT states visited, in first-visit order (the reference's u).
Definition at line 135 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::solver_ssa_serial_on_struct(), line::ssa::ssa_prob(), line::ssa::ssa_prob_aggr(), line::ssa::ssa_prob_sys(), line::ssa::ssa_prob_sys_aggr(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| Matrix<T> line::ssa::SsaSerialRun< T >::ssq |
SSq: the per-(station, class) job counts of each distinct state.
Definition at line 149 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::solver_ssa_serial_on_struct(), and line::ssa::ssa_sample_sys().
| std::vector<std::vector<std::vector<double> > > line::ssa::SsaSerialRun< T >::start_rates |
The DERIVED rates per state, laid out like arv_rates: how fast the transitions enabled in that state START a class-r service at a stateful node, and how fast they PUSH a class-r job in service back into the buffer there.
Annotations on the arcs the engine already walks, so no rate, probability or state depends on them.
Definition at line 166 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), and line::ssa::solver_ssa_serial_on_struct().
| std::vector<std::size_t> line::ssa::SsaSerialRun< T >::tran_state |
The row of space the path OCCUPIED over [t-dt, t], one per firing.
The trace and the distinct-state table are two views of the same path and the samplers need both: sampleSys prints the state at each event and getProb sums the time spent in one state, so keeping only pi would lose the order and keeping only the rows would lose the aggregation. It indexes the state BEFORE the firing, exactly as pi weights it.
Definition at line 190 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| std::vector<std::size_t> line::ssa::SsaSerialRun< T >::tran_sync |
tranSync: which synchronization fired, sync.size() + g for a global one.
Definition at line 180 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| std::vector<double> line::ssa::SsaSerialRun< T >::tran_time |
tranSysState{1}: the cumulative time at each firing.
Definition at line 178 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run(), line::ssa::ssa_sample_node(), and line::ssa::ssa_sample_sys().
| std::size_t line::ssa::SsaSerialRun< T >::warmup = 0 |
leading firings excluded from pi
Definition at line 193 of file solver_ssa_serial.h.
Referenced by line::ssa::SsaSerialEngine< T >::run().