![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Random MAP, MMPP, MMAP, acyclic-PH and hyperexponential generators, plus the hyperexponential reader. More...
#include <cmath>#include <cstddef>#include <random>#include <vector>#include "line/api/mam/map_moment.h"#include "line/api/mam/map_transform.h"#include "line/api/mam/mmap_lambda.h"#include "line/api/mc/dtmc_solve.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/linalg.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::mam::HyperParams< T > |
| Rates and branch probabilities of a hyperexponential given as a MAP. More... | |
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T, class Gen> | |
| Map< T > | line::mam::map_rand (std::size_t K, Gen &gen) |
| Random MAP of order K with uniform [0,1) entries, normalized. | |
| template<class T, class Gen> | |
| Map< T > | line::mam::map_randn (std::size_t K, double mu, double sigma, Gen &gen) |
| Random MAP of order K with folded normal entries, normalized. | |
| template<class T, class Gen> | |
| Map< T > | line::mam::mmpp_rand (std::size_t K, Gen &gen) |
| Random MMPP of order K: the arrival matrix is diagonal, so arrivals do not switch phase. | |
| template<class T, class Gen> | |
| Mmap< T > | line::mam::m3pp_rand (std::size_t K, std::size_t classes, Gen &gen) |
| Random M3PP of order K with classes marks (m3a/m3pp/m3pp_rand.m). | |
| template<class T, class Gen> | |
| Map< T > | line::mam::aph_rand (std::size_t K, Gen &gen) |
| Random acyclic PH renewal process of order K, upper triangular in D0. | |
| template<class T, class Gen> | |
| Map< T > | line::mam::hyper_rand (std::size_t k, Gen &gen) |
| Random hyperexponential of order k, given as a MAP. | |
| template<class T, class Gen> | |
| Mmap< T > | line::mam::mmap_rand (std::size_t order, std::size_t classes, Gen &gen) |
| Random MMAP of the given order with a random split of D1 across the classes. | |
| template<class T> | |
| HyperParams< T > | line::mam::ph2hyper (const Map< T > &ph) |
| Reads a hyperexponential MAP back into rates and branch probabilities. | |
Random MAP, MMPP, MMAP, acyclic-PH and hyperexponential generators, plus the hyperexponential reader.
Templated port of matlab/lib/kpctoolbox/map/map_rand.m, map_randn.m, matlab/lib/kpctoolbox/mmpp/mmpp_rand.m, matlab/lib/kpctoolbox/aph/aph_rand.m, hyper_rand.m, ph2hyper.m and matlab/lib/m3a/m3a/mmap/mmap_rand.m.
The generators take an explicit engine, following ctmc_rand, so a caller can reproduce a draw; they therefore do NOT reproduce the MATLAB stream and are only distributionally equivalent to it. Everything is drawn on the raw matrices and then passed through map_normalize, which is what makes the result a generator rather than a nonnegative matrix pair.
mmap_rand draws its class split once. MATLAB redraws it inside a loop over the phases and keeps only the last draw, so the two agree in law and differ only in how far the stream is advanced.
Definition in file map_rand.h.