![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
M/G/1 under FB (feedback), also called LAS (least attained service). More...
#include <cstddef>#include <vector>#include "line/api/qsys/qsys_mg1_setf.h"#include "line/api/qsys/qsys_quadrature.h"#include "line/api/qsys/qsys_types.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::qsys |
Functions | |
| template<class T> | |
| Mg1DisciplineResult< T > | line::qsys::qsys_mg1_fb (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &cs) |
| M/G/1 under FB (feedback), also called LAS (least attained service). | |
M/G/1 under FB (feedback), also called LAS (least attained service).
Templated port of matlab/src/api/qsys/qsys_mg1_fb.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mg1_fb.java.
The job with the least attained service holds the server, so priority depends on age, not on the original or remaining size. For a job of size x (Wierman and Harchol-Balter, SIGMETRICS 2003, Sec. 3.3)
rho_x = lambda int_0^x Fbar(t) dt num(x) = lambda int_0^x t Fbar(t) dt E[T(x)] = num(x)/(1-rho_x)^2 + x/(1-rho_x)
with Fbar the tail of the mixture job-size law. MATLAB takes two paths:
all cs_i = 1 (within 1e-6): the mixture is a mixture of exponentials, the two truncated integrals are closed forms, and the class mean is E[T_k] = int_0^{20/mu_k} E[T(x)] mu_k e^{-mu_k x} dx by quadrature; otherwise: the class is collapsed onto its mean size x = 1/mu_k and the non-exponential truncated integrals are replaced by the bounded surrogates min(x, 1/mu_i) and min(x^2/2, 1/mu_i^2).
Both paths are reproduced verbatim, including the truncation of the outer integral at 20 mean service times, which is not an implementation detail: it biases the class mean low by the tail beyond 20 e-foldings, of relative order 1e-8, and a port that integrated to infinity would not reproduce the reference.
ARITHMETIC. exp and the adaptive quadrature make this transcendental.
Definition in file qsys_mg1_fb.h.