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

Logistic expansion (LE) asymptotic approximation of the normalizing constant of a closed product-form network. More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/pfqn/pfqn_asympt_common.h"
#include "line/lang/lang_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_le.h:

Go to the source code of this file.

Classes

struct  line::pfqn::LeResult< T >
 Return value of pfqn_le, mirroring [Gn, lGn]. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
std::vector< T > line::pfqn::pfqn_le_fpi (const Matrix< T > &L, const std::vector< T > &N)
 Mode of the logistic-transformed integrand, Z = 0 case (pfqn_le_fpi).
template<class T>
void line::pfqn::pfqn_le_fpiZ (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, std::vector< T > &u, T &v)
 Mode of the logistic-transformed integrand, Z > 0 case (pfqn_le_fpiZ).
template<class T>
Matrix< T > line::pfqn::pfqn_le_hessian (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &u0)
 Hessian of the Z = 0 logistic integrand at the mode ((M-1) x (M-1)).
template<class T>
Matrix< T > line::pfqn::pfqn_le_hessianZ (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, const std::vector< T > &u, const T &v)
 Hessian of the Z > 0 logistic integrand at the mode (M x M).
template<class T>
LeResult< T > line::pfqn::pfqn_le (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z)
 Logistic expansion estimate of the normalizing constant.
template<class T>
LeResult< T > line::pfqn::pfqn_le (const Matrix< T > &L, const std::vector< T > &N)

Detailed Description

Logistic expansion (LE) asymptotic approximation of the normalizing constant of a closed product-form network.

Templated port of matlab/src/api/pfqn/pfqn_le.m (Casale, "Accelerating performance inference over closed systems by asymptotic methods", SIGMETRICS 2017), including its four local functions pfqn_le_fpi, pfqn_le_fpiZ, pfqn_le_hessian and pfqn_le_hessianZ, which are exported here because pfqn_ls needs the same mode and Hessian.

The integral representation of G is mapped to the simplex by a logistic transformation and evaluated by Laplace's method at the mode u* of the transformed integrand, giving

log G = multinomialln([N, M-1]) + factln(M-1) + (M-1) log sqrt(2 pi)

  • log sqrt(det A) + sum_i log u*_i + sum_r N_r log(u*' L(:,r))

with A the Hessian at the mode, and the analogous Z > 0 form in which the mode carries an extra scale variable v*. This is Cas17 eq. (34) as published; pfqn_ble (pfqn_ble.h) adds the eps->0 bias correction derived there.

ARITHMETIC. Laplace's method is an asymptotic approximation and the formula itself is a sum of logarithms, so the routine is gated on num_traits<T>::has_transcendental: it has no meaning in exact arithmetic, and instantiating it there would silently produce a value that is not the normalizing constant.

FIXED POINT. The mode is found by the same 1-norm fixed-point iteration as MATLAB, stopped at 1e-10; the tolerance is a double constant converted into T, so a Real<D> instantiation iterates to the same point, not further. That is deliberate: matching MATLAB is the contract, and the Laplace error dominates the fixed-point residual by many orders of magnitude anyway.

Definition in file pfqn_le.h.