LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
line::lossn Namespace Reference

Classes

struct  ErlangFpResult
struct  LossnManjunathOptions
 Controls of lossn_manjunath. More...
struct  LossnManjunathResult
 Result of lossn_manjunath. More...
struct  LossnMciOptions
 Options of lossn_mci, MATLAB's options struct. More...
struct  LossnMciResult
 Result of lossn_mci. More...
struct  LossnRecResult
 Carried load, blocking, log normalising constant and walk count. More...

Functions

template<class T>
erlang_b (const T &nu, int C)
 Erlang's loss formula B(nu, C), evaluated through logs as MATLAB does so the factorials stay in range for large C.
template<class T>
ErlangFpResult< T > lossn_erlangfp (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< int > &C, const da::FpiOptions &options=da::FpiOptions())
 Erlang fixed-point (reduced-load) approximation for a loss network.
template<class T>
LossnManjunathResult< T > lossn_manjunath (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< T > &C, const LossnManjunathOptions &options=LossnManjunathOptions())
 Exact normalizing constant, carried load and blocking of a loss network.
template<class T, class Rng>
LossnMciResult< T > lossn_mci (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< T > &C, const LossnMciOptions< T > &opt, Rng &gen)
 Estimate the normalizing constant and the blocking probabilities.
template<class T>
LossnMciResult< T > lossn_mci (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< T > &C, const LossnMciOptions< T > &opt, std::uint64_t seed)
 Overload seeding a local engine.
template<class T>
LossnRecResult< T > lossn_rec (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< T > &C)
 Exact loss-network analysis by MDD-rec.

Function Documentation

◆ erlang_b()

template<class T>
T line::lossn::erlang_b ( const T & nu,
int C )

Erlang's loss formula B(nu, C), evaluated through logs as MATLAB does so the factorials stay in range for large C.

Definition at line 58 of file lossn_erlangfp.h.

References erlang_b(), line::InputError::InputError(), and line::num_factorial().

Referenced by erlang_b(), and lossn_erlangfp().

◆ lossn_erlangfp()

template<class T>
ErlangFpResult< T > line::lossn::lossn_erlangfp ( const std::vector< T > & nu,
const Matrix< T > & A,
const std::vector< int > & C,
const da::FpiOptions & options = da::FpiOptions() )

Erlang fixed-point (reduced-load) approximation for a loss network.

Parameters
nuoffered load per class (R)
A(J x R) route matrix: A(j,r) is the number of circuits class r takes on link j
C(J) link capacities
optionsfixed-point options (tolerance, iteration cap, damping)

Definition at line 84 of file lossn_erlangfp.h.

References line::Matrix< T >::cols(), line::da::FpiResult< T >::converged, line::lossn::ErlangFpResult< T >::converged, line::da::da_fpi(), line::lossn::ErlangFpResult< T >::E, erlang_b(), line::InputError::InputError(), line::da::FpiResult< T >::iterations, line::lossn::ErlangFpResult< T >::iterations, line::lossn::ErlangFpResult< T >::Loss, lossn_erlangfp(), line::num_pow_int(), line::NumericError::NumericError(), line::lossn::ErlangFpResult< T >::QLen, line::Matrix< T >::rows(), and line::da::FpiResult< T >::x.

Referenced by lossn_erlangfp(), and line::nc::solver_nc_lossn_analyzer().

◆ lossn_manjunath()

template<class T>
LossnManjunathResult< T > line::lossn::lossn_manjunath ( const std::vector< T > & nu,
const Matrix< T > & A,
const std::vector< T > & C,
const LossnManjunathOptions & options = LossnManjunathOptions() )

Exact normalizing constant, carried load and blocking of a loss network.

Parameters
nuoffered load of route r, nonnegative (R)
A(J x R) nonnegative integer circuit requirements
C(J) nonnegative integer capacities
optionsthe live-coefficient cap

Definition at line 365 of file lossn_manjunath.h.

References line::Matrix< T >::cols(), line::InputError::InputError(), line::lossn::LossnManjunathResult< T >::lG, line::lossn::LossnManjunathResult< T >::Loss, lossn_manjunath(), line::NumericError::NumericError(), line::lossn::LossnManjunathResult< T >::peak_states, line::lossn::LossnManjunathResult< T >::QLen, and line::Matrix< T >::rows().

Referenced by lossn_manjunath(), and line::nc::solver_nc_lossn_analyzer().

◆ lossn_mci() [1/2]

template<class T, class Rng>
LossnMciResult< T > line::lossn::lossn_mci ( const std::vector< T > & nu,
const Matrix< T > & A,
const std::vector< T > & C,
const LossnMciOptions< T > & opt,
Rng & gen )

◆ lossn_mci() [2/2]

template<class T>
LossnMciResult< T > line::lossn::lossn_mci ( const std::vector< T > & nu,
const Matrix< T > & A,
const std::vector< T > & C,
const LossnMciOptions< T > & opt,
std::uint64_t seed )

Overload seeding a local engine.

Deterministic in the seed and independent of any global state; the engine is created and destroyed here.

Definition at line 369 of file lossn_mci.h.

References lossn_mci().

◆ lossn_rec()

template<class T>
LossnRecResult< T > line::lossn::lossn_rec ( const std::vector< T > & nu,
const Matrix< T > & A,
const std::vector< T > & C )

Exact loss-network analysis by MDD-rec.

Parameters
nuoffered load per class, length K
AJ x K non-negative resource requirement matrix
Ccapacity vector, length J
Returns
the carried load, the blocking probabilities and the normalising constant

Definition at line 141 of file lossn_rec.h.

References line::Matrix< T >::cols(), line::lossn::LossnRecResult< T >::G, line::InputError::InputError(), line::lossn::LossnRecResult< T >::iterations, line::lossn::LossnRecResult< T >::lG, line::lossn::LossnRecResult< T >::Loss, lossn_rec(), line::mdd::mdd_rec_marginal(), line::lossn::LossnRecResult< T >::QLen, and line::Matrix< T >::rows().

Referenced by lossn_rec(), and line::nc::solver_nc_lossn_analyzer().