![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Default G/I/G/k approximation of the mean response time. More...
Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| QsysResult< T > | line::qsys::qsys_gigk_approx (const T &lambda, const T &mu, const T &ca, const T &cs, unsigned k) |
| Default G/I/G/k approximation of the mean response time. | |
Default G/I/G/k approximation of the mean response time.
Templated port of matlab/src/api/qsys/qsys_gigk_approx.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_gigk_approx.java (identical; the JAR is careful to write (k+1)/2.0 so the exponent stays a real, as in MATLAB).
rho = lambda/(mu k) alpha = (rho^k+rho)/2 if rho > 0.7 alpha = rho^((k+1)/2) otherwise W = (alpha/mu)(1/(1-rho))(ca^2+cs^2)/(2k) + 1/mu
The low-load branch raises rho to a half-integer power whenever k is even, which is a genuine transcendental, so the function requires num_traits<T>::has_transcendental and cannot be instantiated at exact arithmetic. Gating is at function level rather than per branch, since the branch is chosen at run time.
Definition in file qsys_gigk_approx.h.