![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of solver_nc.m: the load-INDEPENDENT normalizing-constant analyzer. More...
#include <algorithm>#include <cmath>#include <limits>#include <string>#include <vector>#include "line/api/npfqn/npfqn_nonexp_approx.h"#include "line/api/pfqn/pfqn_nc.h"#include "line/lang/qn/network_struct.h"#include "line/solvers/nc/solver_nc_lcfsqn.h"#include "line/solvers/mva/mva_types.h"#include "line/solvers/mva/sn_chain.h"#include "line/solvers/nc/nc_types.h"#include "line/solvers/nc/solver_nc_sdr.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Classes | |
| struct | line::nc::GlobalConstants |
| The MATLAB GlobalConstants, as reported by lineStart at its defaults. More... | |
Namespaces | |
| namespace | line |
| namespace | line::nc |
Enumerations | |
| enum class | line::nc::SchedStrategy |
| Scheduling disciplines, with the values of MATLAB SchedStrategy. More... | |
Functions | |
| template<class T> | |
| NcSolution< T > | line::nc::solver_nc (const qn::NetworkStruct< T > &sn, const NcSolverOptions &opt) |
| Port of solver_nc.m. | |
Port of solver_nc.m: the load-INDEPENDENT normalizing-constant analyzer.
WHAT IT COMPUTES. One evaluation of the normalizing constant G(N) settles the whole product-form network: the chain throughput is X_c = G(N - 1_c) / G(N), and the chain queue length at station i follows from a constant evaluated on the model with station i REPLICATED into a private class,
Q_ic = Zms_ic X_c + Lms_ic exp(lG_ar(i,c) - lG),
which is the arrival-theorem identity written in constants rather than in a recursion. That is why this file calls pfqn_nc once per chain and once per (station, chain) pair rather than solving anything itself: the algorithms live in api/pfqn, and choosing among them is pfqn_nc's job.
MULTISERVER IS SEIDMANN'S APPROXIMATION, NOT AN EXACT SOLVE. A station with c > 1 servers is split into a demand L/c at a single server plus a pure delay L (c-1)/c. It is exact only in the limit; the reference warns and continues, and @@SolverNC/runAnalyzer converts genuine multiservers to load-dependent rates BEFORE reaching here whenever the model is product-form, so this branch serves the models that have no exact load-dependent form.
WHY THERE IS AN OUTER LOOP AT ALL. SolverOptions('NC') sets config.highvar = 'interp', so a non-product-form FCFS station has its service time rescaled by npfqn_nonexp_approx after each pass and the analyzer re-solves until the decay rates eta stop moving. With no FCFS station the reference pins iter_max to 1 and the loop runs once.
ARITHMETIC. Every measure here is formed from differences of LOGARITHMS of normalizing constants, which is the only way the ratios stay representable; there is no exact-field formulation of exp(lG' - lG), so a non-transcendental backend is refused by name rather than narrowed.
Definition in file solver_nc.h.