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

Equilibrium distribution relative to a reference state. 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_relsolve.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_relsolve (const Matrix< T > &Qin, std::size_t refstate)
 Stationary measure scaled so that entry refstate equals one.
template<class T>
std::vector< T > line::mc::ctmc_relsolve (const Matrix< T > &Q)
 Reference state 1 in the MATLAB numbering, i.e.

Detailed Description

Equilibrium distribution relative to a reference state.

Templated port of matlab/lib/kpctoolbox/mc/ctmc_relsolve.m. The balance equations are closed with p(refstate) = 1 instead of sum(p) = 1, so the result is NOT a probability vector: it is the stationary measure scaled so that the reference state carries weight one. Dividing by its sum recovers ctmc_solve. Keeping the unnormalized form is what makes the ratios usable when the normalizing constant itself overflows.

On a reducible generator the reference-state closure is meaningless across components, so the reducible case falls back to solving each weakly connected component and renormalizing globally, exactly as MATLAB does.

Definition in file ctmc_relsolve.h.