![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Exact analysis of the M/M/c/K queue (truncated Erlang form). More...
#include <cstddef>#include <vector>#include "line/api/qsys/qsys_types.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::qsys::MmckResult< T > |
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| MmckResult< T > | line::qsys::qsys_mmck (const T &lambda, const T &mu, unsigned c, unsigned K) |
| Exact analysis of the M/M/c/K queue (truncated Erlang form). | |
Exact analysis of the M/M/c/K queue (truncated Erlang form).
Templated port of matlab/src/api/qsys/qsys_mmck.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mmck.java.
a = lambda/mu, rho = a/c p_n = a^n/n! p_0 0 <= n <= c p_n = a^c/c! rho^(n-c) p_0 c <= n <= K p_0 = 1 / [ sum_{n<c} a^n/n! + (a^c/c!) sum_{n=0}^{K-c} rho^n ]
All exponents are integers and the normalization is a finite sum, so the whole computation stays in the field of the inputs and is exact for T = Rational. The exact instantiation is not academic here: MATLAB builds the unnormalized vector as a^n/n! and warns about overflow, which is the failure mode for large a and K; in rational arithmetic the intermediate magnitudes are irrelevant.
Unlike the unbounded M/M/c, no stability condition is needed: a finite capacity makes every load admissible, rho >= 1 included.
Definition in file qsys_mmck.h.