LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::qsys::mgck_sync_detail Namespace Reference

Classes

struct  Triplets
 A sparse transition list, summed into a dense matrix as MATLAB's sparse() does. More...

Functions

template<class T>
Matrix< T > rowmask (const Matrix< T > &M, const std::vector< bool > &keep)
 Row-masked copy: rows with keep[i] false are zeroed, i.e.
template<class T>
Matrix< T > colmask (const Matrix< T > &M, const std::vector< bool > &keep)
 Column-masked copy: M diag(keep).
template<class T>
Matrix< T > matadd (const Matrix< T > &A, const Matrix< T > &B)
template<class T>
void unif (const Matrix< T > &QG, const std::vector< T > &cn, const T &theta, Matrix< T > &Om, Matrix< T > &Ps)
 i_unif: Om = E[exp(QG S)], Ps = E[int_0^S exp(QG t) dt] from c_n at rate theta, with d_n = (1 - sum_{k<=n} c_k)/theta.
template<class T>
std::vector< T > emc (const Matrix< T > &Q, const std::vector< bool > &inE, const Matrix< T > &OmDelta, const Matrix< T > &Psi, const Matrix< T > &Qbar)
 i_emc: stationary law of the embedded chain at regenerations, converted to time.
template<class T>
std::vector< T > coefficients (const ServiceLaw< T > &svc, const T &lambda, const T &tol, std::size_t nmaxCap)
template<class T>
std::vector< T > plain (const T &lambda, std::size_t c, std::size_t K, const ServiceLaw< T > &svc, bool faster, const T &tol, std::size_t nmaxCap, std::vector< std::size_t > &level)
 i_plain: synchronous approximation without state expansion; state i <-> i jobs.
std::vector< int > tick (int a, int q, const std::vector< int > &B, int nph)
 i_tick: advance every non-owner phase by one tick; a completed job frees its server for a waiting one, which starts at phase 0 on the boundary.
std::vector< int > make_state (int a, int q, const std::vector< int > &B)
template<class T>
std::vector< T > expanded (const T &lambda, std::size_t c, std::size_t K, const T &d, std::size_t nphU, bool faster, const T &tol, std::size_t nmaxCap, std::vector< std::size_t > &level)
 i_expanded: synchronous phase expansion; states are [a, q, sorted B phases].

Function Documentation

◆ coefficients()

template<class T>
std::vector< T > line::qsys::mgck_sync_detail::coefficients ( const ServiceLaw< T > & svc,
const T & lambda,
const T & tol,
std::size_t nmaxCap )

Definition at line 220 of file qsys_mgck_sync.h.

References coefficients(), and line::qsys::qsys_svclaw_coeffs().

Referenced by coefficients(), expanded(), and plain().

◆ colmask()

template<class T>
Matrix< T > line::qsys::mgck_sync_detail::colmask ( const Matrix< T > & M,
const std::vector< bool > & keep )

Column-masked copy: M diag(keep).

Definition at line 118 of file qsys_mgck_sync.h.

References colmask(), line::Matrix< T >::cols(), and line::Matrix< T >::rows().

Referenced by colmask(), and expanded().

◆ emc()

template<class T>
std::vector< T > line::qsys::mgck_sync_detail::emc ( const Matrix< T > & Q,
const std::vector< bool > & inE,
const Matrix< T > & OmDelta,
const Matrix< T > & Psi,
const Matrix< T > & Qbar )

i_emc: stationary law of the embedded chain at regenerations, converted to time.

Definition at line 174 of file qsys_mgck_sync.h.

References emc(), matadd(), line::matmul(), line::num_abs(), line::NumericError::NumericError(), rowmask(), line::Matrix< T >::rows(), line::solve(), and line::vecmul().

Referenced by emc(), expanded(), and plain().

◆ expanded()

template<class T>
std::vector< T > line::qsys::mgck_sync_detail::expanded ( const T & lambda,
std::size_t c,
std::size_t K,
const T & d,
std::size_t nphU,
bool faster,
const T & tol,
std::size_t nmaxCap,
std::vector< std::size_t > & level )

◆ make_state()

std::vector< int > line::qsys::mgck_sync_detail::make_state ( int a,
int q,
const std::vector< int > & B )
inline

Definition at line 294 of file qsys_mgck_sync.h.

References make_state().

Referenced by expanded(), and make_state().

◆ matadd()

template<class T>
Matrix< T > line::qsys::mgck_sync_detail::matadd ( const Matrix< T > & A,
const Matrix< T > & B )

Definition at line 128 of file qsys_mgck_sync.h.

References line::Matrix< T >::cols(), matadd(), and line::Matrix< T >::rows().

Referenced by emc(), expanded(), and matadd().

◆ plain()

template<class T>
std::vector< T > line::qsys::mgck_sync_detail::plain ( const T & lambda,
std::size_t c,
std::size_t K,
const ServiceLaw< T > & svc,
bool faster,
const T & tol,
std::size_t nmaxCap,
std::vector< std::size_t > & level )

i_plain: synchronous approximation without state expansion; state i <-> i jobs.

Definition at line 228 of file qsys_mgck_sync.h.

References coefficients(), emc(), line::matmul(), plain(), rowmask(), and unif().

Referenced by plain(), and line::qsys::qsys_mgck_sync().

◆ rowmask()

template<class T>
Matrix< T > line::qsys::mgck_sync_detail::rowmask ( const Matrix< T > & M,
const std::vector< bool > & keep )

Row-masked copy: rows with keep[i] false are zeroed, i.e.

diag(keep) M.

Definition at line 107 of file qsys_mgck_sync.h.

References line::Matrix< T >::cols(), rowmask(), and line::Matrix< T >::rows().

Referenced by emc(), expanded(), plain(), and rowmask().

◆ tick()

std::vector< int > line::qsys::mgck_sync_detail::tick ( int a,
int q,
const std::vector< int > & B,
int nph )
inline

i_tick: advance every non-owner phase by one tick; a completed job frees its server for a waiting one, which starts at phase 0 on the boundary.

Definition at line 277 of file qsys_mgck_sync.h.

References tick().

Referenced by expanded(), and tick().

◆ unif()

template<class T>
void line::qsys::mgck_sync_detail::unif ( const Matrix< T > & QG,
const std::vector< T > & cn,
const T & theta,
Matrix< T > & Om,
Matrix< T > & Ps )

i_unif: Om = E[exp(QG S)], Ps = E[int_0^S exp(QG t) dt] from c_n at rate theta, with d_n = (1 - sum_{k<=n} c_k)/theta.

Definition at line 140 of file qsys_mgck_sync.h.

References line::eye(), line::matmul(), line::Matrix< T >::Matrix(), line::Matrix< T >::rows(), and unif().

Referenced by expanded(), plain(), and unif().