4 % @brief AMVA-QD
class-dependence function
for queue-dependent scaling.
10 % @brief AMVA-QD
class-dependence function
for queue-dependent scaling.
11 % @fn pfqn_cdfun(nvec, cdscaling, classIdx)
12 % @param nvec Population state vector.
13 % @param cdscaling Cell array of
class-dependent scaling functions.
14 % @param classIdx Optional
class index selecting
beta_{i,r} (
default: 1).
15 % @
return r Scaling
factor vector
for each station.
18function r = pfqn_cdfun(nvec, cdscaling, classIdx)
19% R = PFQN_CDFUN(NVEC, CDSCALING, CLASSIDX)
21% AMVA-QD
class-dependence function. Returns,
for every station i,
the
22% reciprocal of
the class-dependent scaling
23%
beta_{i,r}(n_i1, ..., n_iR)
24% evaluated at
the per-
class population vector NVEC(i,:), for class r=CLASSIDX.
26% CDSCALING{i}
is a function handle of
the per-class population vector at
27% station i. It may return either
28% - a scalar, i.e. a chain-independent scaling beta_i(n) shared by every
29% class (
the common case, and
the historical contract), or
30% - a vector of length R, i.e.
the per-class scalings
31% [
beta_{i,1}(n), ...,
beta_{i,R}(n)], of which element CLASSIDX
is taken.
32% The per-class form expresses Sauer
's chain-dependent service rates
33% mu_{r,i}(n) (Sauer 1983, "Computational Algorithms for State-Dependent
34% Queueing Networks", eq. (40)), so a single class-dependence mechanism covers
35% both the chain-independent and the chain-specific cases.
37% Copyright (c) 2012-2026, Imperial College London
39if nargin < 3 || isempty(classIdx)
46 if isempty(cdscaling{i})
49 v = cdscaling{i}(nvec(i,:));
51 % per-class beta_{i,r}: select the requested class