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

Service-time descriptor, the C++ form of the MATLAB svc struct. More...

#include <line/api/qsys/qsys_mapg1k.h>

Collaboration diagram for line::qsys::ServiceLaw< T >:

Static Public Member Functions

static ServiceLaw gamma (const T &shape, const T &scale)
 Gamma(shape, scale).
static ServiceLaw deterministic (const T &d)
 Constant service time d.
static ServiceLaw phase_type (const std::vector< T > &alpha, const Matrix< T > &Tmat)
 Phase type (alpha, Tmat).
static ServiceLaw density (std::function< T(const T &)> f)
 Arbitrary density on (0, inf), or on (0, tmax] when tmax is supplied.
static ServiceLaw density (std::function< T(const T &)> f, const T &tmax)

Public Attributes

ServiceKind kind = ServiceKind::Deterministic
shape = num_traits<T>::from_int(1)
 gamma shape alpha
scale = num_traits<T>::from_int(1)
 gamma scale theta
det = num_traits<T>::from_int(1)
 deterministic service time
std::vector< T > ph_alpha
 PH initial probability row.
Matrix< T > ph_T
 PH subgenerator.
std::function< T(const T &)> pdf
 density of the service time
tmax = num_traits<T>::from_int(0)
 upper support limit of the density
bool tmax_finite = false
 whether tmax is used

Detailed Description

template<class T>
struct line::qsys::ServiceLaw< T >

Service-time descriptor, the C++ form of the MATLAB svc struct.

Build one with the static factories; the fields that a given kind does not use are left at their default and are never read.

Definition at line 108 of file qsys_mapg1k.h.

Member Function Documentation

◆ density() [1/2]

template<class T>
ServiceLaw line::qsys::ServiceLaw< T >::density ( std::function< T(const T &)> f)
inlinestatic

Arbitrary density on (0, inf), or on (0, tmax] when tmax is supplied.

Definition at line 143 of file qsys_mapg1k.h.

References line::qsys::Density, kind, and pdf.

Referenced by density().

◆ density() [2/2]

template<class T>
ServiceLaw line::qsys::ServiceLaw< T >::density ( std::function< T(const T &)> f,
const T & tmax )
inlinestatic

Definition at line 149 of file qsys_mapg1k.h.

References density(), tmax, and tmax_finite.

◆ deterministic()

template<class T>
ServiceLaw line::qsys::ServiceLaw< T >::deterministic ( const T & d)
inlinestatic

Constant service time d.

Definition at line 128 of file qsys_mapg1k.h.

References det, line::qsys::Deterministic, and kind.

◆ gamma()

template<class T>
ServiceLaw line::qsys::ServiceLaw< T >::gamma ( const T & shape,
const T & scale )
inlinestatic

Gamma(shape, scale).

shape = 1 is the exponential, integer shape Erlang.

Definition at line 120 of file qsys_mapg1k.h.

References line::qsys::Gamma, kind, scale, and shape.

◆ phase_type()

template<class T>
ServiceLaw line::qsys::ServiceLaw< T >::phase_type ( const std::vector< T > & alpha,
const Matrix< T > & Tmat )
inlinestatic

Phase type (alpha, Tmat).

Definition at line 135 of file qsys_mapg1k.h.

References kind, ph_alpha, ph_T, and line::qsys::PhaseType.

Member Data Documentation

◆ det

template<class T>
T line::qsys::ServiceLaw< T >::det = num_traits<T>::from_int(1)

deterministic service time

Definition at line 112 of file qsys_mapg1k.h.

Referenced by deterministic().

◆ kind

Definition at line 109 of file qsys_mapg1k.h.

Referenced by density(), deterministic(), gamma(), and phase_type().

◆ pdf

template<class T>
std::function<T(const T&)> line::qsys::ServiceLaw< T >::pdf

density of the service time

Definition at line 115 of file qsys_mapg1k.h.

Referenced by density().

◆ ph_alpha

template<class T>
std::vector<T> line::qsys::ServiceLaw< T >::ph_alpha

PH initial probability row.

Definition at line 113 of file qsys_mapg1k.h.

Referenced by phase_type().

◆ ph_T

template<class T>
Matrix<T> line::qsys::ServiceLaw< T >::ph_T

PH subgenerator.

Definition at line 114 of file qsys_mapg1k.h.

Referenced by phase_type().

◆ scale

template<class T>
T line::qsys::ServiceLaw< T >::scale = num_traits<T>::from_int(1)

gamma scale theta

Definition at line 111 of file qsys_mapg1k.h.

Referenced by gamma().

◆ shape

template<class T>
T line::qsys::ServiceLaw< T >::shape = num_traits<T>::from_int(1)

gamma shape alpha

Definition at line 110 of file qsys_mapg1k.h.

Referenced by gamma().

◆ tmax

template<class T>
T line::qsys::ServiceLaw< T >::tmax = num_traits<T>::from_int(0)

upper support limit of the density

Definition at line 116 of file qsys_mapg1k.h.

Referenced by density().

◆ tmax_finite

template<class T>
bool line::qsys::ServiceLaw< T >::tmax_finite = false

whether tmax is used

Definition at line 117 of file qsys_mapg1k.h.

Referenced by density().


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