![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Fluid response-time likelihood, and the FMLPS demand estimator built on it. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <limits>#include <vector>#include "line/api/infer/infer_mlps.h"#include "line/lang/qn/network_struct.h"#include "line/num/number.h"#include "line/solvers/fluid/fluid_odes.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/solvers/fluid/fluid_stiff.h"#include "line/util/lsoda.h"#include "line/util/ode.h"Go to the source code of this file.
Classes | |
| struct | line::api::FluidRtLikelihood |
| What the fluid likelihood call reports. More... | |
Namespaces | |
| namespace | line |
| namespace | line::api |
Functions | |
| template<class T> | |
| FluidRtLikelihood | line::api::infer_fluid_ps_rt_likelihood (const qn::NetworkStruct< T > &sn, std::size_t ist, std::size_t cls, const std::vector< double > &levels, double rsampled, double marked=1.0) |
| The fluid passage-time density at one observed response time. | |
| template<class T> | |
| std::vector< double > | line::api::infer_fmlps (const qn::NetworkStruct< T > &sn, std::size_t ist, const std::vector< MlpsSample > &samples) |
| FMLPS: the fluid analogue of MLPS. | |
Fluid response-time likelihood, and the FMLPS demand estimator built on it.
Port of matlab/src/api/infer/infer_fluid_ps_rt_likelihood.m and infer_fmlps.m. Both are MATLAB-ONLY: no JAR, no native-Python twin.
Reference: Casale et al., "Fluid Analysis of Queueing in Processor Sharing Systems".
WHAT THE LIKELIHOOD IS. MLPS builds an exact CTMC per observation and reads a phase-type density; that is exact and costs a state space. FMLPS replaces it with the FLUID limit: mark one unit of fluid at the reference station in the tagged class, let the deterministic drift carry it, and the passage-time density at the observed response time is -d/dt (marked mass) / mass0. The marked mass is nonincreasing, so that derivative is the density and the likelihood needs no separate normalization.
THE AUGMENTATION IS THE SAME ONE fluid_passage_time PERFORMS, and this file deliberately reuses it rather than re-deriving the drift. The reference expands sn.mu, sn.phi, sn.proc and the routing table from K to K+1 classes by hand and hands the loose arrays to solver_fluid_odes; the C++ fluid solver takes a NetworkStruct, and the marked-fluid construction it already carries is exactly the tagged class K+1 – a departure of the marked block UNMARKS the fluid and delivers it wherever the class routes, which is precisely the reference's "absorption at refIdx: the tagged class switches back to the original classes". Re-transcribing the routing expansion would duplicate the one part of the reference where the index arithmetic (l:Kc:end against l:K:end) is easiest to get wrong.
TWO DIFFERENCES FROM THE CTMC ESTIMATOR THAT A CALLER MUST KNOW:
ARITHMETIC: double, following the ODE.
Definition in file infer_fmlps.h.