![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
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]. | |
| 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().
| 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().
| 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().
| 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 ) |
i_expanded: synchronous phase expansion; states are [a, q, sorted B phases].
Definition at line 304 of file qsys_mgck_sync.h.
References line::qsys::mgck_sync_detail::Triplets< T >::add(), coefficients(), colmask(), line::qsys::mgck_sync_detail::Triplets< T >::dense(), line::qsys::ServiceLaw< T >::deterministic(), emc(), expanded(), make_state(), matadd(), line::matmul(), rowmask(), tick(), and unif().
Referenced by expanded(), and line::qsys::qsys_mgck_sync().
|
inline |
Definition at line 294 of file qsys_mgck_sync.h.
References make_state().
Referenced by expanded(), and make_state().
| 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().
| 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().
| 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().
|
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().
| 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().