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

Successively Improving Bounds (Srinivasan 1985/1987) on the cycle time and throughput of a single-class closed product-form network. More...

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

Go to the source code of this file.

Classes

struct  line::pfqn::SibBounds< T >
 Return value of pfqn_sib, mirroring [Xlo, Xhi, Wlo, Whi]. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
SibBounds< T > line::pfqn::pfqn_sib (const std::vector< T > &L, int N, const T &Z, int level)
 Successively Improving Bounds (Srinivasan 1985/1987) on the cycle time and throughput of a single-class closed product-form network.
template<class T>
SibBounds< T > line::pfqn::pfqn_sib (const std::vector< T > &L, int N, const T &Z)

Detailed Description

Successively Improving Bounds (Srinivasan 1985/1987) on the cycle time and throughput of a single-class closed product-form network.

Templated port of matlab/src/api/pfqn/pfqn_sib.m, including its local functions phi_u1, sigma and betaL. The hierarchy bounds phi(K) = sum_m rho_m Q_m(K) from both sides, with level 1 the closed form of Theorem 2.1 and higher levels the S_i power-sum forms of Theorems 3.5 and 3.6, and reads the cycle time off W(N) = sum(L) (1 + phi(N-1)).

REFERENCE DEFECT ABOVE LEVEL 1, and the port does NOT reproduce it. pfqn_sib.m declares phi_u1, sigma and betaL as NESTED functions, which in MATLAB share the parent's workspace rather than getting their own. phi_u1 assigns eta = (K-1)/K internally, and the parent has already set eta = (N-2)/(N-1) for the Theorem 3.5 prefactor 0.5/eta. At level 1 sigma returns before it ever calls phi_u1, so eta survives and the bound is correct; from level 2 on, sigma calls phi_u1(N-3), which OVERWRITES the parent's eta, and the prefactor 0.5/eta is then evaluated with the wrong value. On L = [1/2, 1/3, 1/5], N = 5 the parent eta is 3/4 and the clobbered one is 1/2, so phi_u_n comes out 1.5x too large – 2.4919 instead of 1.6613 – which exceeds the Section-2 baseline 1.7798, so min discards it. The net effect is that MATLAB's SIB hierarchy is INERT above level 1: levels 2, 3 and 4 all return the level-0 baseline, and the "bound" reported at level 2 (X in [1.7407, 1.9335]) is LOOSER than the one at level 1 ([1.7607, 1.9335]), which contradicts the monotonicity the method is for. A C++ port has no such aliasing – the three helpers are lambdas with their own scope – so this port computes the intended Theorem 3.5 value and its bounds do tighten with the level: level 2 gives 1.8182, level 3 gives 1.8369, both still below the exact 1.8558. Reproducing the MATLAB value here would mean deliberately reintroducing a scoping accident, so the divergence is documented and pinned in the tests instead.

DELAY IS REJECTED, following the reference: the no-delay phi bounds do not bracket the with-delay congestion, so pfqn_sib.m raises pfqn_sib:delayUnsupported for Z > 0 rather than return an invalid bracket. The port throws InputError in the same case; returning a bound that is not one would be worse than refusing.

ARITHMETIC. Both Theorem 3.5 and Theorem 2.1 solve a quadratic, so the bounds carry a square root and the routine is gated on num_traits<T>::has_transcendental. That is a real restriction rather than a formality: unlike the CBH and PBH families, SIB cannot be evaluated exactly.

Definition in file pfqn_sib.h.