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

Sensitivity of the steady-state distribution of a CTMC to a scalar parameter. More...

#include <cstddef>
#include <vector>
#include "line/api/mc/ctmc_solve.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/lu.h"
#include "line/util/matrix.h"
Include dependency graph for ctmc_sens.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::mc

Functions

template<class T>
std::vector< T > line::mc::ctmc_sens (const Matrix< T > &Q, const Matrix< T > &dQ, const std::vector< T > &pi)
 Sensitivity of the steady-state distribution of a CTMC to a scalar parameter.
template<class T>
std::vector< T > line::mc::ctmc_sens (const Matrix< T > &Q, const Matrix< T > &dQ)
 Overload computing the steady-state vector itself, as MATLAB does.

Detailed Description

Sensitivity of the steady-state distribution of a CTMC to a scalar parameter.

Templated port of matlab/src/api/mc/ctmc_sens.m. Differentiating pi Q = 0 and pi e = 1 with respect to theta gives Trivedi and Bobbio (2017), Eq. (9.81),

(dpi/dtheta) Q = -pi (dQ/dtheta), sum_i dpi_i/dtheta = 0,

whose coefficient matrix is the one the steady-state solve already assembles: a sensitivity costs exactly one extra triangular solve. The normalization replaces the LAST equation of the transposed system, as in ctmc_solve.

The whole computation is a linear solve over the field of the rates, so it carries NO gate: at Rational it returns the exact derivative of the exact stationary vector, which is the regime where a finite-difference estimate of the same quantity is worst behaved (it differences two nearly equal vectors) and where this port is therefore most worth having.

Definition in file ctmc_sens.h.