![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
M/G/1 under PSJF (preemptive shortest job first). More...
#include <algorithm>#include <cstddef>#include <numeric>#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_psjf (const std::vector< T > &lambda, const std::vector< T > &mu, const std::vector< T > &cs) |
| M/G/1 under PSJF (preemptive shortest job first). | |
M/G/1 under PSJF (preemptive shortest job first).
Templated port of matlab/src/api/qsys/qsys_mg1_psjf.m, cross-checked against jar/src/main/java/jline/api/qsys/Qsys_mg1_psjf.java.
Priority follows the original size, so a job of size x is delayed only by work of size at most x (Wierman and Harchol-Balter, SIGMETRICS 2003, Sec. 3.2):
rho(x) = lambda int_0^x t f(t) dt m2(x) = lambda int_0^x t^2 f(t) dt E[T(x)] = x/(1-rho(x)) + m2(x)/(2 (1-rho(x))^2)
As in qsys_mg1_fb, MATLAB has an exponential path – closed-form truncated moments of the mixture, class mean by quadrature over [0, 20/mu_k] – and a general path that sorts the classes by increasing mean size and evaluates the same expression at x = 1/mu_k with the truncated moments replaced by the per-class second moments of the classes at least as fast. Both are reproduced.
ARITHMETIC. exp and the adaptive quadrature make this transcendental.
Definition in file qsys_mg1_psjf.h.