![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
M3PP(2, 2) fitted to the count COVARIANCE between its two classes (matlab/lib/m3a/m3a/m3pp/m3pp22_fitc_approx_cov_multiclass.m and matlab/lib/m3a/m3a/m3pp/m3pp22_fitc_approx_cov.m). More...
#include <cstddef>#include <vector>#include "line/api/mam/map_fit_detail.h"#include "line/api/mam/map_moment.h"#include "line/api/mam/mmap_lambda.h"#include "line/api/mam/mmpp2_fitc_approx.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::mam::M3pp22FitcCovResult< T > |
| Result of the covariance-matching M3PP(2, 2) fits. More... | |
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T> | |
| M3pp22FitcCovResult< T > | line::mam::m3pp22_fitc_approx_cov_multiclass (const Map< T > &mmpp, const std::vector< T > &ai, const T &st3, const T &t3) |
| Split a GIVEN MMPP(2) into two classes, matching the per-class rates exactly and the count covariance between them at t3 as closely as feasible. | |
| template<class T> | |
| M3pp22FitcCovResult< T > | line::mam::m3pp22_fitc_approx_cov (const T &a, const T &bt1, const T &bt2, const T &binf, const T &m3t2, const T &t1, const T &t2, const std::vector< T > &ai, const T &st3, const T &t3, const AugLagOptions< T > &opt) |
| Fit the underlying MMPP(2) by optimization, then apply the covariance split. | |
| template<class T> | |
| M3pp22FitcCovResult< T > | line::mam::m3pp22_fitc_approx_cov (const T &a, const T &bt1, const T &bt2, const T &binf, const T &m3t2, const T &t1, const T &t2, const std::vector< T > &ai, const T &st3, const T &t3) |
| m3pp22_fitc_approx_cov with the default tuning of the MMPP(2) solve. | |
M3PP(2, 2) fitted to the count COVARIANCE between its two classes (matlab/lib/m3a/m3a/m3pp/m3pp22_fitc_approx_cov_multiclass.m and matlab/lib/m3a/m3a/m3pp/m3pp22_fitc_approx_cov.m).
TWO CLASSES ONLY, by construction, and the reference refuses more by name. Given the underlying MMPP(2) the per-phase marking probabilities (q1, q2) of the first class satisfy two relations: the class rate a1 is affine in them, and the count covariance sigma at t3 is a QUADRATIC in q2 once q1 has been eliminated,
sigma(q2) = w0 + w1 q2 + w2 q2^2 ,
so the inverse has two roots. Rather than picking one and repairing the result, the reference derives, for EACH root separately, the interval of covariances over which that root keeps both marking probabilities inside [0, 1] and the discriminant non-negative; it then clamps the requested covariance into whichever interval is closer to it and takes the matching root. A root whose interval is provably empty is flagged rather than clamped. That bound derivation is the bulk of the reference and of this port, and it is transcribed relation by relation: square-root argument >= 0, q2 >= 0, q1 >= 0, q2 <= 1, q1 <= 1.
The clamp is the only approximation: the rates are matched exactly, and the covariance is matched exactly whenever the request lies inside the feasible interval of either root.
Degenerate inputs short-circuit as in the reference: a Poisson underlying process splits D1 in proportion to the class rates, and a single class takes all of D1.
Gated on transcendental arithmetic: the bounds carry exp(-(r1 + r2) t3).
Definition in file m3pp22_fitc_cov.h.