1function [G, lG] = pfqn_oi_nc(Z, N, mu, options)
2% [G, LG] = PFQN_OI_NC(Z, N, MU, OPTIONS)
4% Normalizing constant
for a closed product-form queueing network that
5% comprises a single aggregated infinite-server (delay) node and an
6% arbitrary number of order-independent (OI) / pass-and-swap stations with
9% The OI stations are analyzed by
the balanced-fairness recursion of
10% Bonald & Proutiere (2003),
"Insensitive bandwidth sharing in data
11% networks", combined with
the multichain convolution over stations. For a
12% single OI station with rank rate mu(supp(n))
the balance function
is
13% Phi(0) = 1, Phi(n) = (1/mu(supp n)) * sum_{r: n_r>0} Phi(n - e_r),
14% and G(N)
is obtained by convolving
the per-station balance functions with
15%
the multinomial delay
factor F_Z(n) = prod_r Z_r^{n_r} / n_r!.
17% The routine returns
the exact G(N) via
the equivalent recursive
18% peeling: peel
the last OI station (empty) then, per
class r with N_r>0,
19% place one
class-r job at that station and recurse on N - e_r with
the
20% station rate function shifted by e_r. This reproduces
the balanced-
21% fairness convolution without materializing
the full Phi tables.
24% Z - (1 x R) think-time demand vector of
the aggregated delay node.
25% Z(r) = 1/sigma_r
for a delay with per-
class rate sigma_r.
26% N - (1 x R) closed population vector, finite.
27% mu - cell array {1 x M} of function handles, one per OI station. Each
28% mu{m}(n) returns
the total service rate of station m given
the
29% per-
class occupancy (
count) vector n (1 x R). For an order-
30% independent station
this rate depends only on
the support of n
31% (which classes are present), i.e. mu{m}(n) = sum of
the capacities
32% of
the servers compatible with
the classes present in n. May be
33% empty to model a pure delay network.
34% options - solver options (optional, currently unused; accepted
for
35% signature parity with
the other pfqn_* routines).
38% G - Normalizing constant G(N).
41% Example (IS + two OI stations, R classes):
42% oirate = @(n) sum(mu1(any(compat1(:, find(n>0)) ~= 0, 2)));
43% oirate2 = @(n) sum(mu2(any(compat2(:, find(n>0)) ~= 0, 2)));
44% G = pfqn_oi_nc(1./sigma, N, {oirate, oirate2});
46% Copyright (c) 2012-2026, Imperial College London
52if nargin < 3 || isempty(mu)
64 line_error(mfilename,
'Z and N must have the same number of classes.');
67 line_error(mfilename,
'pfqn_oi_nc requires finite (closed) populations.');
73G = oi_nc_rec(Z, N, mu);
77function G = oi_nc_rec(Z, N, mu)
78% Recursive balanced-fairness convolution over
the OI stations.
88 % Base
case: only
the aggregated delay node remains. Its unnormalized
89 % weight
is the multinomial
factor prod_r Z_r^{N_r} / N_r!.
94 G = 0; %
class r has population but no delay demand: infeasible weight
97 logf = logf + N(r) * log(Z(r)) - gammaln(N(r) + 1);
104% Step A: last OI station holds no jobs; peel it off.
106G = oi_nc_rec(Z, N, mu_sub);
108% Step B: place one job of each present class at
the active OI station and
109% recurse with
the station rate function shifted to account for that job.
119 shifted = @(state) active(state + e_r);
121 mu_next{M} = shifted;
124 G = G + (1 / mu_r) * oi_nc_rec(Z, Nm, mu_next);