4 % @brief Exact normalizing constant
for load-dependent queueing networks.
10 % @brief Exact normalizing constant
for load-dependent queueing networks.
11 % @fn pfqn_gld(L, N, mu, options)
12 % @param L Service demand matrix (MxR).
13 % @param N Population vector (1xR).
14 % @param mu Load-dependent rate matrix (Mx sum(N)).
15 % @param options Solver options.
16 % @
return G Normalizing constant.
17 % @
return lG Logarithm of normalizing constant.
20function [G,lG]=pfqn_gld(L,N,mu,options)
21% [G,LG]=PFQN_GLD(L,N,MU,OPTIONS)
24% mu: MxN matrix of load-dependent rates
28 lG = factln(sum(N)) - sum(factln(N)) + N(L>0)*log(L(L>0))
' - sum(log(mu(1,1:sum(N))));
34 [lG,G] = pfqn_gldsingle(L,N,mu);
39 G = 0; lG = -Inf; return
47 options = SolverNC.defaultOptions;
53 if min(mu(ist,1:sum(N))) == 1 & max(mu(ist,1:sum(N))) == 1
54 isInfServer(ist) = false;
55 continue; % this is a LI station
56 elseif all(mu(ist,1:sum(N)) == 1:sum(N))
57 isInfServer(ist) = true;
58 continue; % this is a infinite server station
60 isInfServer(ist) = false;
66 % if load-independent model then use faster pfqn_gmva solver
67 Lli = L(find(~isInfServer),:);
71 Zli = L(find(isInfServer),:);
75 options.method='exact
';
76 lG = pfqn_nc(lambda,Lli, N, sum(Zli,1), options);
87if sum(N==zeros(1,R))==R
94 G=pfqn_gldsingle(L,N,mu);
99G=G + pfqn_gld(L(1:(M-1),:),N,mu(1:(M-1),:),options);
107 G = G + (L(M,r)/mu(M,1))*pfqn_gld(L,N_1,pfqn_mushift(mu,M),options);