LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
getCdfRespT.m
1function RD = getCdfRespT(self, R)
2% RD = GETCDFRESPT(R)
3T0 = tic;
4if nargin<2 || isempty(R) %~exist('R','var')
5 R = self.getAvgRespTHandles;
6end
7
8config = self.getOptions.config;
9if ~isfield(config,'algorithm')
10 config.algorithm = 'exact';
11end
12RD = {};
13sn = self.getStruct;
14[~,D,N,Z,~,S]= sn_get_product_form_params(sn);
15fcfsNodes = find(sn.sched(sn.sched ~= SchedStrategy.INF) == SchedStrategy.FCFS);
16fcfsNodeIds = find(sn.sched == SchedStrategy.FCFS);
17delayNodeIds = find(sn.sched == SchedStrategy.INF);
18if ~isempty(fcfsNodes)
19 T = max(sum(N) * mean(1./sn.rates(fcfsNodes,:)));
20 tset = logspace(0,2*log10(T),100);
21 rates = sn.rates(sn.sched == SchedStrategy.FCFS,:);
22 switch config.algorithm
23 case 'exact'
24 RDout = pfqn_stdf(D,N,Z,S,fcfsNodes,rates,tset);
25 case 'rd'
26 RDout = pfqn_stdf_heur(D,N,Z,S,fcfsNodes,rates,tset);
27 end
28 for i=1:size(RDout,1)
29 for j=1:size(RDout,2)
30 RD{fcfsNodeIds(i),j} = real(RDout{i,j}); % remove complex number round-offs
31 end
32 end
33 for i=1:length(delayNodeIds)
34 for j=1:size(RDout,2)
35 RD{delayNodeIds(i),j} = [map_cdf(sn.proc{delayNodeIds(i)}{j}, tset(:))' tset(:)];
36 end
37 end
38 runtime = toc(T0);
39 self.setDistribResults(RD, runtime);
40else
41 line_warning(mfilename, 'getCdfRespT applies only to FCFS nodes.\n');
42 return
43end
44end
Definition mmt.m:92