![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Myskja's enhanced third-moment approximation of the mean response time of a G/I/G/1 queue. More...
#include "line/api/qsys/qsys_mg1.h"#include "line/api/qsys/qsys_types.h"#include "line/num/number.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| QsysResult< T > | line::qsys::qsys_gig1_approx_myskja2 (const T &lambda, const T &mu, const T &ca, const T &cs, const T &q0, const T &qa) |
| Myskja's enhanced third-moment approximation of the mean response time of a G/I/G/1 queue. | |
Myskja's enhanced third-moment approximation of the mean response time of a G/I/G/1 queue.
Templated port of matlab/src/api/qsys/qsys_gig1_approx_myskja2.m.
ra = (1+ca^2)/2, rs = (1+cs^2)/2, rho = lambda/mu theta = [ rho(qa-ra) - (qa-ra^2) ] / [ 2 rho (ra-1) ] d = (1+1/ra)(1-rs)(1-(q0/qa)^3)(1-rho^3) D = (rs-theta)^2 + (2 rs - 1 + d)(ra-1), clamped at 0 W = (rho/(1-rho))/lambda [ rs + (1/rho)( sqrt(D) - (rs-theta) ) ]
At ca = 1 the interpolation parameter theta is a 0/0 form, so the exact M/G/1 answer is returned instead; that is also the anchor the method interpolates from.
ARITHMETIC. sqrt(D) and the cube of q0/qa make this transcendental (the cube alone would not, but the square root does), so the function is gated.
MATLAB-vs-JAR. jline.api.qsys.Qsys_gig1_approx_myskja2 sets ra = (1+ca)/2, rs = (1+cs)/2 and branches on |ca-1| < 1e-8, i.e. it reads ca/cs as squared coefficients of variation, and in the M/G/1 branch it calls qsys_mg1 with sqrt(cs) rather than cs. MATLAB reads them as coefficients of variation throughout. The two disagree on every non-Markovian input; this port follows MATLAB.
Definition in file qsys_gig1_approx_myskja2.h.