![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Normalizing constant of a LOAD-DEPENDENT closed network: the dispatcher. More...
#include <cmath>#include <cstddef>#include <cstdint>#include <string>#include <vector>#include "line/api/pfqn/pfqn_ca.h"#include "line/api/pfqn/pfqn_clw.h"#include "line/api/pfqn/pfqn_comomrm_ld.h"#include "line/api/pfqn/pfqn_explicit_ld.h"#include "line/api/pfqn/pfqn_gld.h"#include "line/api/pfqn/pfqn_gldsingle.h"#include "line/api/pfqn/pfqn_lldsingle.h"#include "line/api/pfqn/pfqn_ld_is.h"#include "line/api/pfqn/pfqn_mc_common.h"#include "line/api/pfqn/pfqn_nc.h"#include "line/api/pfqn/pfqn_nre.h"#include "line/api/pfqn/pfqn_nrl.h"#include "line/api/pfqn/pfqn_panaceald.h"#include "line/api/pfqn/pfqn_rd.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::NcldResult< T > |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Enumerations | |
| enum class | line::pfqn::NcldMethod { line::pfqn::Default , line::pfqn::Exact , line::pfqn::Is , line::pfqn::Clw , line::pfqn::Panald , line::pfqn::Rd , line::pfqn::Nrp , line::pfqn::Nrl , line::pfqn::Nre , line::pfqn::Comomld , line::pfqn::Divdiff } |
| The load-dependent methods this port dispatches. More... | |
Functions | |
| const char * | line::pfqn::ncld_method_name (NcldMethod m) |
| NcldMethod | line::pfqn::ncld_method_of (const std::string &s) |
| Map a method name to its enum; throws UnsupportedError on an unknown one. | |
| void | line::pfqn::pfqn_ncld_refuse (const std::string &method) |
| Refuse a load-dependent method in an arithmetic it has no meaning in. | |
| template<class T> | |
| NcldResult< T > | line::pfqn::pfqn_ncld (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const Matrix< T > &mu, NcldMethod method, const T &atol, const NcOptions &nopt) |
| Normalizing constant of a LOAD-DEPENDENT closed network: the dispatcher. | |
| template<class T> | |
| NcldResult< T > | line::pfqn::pfqn_ncld (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const Matrix< T > &mu, NcldMethod method, const T &atol) |
| Overload with the reference's default sample count, seed and tolerance. | |
| template<class T> | |
| NcldResult< T > | line::pfqn::pfqn_ncld (const Matrix< T > &L, const std::vector< int > &N, const Matrix< T > &Z, const Matrix< T > &mu) |
| Overload with the exact (zero-tolerance) filters. | |
Normalizing constant of a LOAD-DEPENDENT closed network: the dispatcher.
Templated port of matlab/src/api/pfqn/pfqn_ncld.m. The model reduction is the same one pfqn_nc performs – drop the empty classes, rescale per class, drop the demand-free stations, peel off the classes confined to the delay – with one addition: the rate lattice mu follows the stations through the station filter, so a dropped station takes its rates with it.
DELAY FOLDING. pfqn_gld and pfqn_lldsingle take no think-time argument: an infinite server is an ordinary row whose rate lattice is mu(i,k) = k, for which the factorials cancel. When the model has a delay this port appends one such row per think-time row, exactly as the reference does with Lz = [L;Z]; muz = [mu; repmat(1:size(mu,2),D,1)].
DISPATCH. The exact ladder, which is the reference's exact branch and its default branch whenever the Choudhury-Leung-Whitt gate declines:
R == 1 -> pfqn_lldsingle M == 1 with a delay -> pfqn_comomrm_ld M == 1 without a delay -> pfqn_comomrm_ld with a zero think time otherwise -> pfqn_gld
and, beside it, the ladder that answers with a LOGARITHM, mirroring pfqn_nc's split between an exact finish and an estimator finish_log:
clw -> pfqn_clw_lld (generating-function inversion) is -> pfqn_ld_is (sample-an-ordering importance sampling) panald -> pfqn_panaceald (Mitra-McKenna asymptotic expansion) rd -> pfqn_rd (recursive decomposition) nrp / nrl -> pfqn_nrp / pfqn_nrl (Norlund-Rice probit / logit) comomld -> pfqn_comomrm_ld, or pfqn_rd where CoMoM-LD does not apply divdiff -> pfqn_explicit_ld (divided difference over the LLD closed form)
THE CLW GATE ON default IS A COST MODEL, NOT AN ACCURACY ONE. CLW and the exact convolution compute the same constant, so the gate – at most 5 classes, at most 200 jobs, at most 2e7 predicted contour points – only decides which is cheaper. It is consulted in transcendental arithmetic only; in an exact field default goes straight to the exact ladder, which changes the SPEED on a subset of models and never the value.
Arithmetic: the exact ladder and the whole reduction are EXACT-CAPABLE. The log-domain ladder is refused by name outside transcendental arithmetic, on pfqn_nc's grounds: a contour inversion, a Monte Carlo estimate and a truncated asymptotic series have no meaning in the rational field, and silently substituting the exact convolution would answer with an algorithm the caller did not ask for.
Definition in file pfqn_ncld.h.