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

Transient distribution of a level-independent-in-the-tail QBD by an adaptive Taylor series (libQBD QBD + TaylorSeriesAdaptive). More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for libqbd_taylor.h:

Go to the source code of this file.

Classes

class  line::mam::LibQbdProcess< T >
 A QBD's level blocks, as libQBD's QBD class holds them. More...
struct  line::mam::TaylorSeriesResult< T >
 What the adaptive Taylor series returns: the reference grid and its laws. More...

Namespaces

namespace  line
namespace  line::mam

Functions

double line::mam::gammainc_lower (double a, double x)
 Regularized lower incomplete gamma P(a, x), MATLAB's gammainc(x, a, 'lower').
template<class T>
TaylorSeriesResult< T > line::mam::taylor_series_adaptive (const LibQbdProcess< T > &proc, const std::vector< std::vector< T > > &pi0, double error, double max_time)
 libQBD's TaylorSeriesAdaptive, restricted to the reference grid that solver_mam_ldqbd_transient reads (get_reference_times and get_reference_dists); the interpolation to arbitrary points is not ported because no caller in this tree asks for it.

Detailed Description

Transient distribution of a level-independent-in-the-tail QBD by an adaptive Taylor series (libQBD QBD + TaylorSeriesAdaptive).

solver_mam_ldqbd_transient.m uses this for the INFINITE-buffer case, where there is no finite generator to exponentiate. The method advances pi(t) in steps of 1/|min diagonal|, and at each step sums the Taylor series

pi(t + h) = sum_k (h Q)^k / k! pi(t)

in the UNIFORMIZED time h = 1/min_elem, truncating when the tail bound

||d_k||_1 P(k+2, 2) e^2 2^-(k+1)

falls below the requested error. P(a,x) is the regularized lower incomplete gamma function, which is what makes this a genuine a-posteriori bound rather than a heuristic cutoff, and it is the one special function the port had to add (gammainc_lower below).

THE STATE SPACE GROWS AS IT MUST. The distribution is a list of per-level row vectors; multiplying by the generator can push mass one level higher, so mull_by_row_vector appends a level whenever the new top carries any mass. That is how an infinite buffer is handled without a truncation parameter: the represented depth is whatever the elapsed time has actually reached.

Levels above the last supplied one REPEAT it. get_A_* clamps the index, so add_final_level defines the repeating block and every deeper level reuses it, which is the QBD structure itself rather than an approximation.

ARITHMETIC. Gated on transcendental: the truncation test evaluates an incomplete gamma and an exponential.

Definition in file libqbd_taylor.h.