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

Approximate moments E[Q_i], Var[Q_i], Cov[Q_i,Q_j], E[Q_i^2] and E[Q_i^3] of the per-station total queue lengths of a closed product-form network, by the LINEARIZER-2 / LINEARIZER-3 algorithms of Strelen (Performance Evaluation 11:127-142, 1990, Section 5). More...

#include <cmath>
#include <cstddef>
#include <vector>
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for pfqn_sens_linearizer.h:

Go to the source code of this file.

Classes

struct  line::pfqn::SensLinearizerResult< T >

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
SensLinearizerResult< T > line::pfqn::pfqn_sens_linearizer (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z, const T *tol, unsigned maxiter)
 Approximate moments E[Q_i], Var[Q_i], Cov[Q_i,Q_j], E[Q_i^2] and E[Q_i^3] of the per-station total queue lengths of a closed product-form network, by the LINEARIZER-2 / LINEARIZER-3 algorithms of Strelen (Performance Evaluation 11:127-142, 1990, Section 5).
template<class T>
SensLinearizerResult< T > line::pfqn::pfqn_sens_linearizer (const Matrix< T > &L, const std::vector< int > &N, const std::vector< T > &Z)
 pfqn_sens_linearizer with the defaults of the reference.

Detailed Description

Approximate moments E[Q_i], Var[Q_i], Cov[Q_i,Q_j], E[Q_i^2] and E[Q_i^3] of the per-station total queue lengths of a closed product-form network, by the LINEARIZER-2 / LINEARIZER-3 algorithms of Strelen (Performance Evaluation 11:127-142, 1990, Section 5).

Templated port of matlab/src/api/pfqn/pfqn_sens_linearizer.m. The exact moment analysis of pfqn_sens_mom walks the whole population lattice and so costs O(prod(N+1)); the Linearizer replaces that lattice by a fixed point over R+1 populations, and the reference observes that the same trick applies to the derivatives: differentiate the Linearizer equations, append them to the originals and iterate everything together. Carrying the first derivative is LINEARIZER-2, carrying the second as well is LINEARIZER-3; both are done here, so the third moment is available.

CORE (equations (5.1)-(5.2)) estimates the queue lengths one job down by v_i(l) = m_i(l)/n(l), m_i^(n-e_l')(l) = (n - e_l')_l (v_i(l) + delta_i(l',l)) and substitutes them into the exact MVA equations; delta comes from (5.3), delta_i(l',l) = v_i^(N-e_l')(l) - v_i^(N)(l), and is held fixed across populations by the heuristic (5.4). Differentiating (5.1)-(5.3) gives (5.5)-(5.8), carried alongside.

Accuracy. The reference reports, over 51 networks, relative errors below 2.1% on E[Q], 4.1% on E[Q^2] and 6.2% on E[Q^3]. This is an approximation and is expected to disagree with pfqn_sens_mom by about that much. CovAsym is a genuine error indicator here, not a roundoff residual: the product form makes Cov symmetric but the Linearizer fixed point does not enforce it.

Arithmetic. static_assert(has_transcendental) – unlike every other member of the sensitivity family, this routine reaches a fixed point only to within a stopping tolerance, so its output is a function of the termination test rather than of the model alone and exact arithmetic buys nothing. Same rationale as pfqn_linearizer.h, on top of which this is built.

Definition in file pfqn_sens_linearizer.h.