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

The parameters of a Cache node, MATLAB's sn.nodeparam{ind} for a Cache. More...

#include <line/lang/qn/network_struct.h>

Collaboration diagram for line::qn::TransitionParam< T >:

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::TimingStrategytiming
 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.

Detailed Description

template<class T>
struct line::qn::TransitionParam< T >

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.

Member Function Documentation

◆ arc_total()

template<class T>
std::vector< T > line::qn::TransitionParam< T >::arc_total ( const std::vector< Matrix< T > > & a,
std::size_t m )
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().

◆ inhibit_total()

template<class T>
std::vector< T > line::qn::TransitionParam< T >::inhibit_total ( const std::vector< Matrix< T > > & a,
std::size_t m )
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().

◆ is_multiclass()

template<class T>
bool line::qn::TransitionParam< T >::is_multiclass ( ) const
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.

◆ single_class()

template<class T>
std::size_t line::qn::TransitionParam< T >::single_class ( ) const
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.

Member Data Documentation

◆ enabling

◆ fireweight

template<class T>
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().

◆ firing

◆ firingdep

template<class T>
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().

◆ firingphases

template<class T>
std::vector<std::size_t> line::qn::TransitionParam< T >::firingphases

◆ firingprio

template<class T>
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().

◆ firingproc

◆ inhibiting

◆ modenames

template<class T>
std::vector<std::string> line::qn::TransitionParam< T >::modenames

◆ nmodes

◆ nmodeservers

◆ timing


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