4 % @brief Convolutional Bound Hierarchy (Dowdy, Eager, Gordon, Saxton 1984)
5 %
for single-
class closed product-form networks.
9function [Xlo,Xhi] = pfqn_cbh(L,N,Z,level)
12 % @brief Level-`level` convolutional bound hierarchy on throughput. Fills
13 %
column c = M-level of Buzen
's g-array with BJB-derived estimates
14 % (e_0=1, e_i=e_{i-1}/BOUND(i)), then convolves the remaining `level`
15 % servers exactly (g(n,m)=g(n,m-1)+L_m g(n-1,m)). Bounds tighten
16 % monotonically with level and equal the exact solution at level M
17 % (Dowdy et al. 1984). BJB upper fill yields the upper bound; BJB
18 % lower fill the lower bound.
19 % @fn pfqn_cbh(L, N, Z, level)
20 % @param L Service demand vector (M x 1).
21 % @param N Population (scalar).
22 % @param Z Think time (scalar, default 0); folded as an extra IS column.
23 % @param level Number of exactly-convolved servers, 1..M (default 2).
24 % @return Xlo Lower throughput bound.
25 % @return Xhi Upper throughput bound.
29if nargin < 3 || isempty(Z), Z = 0; end
30if nargin < 4 || isempty(level), level = 2; end
32level = max(1, min(level, M));
33c = max(1, M - level); % c=1 (single-server column) is already exact
34Xlo = cbh_hier(L,N,Z,c,'lower
');
35Xhi = cbh_hier(L,N,Z,c,'upper
');
38function X = cbh_hier(L,N,Z,c,side)
39% BJB-filled column c, then exact convolution of the remaining queueing
40% servers and (separately, always exactly) the IS think-time station.
42Rc = sum(L(1:c)); Lbc = max(L(1:c)); Lac = mean(L(1:c));
43% Column-c fill from a BJB estimate of the first c queueing servers. The
44% think time is NOT folded here: the delay is an infinite-server station and
45% is convolved exactly below, so folding Z into the BJB fill would corrupt
46% both the bound and the exact-at-level-M property.
47e = zeros(1, N+1); e(1) = 1;
50 case 'upper
', B = i/(Rc + (i-1)*Lac); % BJB upper fill -> upper bound
51 case 'lower
', B = i/(Rc + (i-1)*Lbc); % BJB lower fill -> lower bound
56 e = L(1).^(0:N); % single-server column is exact
59for m = c+1:M % exact convolution of servers c+1..M
61 g(n+1) = g(n+1) + L(m)*g(n);
64if Z > 0 % convolve the IS delay exactly: g_Z(j)=Z^j/j!
65 gd = Z.^(0:N) ./ factorial(0:N);
66 gfull = zeros(1, N+1);
70 acc = acc + g(j+1)*gd(n-j+1);