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

M/D/c by Crommelin's embedded chain. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/qsys/qsys_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/lu.h"
#include "line/util/matrix.h"
Include dependency graph for qsys_mdc_crommelin.h:

Go to the source code of this file.

Classes

struct  line::qsys::MDcCrommelinResult< T >

Namespaces

namespace  line
namespace  line::qsys

Functions

template<class T>
MDcCrommelinResult< T > line::qsys::qsys_mdc_crommelin (const T &lambda_arr, const T &s, unsigned c, long truncation=-1)
 M/D/c by Crommelin's embedded chain.

Detailed Description

M/D/c by Crommelin's embedded chain.

Templated port of jar/src/main/java/jline/api/qsys/Qsys_mdc_crommelin.java and the native Python qsys_mdc_crommelin; MATLAB carries the method under qsys_dmc.m's "see also" rather than as its own file.

The chain is embedded at multiples of the deterministic service time s: X_{n+1} = max(0, X_n - c) + A_n, A_n ~ Poisson(lambda s), because in one service period exactly min(X_n, c) jobs complete and the arrivals in that period are Poisson. The embedded epochs are Poisson arrival epochs, so PASTA makes the embedded law the time-average law, and the result is EXACT for M/D/c under FCFS, not an approximation.

THE TRUNCATION IS THE ONLY ERROR. The default level is max(200, min(2500, 10/(1-rho) + 200)), which the references settled on empirically at six digits for moderate c; the cap keeps the dense LU affordable, since the transition matrix is triangular-banded but not sparse. A caller comparing against another codebase must pass the SAME truncation to both, as the defaults are the only free parameter.

The Poisson weights are formed in logs and exponentiated once, which is what keeps lambda s in the hundreds from overflowing the factorial.

ARITHMETIC: transcendental, for the Poisson weights.

Definition in file qsys_mdc_crommelin.h.