LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
aph_simplify.h File Reference

Composition of two matrix-exponential distributions given in (alpha, T) form. More...

#include <cstddef>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for aph_simplify.h:

Go to the source code of this file.

Classes

struct  line::mam::AphPair< T >
 A matrix-exponential law in (alpha, S) form: initial vector and subgenerator. More...

Namespaces

namespace  line
namespace  line::mam

Enumerations

enum class  line::mam::AphPattern { line::mam::Sequence = 1 , line::mam::Parallel = 2 , line::mam::Branch = 3 , line::mam::Loop = 4 }
 The pattern argument of aph_simplify.m, by name. More...

Functions

template<class T>
AphPair< T > line::mam::aph_simplify (const AphPair< T > &d1, const AphPair< T > &d2, const T &p1, const T &p2, AphPattern pattern)
 Compose two matrix-exponential laws, as aph_simplify.m does.

Detailed Description

Composition of two matrix-exponential distributions given in (alpha, T) form.

Port of matlab/lib/kpctoolbox/aph/aph_simplify.m. The three patterns are the three ways two activities can be composed in an LQN activity graph, which is the caller this exists for (updateMetricsMomentBased):

Sequence X1 + X2 the convolution Parallel max(X1, X2) both run, the composite ends with the last Branch X1 w.p. p1, X2 w.p. p2 the mixture

WHY (alpha, T) AND NOT A Map. A MAP pair (D0, D1) fixes the RESTART law as well as the absorption law, and every one of these patterns is a statement about a single passage: what happens after absorption is the caller's, not the composition's. aph_fit.h converts in the other direction (aph_canonical) precisely once, when a fitted APH has to become a process.

THE ALPHA VECTORS ARE SUB-STOCHASTIC ON PURPOSE. 1 - alpha*e is the mass that skips the phase process entirely, i.e. an atom at zero, and each pattern routes it explicitly – in the sequence, the mass of X1 that starts already absorbed enters X2's initial vector directly. Renormalizing alpha would drop that atom and shorten the composite.

Definition in file aph_simplify.h.