LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
fes_beta_handle.m
1function beta = fes_beta_handle(scalingTable, cutoffs)
2% BETA = FES_BETA_HANDLE(SCALINGTABLE, CUTOFFS)
3%
4% Wrap a flow-equivalent-server (FES) throughput table as a per-class
5% class-dependence function beta_{i,r}(n).
6%
7% SCALINGTABLE is a cell {1 x K} in which SCALINGTABLE{r} is the linearized
8% vector of class-r throughputs X_r(n) of the aggregated subnetwork, indexed by
9% LJD_LINEARIZE(min(n,CUTOFFS), CUTOFFS). CUTOFFS is the per-class population
10% vector the table was tabulated on.
11%
12% The returned handle takes the per-class population vector n at the station and
13% returns the length-K vector of DIMENSIONLESS class-dependence scalings
14% beta_r(n) = X_r(n) * |n| / n_r,
15% relative to the nominal rate-1 service of the FES station. The |n|/n_r factor
16% cancels the processor-sharing share that the convolution applies (Sauer 1983,
17% "Computational Algorithms for State-Dependent Queueing Networks", eq. (40),
18% with mu_{r,i}(n) = (n_r/|n|) beta_r(n)), leaving the aggregate completing class
19% r at exactly the subnetwork throughput X_r(n). The population is clamped to
20% CUTOFFS, so the scaling saturates beyond the tabulated range as the underlying
21% table intends. Entries with n_r = 0 are never consulted by the recurrence.
22%
23% This is the single class-dependence mechanism used across the solvers: the
24% exact convolution (PFQN_CONV) reads mu_{r,i}(n) from it, and AMVA-QD reads the
25% same handle through PFQN_CDFUN. A table is materialized only at a language
26% boundary (see JLINE.handle_to_serializablefun), never in the model.
27%
28% See also FES_COMPUTE_THROUGHPUTS, PFQN_CDFUN, PFQN_CONV, LJD_LINEARIZE.
29%
30% Copyright (c) 2012-2026, Imperial College London
31% All rights reserved.
32
33scalingTable = scalingTable(:)';
34cutoffs = round(cutoffs(:)');
35beta = @(n) fes_beta_eval(n, scalingTable, cutoffs);
36end
37
38function v = fes_beta_eval(n, scalingTable, cutoffs)
39K = numel(scalingTable);
40v = ones(1, K);
41n = round(n(:)');
42if numel(n) < numel(cutoffs)
43 n(end+1:numel(cutoffs)) = 0;
44elseif numel(n) > numel(cutoffs)
45 n = n(1:numel(cutoffs));
46end
47nClamped = max(0, min(n, cutoffs));
48idx = ljd_linearize(nClamped, cutoffs);
49tot = sum(n);
50for r = 1:K
51 tbl = scalingTable{r};
52 if ~isempty(tbl) && idx >= 1 && idx <= numel(tbl) && n(r) > 0
53 % The FES station is a nominal rate-1 PS queue, so its class-r service
54 % rate under the convolution is (n_r/|n|) * beta_r(n). The aggregate
55 % must instead complete class r at the subnetwork throughput X_r(n)
56 % outright, so beta_r(n) = X_r(n) * |n|/n_r absorbs the sharing factor.
57 % beta stays dimensionless: it scales the nominal rate-1 demand.
58 v(r) = tbl(idx) * tot / n(r);
59 end
60end
61end
Definition Station.m:245