4 % @brief Srinivasan (1985) Successively Improving Bounds (SIB) on cycle time
5 % and throughput for single-class product-form closed networks.
9function [Xlo,Xhi,Wlo,Whi] = pfqn_sib(L,N,Z,level)
12 % @brief Successively Improving Bounds (Srinivasan,
"Successively Improving
13 % Bounds on Performance Measures for Product Form Queueing Networks",
14 % IEEE ToC 1987 / TR 85-2). Closed-form hierarchy of upper/lower bounds
15 % on
the cycle time W(N) and throughput X(N) of a single-
class closed
16 % network of fixed-rate (and delay) stations, based on
the MVA relation
17 % W(N)=L*(1+phi(N-1)) with phi(K)=sum_m rho_m Q_m(K). Level 1
is the
18 % closed form of Thm 2.1; higher levels use
the S_i power sums
19 % (S_i=sum_m rho_m^i) via Thms 3.5 (upper) and 3.6 (lower), tightening
20 % monotonically toward exact. Bounds are always at least as tight as
the
21 % Balanced Job Bounds. O(M) to compute; level n needs S_2..S_{n+2}.
22 % @fn pfqn_sib(L, N, Z, level)
23 % @param L Fixed-rate service demand vector (M x 1). Delay demand goes in Z.
24 % @param N Total population (scalar, N>=2).
25 % @param Z Think time (scalar; added to
the cycle-time bracket).
26 % @param level Bound level (>=1,
default 3). Higher = tighter, more S_i terms.
27 % @
return Xlo Lower bound on throughput X(N).
28 % @
return Xhi Upper bound on throughput X(N).
29 % @
return Wlo Lower bound on cycle time (residence + think) W(N).
30 % @
return Whi Upper bound on cycle time W(N).
35if nargin < 3 || isempty(Z), Z = 0; end
37if nargin < 4 || isempty(level), level = 3; end
38level = max(1, round(level));
40% Delay (Z>0)
requires the Section-3.2 demand-substitution extension:
the
41% no-delay phi bounds do NOT bracket
the with-delay congestion (a delay
42% station lowers queueing, so
the no-delay lower bound overestimates it).
43% Only Z=0
is currently supported; reject Z>0 rather than return an invalid
46 error('pfqn_sib:delayUnsupported', ...
47 'pfqn_sib supports Z=0 only (delay needs
the Section-3.2 demand substitution, not yet implemented).');
53% Power sums S_i, i=1..level+3 (S_1=1).
61% alpha_i coefficients (eq. 3.5-3.6), 0-indexed: alpha(k+1) = alpha_k.
62alpha = zeros(1,level+1);
63alpha(1) = S2; % alpha_0
67 acc = acc + S(i+1-j) * alpha(j+1);
69 alpha(i+1) = S(i+2) - acc; % alpha_i
72 function v = phi_u1(K)
73 % Level-1 upper bound on phi(K) (Thm 3.5 with n=1 / eq. 3.18).
77 v = S2; % phi(1) = sum rho_m^2 = S_2 (exact)
81 v = 0.5/eta * (T1 + sqrt(T1^2 + 4*(K-1)*S2));
85 function s = sigma(NN,i)
86 % eq. (3.22c): NN plays
the role of (N-1); Dbar_{N-3}=1+phi_u1(N-3).
88 if i <= 0,
return; end
89 Dbar = 1 + phi_u1(NN-2); % N-3 = (N-1)-2 = NN-2
92 pnum = pnum * (NN-1-(j-1)); % prod_{m=0}^{j-1}(N-2-m)
93 s = s + (rho_u*S(j+1) - S(j+2)) * pnum / Dbar^j;
97 function b = betaL(NN,i)
98 % eq. (3.23c): NN plays
the role of (N-1).
100 if i <= 0,
return; end
101 % term1: sum_{j=1}^{i-1} alpha_j prod_{m=2}^{j}((N-1-m)/Dbar_{N-1-m})
105 p = p * (NN-m)/(1 + phi_u1(NN-m));
107 b = b + alpha(j+1)*p;
109 % term2: alpha_i prod_{m=2}^{i}(...)(1 + (alpha_i/alpha_{i-1})(N-i-2)/(1+(N-i-2)alpha_0))
112 p = p * (NN-m)/(1 + phi_u1(NN-m));
114 Nim2 = NN-1-i-1; % N-i-2 = (NN+1)-i-2 = NN-i-1
115 corr = 1 + (alpha(i+1)/alpha(i)) * Nim2/(1 + Nim2*alpha(1));
116 b = b + alpha(i+1)*p*corr;
121% Section-2 baseline bounds (always valid).
123T1s2 = (N-1)*rho_u - 1;
124phi_hi = 0.5*(T1s2 + sqrt(T1s2^2 + 4*(N-1)*S2));
127 % Section-3 level-n upper (Thm 3.5) and lower (Thm 3.6); take tightest valid.
129 T1u = (N-2)*rho_u - 1;
130 su = sigma(NN, level-1);
131 phi_u_n = 0.5/eta * (T1u + sqrt(max(0, T1u^2 + 4*(N-2)*(S2 - su))));
132 phi_hi = min(phi_hi, phi_u_n);
135 bl = betaL(NN, level-1);
136 phi_l_n = (T1l + sqrt(max(0, T1l^2 + 4*(N-2)*(S2 + (N-2)*bl))))/(2*level);
137 phi_lo = max(phi_lo, phi_l_n);
140% Guard validity of
the bracket.
141phi_lo = max(0, phi_lo);
146% Cycle time and throughput. Delay Z adds to
the cycle time.
147Wlo = Lsum*(1 + phi_lo) + Z;
148Whi = Lsum*(1 + phi_hi) + Z;
149Xlo = N/Whi; % larger cycle time -> lower throughput