-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathintelNonLinearTop.m
More file actions
59 lines (47 loc) · 1.23 KB
/
intelNonLinearTop.m
File metadata and controls
59 lines (47 loc) · 1.23 KB
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
59
% random partition the sum of 1
% only generate small number of partitions assuming that
function intelNonLinearTop(randsize)
INVALID = 10000;
num = 2;
odfDim = 388;
count = 0;
counter = [];
odfs = [];
Data = [];
load linprog849_compliance_node;
compliance = propmat(1:36,:);
volumefraction = propmat(end,:);
load linprog_yield_node;
optType = 'intel_NL_Top';
propFunc = @stress_nonLinear;
load populationTop;
tic
% 1 partition - odfDim outcomes 50 for Titanium, 76 for Galfenol
if num == 1
for i = 1:odfDimq
odf_1 = zeros(1,odfDim);
odf_1(i) = 1./constraint(i);
odf = odf_1(i)
[val,C11,C12,S11,S22] = propFunc(odf_1);
if val == -INVALID
count = count + 1;
else
odfs = [odfs;odf_1];
Data = [Data;odf_1,C11,C12,S11,S22,-val];
end
end
else
[odfarray,dataarray,invalid] = intelligentSmallPartitionNonLinear(2,randsize,propFunc,population);
println(length(odfarray)) ;
odfs = [odfs;odfarray];
Data = [Data;dataarray];
end
toc
t = toc;
t_Y_RkI = t;
println('Invalid',invalid);
println(t);
fileName = strcat(optType,'Data/',optType,'_SmallPartition',num2str(num),'_',num2str(randsize),'.mat');
save(fileName,'Data','odfs','randsize','count','t_*');
%findMaxMin(fileName);
% exit;