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

Moments and index of dispersion of an inter-departure MAP. More...

#include <cmath>
#include <cstddef>
#include <string>
#include <vector>
#include "line/api/mam/map_moment.h"
#include "line/api/mc/ctmc_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 fes_map_moments.h:

Go to the source code of this file.

Classes

struct  line::fes::FesMapMoments< T >
 Descriptors a MAP(2) is fitted against. More...

Namespaces

namespace  line
namespace  line::fes

Functions

template<class T>
std::vector< T > line::fes::fes_map_euler (const std::vector< T > &v, const Matrix< T > &T0, const T &dt, double tol, std::size_t iter_max)
 Approximate v (-T0)^-1 by the trapezoid rule with the Euler propagator.
template<class T>
FesMapMoments< T > line::fes::fes_map_moments (const mam::Map< T > &map, const std::string &method="ssolve", double step_safety=0.1, double tol=1e-12, std::size_t iter_max=1000000)
 Moments and index of dispersion of an inter-departure MAP.

Detailed Description

Moments and index of dispersion of an inter-departure MAP.

Templated port of matlab/src/api/fes/fes_map_moments.m and fes_map_euler.m, mirrored by the JAR and native Python. Evaluates equations (4), (5) and (7) of Casale, Mi, Cherkasova and Smirni, IEEE Trans. Soft. Eng. 37(5), 2011.

The inverse (-T0)^-1 is dense even when T0 is sparse, so it is never formed: the moments follow from the vector recursion v_{k+1} = v_k (-T0)^-1, each step being one linear solve. Method "euler" replaces the solve by the quadrature v (-T0)^-1 = v int_0^inf exp(T0 t) dt of Section 5.2.2, integrated by the trapezoid rule with the Euler propagator exp(T0 dt) ~ I + T0 dt and a step below the inverse of the largest diagonal element in absolute value, as in the uniformization method. Method "ssolve" is the default because it is exact and faster; "euler" reproduces the reference implementation of the paper and is first order in the step.

ARITHMETIC: "ssolve" uses field operations only and is exact at T = Rational; "euler" is an approximation at every arithmetic.

Definition in file fes_map_moments.h.