![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Tail quantile of the sojourn time in a non-preemptive priority M/M/1 queue. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdio>#include <limits>#include <numeric>#include <string>#include <vector>#include "line/api/sim/sim_dist.h"#include "line/util/error.h"#include "line/util/rng_ssj.h"Go to the source code of this file.
Classes | |
| struct | line::sim::PrioTailQuantileOptions |
| Options of sim_prio_tailquantile; defaults as in the MATLAB reference. More... | |
| struct | line::sim::PrioTailQuantileResult |
| Estimate for one target class. More... | |
| struct | line::sim::detail_prio_tq::Cycle |
| One regenerative cycle; buffers are reused across cycles. More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::sim |
| namespace | line::sim::detail_prio_tq |
Functions | |
| void | line::sim::detail_prio_tq::seed_stream (rng::Mrg32k3a &g, long long seed) |
| double | line::sim::detail_prio_tq::sample_var (const std::vector< double > &x) |
| std::pair< double, double > | line::sim::detail_prio_tq::quantile (const std::vector< double > &R, const std::vector< double > &L, std::size_t from, std::size_t to, double p, int m1, int m2, double sumAlpha) |
| Eq. | |
| std::vector< PrioTailQuantileResult > | line::sim::sim_prio_tailquantile (const std::vector< double > &lambda, const std::vector< double > &mu, double p, const PrioTailQuantileOptions &opt=PrioTailQuantileOptions()) |
| Tail quantile of the steady-state response time per class in a non-preemptive priority M/M/1 queue, with its batching confidence interval. | |
Tail quantile of the sojourn time in a non-preemptive priority M/M/1 queue.
Port of matlab/src/api/sim/sim_prio_tailquantile.m, cross-checked against jar/src/main/java/jline/api/sim/Sim_prio_tailquantile.java and python/line_solver/api/sim/prio_tailquantile.py.
K classes, Poisson arrivals lambda[k], exponential service mu[k], one server, NON-PREEMPTIVE priority (class index 0 highest), FCFS within a class. For p close to 1 the p-quantile Q_k(p) of each class's steady-state response time is estimated with Algorithm 1 of Guang et al.:
RANDOM NUMBERS. One MRG32k3a stream (line::rng::Mrg32k3a, L'Ecuyer's double-precision form), seeded by the same affine map and consumed in the same order as the other three codebases, so a seed gives the same estimate everywhere up to last-ulp differences of log().
WARNINGS BECOME FIELDS. Where MATLAB line_warning()s that the CE loop hit maxIter, the result carries ceConverged = false and the message in warnings.
Reference: J. Guang, G. Hong, X. Chen, X. Peng, L. Chen, B. Bai, G. Zhang, "Tail quantile estimation for non-preemptive priority queues", Proc. Winter Simulation Conference 2022, 85-96.
Definition in file sim_prio_tailquantile.h.