Graphics Programs Reference
In-Depth Information
Wecoulduse the formulas in the table to derive S as an explicitfunction of y , but
that would involve a lot of error-prone algebra and result in an overly complicated
expression. It makes moresense to let the computerdo the work.
Theprogramweusedislistedbelow. Aswewish tomaximize S with aminimization
algorithm, the meritfunctionis
S . There are noconstraints in this problem.
% Example 10.2 (root finding with golden section)
yStart=60.0;h=1.0;
[a,b] = goldBracket(@fex10
_
2,yStart,h);
[yopt,Sopt] = goldSearch(@fex10
2,a,b);
fprintf('optimaly=%7.4f\n',yopt)
fprintf('optimalS=%7.2f',-Sopt)
_
The function thatcomputes the sectionmodulus is
functionS=fex10
2(y)
% Function used in Example 10.2
B=48.0;H=60.0;
a=B*(H-y)/H;b=(B-a)/2.0;
A = (B + a)*y/2.0;
Q = (a*yˆ2)/2.0 + (b*yˆ2)/3.0;
d=Q/A;c=y-d;
I = (a*yˆ3)/3.0 + (b*yˆ3)/6.0;
Ibar=I-A*dˆ2;S=-Ibar/c
_
Here is the output:
optimaly=52.1763
optimalS=7864.43
The sectionmodulus of the originaltriangle is 7200; thus the optimal section
modulus is a 9.2% improvementover the triangle.
10.3 Conjugate Gradient Methods
Introduction
We now look atoptimizationin n -dimensional design space. The objective istomin-
imize F ( x ), where the components of x are the n independent design variables. One
Search WWH ::




Custom Search