![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Blocking probability of the M/M/1/K queue. More...
#include <cmath>#include "line/api/qsys/qsys_types.h"#include "line/lang/lang_types.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::qsys::Mm1kLossResult< T > |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| Mm1kLossResult< T > | line::qsys::qsys_mm1k_loss (const T &lambda, const T &mu, unsigned K) |
| Blocking probability of the M/M/1/K queue. | |
Blocking probability of the M/M/1/K queue.
Templated port of matlab/src/api/qsys/qsys_mm1k_loss.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mm1k_loss.java (identical).
rho = lambda/mu Ploss = (1-rho)/(1-rho^(K+1)) * rho^K
Only integer powers appear, so this is exact for T = Rational. It is the closed form the Niu-Cooper transform-free M/G/1/K analysis collapses onto when the service is exponential, and qsys_mg1k_loss must reproduce it.
The formula has a removable singularity at rho = 1, where the true value is 1/(K+1): the stationary law is uniform over 0..K, so the full state carries 1/(K+1) like every other. This port RAISED there until 2026-09-13, while MATLAB, the JAR and python all returned the limit, so the one caller that reaches a saturated M/M/1/K got an exception from C++ and a number from the other three. The limit is a rational, not an approximation, so it is exact for T = Rational as well.
Definition in file qsys_mm1k_loss.h.