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

QD-AMVA: queue-dependent approximate mean value analysis. More...

#include <algorithm>
#include <cmath>
#include <cstddef>
#include <vector>
#include "line/api/pfqn/pfqn_lldfun.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
#include "line/num/number.h"
Include dependency graph for pfqn_qdamva.h:

Go to the source code of this file.

Classes

struct  line::pfqn::QdAmvaResult< T >
 What pfqn_qdamva returns: the fixed point and how it was reached. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
QdAmvaResult< T > line::pfqn::pfqn_qdamva (const Matrix< T > &L, const std::vector< T > &N, const std::vector< T > &Z, const Matrix< T > &mu, const Matrix< T > &Q0, double tol=1e-6, std::size_t maxiter=10000)
 QD-AMVA: queue-dependent approximate mean value analysis.

Detailed Description

QD-AMVA: queue-dependent approximate mean value analysis.

Port of matlab/src/api/pfqn/pfqn_qdamva.m, the queue-dependent AMVA of Casale, Perez and Wang (IFIP PERFORMANCE 2015), on a closed multiclass product-form network.

A Schweitzer/Bard core in which the class-r demand at station k is scaled by the queue-dependence term g_k evaluated at the ARRIVAL-INSTANT total queue length, g = pfqn_lldfun(1 + delta * rowsum(Q), mu).

SETTING mu TO A CONSTANT ROW RECOVERS PLAIN SCHWEITZER AMVA ONLY FOR A SINGLE CLASS. pfqn_lldfun does skip a constant row, so g == 1 there, but the residence time that remains is 1 + delta * rowsum(Q) with ONE aggregate delta = (sum(N)-1)/sum(N) applied to the whole arrival-instant queue, where Bard-Schweitzer shrinks the TAGGED class alone:

1 + sum_{s != r} Q(k,s) + (N(r)-1)/N(r) * Q(k,r)

The two coincide iff K == 1. Measured over 40 random three-class instances, pfqn_qdamva(L,N,Z,ones) departs from pfqn_bs by up to 0.217 in absolute queue length, and is the LESS accurate of the two on single-server multiclass models (mean relative error on Q 0.069 against 0.056 at R = 3), the aggregate delta buying nothing once g == 1. This is the QD-AMVA closure, not a defect of the port, but do not use the function as a Schweitzer oracle for K > 1.

MU IS A DIMENSIONLESS RATE MULTIPLIER, NOT A RATE. mu(k,n) is the factor by which station k serves faster when it holds n jobs. Two traps follow from pfqn_lldfun and are the reference's, not this port's:

  • it SKIPS a station whose mu row is constant (its range(...) > 0 gate), so a single-server station must be a row of ones and a c-server station min(1..smax, c). Passing a c-server station a constant row silently returns g = 1, i.e. a single server.
  • smax = mu.cols() must be at least ceil(sum(N)) or the interpolation clamps the population and the top of the rate curve is never reached.

Delay stations are carried in Z, not as rows of L. Closed classes only: an infinite N(r) is not supported.

Arithmetic: TRANSCENDENTAL-GATED, inherited whole from pfqn_lldfun – the softmin it evaluates is not an element of the field generated by the inputs.

Definition in file pfqn_qdamva.h.