N = 8;
wmin = .1; wmax = 100;
hmin = .1; hmax = 6;
Smin = 1/5; Smax = 5;
sigma_max = 1;
ymax = 10;
E = 1; F = 1;
cvx_begin gp
variables w(N) h(N) v(N+1) y(N+1);
minimize( w'*h )
subject to
d = 6*F*ones(N,1)./(E*ones(N,1).*w.*h.^3);
for i = 1:N
(2*i-1)*d(i) + v(i+1) <= v(i);
(i-1/3)*d(i) + v(i+1) + y(i+1) <= y(i);
end
wmin <= w <= wmax;
hmin <= h <= hmax;
Smin <= h./w <= Smax;
6*F*[1:N]'./(w.*(h.^2)) <= sigma_max;
y(1) <= ymax;
cvx_end
disp('The optimal widths and heights are: ');
w, h
fprintf(1,'The optimal minimum volume of the beam is %3.4f.\n', sum(w.*h))
figure, clf
cantilever_beam_plot([h; w])
Successive approximation method to be employed.
For improved efficiency, SeDuMi is solving the dual problem.
SeDuMi will be called several times to refine the solution.
Original size: 216 variables, 81 equality constraints
48 exponentials add 384 variables, 240 equality constraints
-----------------------------------------------------------------
Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------+---------------------------------+---------
46/ 46 | 8.000e+00 6.109e+01 0.000e+00 | Solved
46/ 46 | 8.000e+00s 1.097e+01 8.399e-07 | Solved
42/ 43 | 9.432e-02 7.105e-04 1.806e-07 | Solved
25/ 42 | 6.491e-03 3.011e-06 4.837e-07 | Solved
2/ 40 | 4.556e-04 1.509e-07 1.509e-07 | Solved
0/ 40 | 3.461e-05 1.508e-07 1.508e-07 | Solved
-----------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +42.3965
The optimal widths and heights are:
w =
0.6214
0.7830
0.9060
1.0124
1.1004
1.1762
1.2000
1.3333
h =
3.1072
3.9149
4.5298
5.0620
5.5019
5.8811
6.0000
6.0000
The optimal minimum volume of the beam is 42.3965.