![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Port of @SolverNC/getAvgBusyPeriod.m and of the Python-native SolverNC.getAvgBusyPeriod: the mean busy period of order n for a set of stations, from pfqn_busyp (Daduna, J. More...
#include <algorithm>#include <cmath>#include <cstddef>#include <functional>#include <limits>#include <vector>#include "line/api/pfqn/pfqn_busyp.h"#include "line/api/sn/sn_rt_stations.h"#include "line/lang/qn/network_struct.h"#include "line/solvers/mva/sn_chain.h"#include "line/util/error.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::nc |
Functions | |
| template<class T> | |
| std::vector< double > | line::nc::solver_nc_busyp (const qn::NetworkStruct< T > &sn, const std::vector< std::size_t > &subnet, const std::vector< std::size_t > &orders) |
| Mean busy period of order n for a set of stations. | |
Port of @SolverNC/getAvgBusyPeriod.m and of the Python-native SolverNC.getAvgBusyPeriod: the mean busy period of order n for a set of stations, from pfqn_busyp (Daduna, J.
ACM 35(3), 1988).
WHAT THIS LAYER ADDS OVER THE API. pfqn_busyp takes the paper's inputs – relative arrival rates, a rate law, a routing matrix – and this reads them off a NetworkStruct:
alpha = Vchain(:,1), the chain visit ratios. The CLOSED formula is homogeneous of degree zero in alpha, so unnormalized visits serve; the OPEN one is not, and alpha there is scaled to absolute rates by lambda. mu(j,k) = scaling(j,k) / STchain(j), a RATE and not the dimensionless lldscaling pfqn_ncld takes. The precedence is the one solver_ncld uses: an infinite server first (scaling = k), then a declared lldscaling row, then the multiserver staircase min(k,c). P = the station-to-station chain routing, the class blocks of sn_rt_stations weighted by the class visits. That weighting is exact, being a flow balance and not an approximation.
AN OPEN MODEL DROPS THE SOURCE. The Jackson network of the paper has no Source station: its outflow is the external stream gamma, so the Source is removed from the node set and gamma_j = lambda * P(source, j).
SINGLE CHAIN ONLY. The paper is written for identical customers; Section 5 only sketches the multichain extension, which no codebase implements, so a multichain model is refused rather than answered from a chain aggregate that the theorem does not cover.
Definition in file solver_nc_busyp.h.