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

Norlund-Rice inversion of the normalizing constant on a SADDLE-TILTED contour, with a second-order Edgeworth correction. More...

#include <cmath>
#include <cstddef>
#include <map>
#include <vector>
#include "line/api/pfqn/pfqn_asympt_common.h"
#include "line/api/pfqn/pfqn_gld.h"
#include "line/api/pfqn/pfqn_lldsingle.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/linalg.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_nre.h:

Go to the source code of this file.

Classes

struct  line::pfqn::PfqnNreResult< T >
 The reference's [lG,G,lGs,vsad]. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
PfqnNreResult< T > line::pfqn::pfqn_nre_full (const Matrix< T > &L0, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha0, const std::vector< T > &vfix)
 Saddle-tilted Edgeworth approximation of log G for a limited load-dependent model: the full form of the reference's outputs, named alike in the JAR and the native python port.
template<class T>
line::pfqn::pfqn_nre (const Matrix< T > &L0, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &alpha0)
 Saddle-tilted Edgeworth approximation of log G for a limited load-dependent model.

Detailed Description

Norlund-Rice inversion of the normalizing constant on a SADDLE-TILTED contour, with a second-order Edgeworth correction.

Templated port of matlab/src/api/pfqn/pfqn_nre.m. Two corrections separate it from pfqn_nrl and pfqn_nrp, which Laplace-approximate the same integral on the untilted contour X = 1:

  1. The integrand is invariant under t -> t + c*1, since h is homogeneous of degree sum(N) in the class variables and that degree cancels against exp(-i N t). The redundant direction is quotiented out, so the integral is (R-1)-dimensional; pfqn_nrl and pfqn_nrp integrate over R dimensions and let the substitution Jacobian supply curvature along the null direction, which is an artifact of the change of variables.
  2. The contour radii are tilted per class to the saddle point, the X solving X_r dlog(h)/dX_r = N_r, so the origin is a stationary point of the phase. On X = 1 it is not, which is the leading bias of nrl / nrp.

NO COMPLEX ARITHMETIC. Every integrand evaluation sits at real positive demands, so unlike pfqn_nrl this routine only needs pfqn_lldsingle. It is still gated on num_traits<T>::has_transcendental: the cumulant generating function, the Gaussian curvature term and the tilt all take logs and exps.

OVERFLOW CEILING. The cumulant generating function is log(G) of the tilted single-class model, and this port's pfqn_lldsingle accumulates G itself rather than its logarithm (the MATLAB reference switches to the log domain). A double instantiation therefore loses the saddle search once log G passes ~709; a Real<D> instantiation does not.

WARNINGS. This layer has no warning channel, so the two conditions the reference warns about – a saddle search that runs out of iterations and a non-positive Edgeworth correction – take the same fallback silently: the current estimate, and the bare saddlepoint term respectively.

COST is O(I R^2 + R^4) evaluations of a single-class LLD constant, hence polynomial in the class count. The fourth-cumulant tensor caps the port at 8 classes, as in the reference.

Definition in file pfqn_nre.h.