LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getProbSysAggr.m
1function [Pnir,logPn] = getProbSysAggr(self)
2% [PNIR,LOGPN] = GETPROBSYSSTATEAGGR()
3
4if isempty(self.result)
5 self.run;
6end
7Q = self.result.Avg.Q;
8sn = self.getStruct;
9N = sn.njobs;
10if all(isfinite(N))
11 switch self.options.method
12 case 'exact'
13 line_error(mfilename,'Exact joint state probabilities not available yet in SolverMVA.');
14 otherwise
15 state = sn.state;
16 % Binomial approximation with mean fitted to queue-lengths.
17 % Rainer Schmidt, "An approximate MVA ...", PEVA 29:245-254, 1997.
18 logPn = sum(factln(N));
19 for ist=1:sn.nstations
20 [~, nir, ~, ~] = State.toMarginal(sn, ist, state{ist});
21 % logPn = logPn - log(sum(nir));
22 for r=1:sn.nclasses
23 logPn = logPn - factln(nir(r));
24 if Q(ist,r)>0
25 logPn = logPn + nir(r)*log(Q(ist,r)/N(r));
26 end
27 end
28 end
29 Pnir = real(exp(logPn));
30 end
31else
32 line_error(mfilename,'getProbAggr not yet implemented for models with open classes.');
33end
34end