![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Order-independent (OI) and pass-and-swap (P&S) normalizing-constant analysis. More...
#include <cmath>#include <functional>#include <map>#include <memory>#include <vector>#include "line/api/pfqn/pas_swap2order.h"#include "line/api/pfqn/pfqn_oi_fnc.h"#include "line/api/pfqn/pfqn_oi_insvc.h"#include "line/api/pfqn/pfqn_ncoi.h"#include "line/api/pfqn/pfqn_pas_is.h"#include "line/lang/qn/network_struct.h"#include "line/solvers/nc/nc_types.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::nc |
Functions | |
| template<class T> | |
| bool | line::nc::nc_is_oi_model (const qn::NetworkStruct< T > &sn) |
| Port of nc_is_oi_model.m: a closed network with at least one OI station and nothing but BCMP product-form stations besides. | |
| template<class T> | |
| bool | line::nc::nc_is_pas_model (const qn::NetworkStruct< T > &sn) |
| Port of nc_is_pas_model.m: a closed two-station OI / P&S tandem. | |
| template<class T> | |
| NcSolution< T > | line::nc::solver_nc_oi_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt) |
| Port of solver_nc_oi_analyzer.m. | |
| template<class T> | |
| NcSolution< T > | line::nc::solver_nc_pas_is_analyzer (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt) |
| Port of solver_nc_pas_is_analyzer.m. | |
Order-independent (OI) and pass-and-swap (P&S) normalizing-constant analysis.
Ports nc_is_oi_model.m, nc_is_pas_model.m, solver_nc_oi_analyzer.m and solver_nc_pas_is_analyzer.m.
An OI station is a load-dependent server whose total rate mu(n) is invariant under permutations of the ordered microstate, so it is a function of the per-class count vector alone. Such a station is product-form under balanced fairness (Bonald and Proutiere 2003) and the whole network's constant is assembled on the population lattice: pfqn_ncoi evaluates the OI stations together with the aggregated delay, and every ordinary BCMP station is folded in by lattice convolution of its load-dependent weight table. Mean queue lengths come from the OI functional-server identity of pfqn_oi_fnc (Casale, QEST 2006), E[f(n_i)] = G^+/G - 1 with G^+ the convolution of that station's FNC balance function against the full-network table.
A P&S station with a NON-EMPTY swap graph is not order-independent: the ordered-state chain is reducible (Comte and Dorsman 2021) and only the recurrent communicating class carries a product form. Its constant has no exact lattice recursion here and is estimated by the auto-normalized importance sampler pfqn_pas_is, which reduces to pfqn_oi_is when the swap graph is empty.
THE TWO ANALYZERS ARE NOT INTERCHANGEABLE and the dispatch order decides which a model gets: a pure-OI tandem on 'default'/'exact' is caught by the exact analyzer first, and only a genuine swap graph (or an explicit 'is' / 'sampling') reaches the sampler.
Arithmetic: the OI analyzer needs log for lG and exp/lgamma for the BCMP weight table, so it is guarded on has_transcendental. The sampler needs a random stream and is guarded the same way through pfqn_pas_is.
NOTE ON PRECISION AT Real<N>. oi_ld_table accumulates its weight in a DOUBLE logarithm, exactly as the reference's gammaln/exp do, so the BCMP factor is double precision whatever T is. Everything else – the balanced- fairness fill, the lattice convolution, the FNC identity – is field arithmetic in T. A higher-precision run therefore gains nothing on the BCMP stations; the table would have to be built as an exact multinomial product to change that, which is a different algorithm from the reference's.
Definition in file solver_nc_oi.h.