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

Transient queue-length distribution of the M/M/1/K queue. More...

#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstddef>
#include <limits>
#include <string>
#include <vector>
#include "line/api/qsys/qsys_mm1_transient.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for qsys_mm1k_transient.h:

Go to the source code of this file.

Classes

struct  line::qsys::Mm1kTransientResult
 Return value of qsys_mm1k_transient: [P, EN, P0, res]. More...

Namespaces

namespace  line
 Conservation laws of a layered queueing network, enumerated from its structure.
namespace  line::qsys

Functions

Mm1kTransientResult line::qsys::qsys_mm1k_transient (double lambda, double mu, double K, double n0, const std::vector< double > &t, double tol=1e-14, const std::string &method_in="auto")
 Transient distribution of the M/M/1/K queue (Takacs; Rubino 2020).

Detailed Description

Transient queue-length distribution of the M/M/1/K queue.

Port of matlab/src/api/qsys/qsys_mm1k_transient.m (native Python twin: python/line_solver/api/qsys/transient.py). K counts the job in service; the queue starts with N0 jobs and P(r, j) = P(N(t_r) = j | N(0) = N0), j = 0..K, for any load rho = lambda/mu. P(:, K) is the time-t blocking probability seen by a Poisson arrival and tends to the stationary loss probability of qsys_mm1k_loss; res.pi is the stationary law.

Methods: 'spectral' the eigen-expansion of Takacs, as given in Rubino 2020 eqs. (3.5)-(3.6), for any N0 = i: P_ij(t) = pi_j + 2/(K+1) rho^{(j-i)/2} sum_{h=1}^{K} e^{g_h t} w_h(i) w_h(j)/(1 + rho - 2 sqrt(rho) cos th_h), th_h = h pi/(K+1), g_h = -(lambda+mu) + 2 sqrt(lambda mu) cos th_h, w_h(j) = sqrt(rho) sin((j+1) th_h) - sin(j th_h), valid for rho = 1 as well. kappa bounds the amplification of the rho^{(j-i)/2} prefactors; the absolute error is about kappa*eps. 'uniformization' Jensen's method on the K+1 states at rate lambda+mu (Rubino 2020 Sec. 2.2; Rubino-Krinik 2021 Sec. 2) with a rigorously bounded Poisson window: absolute error <= errBound (<= tol). 'auto' 'spectral' when kappa*eps <= tol, else 'uniformization'.

ARITHMETIC: double only.

References: G. Rubino, "Transient analysis of Markovian queueing systems: a survey with focus on closed-forms and uniformization", Advanced Trends in Queueing Theory 2, ISTE/Wiley, 2020; L. Takacs, Introduction to the Theory of Queues, Oxford University Press, 1962.

Definition in file qsys_mm1k_transient.h.