-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchooseMethod.m
58 lines (48 loc) · 944 Bytes
/
chooseMethod.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function [ algorithm ] = chooseMethod( data )
R = size(data,2)-1;
nbSamples = 0;
arrival = 1;
departure = 1;
responseTime = 1;
throughput = 1;
utilization = 1;
for i = 1:R
if isempty(data{3,i})
arrival = 0;
else
nbSamples = nbSamples + length(data{3,i});
end
if isempty(data{4,i})
departure = 0;
end
if isempty(data{5,i})
responseTime = 0;
end
if isempty(data{6,i})
throughput = 0;
end
end
if isempty(data{2,R+1})
utilization = 0;
end
if arrival && departure && nbSamples < 10^4
algorithm = 'ci';
return
end
if arrival && departure && nbSamples > 10^4 && nbSamples < 10^5
algorithm = 'gql';
return
end
if arrival && departure && nbSamples > 10^5
algorithm = 'erps';
return
end
if throughput && utilization && responseTime
algorithm = 'ubo';
return
end
if throughput && utilization
algorithm = 'ubr';
return
end
end