![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Normalizing constant of a closed network of ORDER-INDEPENDENT (OI) / pass-and-swap stations with empty swap graph, plus one aggregated delay. More...
#include <cstddef>#include <functional>#include <vector>#include "line/api/pfqn/pfqn_ca.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 |
Typedefs | |
| template<class T> | |
| using | line::pfqn::OiRate = std::function<T(const std::vector<int>&)> |
| An OI station's total service rate as a function of the occupancy vector. | |
Functions | |
| template<class T> | |
| NcResult< T > | line::pfqn::pfqn_ncoi (const std::vector< T > &Z, const std::vector< int > &N, const std::vector< OiRate< T > > &mu, const Matrix< T > &visits) |
| Normalizing constant of a closed network of ORDER-INDEPENDENT (OI) / pass-and-swap stations with empty swap graph, plus one aggregated delay. | |
| template<class T> | |
| NcResult< T > | line::pfqn::pfqn_ncoi (const std::vector< T > &Z, const std::vector< int > &N, const std::vector< OiRate< T > > &mu) |
| Overload with unit visits. | |
Normalizing constant of a closed network of ORDER-INDEPENDENT (OI) / pass-and-swap stations with empty swap graph, plus one aggregated delay.
Templated port of matlab/src/api/pfqn/pfqn_ncoi.m.
An OI station's total service rate mu_i(n) depends on the per-class occupancy n only through which classes are present. Its balance function satisfies the balanced-fairness recursion of Bonald and Proutiere (2003),
Phi_i(0) = 1, Phi_i(n) = (1/mu_i(n)) sum_{r: n_r>0} Phi_i(n - e_r),
and G(N) is the convolution of the per-station balance functions with the multinomial delay factor prod_r Z_r^{n_r}/n_r!,
g_0(n) = F_Z(n), g_i(n) = sum_{0<=x<=n} Phi_i(x) g_{i-1}(n-x), G(N) = g_K(N).
This is a MACROSTATE routine: the balance functions and the convolution are both tabulated over the count lattice 0 <= n <= N, never over orderings. That is legitimate exactly because an OI rate is permutation-invariant, so Phi(n) – itself the sum of the ordered-prefix weights over all orderings of the multiset n – closes on the count vector. With a non-empty swap graph the closure fails and pfqn_pas_nc (microstate) must be used instead.
Cost: O(K R L) for the balance functions and O(K prod_r (N_r+1)(N_r+2)/2) for the convolutions, with L = prod_r (N_r+1); that is the order of a load-dependent Buzen convolution.
Arithmetic: EXACT-CAPABLE. The routine performs only reciprocals, additions and multiplications, plus the exact multinomial delay factor. Whether the result is exact therefore depends only on the rate callables, which are evaluated and never inspected. A nonpositive rate marks an occupancy the station cannot serve: its balance value is zero, which prunes every ordering through it, exactly as the reference does.
Definition in file pfqn_ncoi.h.