![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Marked MAP (MMAP) algebra: per-class rates, class probabilities, superposition, normalization and scaling. More...
#include <cstddef>#include <vector>#include "line/api/mam/map_moment.h"#include "line/api/mam/map_transform.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::Mmap< T > |
| An MMAP: the underlying MAP plus the per-class arrival matrices. More... | |
Namespaces | |
| namespace | line |
| namespace | line::mam |
Functions | |
| template<class T> | |
| Matrix< T > | line::mam::kron (const Matrix< T > &A, const Matrix< T > &B) |
| Kronecker product. | |
| template<class T> | |
| Matrix< T > | line::mam::krons (const Matrix< T > &A, const Matrix< T > &B) |
| Kronecker sum, MATLAB's krons: kron(A, I_nb) + kron(I_na, B). | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_super (const Mmap< T > &a, const Mmap< T > &b) |
| Superposition of two MMAPs: the phase process is the product chain, and the class list of the result is the concatenation of the two class lists (mmap_super.m, 'default' option). | |
| template<class T> | |
| std::vector< T > | line::mam::mmap_count_lambda (const Mmap< T > &m) |
| Per-class arrival rates, lambda_c = theta D1^(c) e. | |
| template<class T> | |
| std::vector< T > | line::mam::mmap_lambda (const Mmap< T > &m) |
| Alias kept for parity with the MATLAB name. | |
| template<class T> | |
| std::vector< T > | line::mam::mmap_pc (const Mmap< T > &m) |
| Class probabilities seen by an arriving job, pc = pie (-D0)^-1 D1^(c) e. | |
| template<class T> | |
| bool | line::mam::mmap_isfeasible (const Mmap< T > &m) |
| True when the per-class matrices partition D1 exactly and D0 is a generator. | |
| template<class T> | |
| bool | line::mam::mmap_isfeasible_tol (const Mmap< T > &m, const T &tol) |
| Feasibility of a marked MAP WITHIN A TOLERANCE, the semantics of matlab/lib/m3a/m3a/mmap/mmap_isfeasible.m, whose second argument defaults to 10^-map_feastol = 1e-8: every per-class matrix non-negative up to -tol, the per-class matrices summing to D1 up to tol, and the underlying MAP feasible. | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_normalize (const Mmap< T > &in) |
| Clamp negative off-diagonal and per-class entries to zero and rebuild D1 and the diagonal of D0 from them (mmap_normalize.m). | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_scale (const Mmap< T > &in, const T &M) |
| Rescale time so that the mean inter-arrival time becomes M. | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_hide (const Mmap< T > &in, const std::vector< std::size_t > &hide) |
| Hide a subset of the marks (mmap_hide.m). | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_hide_but (const Mmap< T > &in, std::size_t keep) |
| mmap_hide(m, setdiff(1:K, keep)): keep ONE mark, hide every other. | |
| template<class T> | |
| Mmap< T > | line::mam::mmap_mark (const Map< T > &base, const Matrix< T > &weights) |
| Turn a MAP into a single-class MMAP (mmap_mark with one class). | |
Marked MAP (MMAP) algebra: per-class rates, class probabilities, superposition, normalization and scaling.
Templated port of the M3A/kpctoolbox MMAP primitives (mmap_count_lambda.m, mmap_lambda.m, mmap_pc.m, mmap_super.m, mmap_normalize.m, mmap_scale.m, mmap_mark.m, mmap_hide.m, mmap_isfeasible.m).
An MMAP is the tuple (D0, D1, D1^(1), ..., D1^(C)): D1 is the aggregate arrival matrix and the per-class matrices partition it, sum_c D1^(c) = D1. Every quantity here is rational in the entries, so the exact instantiation carries the partition identity exactly; that identity is precisely what marking and splitting operations break when they are wrong, and a rounded check cannot tell a broken partition from an accumulation of error.
Superposition uses the Kronecker sum, as in MATLAB's krons: for generators A and B, krons(A,B) = kron(A, I) + kron(I, B), so the phase process of the superposition is the product chain.
Definition in file mmap_lambda.h.