![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Heuristic sojourn-time distribution at multiserver FCFS stations, a variant of J. More...
#include <cmath>#include <cstddef>#include <vector>#include "line/api/mam/map_cdf.h"#include "line/api/mam/map_transform.h"#include "line/api/pfqn/pfqn_comomrm_ld.h"#include "line/api/pfqn/pfqn_mu_ms.h"#include "line/api/pfqn/pfqn_mushift.h"#include "line/api/pfqn/pfqn_mvams.h"#include "line/api/pfqn/pfqn_rd.h"#include "line/api/pfqn/pfqn_stdf.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Functions | |
| template<class T> | |
| StdfResult< T > | line::pfqn::pfqn_stdf_heur (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const std::vector< int > &S, const std::vector< std::size_t > &fcfsNodes, const Matrix< T > &rates, const std::vector< T > &tset) |
| Heuristic sojourn-time distribution at the listed FCFS stations. | |
Heuristic sojourn-time distribution at multiserver FCFS stations, a variant of J.
McKenna, JACM 1987.
Templated port of matlab/src/api/pfqn/pfqn_stdf_heur.m. See pfqn_stdf.h for the method; this file documents only where the heuristic departs from it.
TWO DEFECTS OF THE REFERENCE, reproduced as failures rather than as wrong numbers. Neither is repaired here, since MATLAB is the ground truth and both are failures in it too.
(a) Small t. h_k(t | n) underflows to zero for the higher levels, so the tilted rate gamma_k(t, n) becomes infinite, every entry of the beta transform inside pfqn_rd becomes infinite, and pfqn_rd's lastfinite = max(find(isfinite(...))) is empty, whereupon s(ist) = lastfinite raises "Unable to perform assignment because the left and right sides have a different number of elements". The ported pfqn_rd raises NumericError("a station has no finite load-dependent rate") at the same point, which is the same condition with a diagnosis. CORRECTED, MEASURED: this note previously claimed the failure fires at the FineTol substitute for t = 0 "in every model tried", so that the heuristic could not be evaluated at t = 0 at all. That is false. For the single-delay family MATLAB returns 1.9999999767e-08 through 1.9047620835e-09 at N = 1 to 5 there and the port matches every one. The condition is real but model-dependent, not universal.
(b) A class with population zero at N - e_r. Then Q1(k,s) = 0 for that class and item 2 above asks for Exp with mean 0, i.e. an infinite rate. MATLAB builds D0 = -Inf, map_cdf returns NaN, the tilt is NaN and pfqn_rd fails as in (a). This makes the heuristic unusable for every t on any model with a class whose population is one. The port throws InputError from map_exponential_mean at the point the degenerate MAP is requested, which is the earliest place the defect is detectable.
Arithmetic: INEXACT BY CONSTRUCTION, gated on has_transcendental, for the reasons given in pfqn_stdf.h and additionally because pfqn_rd is itself a truncated correction series.
Definition in file pfqn_stdf_heur.h.