![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Fixed-sample-size confidence interval for a steady-state quantile. More...
#include <cmath>#include <cstddef>#include <string>#include <vector>#include "line/api/sim/sim_dist.h"#include "line/api/sim/sim_quest_heuristic_ci.h"#include "line/api/sim/sim_quest_options.h"#include "line/api/sim/sim_shapirowilk.h"#include "line/api/sim/sim_sts_quantile_areas.h"#include "line/api/sim/sim_types.h"#include "line/api/sim/sim_vonneumann.h"#include "line/num/number.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::sim::QuestResult< T > |
| Point estimate and interval delivered by the QUEST procedures. More... | |
Namespaces | |
| namespace | line |
| namespace | line::sim |
Functions | |
| template<class T> | |
| QuestResult< T > | line::sim::sim_fquest (const std::vector< T > &Y, double p, double alpha=0.05, const QuestOptions &options=QuestOptions()) |
| Fixed-sample-size confidence interval for a steady-state quantile. | |
Fixed-sample-size confidence interval for a steady-state quantile.
Port of matlab/src/api/sim/sim_fquest.m. The sample path Y has arbitrary fixed length; no sequential control of the run length is needed. The procedure is FQUEST and has four blocks:
Warmup. Starting from b = b0 and m = m0 it computes the b signed STS areas of the batched quantile process and tests them for randomness with von Neumann's ratio at the DECAYING significance beta*exp(-eta*(l-1)^theta) on iteration l, growing m by sqrt(2) whenever the test rejects. The decay is what terminates the loop once m can no longer grow: with a fixed significance the last iteration would repeat forever at m = floor(N/b).
Truncation. The first batch is deleted, which is the entire warmup treatment; there is no separate transient detector.
Batch-count selection. With b stepping down through s and m = floor(N* / b), four tests must pass in order: von Neumann and Shapiro-Wilk on the signed areas, then von Neumann and Shapiro-Wilk on the batched quantile estimators. b only ever decreases, and a failure at the last entry of s ends the stage.
Delivery. When all four tests pass the interval is ytilde_p(n*) +- t_{1-alpha/2, 2b-1} sqrt(V_p(w;b,m)/n*). Otherwise the sample was too small, heuristic is true, and under options.force the interval returned is the union of the wider of the two single-component intervals and Willink's skewness- and correlation-adjusted asymmetric interval.
WHAT THIS MAY BE RUN ON. Applicability is a condition on the output process, not on the model that produced it: geometric moment contraction (Wu 2005), a density positive and differentiable at the quantile of interest, short-range dependence and an FCLT for the indicator process. Two exclusions follow and neither raises an error, so they have to be observed by the caller. Do NOT use this on integer-valued output such as a queue length: the marginal has no density and the batched quantile has no Bahadur representation. And heavy-tailed service, which can break geometric moment contraction, is outside the theory. Use it on continuous output, that is response, waiting and sojourn times.
A DELIVERED INTERVAL MAY WELL BE THE HEURISTIC ONE: 22% to 65% of runs took that fallback in the reference's own test bed, rising with p. Read heuristic before quoting the half-width as an asymptotically justified one. Coverage measured there on M/M/1 waiting times at N = 200000 over 500 replications was 95.2% at p = 0.5, 96.2% at p = 0.9 and 95.6% at p = 0.99 against a nominal 95%, with the delivered half-width exceeding the empirically needed one by 1.16, 1.24 and 1.99 respectively.
Reference: A. Lolos, C. Alexopoulos, D. Goldsman, K. D. Dingec, A. C. Mokashi, J. R. Wilson, "A Fixed-Sample-Size Method for Estimating Steady-State Quantiles", Proc. Winter Simulation Conference, 2023.
Definition in file sim_fquest.h.