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

Deterministic (round-robin) split degrees of every station-class departure stream. More...

#include <cstddef>
#include <vector>
#include "line/lang/lang_types.h"
#include "line/lang/qn/network_struct.h"
#include "line/num/number.h"
#include "line/util/matrix.h"
Include dependency graph for npfqn_traffic_split_rr.h:

Go to the source code of this file.

Namespaces

namespace  line
namespace  line::npfqn

Functions

template<class T>
Matrix< T > line::npfqn::npfqn_traffic_split_rr (const qn::NetworkStruct< T > &sn)
 Port of npfqn_traffic_split_rr.m.

Detailed Description

Deterministic (round-robin) split degrees of every station-class departure stream.

Templated port of matlab/src/api/npfqn/npfqn_traffic_split_rr.m, cross-checked against jar/src/main/java/jline/api/npfqn/Npfqn_traffic_split_rr.java and python/line_solver/api/npfqn/split_rr.py (identical).

kRR(i,r) = k > 1 says the class-r departures of station i are dispatched one-in-k by a round-robin node, so a downstream flow carrying a fraction p of them is the k-fold convolution thinned at q = k p and has SCV 1 + p (d2 - k), against the Markovian 1 + p (d2 - 1). kRR(i,r) = 1 is an ordinary probabilistic split, which is what every entry stays at on a model with no round-robin dispatcher; the QNA/MNA equations then reduce exactly to the Bernoulli-thinning form they had before this factor existed.

Only two topologies admit the deterministic rule: the station dispatches round-robin itself, or it feeds WITH PROBABILITY ONE a non-station node that does and whose pointer no other flow advances. A router shared by two upstream streams interleaves them, so neither sees a clean one-in-k split and both fall back to k = 1.

THE DEGREE IS READ OFF rtnodes, NOT off connmatrix and not off an outlinks list. The reference prefers sn.nodeparam{ind}{r}.outlinks, the per-class destination list of the dispatcher, and falls back to the row of sn.connmatrix. This port's NetworkStruct carries neither field: rtnodes is the same graph once refresh_routing has expanded the strategies (the same substitution downstream_stations documents in network_struct.h). Counting the DISTINCT destination NODES of row (ind,r) reproduces the per-class outlinks semantics, which is the branch the reference takes whenever a dispatcher was actually built, and differs from the connmatrix fallback only on a link the model declares and then routes no mass over.

ARITHMETIC: field, and integral in fact. The result is a matrix of counts; only comparisons against zero and against 1 - FineTol are taken, so this is exact at T = Rational.

Definition in file npfqn_traffic_split_rr.h.