![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Embedded jump probabilities and mean holding time of a semi-Markov stage. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <cstdio>#include <string>#include <vector>#include "line/api/mc/smp_stage_cif.h"#include "line/lang/distribution.h"#include "line/lang/lang_types.h"#include "line/util/error.h"Go to the source code of this file.
Classes | |
| struct | line::mc::SmpStageQuad |
| What smp_stage_quad returns. More... | |
Namespaces | |
| namespace | line |
| Conservation laws of a layered queueing network, enumerated from its structure. | |
| namespace | line::mc |
Functions | |
| template<class T> | |
| SmpStageQuad | line::mc::smp_stage_quad (const std::vector< lang::Distrib< T > > &arcs, const std::vector< double > &probs) |
Embedded jump probabilities and mean holding time of a semi-Markov stage.
Port of matlab/src/api/mc/smp_stage_quad.m. For KERNEL arcs both are in closed form: P = probs and m = sum_h p_h E[F_h]. For COMPETING arcs they are P_h = CIF_h(Inf) and m = int_0^Inf (1 - Fhold(t)) dt (see smp_stage_cif.h), evaluated on [0, U], where U starts at the largest arc mean and doubles until the joint survival is below 1e-12 (or U reaches 1e8 times that mean). The grid is 20001 uniform points on [0, U] merged with 4001 points on [0, min(U, 40 E[F_h])] and the point min(E[F_h], U) per arc, so a fast clock beside a slow one is still resolved. P is renormalized to sum to one, and the mean is Simpson's rule with the midpoint survival from a second smp_stage_cif call.
U is returned as well: the horizon the quadrature covered.
Definition in file smp_stage_quad.h.