![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
The estimators of the native LDES engine: running integrals, the MSER-5 warmup filter, and the batch-means confidence intervals. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdint>#include <limits>#include <string>#include <vector>#include "line/solvers/wrappers/ldes/ldes_options.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::ldes::engine::Accum |
| The running per-(station, class) integrals and tallies. More... | |
| struct | line::ldes::engine::Truncation |
| Where the warmup ended, and whether a truncation was applied at all. More... | |
| struct | line::ldes::engine::Observations |
| The event-spaced observation series MSER-5 and the CI both read. More... | |
| struct | line::ldes::engine::StatTriple |
| Grand mean, standard error and degrees of freedom of a batch-means estimate. More... | |
| class | line::ldes::engine::Convergence |
| Convergence-based stopping: batch the four metrics and stop once EVERY active (station, class) pair has reached the requested relative precision. More... | |
Namespaces | |
| namespace | line |
| namespace | line::ldes |
| namespace | line::ldes::engine |
Functions | |
| int | line::ldes::engine::mser5_truncation (const std::vector< double > &obs, int batch_size) |
| MSER-5 truncation point over a series of observations, in BATCHES. | |
| double | line::ldes::engine::overlap_adjustment (double overlap) |
| The variance inflation of OVERLAPPING batch means. | |
| StatTriple | line::ldes::engine::bm_statistics (const std::vector< double > &obs, int batch_size) |
| Non-overlapping batch means. | |
| StatTriple | line::ldes::engine::obm_statistics (const std::vector< double > &obs, int batch_size, double overlap) |
| Overlapping batch means. | |
| double | line::ldes::engine::t_critical (double level, int df) |
| The two-sided t critical value, from the REFERENCE'S TABLE. | |
| StatTriple | line::ldes::engine::spectral_statistics (const std::vector< double > &obs, int batch_size, double low_freq_frac) |
| Heidelberger-Welch spectral estimate of the variance of the sample mean. | |
| StatTriple | line::ldes::engine::ci_statistics (const std::vector< double > &obs, int batch_size, const LdesOptions &o) |
| Dispatch on cimethod. | |
| void | line::ldes::engine::batch_means_ci (const Observations &obs, const Truncation &tr, const LdesOptions &o, LdesResult &res) |
| Fill the half-width matrices of res from the post-warmup observation series. | |
The estimators of the native LDES engine: running integrals, the MSER-5 warmup filter, and the batch-means confidence intervals.
THE INTEGRALS ARE LAZY. tot_qlen(i,r) is the time integral of the class-r queue length at station i, advanced only when that pair CHANGES. Advancing every pair on every event would be O(M*K) per event on a hot loop where the event touches one pair; the reference does the same thing with lastQueueUpdateTime, and the invariant is that update_qlen is called BEFORE any write to qlen, never after.
THE WARMUP FILTER IS MSER-5 over EVENT-SPACED observations, not time-spaced ones. That matters for what the estimators may then do with the series: an unweighted mean of per-interval averages overweights congested epochs, because a congested epoch contains more events and therefore more intervals per unit time. So the means below are integral DIFFERENCES over elapsed time, and only the CI – which needs a sequence of comparable observations, not a mean – reads the per-interval series directly.
Definition in file ldes_stats.h.