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

Traffic variability equations of the Robust Queueing Network Analyzer (W. More...

#include <cstddef>
#include <functional>
#include <vector>
#include "line/api/npfqn/npfqn_rqna_weight.h"
#include "line/api/npfqn/npfqn_types.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/lu.h"
#include "line/util/matrix.h"
Include dependency graph for npfqn_traffic_idc.h:

Go to the source code of this file.

Classes

struct  line::npfqn::TrafficIdcCorrections
 Toggle for the two correction terms, mirroring MATLAB's corrections. More...
struct  line::npfqn::TrafficIdcContext< T >
 Context returned by npfqn_traffic_idc, mirroring the MATLAB ctx struct. More...

Namespaces

namespace  line
namespace  line::npfqn

Functions

template<class T>
TrafficIdcContext< T > line::npfqn::npfqn_traffic_idc (const std::vector< T > &lambda0, const Matrix< T > &P, const std::vector< T > &c2a0, const std::vector< T > &mu, const std::vector< T > &cs2, const TrafficIdcCorrections &corrections)
 Traffic variability equations of the Robust Queueing Network Analyzer (W.
template<class T>
TrafficIdcContext< T > line::npfqn::npfqn_traffic_idc (const std::vector< T > &lambda0, const Matrix< T > &P, const std::vector< T > &c2a0, const std::vector< T > &mu, const std::vector< T > &cs2)
 Default corrections (both on), matching MATLAB's nargin < 8 branch.
template<class T>
std::vector< T > line::npfqn::npfqn_traffic_idc_at (const TrafficIdcContext< T > &ctx, const T &t, const std::function< std::vector< T >(const T &)> &a0IdcFun, const std::function< std::vector< T >(const std::vector< T > &)> &sIdcFun)
 Time-dependent IDC equations (eq.

Detailed Description

Traffic variability equations of the Robust Queueing Network Analyzer (W.

Whitt and W. You 2018, "A Robust Queueing Network Analyzer Based on Indices of Dispersion").

Templated port of matlab/src/api/npfqn/npfqn_traffic_idc.m. The JAR carries the same algorithm in jar/src/main/java/jline/api/npfqn/Npfqn_traffic_idc.java; both were cross-read and agree on every equation.

The model is a single-class open network of K single-server FCFS queues with Markovian routing P. Two pieces are computed:

  1. npfqn_traffic_idc assembles and solves the LIMITING variability equations (eq. 42/44) for the asymptotic arrival variability parameters c2_{a,i} = I_{a,i}(Inf), together with the flow rates (eq. 20-21), the fundamental matrix Xi = (I - P')^{-1}, the splitting correction alpha_{i,j} (eq. 34) and the superposition correction beta_i (eq. 38-39). Every operation there is an addition, a multiplication, a division or a linear solve in the field of the inputs, so this stays exact at T = Rational with no reformulation.
  2. npfqn_traffic_idc_at solves the TIME-DEPENDENT IDC equations (eq. 40/43) at a single time t and returns I_{a,i}(t). It weights the equations by the canonical RBM correlation weight w*, which is an erfc and an exp, so that half requires transcendental arithmetic.

Deviations from MATLAB, both mechanical:

  • the external-arrival and service IDC handles a0IdcFun and sIdcFun are arguments of npfqn_traffic_idc_at rather than fields of the context, so the context stays a plain value type with no std::function in it;
  • MATLAB signals "no weight available at this station" by setting the weight argument to Inf, which w* maps to 1. An exact field has no infinity, so the port tests the same condition (h_i > 0 and c2x_i > 0) and uses the weight 1 directly. The two are identical in double.

Definition in file npfqn_traffic_idc.h.