4 % @brief Normalizing constant
for mixed open/closed networks with limited load dependence.
10 % @brief Normalizing constant
for mixed open/closed networks with limited load dependence.
12 % The closed-conditional normalizing constant of a mixed limited load-dependent
13 % (LLD) network equals a purely closed load-dependent normalizing constant in
14 % which every queueing station i carries
the Bruell-Balbo-Afshari effective
15 % capacity rate mu_i^eff(n) = 1/EC_i(n), where EC
is returned by
16 % pfqn_ldmx_ec and folds
the open classes into
the closed subnetwork. The
17 % open classes contribute
the separable prefactor lGopen = sum_i log E_i(0),
18 % which reduces to -sum_i log(1-rho_i) in
the load-independent limit.
20 % Mean closed metrics follow from
the standard normalizing-constant ratios,
21 % e.g. X_r = G(N-e_r)/G(N), matching
the exact pfqn_mvaldmx solver.
23 % @fn pfqn_ncldmx(lambda, D, N, Z, mu, S, varargin)
24 % @param lambda Arrival rate vector (0 on closed classes).
25 % @param D Service demand matrix (MxR).
26 % @param N Population vector (Inf on open classes).
27 % @param Z Think time vector (closed classes).
28 % @param mu Load-dependent rate matrix (Mx>=sum(N_closed)).
29 % @param S Number of servers per station (currently informational).
30 % @param varargin Optional solver parameters forwarded to pfqn_ncld.
31 % @
return lG Logarithm of
the closed-conditional normalizing constant.
32 % @
return G Closed-conditional normalizing constant (exp(lG)).
33 % @
return lGopen Logarithm of
the open-
class normalizing prefactor sum_i log E_i(0).
36function [lG,G,lGopen] = pfqn_ncldmx(lambda,D,N,Z,mu,S,varargin)
37% [LG,G,LGOPEN] = PFQN_NCLDMX(LAMBDA,D,N,Z,MU,S,VARARGIN)
40if nargin<5 || isempty(mu)
41 mu = ones(M,max(1,sum(N(isfinite(N)))));
43if nargin<6 || isempty(S)
44 S = ones(M,1); %#ok<NASGU> % kept
for signature parity with pfqn_mvaldmx
46if nargin<4 || isempty(Z)
50openClasses = find(isinf(N));
51closedClasses = setdiff(1:R, openClasses);
53if any(N(intersect(find(lambda),closedClasses))>0)
54 line_error(mfilename,'Arrival rate cannot be specified on closed classes.');
60% open-class normalizing prefactor sum_i log E_i(0); needs
the effective
61% capacity terms even when there are no closed jobs.
63if size(mup,2) < max(1,Kc)
64 mup = [mup, repmat(mup(:,end), 1, max(1,Kc)-size(mup,2))];
66mup = [mup, mup(:,end)]; % one extra
column as in pfqn_mvaldmx
67lambdao = zeros(1,R); lambdao(openClasses) = lambda(openClasses);
68[EC,E] = pfqn_ldmx_ec(lambdao, D, mup);
69lGopen = sum(log(E(1:M,1)));
71% closed-conditional normalizing constant
77Dc = D(:,closedClasses);
79muEff = 1 ./ EC(:,1:Kc);
80[lG,G] = pfqn_ncld(Dc, Nc, Zc, muEff, varargin{:});