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

G/G/1 dispatcher: exact where a two-moment description determines the answer, Allen-Cunneen otherwise. More...

Include dependency graph for qsys_gg1.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::qsys

Functions

template<class T>
QsysResult< T > line::qsys::qsys_gg1 (const T &lambda, const T &mu, const T &ca2, const T &cs2)
 G/G/1 dispatcher: exact where a two-moment description determines the answer, Allen-Cunneen otherwise.

Detailed Description

G/G/1 dispatcher: exact where a two-moment description determines the answer, Allen-Cunneen otherwise.

Templated port of matlab/src/api/qsys/qsys_gg1.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_gg1.java.

ca2 = cs2 = 1 -> qsys_mm1 (exact) ca2 = 1 -> qsys_mg1 with cs = sqrt(cs2) (exact) cs2 = 1 -> qsys_gm1 at the G/M/1 root (exact) otherwise -> qsys_gig1_approx_allencunneen (approximation)

In the G/M/1 branch the interarrival law is fitted from (lambda, ca2) by a two-moment renewal process – a balanced-means H2 for ca2 > 1, a Tijms mixture of Erlang-(j-1)/Erlang-j for ca2 < 1, deterministic below 1e-6 – and sigma is the root in (0,1) of sigma = A*(mu(1-sigma)) with A* the interarrival LST. The map T(x) = A*(mu(1-x)) is increasing and the queue root is its smallest fixed point, so the iterates from sigma_0 = rho converge monotonically; MATLAB runs at most 100000 of them and stops at an absolute step below 1e-13, which is reproduced here.

ARITHMETIC. The fixed point is driven to a tolerance and the deterministic branch evaluates exp, so the whole function is gated on transcendental arithmetic. The three exact branches are individually available at Rational through qsys_mm1, qsys_mg1 and qsys_gm1; only the dispatcher, whose tolerance test |ca2-1| < 1e-8 is itself inexact, is gated.

MATLAB-vs-JAR. The JAR returns L, Lq, W, Wq, p0 (and, in a second overload, a geometric pk) whereas MATLAB returns [W, rhohat]. The W they compute is the same; the port follows the MATLAB return list, since rhohat is what the rest of the qsys family consumes.

Definition in file qsys_gg1.h.