LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
pfqn_ab_amva.h File Reference

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"
Include dependency graph for pfqn_ab_amva.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.

Detailed Description

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:

  • the throughput is read off STATION 1, XN(r) = Q(1,r)/W(1,r), so it is the class-r throughput AT that station, i.e. v(1,r) times the system throughput, not the system throughput itself;
  • the convergence tolerance is the reference's 1/(4000 + 16 sum(N)) and the iteration cap is 100 passes, with no error on non-convergence;
  • a Schmidt-FCFS wait below 1e-3 is snapped to zero;
  • the AB marginal weights use the reference's ALPHA = 45, BETA = 0.7 and its distance cutoff of 25.

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.