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 total queue-length distribution,
8% i.e.,
P(n total jobs) summed over all class combinations.
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.');
21 line_error(mfilename,'Station number exceeds the number of stations in the model.');
23if isempty(self.result)
30 state = sn.state{sn.stationToStateful(ist)};
31 [~, nir, ~, ~] = State.toMarginal(sn, ist, state);
32 % Binomial approximation with mean fitted to queue-lengths.
33 % Rainer Schmidt,
"An approximate MVA ...", PEVA 29:245-254, 1997.
36 logPnir = logPnir + nchoosekln(N(r),nir(r));
37 logPnir = logPnir + nir(r)*log(Q(ist,r)/N(r));
38 logPnir = logPnir + (N(r)-nir(r))*log(1-Q(ist,r)/N(r));
40 Pnir = real(exp(logPnir));
42 line_error(mfilename,'getProbAggr not yet implemented for models with open
classes.');