1function [Pnir,logPnir] = getProbAggr(self, ist)
2% [PNIR,LOGPNIR] = GETPROBAGGR(IST)
4% Probability of a SPECIFIC per-
class job distribution at a station.
5% Returns
P(n1 jobs of
class 1, n2 jobs of
class 2, ...) for current state.
7% Compare with getProbMarg: returns queue-length distribution for a
8% single class, i.e.,
P(n jobs of class r) for n=0,1,...,N(r).
14% Pnir - Scalar probability in [0,1]
15% logPnir - Log probability for numerical stability
17if nargin<2 %~exist('ist','var')
18 line_error(mfilename,'getProbAggr requires to pass a parameter the station of interest.');
22 line_error(mfilename,'Station number exceeds the number of stations in the model.');
24if isempty(self.result)
30 switch self.options.method
32 line_error(mfilename,'Exact marginal state probabilities not available yet in SolverMVA.');
34 state = sn.state{sn.stationToStateful(ist)};
35 [~, nir, ~, ~] = State.toMarginal(sn, ist, state);
36 % Binomial approximation with mean fitted to queue-lengths.
37 % Rainer Schmidt,
"An approximate MVA ...", PEVA 29:245-254, 1997.
40 logPnir = logPnir + nchoosekln(N(r),nir(r));
41 logPnir = logPnir + nir(r)*log(Q(ist,r)/N(r));
42 logPnir = logPnir + (N(r)-nir(r))*log(1-Q(ist,r)/N(r));
44 Pnir = real(exp(logPnir));
47 line_error(mfilename,'getProbAggr not yet implemented for models with open
classes.');