![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Akyildiz-Bolch approximate MVA for multi-server BCMP networks. More...
#include <cmath>#include <cstddef>#include <map>#include <vector>#include "line/api/pfqn/pfqn_amva_common.h"#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"#include "line/util/population.h"Go to the source code of this file.
Classes | |
| struct | line::pfqn::AbAmvaResult< T > |
| Return value of pfqn_ab_amva, mirroring [QN,UN,RN,CN,XN,totiter]. More... | |
Namespaces | |
| namespace | line |
| namespace | line::pfqn |
Enumerations | |
| enum class | line::pfqn::AbMarginalMethod { line::pfqn::Ab , line::pfqn::Scat } |
| Which marginal-probability rule the multiserver correction uses. More... | |
Functions | |
| template<class T> | |
| AbAmvaResult< T > | line::pfqn::pfqn_ab_amva (const Matrix< T > &S, const std::vector< int > &N, const Matrix< T > &v, const std::vector< int > &nservers, const std::vector< SchedStrategy > &sched, bool fcfsSchmidt, AbMarginalMethod method) |
| Akyildiz-Bolch approximate MVA for multi-server BCMP networks. | |
| template<class T> | |
| AbAmvaResult< T > | line::pfqn::pfqn_ab_amva (const Matrix< T > &S, const std::vector< int > &N, const Matrix< T > &v, const std::vector< int > &nservers, const std::vector< SchedStrategy > &sched) |
| Reference defaults: no Schmidt FCFS wait, the AB marginal rule. | |
Akyildiz-Bolch approximate MVA for multi-server BCMP networks.
Templated port of matlab/src/api/pfqn/pfqn_ab_amva.m, cross-checked against jar/src/main/java/jline/api/pfqn/mva/Pfqn_ab_amva.java.
The driver is a Linearizer-shaped three-pass scheme around a fixed-point core:
step 1 run the core at the full population N, from the flat start L(i,r) = N_r / M; step 2 run the core once per class at N - e_r, seeding it with the per-class queue lengths of step 1; step 3 form the fractional-change tensor Delta(i,r,t) = Q(i,t | N - e_r)/den - Q(i,r | N)/N_r, with den = N_r - 1 when r == t and N_r otherwise; step 4 rerun the core at N with those Delta held fixed.
Inside the core the arrival-theorem queue length seen by a class-r job is L(i,c | N - e_r) = scalar (F(i,c) + Delta(i,c,r)), and the residence time is formed per station kind:
INF W = S(i,r); single server W = S(i,r) (1 + sum_c L(i,c | N - e_r)); multiserver W = S(i,r)/c (1 + Qtot + sum_{j<c} (c-j) Pr(j)), with Pr(j) the Akyildiz-Bolch marginal weight (or the two-point 'scat' scatter) of the queue length; FCFS, fcfsSchmidt W = sum_{n <= N, n_r > 0} B_r(n) Pr(n - e_r), with Pr a per-class binomial product and B_r the queue-composition-weighted mean service time.
Reference behaviour preserved verbatim, including the parts that look like defects but define the numbers the reference produces:
One sizing divergence, deliberate. weightFun builds its weight table with max(N) + 1 rows, but the row index used later is floor(Qtot) where Qtot is the TOTAL queue length over all classes, which exceeds max(N) as soon as two classes are both loaded at a multiserver station; MATLAB then raises an index-out-of-bounds error. The recursion defining the table is index-generic (row l is built from row l-1 and the geometric scaling sequence), so the port sizes the table by the largest row actually required. That evaluates the SAME function at a larger argument; it changes no in-range entry and it removes an error the reference cannot otherwise avoid.
Arithmetic: INEXACT BY CONSTRUCTION. The core is a tolerance-stopped fixed point, so the answer depends on where the iteration is cut; the marginal weights additionally need floor and integer powers of a non-integer fraction. It is gated on has_transcendental accordingly.
Definition in file pfqn_ab_amva.h.