![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Maximum-likelihood service-demand estimation at a processor-sharing queue. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <map>#include <string>#include <vector>#include "line/api/infer/infer_rps.h"#include "line/api/mam/map_pdf.h"#include "line/lang/qn/network_builder.h"#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/ctmc/solver_ctmc_getters.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/util/neldermead.h"Go to the source code of this file.
Classes | |
| struct | line::api::MlpsSample |
| One observation: a response time, the tagged class, and the arrival state. More... | |
Namespaces | |
| namespace | line |
| namespace | line::api |
Functions | |
| std::vector< double > | line::api::infer_mlps (const std::vector< double > &muZ, double nCores, const std::vector< MlpsSample > &samples) |
| MLPS demand estimation at a PS queue. | |
| std::vector< double > | line::api::infer_minps (const std::vector< double > &muZ, double nCores, const std::vector< MlpsSample > &samples) |
| MINPS: run MLPS and RPS and keep whichever gives the smaller mean demand. | |
Maximum-likelihood service-demand estimation at a processor-sharing queue.
Port of matlab/src/api/infer/infer_mlps.m and infer_minps.m. THESE ARE MATLAB-ONLY: there is no JAR or native-Python twin, so MATLAB is not merely the ground truth here, it is the only prior art.
WHAT MLPS IS. Each observation is a response time rt, the class of the tagged job, and the per-class queue length seen ON ARRIVAL. For a given vector of mean demands, the sojourn of a tagged job that arrives into a known queue state is the absorption time of a small CTMC: build the same PS queue with one EXTRA class carrying the tagged job, mark every transition that is the tagged job departing, and the remaining sub-generator is the phase-type representation of that sojourn. The likelihood of one sample is that phase-type density at rt, and the estimate maximizes their product.
WHY THE AUGMENTED MODELS ARE BUILT ONCE. The state space, the departure event indices and the absorbing subset depend only on the (tagged class, arrival queue length) PAIR, not on the demands being optimized. The reference caches them per distinct pair and rebuilds only the rates inside the objective; so does this port, because the enumeration is the expensive part and it would otherwise be repeated once per likelihood evaluation.
TWO SUBSTITUTIONS FOR MATLAB:
ARITHMETIC: double. The optimizer and the phase-type density are floating point, and the reference's tolerances are absolute in double.
Definition in file infer_mlps.h.