Let us consider an ideally-pinned planar truss structure, subjected to static point loads and self weight. By assuming that all of the truss members have the same material density, the optimization problem may be expressed as (Pezeshk and Camp 2003):
Minimize
1 m
i i i
W A L
=
=∑ (3.8)
Subject to
l u
l u
l u
s s s
G d d d
A A A
⎧ ≤ ≤
=⎪⎨ ≤ ≤
⎪ ≤ ≤
⎩
(3.9)
where i is the index of the truss member, varying from 1 to the total number of members m.
Li is the length of member i.
Ai = Ai(η) is the cross-sectional area of member i, with η representing the reference number for a given section.
In the above equation, the vectors s, d, A contain the values of stresses, displacements, and cross-sectional areas, respectively. The superscripts l and u refer to the prescribed lower and upper bounds of each constraint.
III.2.1 Algorithm
The algorithm begins by creating a random initial population, or the first generation. The population size is the number of solutions considered in each generation.
The next step is to create a sequence of new populations, or generations. At each step, the individuals in the current generation are the source to create the next generation.
To create a new generation, the algorithm performs the following steps:
scoring each member of the current population by computing its fitness value; scaling the raw fitness scores to convert them into a more usable range of values; selecting parents based on their fitness (selection operator); and producing children from the parents (crossover operator). The children are produced either by making random changes to a single parent (mutation) or by combining the vector entries of a pair of parents (crossover).
Subsequently, the current population is replaced with the children to form the next generation. The algorithm stops when one of the termination criteria is met. The termination criteria are the number of generations to be created, the total computation time, the number of continuous generations without any significant improvement, and the running time without any significant improvement (MATLAB® 2004).
The flowchart in Figure 3.9 demonstrates the main algorithm.
III.2.2. MATLAB GAs Toolbox
MATLAB® is a high-performance language for technical computing that integrates computation, visualization, and programming in an easy-to-use environment where problems and solutions are expressed in familiar mathematical notation. This is an interactive environment whose basic data element is an array that does not require dimensioning. The greatest advantage of MATLAB is its capability to solve many mathematical problems, particularly those with matrix and vector formulations, similarly with the scalar in other programming languages. However, MATLAB® is a translating language which is a huge drawback due to its slow speed in computation.
MATLAB features a family of application-specific solutions called toolboxes.
Toolboxes are comprehensive collections of MATLAB functions (M-files) that extend the MATLAB environment to solve particular classes of problems. All the toolbox functions are MATLAB M-files, made up of MATLAB statements that implement specialized optimization algorithms. The Genetic Algorithm and Direct
Search toolbox is a collection of functions that extend the capabilities of the Optimization toolbox and the MATLAB numeric computing environment.
Figure 3.9 The main flowchart of the genetic algorithm
The current works extend the capabilities of the GAs toolbox by writing its own M-files, to utilize the toolbox in the stage of GA optimization. By default, the GA function in MATLAB finds the minimum value of the objective function for a specified problem.
3. Randomly create initial population
i
i = 1 (process the first generation)
4. Perform structural analysis to obtain internal forces and displacements for every solution in generation #i
5. Calculate the fitness value for all solutions in generation #i, and return this value to the Bfitness function
6. Evaluate the fitnesses of the current population Yes
8. Apply the genetic operators to generate the next population
No
7. Check if any termination criterion is reached or the process is
arbitrarily terminated
END
Yes 1. Declare the global database
2. Input the truss problem BEGIN
No
i = I + 1
III.2.3. Penalized objective function
There are three types of constraints in this problem: the allowable stresses, the allowable displacements, and the available cross-sectional areas.
The variety in the cross-sectional areas is accounted for by using an input list of available sections. Because the selection is based upon this list, we can change the number of sections, the order and the value of each section conveniently.
For the displacement constraint, the penalty term is computed as follows:
max 1
1
max max
1 1
1
i
i
i i
if P P
k P P
P if P θ
⎧ ≤
⎪⎪
= ⎨⎪ >
⎪⎩
(3.10)
1 1
1 n
i i
θ θ
=
=∏ (3.11)
where Pi represents the displacement of the degree of freedom i and Pmax denotes the maximum allowable displacement.
For the constraints upon stress in linear analysis, the penalty term can be computed similarly as for the case of the displacement constraints. However, tracing the loading history in nonlinear analysis is viewed a better way to determine the penalty term for stress constraints.
Let us denote λinitial as the load ratio at which the first member of the truss fails (yielding or buckling); λmax as the load ratio at which the truss reaches its maximum deflection; λcritical as the load ratio at which the last member of the truss fails, i.e. the truss is about to collapse; and λk as a specified load ratio varying from
initial
λ to λmax or λcritical.
The case in which λ>1.0 means the truss can be subjected to heavier load compare to the current load. With the same amount of truss (steel) volume, a set of cross-sectional areas for the members which has a higher value of λ means a better solution. However, this also means that the truss is not an optimum design. The key objective is to minimize the volume of the truss, with the lowest value of λ slightly greater than 1.0. The upper bound of λ is thus set as λ=5. On the other hand, λ<1.0 means the truss is overloaded. To increase the slope on this side, the penalty function is set as θ2 =5 at λ =0.
Based upon the above discussion, θ2 should be chosen such that its lowest value is 1.0 (the optimum λ). The range 0.0< ≤λ 1.0 is avoided by using a parabolic
function of θ2 as well as the range 1.0< ≤λ 3.0 but with a more gradual slope (θ2i →3.0 as λ→3.0).
The penalty function for stresses is computed as follow:
( )
( )
2 2 2
4 1 1 0.0 1.0
1 1 1.0 3.0
2
3.0 3.0
i i
i
i i
i
if if if
λ λ
θ λ λ
λ
⎧ − + < ≤
⎪⎪ −
=⎨ + < ≤
⎪ <
⎪⎩
(3.12)
2 2
1 n
i i
θ θ
=
=∏ (3.13)
Figure 3.10 graphically summarizes θ2i.
The penalized objective function of a particular solution string is obtained by multiplying the truss volume with the corresponding penalty factors:
F =θ θ1 2V (3.14)
where F is the fitness value (penalized objective function); and V is the volume of the truss under consideration.
Figure 3.10 The penalty function
Let us consider a two-dimensional, cantilevered truss with the geometry, supports and loading condition as shown in Figure 4.1. Each member of the truss is designated with a number in the range of 1–10. Each node is also designated with a number in the range of 1–6.
Figure 4.1 The geometry of the ten bar truss.
The length of all the horizontal and vertical members is 100cm. The length of the diagonal members is approximately 141cm. In the first part of the investigation, all members are assigned with the same cross-sectional area, 4.692cm2, for nonlinear analysis. In the second part, the sizing optimization, the list of available cross- sectional areas is specified in accordance with the JIS G 3192 table, using the equal single angles section. As previously mentioned in Chapter 2, the equal single angles are very popular in the design of trusses, particularly light trusses. However, this is the kind of non-compact section in which the yield stress is unable to spread over the entire area of the compression member before buckling. Three types of buckling are possible for this section; however, the current investigation deals only with flexural buckling.
A typical variation of the ten-bar truss problem is the use of either discrete or continuous cross-sectional areas. For the current problem, a set of 20 discrete values are used for the possible cross-sectional areas for each member (1.427, 1.727, 2.336, 3.755, 3.492, 4.302, 3.892, 4.802, 5.644, 4.692, 5.802, 6.367, 7.527, 9.761, 8.127, 8.727, 12.69, 16.56, 9.327, and 10.55 cm2). The radii of gyration (cm) corresponding
to the above list are 0.747, 0.908, 1.230, 1.200, 1.360, 1.360, 1.530, 1.520, 1.500, 1.850, 1.840, 1.990, 1.980, 1.940, 2.140, 2.300, 2.250, 2.220, 2.460, and 2.770 cm, respectively.
The modulus of elasticity of 2,038,901.9 kg/cm2 and the mass density of 7.849x10-3 kg/cm3 are used for steel. The minimum yield stress is 2531.0507 kg/cm2 and the maximum deflection of any node in both the vertical and horizontal directions is 2.0cm (1% of the cantilever span or
100 L ).
The truss is subjected to two static point loads with downward direction as shown in the Figure 4.1.