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

Order-independent (OI) functional server: the balance function Psi and the rate mu_f of an auxiliary station whose insertion turns the mean of a queue-dependent function into a ratio of normalizing constants. More...

#include <cmath>
#include <limits>
#include <cstddef>
#include <functional>
#include <vector>
#include "line/api/pfqn/pfqn_asympt_common.h"
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for pfqn_oi_fnc.h:

Go to the source code of this file.

Classes

struct  line::pfqn::OiFncResult< T >
 Return value of pfqn_oi_fnc, mirroring [muf, Psi, mu] flattened. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
OiFncResult< T > line::pfqn::pfqn_oi_fnc (const std::vector< T > &Phi, const std::vector< int > &N, const std::function< T(const std::vector< int > &)> &f)
 Order-independent (OI) functional server: the balance function Psi and the rate mu_f of an auxiliary station whose insertion turns the mean of a queue-dependent function into a ratio of normalizing constants.
template<class T>
OiFncResult< T > line::pfqn::pfqn_oi_fnc (const std::vector< T > &Phi, const std::vector< int > &N)

Detailed Description

Order-independent (OI) functional server: the balance function Psi and the rate mu_f of an auxiliary station whose insertion turns the mean of a queue-dependent function into a ratio of normalizing constants.

Templated port of matlab/src/api/pfqn/pfqn_oi_fnc.m, the OI generalization of pfqn_fnc (Casale, QEST 2006, Theorem 3 and Corollary 1). Psi is defined by the lattice convolution identity

(Psi * Phi)(n) = (1 + f(n)) Phi(n), (Psi * Phi)(n) = sum_{0<=k<=n} Psi(k) Phi(n-k)

deconvolved triangularly in column-major order, and then inverted to the rate by balanced fairness,

mu_f(n) = ( sum_{r: n_r > 0} Psi(n - e_r) ) / Psi(n).

With that station in the model, E[f(n)] = G+/G - 1, with no probabilities and no Little's law. For f(n) = sum(n) this is the exact total mean queue length of the station.

SIGNED BALANCE. Psi and mu_f may be negative or otherwise non-physical, as the reference notes; this is immaterial because only the normalizing-constant ratio is used. A state with Psi(n) = 0 has no defined rate and returns infinity, exactly as in MATLAB.

ARITHMETIC. Deconvolution and division only, no transcendental function anywhere, so the routine is EXACT in rational arithmetic and is deliberately left ungated. That matters here more than usual: the deconvolution is a triangular solve with alternating signs, which is exactly the pattern where floating point loses digits, and the exact instantiation is a real check on a double one.

Definition in file pfqn_oi_fnc.h.