-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeorge email.txt
97 lines (81 loc) · 2.07 KB
/
george email.txt
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
Hey Geoff,
Easy problem: Pressure Vessel. Go to your OASIS repo and look under single objective benchmarks.
Medium problem: stepped-end beam (matlab code)
Objective function :
%%%Steppend beam, variable length, general case
%lb=[0.01 0.3 0.5]; Replicated by n, number of beams
%ub=[0.05 0.65 1]; Replicated by n, number of beams
% n=10; %number of beams
% E=2e11;
% P=50000;
% for i=1:n
% I1(i,:)=x(3*i-2,:).*x(3*i-1,:).^3/12;
% end
% E=2e11;
% P=50000;
% s3=0;
% for i=1:n
% s1=0;
% s2=0;
% for j=i:n
% s1=s1+x(3*j,:);
% end
% for j=i+1:n
% s2=s2+x(3*j,:);
% end
% s3=s3+((s1.^3)-(s2.^3))./I1(i,:);
% end
% f=s3*P/(3*E);
% hh=0;
Constraint function:
% n=10;
% E=2e11;
% P=50000;
% sigma=14000e4*2.5;
% for i=1:n
% s1=0;
% for j=1:i
% s1=s1+x(3*j,:);
% end
% c(i,:)=6*P*s1./(x(3*i-2).*x(3*i-1).^2)-sigma;
% c(i+n,:)=(x(3*i-1)./x(3*i-2))-25;
% end
% s2=0;
% for i=1:n
% s2=s2+x(3*i,:).*x(3*i-1,:).*x(3*i-2,:);
% end
% c(2*n+1,:)=s2-0.4;
% % c
% % c1;
% % c=[];
% ceq=[];
Hard problem: P118 (matlab code)
Objective function:
%P118
%lb = [8;43;3;0;0;0;0;0;0;0;0;0;0;0;0], ub =
%[21;57;16;90;120;60;90;120;60;90;120;60;90;120;60]
% f = 0;
% for i = 0:4
% f = f + 2.3*x(3*i+1,:)+0.0001*x(3*i+1,:).^2+1.7*x(3*i+2,:)+0.0001*x(3*i+2,:).^2+2.2*x(3*i+3,:)+0.00015*x(3*i+3,:).^2;
% end
Constraint function:
% ccnt = 1;
% for i = 1:4
% c(ccnt,:) = -x(3*i+1,:)+x(3*i-2,:)-7;
% c(ccnt+1,:) = x(3*i+1,:)-x(3*i-2,:)-6;
% c(ccnt+2,:) = -x(3*i+2,:)+x(3*i-1,:)-7;
% c(ccnt+3,:) = x(3*i+2,:)-x(3*i-1,:)-7;
% c(ccnt+4,:) = -x(3*i+3,:)+x(3*i,:)-7;
% c(ccnt+5,:) = x(3*i+3,:)-x(3*i,:)-6;
% ccnt = ccnt +6;
% end
% c(ccnt,:) = -x(1,:)-x(2,:)-x(3,:)+60;
% c(ccnt+1,:) = -x(4,:)-x(5,:)-x(6,:)+50;
% c(ccnt+2,:) = -x(7,:)-x(8,:)-x(9,:)+70;
% c(ccnt+3,:) = -x(10,:)-x(11,:)-x(12,:)+85;
% c(ccnt+4,:) = -x(13,:)-x(14,:)-x(15,:)+100;
% ceq = [];
For the matlab codes, dimension 1 (rows) represents variables/constraints. Dimension 2 (columns) represents points.
Let me know if you got questions.
Cheers,
George