![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
A LINE Distribution, as the model layer and sn carry it. More...
#include <line/lang/lang_types.h>
Public Attributes | |
| bool | continuous = false |
| True for the parameter-density form, false for the alternative-set form. | |
| std::vector< Distrib< T > > | alternatives |
| The alternatives and their weights; the discrete form only. | |
| std::vector< T > | probabilities |
| Distrib< T > | param_dist |
| The law of the scalar parameter; the continuous form only. | |
| std::function< Distrib< T >(const T &)> | factory |
| theta -> Distribution; the continuous form only. | |
A LINE Distribution, as the model layer and sn carry it.
What a Prior carries, in either of its two forms.
WHAT EACH CONSUMER READS, which is why all of it is here: sn.rates, sn.scv the first two moments – every AMVA path sn.procid the type tag – the qsys and QNA dispatch sn.proc, sn.pie the (D0,D1) pair – QNA, RQNA, cache, polling sn.mu, sn.phi the phase rates and completion probabilities sn.phases the order of that representation sn.lst the Laplace-Stieltjes transform – M/G/1 analyzers
params holds the constructor arguments in MATLAB's getParam order, so a dump can be compared parameter by parameter rather than through the moments, which two different distributions can share.
Two values are special and must not be confused, because they enter the struct as opposite extremes: Immediate mean = 1/GlobalConstants.Immediate = 1e-8, rate = 1e8 Disabled rate = NaN, which marks a (station, class) pair the class never visits; the chain and visit machinery keys on it.
ARITHMETIC. The Markovian families are rational in their parameters and are built exactly. Gamma, Weibull and Lognormal are not – their moments call tgamma or exp – so their factories refuse by name under exact arithmetic rather than returning a rounded rational that would look exact.
DISCRETE: an explicit set of alternative distributions and their prior weights, which must sum to one. This is the form the model.json wire carries ({"type":"Prior","distributions":[...],"probabilities":[...]}), because a factory cannot cross JSON.
CONTINUOUS: a density over a scalar parameter theta plus a map theta -> Distribution, the form the epistemic propagation of Trivedi and Bobbio (2017), Sec. 3.4 needs. It is reduced to the discrete form by prior_discretize (lang/prior.h) before anything downstream sees it, so both forms are consumed identically. It can only be BUILT programmatically.
IT IS NOT A MIXTURE. Each alternative is a separate model realization whose weight is a prior probability over models, not a branching probability inside one model. The mixture moments are still computed (see Distrib::prior) because MATLAB's Prior.getMean/getSCV do, but they are a summary of the epistemic uncertainty and not the law any station serves.
Definition at line 1731 of file lang_types.h.
| std::vector<Distrib<T> > line::lang::PriorSpec< T >::alternatives |
The alternatives and their weights; the discrete form only.
Definition at line 1735 of file lang_types.h.
Referenced by line::lang::prior_discretize().
| bool line::lang::PriorSpec< T >::continuous = false |
True for the parameter-density form, false for the alternative-set form.
Definition at line 1733 of file lang_types.h.
Referenced by line::lang::prior_discretize().
| std::function<Distrib<T>(const T&)> line::lang::PriorSpec< T >::factory |
theta -> Distribution; the continuous form only.
A std::function and not a serializable description, exactly as MATLAB's distFactory is a function handle: the map is arbitrary code (a rate becomes an Exp, a scale becomes an Erlang of fixed order), and no wire format in this codebase encodes it. That is why the JSON reader builds the discrete form only.
Definition at line 1748 of file lang_types.h.
Referenced by line::lang::prior_discretize().
| Distrib<T> line::lang::PriorSpec< T >::param_dist |
The law of the scalar parameter; the continuous form only.
Definition at line 1738 of file lang_types.h.
Referenced by line::lang::prior_discretize().
| std::vector<T> line::lang::PriorSpec< T >::probabilities |
Definition at line 1736 of file lang_types.h.
Referenced by line::lang::prior_discretize().