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

Discrete-time Markovian arrival processes (D-MAPs). More...

#include <cstddef>
#include <random>
#include <vector>
#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/lu.h"
#include "line/util/matrix.h"
Include dependency graph for dmap.h:

Go to the source code of this file.

Classes

struct  line::mam::Dmap< T >
 A discrete-time MAP: substochastic D0 (no arrival) and D1 (one arrival). More...

Namespaces

namespace  line
namespace  line::mam

Functions

template<class T>
std::vector< T > line::mam::dmap_pie (const Dmap< T > &d)
 Stationary phase distribution at arrival epochs.
template<class T>
std::vector< T > line::mam::dmap_moment (const Dmap< T > &d, const std::vector< unsigned > &orders)
 Raw moments of the interarrival time in slots, for orders 1, 2 and 3 only.
template<class T>
bool line::mam::dmap_isfeasible (const Dmap< T > &d)
 True when D0 and D1 are nonnegative and D0 + D1 is stochastic.
template<class T>
line::mam::dmap_exp_mul_int (const Dmap< T > &a, const Dmap< T > &b, unsigned L, const std::vector< T > &alA, const std::vector< T > &alB)
 Inner product of the two interarrival densities truncated at lag L.
template<class T>
line::mam::dmap_exp_mul_int (const Dmap< T > &a, const Dmap< T > &b, unsigned L)
 Default stationary vectors, matching the three-argument MATLAB call.
template<class T>
line::mam::dmap_dist (const Dmap< T > &a, const Dmap< T > &b, unsigned L, const std::vector< T > &alA, const std::vector< T > &alB)
 Squared L2 distance between the interarrival densities truncated at lag L.
template<class T>
line::mam::dmap_dist (const Dmap< T > &a, const Dmap< T > &b, unsigned L)
 Default stationary vectors, matching the three-argument MATLAB call.
template<class T>
line::mam::dmap_geo_mul_sum (const Dmap< T > &a, const Dmap< T > &b, const std::vector< T > &alA, const std::vector< T > &alB)
 Geometrically weighted sum of the lagged joint moments, the building block of the autocorrelation distance.
template<class T>
line::mam::dmap_geo_mul_sum (const Dmap< T > &a, const Dmap< T > &b)
 Default stationary vectors, matching the two-argument MATLAB call.
template<class T>
line::mam::dmap_dist_acf (const Dmap< T > &a, const Dmap< T > &b, const std::vector< T > &alA, const std::vector< T > &alB)
 Squared distance between the autocorrelation structures of two D-MAPs.
template<class T>
line::mam::dmap_dist_acf (const Dmap< T > &a, const Dmap< T > &b)
 Default stationary vectors, matching the two-argument MATLAB call.
template<class T>
line::mam::dmap_dist_lag1 (const Dmap< T > &a, const Dmap< T > &b, const std::vector< T > &alA, const std::vector< T > &alB)
 Squared distance between the lag-1 joint densities of two D-MAPs.
template<class T>
line::mam::dmap_dist_lag1 (const Dmap< T > &a, const Dmap< T > &b)
 Default stationary vectors, matching the two-argument MATLAB call.
template<class T, class Gen>
std::vector< unsigned > line::mam::dmap_sample (const Dmap< T > &d, std::size_t n, Gen &gen)
 n interarrival times in slots, drawn by walking the phase process.

Detailed Description

Discrete-time Markovian arrival processes (D-MAPs).

Templated port of matlab/lib/kpctoolbox/dmap: dmap_pie.m, dmap_moment.m, dmap_isfeasible.m, dmap_exp_mul_int.m, dmap_dist.m, dmap_geo_mul_sum.m, dmap_dist_acf.m, dmap_dist_lag1.m and dmap_sample.m.

A D-MAP is the pair (D0, D1) of SUBSTOCHASTIC matrices with D0 + D1 stochastic: D0 carries a slot with no arrival and D1 a slot with one. The continuous-time analogue has D0 with a negative diagonal and rows of D0 + D1 summing to ZERO, so a routine written for one representation silently produces nonsense on the other. Interarrival times are counted in SLOTS and are at least one, which is why the first moment is alpha (I - D0)^-1 1 and not the continuous alpha (-D0)^-1 1.

The distance functionals all reduce to Stein equations A X B - X + C = 0, MATLAB's three-argument dlyap. They are solved here through the Kronecker form, which is exact in the rational backend where a Schur-based solver could not be.

Definition in file dmap.h.