![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Total service rate of a station served by heterogeneous server pools with a class-compatibility graph, and the peak that normalizes its utilization. More...
#include <cstddef>#include <vector>#include "line/num/number.h"#include "line/util/error.h"#include "line/util/matrix.h"Go to the source code of this file.
Namespaces | |
| namespace | line |
| namespace | line::api |
Functions | |
| template<class T> | |
| T | line::api::sn_compat_rate (const Matrix< T > &compat, const std::vector< double > &counts, const std::vector< T > &rates, const std::vector< T > &n) |
| Rate cleared by the pools when the operands in n are present. | |
| template<class T> | |
| T | line::api::sn_compat_peak (const std::vector< double > &counts, const std::vector< T > &rates) |
| Rate with every pool active: sum_t counts(t)*rates(t). | |
| template<class T> | |
| T | line::api::sn_compat_scaling (const Matrix< T > &compat, const std::vector< double > &counts, const std::vector< T > &rates, const std::vector< T > &n) |
| Rate scaling eta(n) a compatibility declaration imposes on its station. | |
Total service rate of a station served by heterogeneous server pools with a class-compatibility graph, and the peak that normalizes its utilization.
Port of matlab/src/api/sn/sn_compat_rate.m. A pool t holds counts(t) identical servers, each running at rates(t), and may serve operand j when compat(t, j) is nonzero. The rate the station clears in state n is
mu(n) = sum_t counts(t) * rates(t) * min(1, sum_{j: compat(t,j) != 0} n(j))
the ACTIVATED-SERVER law: a pool contributes its full rate as soon as it is compatible with at least one operand PRESENT. This is the order-independent reading of a compatibility structure – at an INTEGER state mu depends on n only through its SUPPORT, so it is invariant to the arrival order and to any permutation of the microstate, which is exactly the condition an OI station has to meet (Dorsman & Gardner, Queueing Systems 107:205-256, 2024, Fig. 1). It is also what pas_compatibility_5class.m encodes for a flat Network, so the layered and flat readings of one compatibility matrix agree.
WHY min(1, .) AND NOT AN INDICATOR. At every integer state the two agree exactly – a pool with at least one compatible job present is fully active, one with none is idle – so nothing about the OI law on the real state lattice changes. They part company only at a FRACTIONAL argument, which is what a mean-value solver hands this function: AMVA evaluates the rate at a mean population, and under a hard indicator any operand with a mean above zero, however small, activates every pool it touches. A compatibility structure would then be invisible to AMVA whenever every operand is a little bit busy – which is nearly always. Scaling linearly below one job keeps the structure visible at the evaluation point while leaving the integer-state law untouched; it is the ordinary continuous relaxation of a step function, and the CTMC and simulation paths, which only ever evaluate at integer states, cannot tell the difference.
IT IS NOT A MATCHING. A pool of two servers compatible with a class holding ONE job contributes both servers here, which over-counts against a non-redundant system where one server serves one job. That is deliberate: the matching size depends on the counts and not only on the support, so it is NOT order-independent and would take the station outside the product form the OI closure is built on. A model that means the matching wants a different station, not a different reading of this one.
WHY THE PEAK IS SEPARATE. Utilization at a rate-scaled station is reported as U = T*S/peak, and the peak is the rate with every pool active, sum_t counts(t)*rates(t). It is a property of the DECLARATION, not of a state, so it is computed once and handed to the solver beside the handle rather than recovered from mu at a guessed state.
Definition in file sn_compat_rate.h.