LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
qbd_setupdelayoff.h File Reference

Mean queue length of an M/M/1 queue with a setup delay and a delayed-off period, solved as a QBD. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/mam/qbd_r.h"
#include "line/api/mc/ctmc_solve.h"
#include "line/lang/lang_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for qbd_setupdelayoff.h:

Go to the source code of this file.

Classes

struct  line::mam::SetupDelayoffClosed< T >
 Mean queue length and throughput of the CLOSED setup/delay-off queue. More...

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
Matrix< T > line::mam::coxian_phase_subgen (const T &rate, const T &scv)
 Sub-generator of the canonical Coxian form with the given RATE and SCV, entered at phase 1 (the coxian_phase local of qbd_setupdelayoff.m, which routes through Coxian.fitMeanAndSCV for SCV != 1).
template<class T>
line::mam::qbd_setupdelayoff (const T &lambda, const T &mu, const T &alpharate, const T &alphascv, const T &betarate, const T &betascv)
 Mean queue length of the M/M/1 queue with setup delay and delay-off (qbd_setupdelayoff.m).
template<class T>
SetupDelayoffClosed< T > line::mam::qbd_setupdelayoff_closed (const T &N, const T &Z, const T &mu, const T &alpharate, const T &alphascv, const T &betarate, const T &betascv)
 Mean queue length and throughput of a FINITE-POPULATION queue with setup delay and delay-off, a port of matlab/src/api/mam/qbd_setupdelayoff_closed.m.

Detailed Description

Mean queue length of an M/M/1 queue with a setup delay and a delayed-off period, solved as a QBD.

Templated port of matlab/src/api/mam/qbd_setupdelayoff.m. The server is switched off when the system empties, but only after a delay-off period of rate betarate and SCV betascv has elapsed; an arrival during that period finds the server still up. Once off, an arrival starts a setup of rate alpharate and SCV alphascv before service can begin.

The QBD phase index is overloaded by level, which is why the phases cannot be redistributed on a level change:

  • at level 0 phase 1 is "server off" and phases na+1..na+nb are the delay-off phases;
  • above level 0 phases 1..na are the setup phases and phase na+1 is the busy server. An arrival to an off server must therefore enter the setup at phase 1, which is why both phases are built in CANONICAL COXIAN form: its entry vector is [1 0 ... 0] for every SCV. The reference notes that APH.fitMeanAndSCV violates this for SCV > 1, returning a hyperexponential entered at phase 2 with probability 3/4, which the chain then silently entered at phase 1.

The phases are given as RATES and an exponential phase is built from its rate directly rather than round-tripped through its mean, which is what the reference does after the round trip turned a finite 1e8 rate into an infinite one.

ARITHMETIC. Gated on num_traits<T>::has_transcendental: the Coxian fit takes a square root and R comes from cyclic reduction.

TRUNCATION. The level series is cut where MATLAB's QBD_pi cuts it, at accumulated mass 1 - 1e-10 or 501 level vectors, whichever comes first (QBD_pi's MaxNumComp default is 500). qbd_pi's own default of 20000 levels would keep more of the tail and report a slightly larger queue length, so the cap is passed explicitly.

Definition in file qbd_setupdelayoff.h.