![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The parameters of a Cache node, MATLAB's sn.nodeparam{ind} for a Cache. More...
#include <line/lang/qn/network_struct.h>
Public Member Functions | |
| bool | is_multiclass () const |
| True when any mode's arcs touch more than one class. | |
| std::size_t | single_class () const |
| The one class every arc of every mode touches, 1-based; 0 when none does. | |
Static Public Member Functions | |
| static std::vector< T > | arc_total (const std::vector< Matrix< T > > &a, std::size_t m) |
| The arcs of one mode summed over classes, for a consumer that is class blind BECAUSE THE NET IS SINGLE CLASS. | |
| static std::vector< T > | inhibit_total (const std::vector< Matrix< T > > &a, std::size_t m) |
| The inhibiting THRESHOLD of one mode per place, class blind. | |
Public Attributes | |
| std::size_t | nmodes = 0 |
| std::vector< std::string > | modenames |
| std::vector< Matrix< T > > | enabling |
| enabling[m](p,r): class-r tokens of place p (0-based node) mode m needs. | |
| std::vector< Matrix< T > > | inhibiting |
| inhibiting[m](p,r): class-r tokens of p that BLOCK mode m (Inf = never). | |
| std::vector< Matrix< T > > | firing |
| firing[m](p,r): class-r tokens mode m moves to/from place p when it fires. | |
| std::vector< double > | nmodeservers |
| servers per mode, may be infinite | |
| std::vector< double > | firingprio |
| firing priority per mode | |
| std::vector< T > | fireweight |
| weight among simultaneously enabled modes | |
| std::vector< lang::TimingStrategy > | timing |
| immediate or timed | |
| std::vector< lang::Distrib< T > > | firingproc |
| firing distribution per mode | |
| std::vector< std::size_t > | firingphases |
| phase count per mode, 0 when non-Markovian | |
| std::vector< std::function< T(const std::vector< T > &)> > | firingdep |
| Marking-dependent firing-rate multiplier g_m(marking); an empty entry is the unit multiplier. | |
The parameters of a Cache node, MATLAB's sn.nodeparam{ind} for a Cache.
itemcap is the capacity of each of the h cache lists (a single-level cache has one entry). nitems is the item population n.
pread[v] is the read distribution of class v over the n items; an EMPTY row is MATLAB's NaN placeholder, "class v does not read this cache", and leaves that class's rates at zero. accost[v][k] is the ((h+1) x (h+1)) list-to-list routing matrix of class v on item k; an EMPTY accost selects the reference default, the linear cache in which an item moves from list l to l+1 on a hit. These two match da::CacheParam exactly, so da_cache_isolate consumes them without a conversion.
hitclass and missclass are the 1-based classes a job of class r switches into on a hit and on a miss, 0 meaning the transition is disabled. The parameters of a Transition node: MATLAB sn.nodeparam{ind} for an SPN transition, as refreshPetriNetNodes.m writes them.
A transition has MODES, not classes, but its ARCS carry a class: MATLAB's enablingConditions{m} is an (nnodes x nclasses) matrix, so one mode can require two tokens of Class1 at a place while another requires one of Class2 at the same place. Each mode carries its own enabling and inhibiting conditions over the input places, its firing effect, and its own firing process – which is why State.fromMarginal treats a Transition's state as per-mode and cannot reuse the per-class station encoding.
THE CLASS DIMENSION IS NOT DECORATION. Collapsing the arcs onto the place, as this port did until 2026-08-12, lets a token of one class satisfy another class's pre-arc – a DIFFERENT net, not an approximation of this one. Every consumer therefore reads a (node, class) pair, and the few that are genuinely class-blind (the MDD level aggregation, the S-invariants) say so by refusing a multiclass net rather than by summing it.
Definition at line 280 of file network_struct.h.
|
inlinestatic |
The arcs of one mode summed over classes, for a consumer that is class blind BECAUSE THE NET IS SINGLE CLASS.
is_multiclass() is what makes that safe, and a caller that cannot honour the class dimension must test it and refuse: the sum of a multiclass net's arcs describes a net whose tokens are interchangeable, which is not this one.
A NON-FINITE ENTRY IS SKIPPED, and a row of nothing but non-finite entries stays non-finite: on an enabling arc Inf is JMT's "any number of tokens" and on an inhibiting one it is the ABSENCE of the arc, so adding it in would turn either into a row that no marking satisfies.
Definition at line 304 of file network_struct.h.
Referenced by line::spn::spn_lpbnd(), line::spn::spn_mdd(), and line::spn::spn_sinvariants().
|
inlinestatic |
The inhibiting THRESHOLD of one mode per place, class blind.
A threshold is not a count and does not add up: the mode is blocked as soon as ANY class reaches its own bound, so the class-blind reduction is the smallest finite threshold, and Inf where no class declares one.
Definition at line 331 of file network_struct.h.
Referenced by line::spn::spn_lpbnd(), and line::spn::spn_mdd().
|
inline |
True when any mode's arcs touch more than one class.
Definition at line 348 of file network_struct.h.
References enabling, firing, and inhibiting.
|
inline |
The one class every arc of every mode touches, 1-based; 0 when none does.
Definition at line 368 of file network_struct.h.
References enabling, firing, and inhibiting.
| std::vector<Matrix<T> > line::qn::TransitionParam< T >::enabling |
enabling[m](p,r): class-r tokens of place p (0-based node) mode m needs.
Definition at line 284 of file network_struct.h.
Referenced by line::qn::Network< double >::add_transition(), line::qn::after_global_event(), line::io::build_network_from_json(), is_multiclass(), line::fluid::petri::petri_build_terms(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::qn::refresh_global_sync(), single_class(), line::api::sn_pn_firing_rates(), line::spn::spn_lpbnd(), line::spn::spn_mdd(), and line::spn::spn_sinvariants().
| std::vector<T> line::qn::TransitionParam< T >::fireweight |
weight among simultaneously enabled modes
Definition at line 381 of file network_struct.h.
Referenced by line::qn::after_global_event(), line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), and line::io::read_jsim().
| std::vector<Matrix<T> > line::qn::TransitionParam< T >::firing |
firing[m](p,r): class-r tokens mode m moves to/from place p when it fires.
Definition at line 288 of file network_struct.h.
Referenced by line::qn::Network< double >::add_transition(), line::io::build_network_from_json(), is_multiclass(), line::fluid::petri::petri_build_terms(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::qn::refresh_global_sync(), single_class(), line::api::sn_pn_firing_rates(), line::spn::spn_lpbnd(), line::spn::spn_mdd(), and line::spn::spn_sinvariants().
| std::vector<std::function<T(const std::vector<T>&)> > line::qn::TransitionParam< T >::firingdep |
Marking-dependent firing-rate multiplier g_m(marking); an empty entry is the unit multiplier.
Transition.setFiringRateDependence.
Definition at line 389 of file network_struct.h.
Referenced by line::qn::after_global_event(), line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::spn::spn_lpbnd(), and line::spn::spn_mdd().
| std::vector<std::size_t> line::qn::TransitionParam< T >::firingphases |
phase count per mode, 0 when non-Markovian
Definition at line 384 of file network_struct.h.
Referenced by line::qn::after_event_transition(), line::qn::after_global_event(), line::io::build_network_from_json(), line::qn::from_marginal_node(), line::io::pnml_load(), line::io::read_jsim(), and line::api::sn_nonmarkov_toph().
| std::vector<double> line::qn::TransitionParam< T >::firingprio |
firing priority per mode
Definition at line 380 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), and line::io::read_jsim().
| std::vector<lang::Distrib<T> > line::qn::TransitionParam< T >::firingproc |
firing distribution per mode
Definition at line 383 of file network_struct.h.
Referenced by line::qn::after_event_transition(), line::qn::after_global_event(), line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::api::sn_has_nonmarkov(), line::api::sn_nonmarkov_toph(), line::spn::spn_lpbnd(), and line::spn::spn_mdd().
| std::vector<Matrix<T> > line::qn::TransitionParam< T >::inhibiting |
inhibiting[m](p,r): class-r tokens of p that BLOCK mode m (Inf = never).
Definition at line 286 of file network_struct.h.
Referenced by line::qn::after_global_event(), line::io::build_network_from_json(), is_multiclass(), line::fluid::petri::petri_build_terms(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::qn::refresh_global_sync(), single_class(), line::spn::spn_lpbnd(), and line::spn::spn_mdd().
| std::vector<std::string> line::qn::TransitionParam< T >::modenames |
Definition at line 282 of file network_struct.h.
Referenced by line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), and line::io::read_jsim().
| std::size_t line::qn::TransitionParam< T >::nmodes = 0 |
Definition at line 281 of file network_struct.h.
Referenced by line::qn::Network< double >::add_transition(), line::qn::after_event_transition(), line::qn::after_global_event(), line::io::build_network_from_json(), line::qn::from_marginal_node(), line::fluid::petri::petri_build_terms(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::qn::refresh_global_sync(), line::spn::spn_lpbnd(), line::spn::spn_mdd(), and line::spn::spn_sinvariants().
| std::vector<double> line::qn::TransitionParam< T >::nmodeservers |
servers per mode, may be infinite
Definition at line 379 of file network_struct.h.
Referenced by line::qn::after_global_event(), line::io::build_network_from_json(), line::qn::from_marginal_node(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::spn::spn_lpbnd(), and line::spn::spn_mdd().
| std::vector<lang::TimingStrategy> line::qn::TransitionParam< T >::timing |
immediate or timed
Definition at line 382 of file network_struct.h.
Referenced by line::qn::after_global_event(), line::io::build_network_from_json(), line::io::pnml_load(), line::io::pnml_save(), line::io::read_jsim(), line::spn::spn_lpbnd(), and line::spn::spn_mdd().