4 % @brief Reduced Decomposition (
RD) method
for load-dependent networks.
10 % @brief Reduced Decomposition (
RD) method
for load-dependent networks.
11 % @fn pfqn_rd(L, N, Z, mu, options)
12 % @param L Service demand matrix.
13 % @param N Population vector.
14 % @param Z Think time vector.
15 % @param mu Load-dependent rate matrix.
16 % @param options Solver options.
17 % @
return lGN Logarithm of normalizing constant.
18 % @
return Cgamma Gamma correction factor.
21function [lGN,Cgamma] = pfqn_rd(L,N,Z,mu,options)
29 options=SolverNC.defaultOptions;
36 if all(mu(ist,:)==mu(ist,1)) % LI station
37 L(ist,:) = L(ist,:) / mu(ist,1);
46gamma = ones(M,ceil(sum(N)));
52 if isfinite(mu(ist,end))
53 s(ist) = min(find(abs(mu(ist,:)-mu(ist,end))<options.tol));
66 if isinf(mu(ist,s(ist)))
67 lastfinite=max(find(isfinite(mu(ist,:))));
70 y(ist,:) = y(ist,:) / mu(ist,s(ist));
73 gamma(ist,:) = mu(ist,:)/mu(ist,s(ist));
74 if max(abs(mu(ist,:)-(1:sum(N)))) < options.tol
79% eliminating the delays seems to produce problems
80% Z = sum([Z; L(isDelay,:)],1);
86% M = M - sum(isDelay);
88beta = ones(M,ceil(sum(N)));
90 beta(ist,1) = gamma(ist,1) / (1-gamma(ist,1)) ;
92 beta(ist,j) = (1-gamma(ist,j-1)) * (gamma(ist,j) / (1-gamma(ist,j)));
98 options.method=
'default';
99 lGN = pfqn_nc(lambda,L,N,Z,options);
104 vmax = min(sum(sld-1),ceil(sum(N)));
105 Y = pfqn_mva(y,N,0*N); % single
class model
108 lEN(vtot+1) = real(pfqn_gldsingle(rhoN,vtot,beta));
112 EN = exp(lEN(vtot+1));
113 Cgamma = Cgamma + ((sum(N)-max(0,max(vtot-1)))/sum(N)) * EN;
115 options.method='default';
116 lGN = pfqn_nc(lambda,y,N,Z,options);
117 lGN = lGN + log(Cgamma);