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

PANACEA normal-usage asymptotic expansion for LOAD-DEPENDENT closed networks (Mitra and McKenna, JACM 33(3):568-592, 1986). More...

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

Go to the source code of this file.

Classes

struct  line::pfqn::PanaceaLdResult< T >
 Return value of pfqn_panaceald, mirroring [Gn, lGn] plus why it declined. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
PanaceaLdResult< T > line::pfqn::pfqn_panaceald (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z, const Matrix< T > &mu, int terms)
 PANACEA normal-usage asymptotic expansion for LOAD-DEPENDENT closed networks (Mitra and McKenna, JACM 33(3):568-592, 1986).
template<class T>
PanaceaLdResult< T > line::pfqn::pfqn_panaceald (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z, const Matrix< T > &mu)
 Overload at the reference's default of three terms.

Detailed Description

PANACEA normal-usage asymptotic expansion for LOAD-DEPENDENT closed networks (Mitra and McKenna, JACM 33(3):568-592, 1986).

Templated port of matlab/src/api/pfqn/pfqn_panaceald.m. The expansion coefficients A_n are linear combinations of partition functions of a PSEUDONETWORK whose load dependence is the phi(n) transform of the original rate lattice {mu_i(n)}; the transform itself is carried by logpsi below, the partition functions by a direct load-dependent convolution over a lattice that never exceeds 2*(terms-1) jobs per class.

WHERE THE INFINITE SERVERS GO. A type-3 (infinite-server) row is ABSENT from the pseudonetwork and enters only through the expansion parameter rho_j0. solver_ncld encodes such a row as mu(i,n) = n, so the rows whose rate lattice is exactly 1,2,...,Nt are detected here and folded into the think time, which is why the caller may pass the delay either in Z or as such a row of L.

WHEN IT DOES NOT APPLY, and this is the part worth knowing. The expansion is an asymptotic series in the population and converges only in NORMAL USAGE, i.e. alpha_i = 1 - lambda_i / mu_i(Ntot) > 0 at every queueing centre. MATLAB returns NaN outside it and its caller turns that into an error. This port reports it through normalUsage plus a reason, as pfqn_panacea does, so a value that must not be used cannot be mistaken for one that may – and so the caller can say WHICH of the four conditions declined.

ACCURACY REGIME (measured, 2026-07-24). Relative error on lG falls with the population: 6.7e-4 at N = [10 10], 8.6e-8 at N = [400 400] at a fixed load margin alpha_min ~ 0.70, while the runtime stays flat because the pseudonetworks hold at most 4 jobs. At small N and heavy load it is dominated by pfqn_clw_lld, which is exact there and cheap. Do not calibrate it only on models small enough to have an exact reference.

ARITHMETIC. A truncated asymptotic series reported as a logarithm, so gated on num_traits<T>::has_transcendental.

Definition in file pfqn_panaceald.h.