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

Functions

void input (const char *kind, const std::string &msg)
void dets_generator (int qbar, int rbar, int s, double mu, double theta, Matrix< double > &Qp, Matrix< double > &Qa)
 Transient generator over (q, r), q = 0..qbar, r = 0..rbar, index r*(qbar+1) + q.
std::vector< double > dets_jump (const std::vector< double > &v, int qbar, int rbar, int add, int rem, const std::string &policy, int &qn, int &rn)
 The staffing change at t_k applied to the row vector v over (q, r); qn < 0 means every state was absorbed.
double vsum (const std::vector< double > &x)
double dets_mean (const std::vector< std::vector< double > > &v, const std::vector< Matrix< double > > &Qs, const std::vector< double > &tb, const std::vector< char > &alive, double theta, int sK, double kill)
 Integral over [0, inf) of v_k exp(Q_k (x - t_k)) e exp(-theta t_k) on each piece: a finite piece by the block exponential [Q e; 0 0], the last by (-Q)^{-1} e, Inf when the last chain has no server and no killing.
std::string lower (const std::string &s)
DetsResult dets_core (double mu, double theta, int s0, const std::vector< double > &tk, const std::vector< int > &add, const std::vector< int > &rem, int nq, const std::vector< double > &tau, const std::string &pol, const std::string &wt)
 The common body once the changes are split into added and removed servers.
std::array< std::string, 2 > check_common (double mu, double theta, int s0, const std::vector< double > &tk, int nq, const std::string &policy, const std::string &wait)
 The checks MATLAB runs before splitting DSK, in its order; returns {policy, wait} lower-cased.

Function Documentation

◆ check_common()

std::array< std::string, 2 > line::qsys::detail_dets::check_common ( double mu,
double theta,
int s0,
const std::vector< double > & tk,
int nq,
const std::string & policy,
const std::string & wait )
inline

The checks MATLAB runs before splitting DSK, in its order; returns {policy, wait} lower-cased.

Definition at line 314 of file qsys_mtmstm_dets.h.

References check_common(), input(), and lower().

Referenced by check_common(), line::qsys::qsys_mtmstm_dets(), and line::qsys::qsys_mtmstm_dets().

◆ dets_core()

DetsResult line::qsys::detail_dets::dets_core ( double mu,
double theta,
int s0,
const std::vector< double > & tk,
const std::vector< int > & add,
const std::vector< int > & rem,
int nq,
const std::vector< double > & tau,
const std::string & pol,
const std::string & wt )
inline

◆ dets_generator()

void line::qsys::detail_dets::dets_generator ( int qbar,
int rbar,
int s,
double mu,
double theta,
Matrix< double > & Qp,
Matrix< double > & Qa )
inline

Transient generator over (q, r), q = 0..qbar, r = 0..rbar, index r*(qbar+1) + q.

Level r = 0 moves down in q at rate s*mu + q*theta and is absorbed from q = 0. A level r > 0 (servers due to leave under EH) drops to r - 1 at rate (s + r)*mu and moves down in q by abandonment only. Qa is the same chain killed at rate theta.

Definition at line 102 of file qsys_mtmstm_dets.h.

References dets_generator().

Referenced by dets_core(), and dets_generator().

◆ dets_jump()

std::vector< double > line::qsys::detail_dets::dets_jump ( const std::vector< double > & v,
int qbar,
int rbar,
int add,
int rem,
const std::string & policy,
int & qn,
int & rn )
inline

The staffing change at t_k applied to the row vector v over (q, r); qn < 0 means every state was absorbed.

Definition at line 126 of file qsys_mtmstm_dets.h.

References dets_jump().

Referenced by dets_core(), and dets_jump().

◆ dets_mean()

double line::qsys::detail_dets::dets_mean ( const std::vector< std::vector< double > > & v,
const std::vector< Matrix< double > > & Qs,
const std::vector< double > & tb,
const std::vector< char > & alive,
double theta,
int sK,
double kill )
inline

Integral over [0, inf) of v_k exp(Q_k (x - t_k)) e exp(-theta t_k) on each piece: a finite piece by the block exponential [Q e; 0 0], the last by (-Q)^{-1} e, Inf when the last chain has no server and no killing.

Definition at line 183 of file qsys_mtmstm_dets.h.

References dets_mean(), line::expm(), line::Matrix< T >::rows(), and line::solve().

Referenced by dets_core(), and dets_mean().

◆ input()

void line::qsys::detail_dets::input ( const char * kind,
const std::string & msg )
inline

◆ lower()

std::string line::qsys::detail_dets::lower ( const std::string & s)
inline

Definition at line 226 of file qsys_mtmstm_dets.h.

References lower().

Referenced by check_common(), and lower().

◆ vsum()

double line::qsys::detail_dets::vsum ( const std::vector< double > & x)
inline

Definition at line 172 of file qsys_mtmstm_dets.h.

References vsum().

Referenced by dets_core(), and vsum().