Chapter 3 Graphical Optimization and Basic Concepts
Arora, Introduction to Optimum Design, 4e
3-32
3.16 ________________________________________________________________________________
(1,2)=1
3161+ 2232
2
subect to 1+23
Solution
Chapter 3 Graphical Optimization and Basic Concepts
MATLAB Code
%Create a grid from -3 to 5 with an increment of 0.05 for the variables x1 and x2
[x1,x2]=meshgrid(-3:0.05:5, -3:0.05:5);
c=[2.3094,2,0];
d=[0.333,1,3];
plot(c,d,‘.k); %Plots points c and d
3.17 ________________________________________________________________________________
(,)= 92+132+18 4
subject to 2+2+ 2 16
Solution
(,)= 92+132+18 4
Chapter 3 Graphical Optimization and Basic Concepts
MATLAB Code
%Create a grid from -10 to 10 with an increment of 0.05 for the variables x and y
fv=[15.2909 37.8764 244.5273 453.1539 700]; %Defines contours for the minimization function
fs=contour(x,y,f,fv,‘b’);
d=[3.27196,-3.1754];
plot(c,d,‘.k); %Plots points c and d in black
Chapter 3 Graphical Optimization and Basic Concepts
Arora, Introduction to Optimum Design, 4e
3-36
3.18 ________________________________________________________________________________
(,)= ( − 4)2+ ( 4)2
subject to 10 −  −  0
5≥ 
, 0
Solution
(,)= ( − 4)2+ ( 4)2
Chapter 3 Graphical Optimization and Basic Concepts
MATLAB Code
%Create a grid from -2 to 12 with an increment of 0.05 for the variables r and t
[r,t]=meshgrid(-2:0.05:12, -2:0.05:12);
hold on %retains the current plot and axes properties for all subsequent plots
%Use the “contour” command to plot constraint/minimization functions
cv1=[0:0.01:0.5]; %Specifies contour values
const1=contour(r,t,g1,cv1,‘g’);
cv1=[0 0.001];
const4=contour(r,t,g4,cv4,‘g’);
cv4=[0 0.001];
const4=contour(r,t,g4,cv4,‘k);
fv=[1 2 17 32 52]; %Defines contours for the minimization function
fs=contour(r,t,f,fv,‘b’);
Arora, Introduction to Optimum Design, 4e
3-38
3.19 ________________________________________________________________________________
(,)=− + 2
subject to −2+ 6+ 3 ≤ 27
18 − 2180
, ≥ 0
Solution
(,)=− + 2
Chapter 3 Graphical Optimization and Basic Concepts
MATLAB Code
%Create a grid from -0.5 to 25 with an increment of 0.05 for the variables x and y
[x,y]=meshgrid(-0.5:0.05:35, -0.5:0.05:25);
hold on %retains the current plot and axes properties for all subsequent plots
%Use the “contour” command to plot constraint/minimization functions
cv1=[0:0.01:3]; %Specifies contour values
const1=contour(x,y,g1,cv1,‘g’);
cv1=[0 0.001];
const4=contour(x,y,g4,cv4,‘g’);
cv4=[0 0.001];
const4=contour(x,y,g4,cv4,‘k);
fv=[-7.5 1 8 15]; %Defines contours for the minimization function
fs=contour(x,y,f,fv,‘b’);
Chapter 3 Graphical Optimization and Basic Concepts
Arora, Introduction to Optimum Design, 4e
3-40
3.20 ________________________________________________________________________________
(1,2)= (14)2+ (22)2
subect to 10 ≥ 1+ 22
0≤ 13
20
Solution
(1,2)= (14)2+ (22)2
Chapter 3 Graphical Optimization and Basic Concepts
MATLAB Code
%Create a grid from -0.5 to 6 with an increment of 0.05 for the variables x1 and x2
[x1,x2]=meshgrid(-0.5:0.05:6, -0.5:0.05:6);
hold on %retains the current plot and axes properties for all subsequent plots
%Use the “contour” command to plot constraint/minimization functions
cv1=[0:0.01:1]; %Specifies contour values
const1=contour(x1,x2,g1,cv1,‘g’);
cv1=[0 0.001];
const4=contour(x1,x2,g4,cv4,‘g’);
cv4=[0 0.001];
const4=contour(x1,x2,g4,cv4,‘k’);
fv=[1 3.25 5 20 25]; %Defines contours for the minimization function
fs=contour(x1,x2,f,fv,‘b’);