a = 0.2;
b = 0.5;
c = 1.5;
d = 0.5;
N = 20;
alpha = linspace(1.01,4,N);
fprintf(1,'Solving for the optimal tradeoff curve...\n');
min_area = zeros(N,1);
for n = 1:N
fprintf( 'alpha = %.2f ... ', alpha(n) );
cvx_begin gp quiet
variables wa wb wc wd ha hb hc hd
minimize( max(wa+wb,wc+wd)*(max(ha,hb)+max(hc,hd)) )
subject to
ha*wa == a; hb*wb == b; hc*wc == c; hd*wd == d;
1/alpha(n) <= ha/wa <= alpha(n);
1/alpha(n) <= hb/wb <= alpha(n);
1/alpha(n) <= hc/wc <= alpha(n);
1/alpha(n) <= hd/wd <= alpha(n);
cvx_end
fprintf( 'area = %.2f\n', cvx_optval );
min_area(n) = cvx_optval;
end
figure, clf
plot(alpha,min_area);
xlabel('alpha'); ylabel('min area');
axis([1 4 2.5 4]);
disp('Optimal tradeoff curve is plotted.')
Solving for the optimal tradeoff curve...
alpha = 1.01 ... area = 3.72
alpha = 1.17 ... area = 3.53
alpha = 1.32 ... area = 3.38
alpha = 1.48 ... area = 3.26
alpha = 1.64 ... area = 3.16
alpha = 1.80 ... area = 3.07
alpha = 1.95 ... area = 2.99
alpha = 2.11 ... area = 2.93
alpha = 2.27 ... area = 2.87
alpha = 2.43 ... area = 2.82
alpha = 2.58 ... area = 2.77
alpha = 2.74 ... area = 2.73
alpha = 2.90 ... area = 2.70
alpha = 3.06 ... area = 2.70
alpha = 3.21 ... area = 2.70
alpha = 3.37 ... area = 2.70
alpha = 3.53 ... area = 2.70
alpha = 3.69 ... area = 2.70
alpha = 3.84 ... area = 2.70
alpha = 4.00 ... area = 2.70
Optimal tradeoff curve is plotted.