4 % @brief Multiclass Composite Upper Bound (Kerola 1986) on per-
class
5 % throughput
for closed product-form networks.
9function [Xub,Xlb] = pfqn_mcub(L,N,Z)
12 % @brief Kerola
's composite bound method (Perf. Eval. 6:1-9, eqs. 10-16).
13 % Given per-class multiclass BJB lower bounds X_s^-, the residual-
14 % utilization composite upper bound is
15 % X_r <= min_k [1 - sum_{s!=r} X_s^- L_ks] / L_kr,
16 % computed at O(KR). Much tighter than per-class ABA at moderate load.
17 % (Named pfqn_mcub because pfqn_cub is the unrelated cubature NC method.)
18 % @fn pfqn_mcub(L, N, Z)
19 % @param L Service demand matrix, station x class (M x R).
20 % @param N Population vector (1 x R).
21 % @param Z Think time vector (1 x R, default zeros).
22 % @return Xub Composite upper throughput bound per class (1 x R).
23 % @return Xlb Multiclass BJB lower throughput bound per class (1 x R, eq. 10).
28if nargin < 3 || isempty(Z), Z = zeros(1,R); end
31R0 = sum(L,1); % per-class total demand (1 x R)
32Lb = max(L,[],1); % per-class bottleneck demand (1 x R)
34% eq (10): multiclass Balanced Job Bounds lower throughput bound.
35Xlb = N ./ (R0 + Z + (Ntot - 1).*Lb);
37% eqs (13)-(16): composite upper bound per class.
40 Uoth = zeros(M,1); % utilization at each device by other classes
43 Uoth = Uoth + Xlb(s) * L(:,s);
46 Ucub = 1 - Uoth; % residual utilization available to class r
50 dev(k) = Ucub(k) / L(k,r);