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

Square-root non-iterative (SQNI) approximation for a single queueing station with per-class delay. More...

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

Go to the source code of this file.

Classes

struct  line::pfqn::SqniResult< T >
 Return value of pfqn_sqni, mirroring [Q, U, X] for the single station. More...

Namespaces

namespace  line
namespace  line::pfqn

Functions

template<class T>
SqniResult< T > line::pfqn::pfqn_sqni (const std::vector< T > &N, const std::vector< T > &L, const std::vector< T > &Z)
 Square-root non-iterative (SQNI) approximation for a single queueing station with per-class delay.

Detailed Description

Square-root non-iterative (SQNI) approximation for a single queueing station with per-class delay.

Templated port of matlab/src/api/pfqn/pfqn_sqni.m. Each class throughput is the admissible root of a quadratic assembled from the balanced-job estimate B_r of the other classes' contribution:

X_r = (Z_r - sqrt(disc) - B_r + L_r Ntot) / (2 L_r Z_r) disc = B_r^2 - 2 B_r L_r Ntot - 2 B_r Z_r + L_r^2 Ntot^2 + 2 L_r Ntot Z_r

  • 4 N_r L_r Z_r + Z_r^2

with the discriminant clamped at zero, as in the reference. Classes with Z_r = 0 (self-looping classes, whose quadratic is degenerate) are handled by the reference's two-pass structure: their queue length is pre-set to N_r, and their throughput is filled in from the total queue length afterwards.

ARITHMETIC. The square root is essential, so the routine is gated on num_traits<T>::has_transcendental.

Definition in file pfqn_sqni.h.