LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getProbSysAggr.m
1function probSysStateAggr = getProbSysAggr(self)
2% PROBSYSSTATEAGGR = GETPROBSYSSTATEAGGR()
3if GlobalConstants.DummyMode
4 probSysStateAggr = NaN;
5 return
6end
7sn = self.getStruct;
8TranSysStateAggr = self.sampleSysAggr;
9TSS = cell2mat([TranSysStateAggr.t,TranSysStateAggr.state(:)']);
10TSS(:,1)=[diff(TSS(:,1));0];
11state = sn.state;
12nir = zeros(sn.nstateful,sn.nclasses);
13for isf=1:sn.nstateful
14 ind = sn.statefulToNode(isf);
15 [~,nir(isf,:)] = State.toMarginal(sn, ind, state{isf});
16end
17nir = nir';
18rows = findrows(TSS(:,2:end), nir(:)');
19if ~isempty(rows)
20 probSysStateAggr = sum(TSS(rows,1))/sum(TSS(:,1));
21else
22 line_warning(mfilename,'The state was not seen during the simulation.\n');
23 probSysStateAggr = 0;
24end
25end