1function r = pfqn_ljdfun(nvec, ljdscaling, ljdcutoffs, nservers)
2% R = PFQN_LJDFUN(NVEC, LJDSCALING, LJDCUTOFFS, NSERVERS)
4% Joint-dependence scaling function
for AMVA-QD
6% nvec: per-
class population vector [n1, n2, ..., nR]
7% ljdscaling: cell array of linearized scaling tables per station
8% ljdcutoffs: M x K matrix of cutoffs
9% nservers: (optional) number of servers per station
11% Returns: r - scaling factor vector (M x 1)
13% Copyright (c) 2012-2026, Imperial College London
16M = size(ljdcutoffs, 1);
19alpha = 20; % softmin parameter
22 if ~isempty(ljdscaling{i})
23 % Clamp population to cutoffs
24 nClamped = min(nvec, ljdcutoffs(i, :));
26 % Compute linearized index (1-indexed
for MATLAB)
27 idx = ljd_linearize(nClamped, ljdcutoffs(i, :));
29 % Look up scaling value
30 if idx <= length(ljdscaling{i})
31 r(i) = ljdscaling{i}(idx);
35 % Handle servers (similar to pfqn_lldfun)
37 if isinf(nservers(i)) % delay server
38 % handled in the main code differently
41 r(i) = r(i) / softmin(total_n, nservers(i), alpha);
42 if isnan(r(i)) %
if numerical problems in soft-min
43 r(i) = 1 / min(total_n, nservers(i));