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>
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>
T erlang_b_real (const T &nu, const T &C)
 Erlang B for a REAL capacity, the reference's ErlangB(nu, C) evaluated as it stands: the sum runs over i = 0..floor(C) and factln(C) is lgamma(C+1).
da::FpiOptions lossn_erlangfp_options ()
 The reference's fixed-point settings: iter_max 10000, iter_tol 1e-10, the max-norm of the increment (da_norm = @(d) max(abs(d(:))), the driver's default) and da_nanstop = true.
template<class T>
ErlangFpResult< T > lossn_erlangfp (const std::vector< T > &nu, const Matrix< T > &A, const std::vector< T > &C, const da::FpiOptions &options=lossn_erlangfp_options())
 Erlang fixed-point (reduced-load) approximation for a loss network.
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=lossn_erlangfp_options())
 lossn_erlangfp with integer capacities.
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 63 of file lossn_erlangfp.h.

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

Referenced by erlang_b().

◆ erlang_b_real()

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

Erlang B for a REAL capacity, the reference's ErlangB(nu, C) evaluated as it stands: the sum runs over i = 0..floor(C) and factln(C) is lgamma(C+1).

Definition at line 84 of file lossn_erlangfp.h.

References erlang_b_real(), and line::num_factorial().

Referenced by erlang_b_real().

◆ lossn_erlangfp() [1/2]

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 = lossn_erlangfp_options() )

lossn_erlangfp with integer capacities.

Definition at line 257 of file lossn_erlangfp.h.

References lossn_erlangfp(), and lossn_erlangfp_options().

◆ lossn_erlangfp() [2/2]

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

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

Parameters
nuoffered load per class (R)
A(J x R) capacity requirement of link j for class r; fractional entries are scaled to integers row by row (see the file comment)
C(J) link capacities
optionsfixed-point options; the default is the reference's (max-norm, iter_tol 1e-10, nanstop), see lossn_erlangfp_options()

Returns the carried traffic QLen_r = nu_r prod_j (1 - B(j,r)), the loss 1 - prod_j (1 - B(j,r)) and the (J x R) blocking matrix E = B.

Definition at line 191 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, line::InputError::InputError(), line::da::FpiResult< T >::iterations, line::lossn::ErlangFpResult< T >::iterations, line::lossn::ErlangFpResult< T >::Loss, lossn_erlangfp(), lossn_erlangfp_options(), line::Matrix< T >::Matrix(), line::lossn::ErlangFpResult< T >::QLen, line::Matrix< T >::rows(), and line::da::FpiResult< T >::x.

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

◆ lossn_erlangfp_options()

da::FpiOptions line::lossn::lossn_erlangfp_options ( )
inline

The reference's fixed-point settings: iter_max 10000, iter_tol 1e-10, the max-norm of the increment (da_norm = @(d) max(abs(d(:))), the driver's default) and da_nanstop = true.

Definition at line 104 of file lossn_erlangfp.h.

References line::da::FpiOptions::iter_max, line::da::FpiOptions::iter_tol, lossn_erlangfp_options(), and line::da::FpiOptions::nanstop.

Referenced by lossn_erlangfp(), lossn_erlangfp(), lossn_erlangfp_options(), 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().