LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getCdfPT.m
1function CDc = getCdfPT(self)
2% CDC = GETCDFPT()
3
4% Copyright (c) 2012-2026, Imperial College London
5% All rights reserved.
6
7T0 = tic;
8%if ~exist('R','var')
9R = self.getAvgRespTHandles;
10%end
11sn = self.getStruct;
12%if ~exist('withRefStat','var')
13withRefStat = false(1,sn.nclasses);
14%elseif numel(withRefStat) == 1
15% val = withRefStat;
16% withRefStat = false(1,sn.nclasses);
17% withRefStat(:) = val;
18%end
19% ptSpec = struct(); % passage time specification
20% ptSpec.starts = false(sn.nnodes,sn.nclasses,sn.nnodes,sn.nclasses);
21% ptSpec.completes = false(sn.nnodes,sn.nclasses,sn.nnodes,sn.nclasses);
22% for r=1:sn.nclasses
23% if withRefStat(r)
24% % starts when arriving to ref
25% ptSpec.starts(:,:,sn.refstat(r),r) = true;
26% else % ref station excluded
27% % starts when leaving ref
28% ptSpec.starts(sn.refstat(r),r,:,:) = true;
29% end
30% % completes when arriving to ref
31% if R{sn.refstat(r),r}.class.completes
32% % class switch to r is right after departure from station i
33% ptSpec.completes(:,:,sn.refstat(r),r) = true;
34% end
35% end
36% options = self.getOptions;
37% options.psgtime = ptSpec;
38completes = false(sn.nnodes,sn.nclasses);
39for i=1:sn.nstations
40 for r=1:sn.nclasses
41 if R{i,r}.class.completes
42 completes(i,r) = true;
43 end
44 end
45end
46CDc = solver_fluid_RT(sn, self.result.solverSpecific.odeStateVec, options, completes);
47runtime = toc(T0);
48self.setDistribResults(CDc, runtime);
49end