Genetic Algorithms
Genetic Algorithms
of uncertainties
Ganzerli, S.
Department of Civil Engineering, Gonzaga University, Spokane, WA, USA
Burkhart, M.F.
Department of Computer Science, Gonzaga University, Spokane, WA, USA
ABSTRACT: Convex models are a non-probabilistic method to account for uncertainties. The uncertain
parameters are allowed to vary within a convex set. A very effective implementation technique for the uni-
form bound convex model is the superposition of convex models. This method simply requires superim-
posing the nominal structural response to the structural response due to uncertainties. In this paper, uncer-
tain static loads will be considered and the worst-case scenario that results from their uncertainty sought.
The optimization of trusses considering the volume as the cost function to be minimized will be performed
using genetic algorithms (GAs). GAs have received attention in several fields of study, including structural
design and analysis. However, they have not been extensively implemented to solve a problem that in-
volves uncertain parameters. A major advantage in using GAs is that complex problems with multiple
variables can be addressed. It is the aim of this paper to show how they can be implemented effectively in
the optimal structural design considering uncertainties.
(P 1
0
− β 1 , P20 − β 2 ) (P 1
0
+ β 1 , P20 − β 2 ) Since the convex displacements have already been
derived the convex forces can be written as their di-
Figure 2. The uniform bound convex set. rect function. The convex stresses σcon for a truss
are equal to the convex forces divided by the mem-
While the entire convex set is the rectangular area, ber cross-sectional areas. In the optimal design, to
it has been demonstrated by Elishakoff et al. (1994) incorporate the convex model of uncertainty it is
that the worst effect due to the uncertainties needs to sufficient to substitute the convex displacements,
be searched on the convex hull. For the particular forces and stresses to the nominal ones in the struc-
case of a linear problem, the search can actually be tural analysis routine.
limited to the vertices of the convex set. The verti-
ces are marked with a small triangle in Fig. 2. The
center of the rectangle has coordinates (P10 , P20 ) . 3 GENETIC ALGORITHMS
Therefore, it is the point where no uncertainties are
present and the loads assume their nominal values. The genetic algorithm program GACON has been
The application of the uniform bound convex designed to couple the structural optimization per-
model requires writing the convex displacements. formed by GAs with the convex model of uncertain-
This can be done very easily through the superposi- ties for structural analysis. The flowchart of the
tion of convex models. The nominal displacements program is represented in Fig. 3.
are obtained for three loading conditions. First the The optimization aims to minimize the structural
truss is analyzed with both P10 and P20 , and the volume of a truss. The individuals in the population
nominal displacements X ( P10 , P20 ) are obtained. for the GAs are trusses. Each truss is a chromosome
Then, the structural analysis is performed with one and its genes are the member cross-sectional areas.
load at a time to obtain X ( P10 ) and X ( P20 ). The The cost function is the structural volume. It can be
convex displacements are calculated as follows: minimized as long as the constraints are not ex-
ceeded, i.e. member stresses and displacements are
Xcon = X( P10 , P20 ) ± {β1 |X ( P10 )| + β2 |X ( P20 )|} (3) within their allowable values.
The GACON program generates an initial popu-
Where lation of trusses. The alleles, i.e. the values of the
• X( P10 , P20 ) are the nominal displacements genes, are chosen within an upper and lower limit of
calculated loading the structure with both P10 integer values. The first generation is randomly
and P20 ; chosen, but the algorithm ensures that the population
• |X ( P10 )| are the absolute values of the nomi- has a good distribution of values between the upper
nal displacements calculated loading the and lower limits. The population is composed of an
structure with only P10 (P2 = 0); even number NI of individuals. Only half of the in-
• |X ( P20 )| are the absolute values of the nomi- dividuals (NI/2) will reproduce. The NI/2 fittest
nal displacements calculated loading the trusses, i.e. those with the lowest cost function, are
structure with only P20 (P1 = 0); selected for mating and the other ones are discarded.
• β1 and β2 are the percent of uncertainty of P1 The weighted random pairing method of selection is
and P2 respectively. used. This method assures that the higher ranked
trusses have a higher probability to reproduce. In
In Eq. (3) the plus sign must be used when X( P10 , particular, the technique of rank weighting is used
0
P ) are positive and vice versa. This allows maxi- (Haupt and Haupt, 1998). The crossover operator
2
mizing the structural response due to the uncertain- decides which genes the parents will pass to their
ties. The worst-case scenario is given by the combi- children. As suggested by Goldberg (1989), a mul-
nation of maximum and minimum values of the tiple crossover operator is utilized. The genes
load. passed to the children are randomly chosen. The
For a truss, the forces are a direct function of the NI/2 selected parents produce two children per cou-
convex displacements. To obtain the convex forces ple, NI/2 children total. This restores the total popu-
it is sufficient to substitute the convex displacements lation to NI individuals.
Mutation is necessary to introduce alleles that safe structure. The GAs can account for constraints
have been excluded in the initial population and that in terms of penalty functions assigned to the cost
may be important for convergence. However, elit- function. In other words, if a truss exceeds the limit
ism is implemented on two chromosomes. In fact, of stresses or displacements, its cost function is
the two higher ranked chromosomes are never mu- augmented enormously. In this way the truss is dis-
tated to not lose the best trusses. Mutation can theo- carded from the mating population. The generations
retically happen for every gene in the new popula- that follow the first one undergo the same process of
tion, but this is unlikely. The algorithm chooses selection, mating, reproduction and mutation. As
randomly which genes will mutate. The value of the the cycle continues, the cost function of the indi-
mutation is kept to a small percentage of the original viduals lowers. When the average rate of change of
value of the gene. This is done so that the mutation the cost function over n generations is close to zero
is mimicking the natural process of adaptation to the and the cost function does not improve anymore, the
environment. In other words, this prevents the program presents a choice to the user. The
trusses to abruptly mutate into new trusses that optimization can be stopped and the optimal design
would violate the constraints and therefore they using integer numbers recorded, or the program can
would be discarded from the mating population. switch to floating points. In the latter case the
optimization will be refined to reach a more accurate
value of the cost function until convergence using
PROGRAM GACON
floating points is reached.
(Main program)
Read data
4 TEN-BAR TRUSS EXAMPLE
Examples: number of genes,
search domain size A ten bar aluminum truss was chosen for the optimal
STRUCT. design. Figures 4 and 5 represent the loading condi-
ANALYSIS tion and the degrees of freedom (D.O.F.) of the
Randomly create population truss. Aluminum has a modulus of elasticity equal
(Chromosomes = trusses, PROGRAM
(Auxiliary to 104 ksi (69 * 106 kPa). The bays of the truss and
Genes = cross sectional its height are 360 in (9,144 mm) long. Three loads
areas) program) are affecting the structure. P1 and P2 are vertical
loads placed at D.O.F. 6 and 8 respectively. P3 is a
Calculate horizontal load at D.O.F. 7. P1 and P2 have a nomi-
Evaluate cost stiffness matrix nal value of 100 kip (445 kN) and P3 has a nominal
K = ASB = value of 400 kip (1,780 kN).
ASAT The cost function to be minimized in the optimi-
Select mate zation process is the volume of the structure. The
design variables are the areas of the members. The
Invert K problem solved with the method of GAs is uncon-
Reproduce strained. In the GAs the constraints cannot be ex-
pressed as a function of the design variables. In-
Calculate stead, the constraints are introduced by assigning a
Xnom penalty to the structural volume of those trusses that
Mutate exceed allowable stresses and displacements.
Trusses that violate the constraints will not be able
Test convergence Calculate to mate. The stresses cannot exceed the limit of 25
Xcon, Fcon ,σcon ksi (172 * 103 kPa) for all members except member
9, for which the limit on the stress value is set as 75
ksi (517 * 103 kPa). No distinction is made for lim-
Stop Evaluate its on compressive and tensile stresses. The mini-
constraints mum gage value for the cross sectional area is set at
0.1 in.2 (64.5 mm2). The allowable displacement is
set at 5 in. (127 mm). The optimization is displace-
Figure 3. The GACON program’s flowchart. ment sensitive given the loading condition and the
fact that the truss is cantilevered. D.O.F. 8 will ex-
As the flowchart of Fig. 3 shows the trusses are perience the largest displacement for the given load-
analyzed and the convex structural responses calcu- ing condition. Therefore, penalties are assigned to
lated. These are the convex stresses and displace- trusses for which the displacement at D.O.F. 8 ex-
ments. For the structural design, limits on stresses ceeds the limit.
and displacements need to be imposed to obtain a
The uncertain parameters are the static loads, and the optimal design of the truss with no uncertainties
the optimal design considering uncertainties is ob- in the loads. The results of Table 1 compare very
tained using the superposition method presented ear- well with those available in the literature. The opti-
lier in Eq. 3. All the loads are assumed to be uncer- mal design has been solved also using integer num-
tain by 10 % of their nominal value. Therefore, bers. The results are presented in Table 2 for the
loads P1 and P2 can vary between 90 kip (400 kN) nominal case and the convex model design. As it
and 110 kip (489 kN) and load P3 has lower and up- can be noted, the structural volume using integer
per bounds of 360 kip (1,600 kN) and 440 kip (1,956 numbers is higher than the one using floating points.
kN). However, using integer numbers permits to quickly
calculate a preliminary design. The convergence of
the algorithm using integer numbers is in fact very
1 1 2 2 3 rapid. For a 10-bar truss the advantage of having a
method available to estimate a preliminary design is
7 10 not obvious. Instead, one might think of large struc-
tures or complex systems where having the possibil-
8
360 in 5 6 ity of estimating a cost saving from the beginning
9 could be very fruitful as the design project contin-
ues. In addition, in standard practice the structural
4 3 P3 design is not carried out using floating points, but all
6 5 4 the dimensions are rounded up for constructability
purposes. The use of standard sections is economi-
P1 P2 cally more efficient than utilizing custom-built sec-
360 in 360 in
tions.
Load 5 Node 4 Element
Table 1. Ten-bar truss optimal design results using
P1 Number Number floating points.
Quantity Cross-sectional areas (in2) a
Figure 4. Ten-bar truss, loading condition (1 in = Member Nominal Convex
25.4 mm). number case model
1 4.04 4.46
X2 X4 2 0.10 0.10
1 2 X1 3 X3 3 4.04 6.82
4 12.10 14.04
5 3.87 4.31
6 0.1 0.10
7 11.26 12.38
360 in
8 0.1 0.10
X6 X8 9 2.76 4.62
X5 X7 10 0.14 0.10
Volume (in.3)a 1.5787x104 1.9500x104
6 5 4 a
1 in = 25.4 mm
360 in 360 in Table 2. Ten-bar truss optimal design results using
X6 Node integers.
D.O.F. 5 Number Quantity Cross-sectional areas (in2)a
X5
Member Nominal Convex
number case model
Figure 5. Ten-bar truss, degrees of freedom (1 in = 1 5 5
25.4 mm). 2 1 1
3 5 8
Table 1 presents the results of the structural opti- 4 13 15
mal design of the 10-bar truss using floating points. 5 3 4
This particular truss is referred to as a benchmark 6 1 1
example by many authors in the literature. The 7 11 12
same example has been solved for both the nominal 8 1 1
case and the convex model case using traditional op- 9 3 4
timization techniques (Ben-Haim et al., 1996 and 10 1 1
Ganzerli and Pantelides, 2000). The nominal case is Volume (in.3)a 1.8226x104 2.1404x104
a
1 in = 25.4 mm
5 TWENTY-NINE-BAR TRUSS Table 3. Twenty-nine-bar truss optimal design re-
sults using integers.
Another example has been solved considering a K- Quantity Cross-sectional areas (in2)a
truss. The truss is composed of 29 steel bars with a Member Nominal Convex
modulus of elasticity equal to 29,000 ksi (200 * 106 number case model
kPa). Figure 6 represents the truss geometry and AB 8.03 9.12
loading condition. In addition, the truss has 16 BC 8.03 9.12
nodes that are designated with the letters A through CD 0.39 0.64
K. Each node has two degrees of freedom (D.O.F.) DE 1.44 1.29
except node A has zero D.O.F. since it is pinned, EF 3.33 4.07
and nodes C, E, and G have only one horizontal FG 3.33 4.07
D.O.F. since they are constrained by rollers. The AL 0.29 1.46
loading condition includes: vertical loads P1 and P3 LK 8.04 9.12
with a magnitude of 300 kips (1335 kN) at nodes B KJ 0.34 0.66
and F respectively; vertical load P2 with a magnitude JI 2.10 1.33
of 100 kips (445 kN) located at node D; horizontal IH 3.33 4.07
load P4 with a magnitude of 200 kips (890 kN) lo- HG 6.01 7.33
cated at node L. The static loads are considered un- BM 12.01 13.20
certain. For loads P1 through P3 the percentage of ML 0.40 1.23
uncertainty is 10, and P4 has a percentage of uncer- CN 6.95 8.13
tainty equal to 15. The structural optimization is NK 5.99 6.68
performed with the program GACON and the cost DJ 2.00 2.21
function to be minimized is the structural volume. EO 6.57 6.74
Due to the external supports, the K-truss design is OI 3.50 3.71
not displacement sensitive and constraints are im- FP 12.00 13.21
posed only on stresses. As in the 10-bar truss, con- PH 4.99 6.098
straints are not explicit but they are introduced as a CM 9.99 11.13
penalty function on the structural cost. The value MK 9.98 11.14
chosen for the allowable stresses is 25 ksi (172 * 103 DN 0.79 1.48
kPa) for all the members for both tension and com- NJ 0.76 1.48
pression. The minimum gage value for the cross DO 2.54 2.67
sectional area is set at 0.1 in.2 (64.5 mm2). OJ 2.56 2.68
EP 5.86 6.17
PI 5.85 6.16
P4 L K J I H
Volume (in.3)a 3.35982x104 3.85326x104
a
15 ft 1 in = 25.4 mm
M N O P
15 ft Table 4. Twenty-nine-bar truss optimal design re-
B D F
sults using floating points.
A C E G Quantity Cross-sectional areas (in2)a
P2
P1 P3
Member Nominal Convex
120 ft, 6 @ 20 ft number case model
AB 9 10
DC 9 10
CD 1 2
Figure 6. Twenty-nine-bar truss (1 ft = 305 mm). DE 3 1
EF 4 5
Tables 3 and 4 show the results of the optimal de- FG 4 5
sign of the 29-bar truss using floating points and in- AL 1 2
tegers respectively. Both the nominal and the con- LK 9 10
vex model design are included. The design KJ 1 2
performed with integers yields a higher volume than JI 3 1
the one solved with floating points, as expected. IH 4 5
However, as it was mentioned earlier, the design HG 6 8
performed with integer numbers is preliminary and BM 12 14
serves as an indicator. In fact, it reveals which ML 1 2
members will need larger cross-sectional areas and CN 7 8
which ones can be smaller since they do not carry NK 6 7
much stress. DJ 2 3
EO 7 7 6 CONCLUSIONS
OI 4 4
FP 12 14 In this paper genetic algorithms for structural opti-
PH 5 7 mization have been coupled with convex models of
CM 10 11 uncertainties. The optimal design of trusses subject
MK 10 11 to uncertain static loads has been sought. The uni-
DN 1 2 form bound convex model has been implemented to
NJ 1 2 derive the expressions of the convex response, the
DO 3 3 stresses and displacements. The convex model
OJ 3 4 method, a non-probabilistic method to deal with un-
EP 6 7 certainties, permits to maximize the effect of the un-
PI 6 7 certainties on the structural response. The uncertain-
Volume (in.3)a 3.67486x104 4.30866x104 ties need to be bound by a convex set. The optimal
a
1 in = 25.4 mm design aimed to minimize the structural volume sub-
ject to constraints on the stresses and displacements.
The constraints are implemented as penalties on the
5.1 Truss Analysis cost function applied when the structural response
The convex model optimal design using floating lies in the unfeasible region. This permits disassoci-
points of the 29-bar truss in Table 3 has been ana- ating the cost function from the constraint. The op-
lyzed. For the structural analysis the 16 load condi- timization has been solved using floating points and
tions of Table 5 have been used. These load condi- the results have been compared to the ones available
tions represent all the possible combinations of in the literature. The agreement is outstanding. The
upper (U) and lower (L) values for the four uncertain optimization has also been solved using integer
loads P1, P2, P3 and P4. The performance of the op- numbers. This second approach was chosen as one
timized truss was excellent in that the structural that could serve for large structures to quickly de-
analysis did not show any stress violations. The termine a preliminary design. Furthermore, the pos-
convex model captures the real worst-case scenario sibility of using integer numbers, therefore an array
design. The worst-case scenario is defined as the of discontinuous variables, is an attractive feature of
design that is robust, i.e. does not violate any con- genetic algorithms. The present paper should be of
straints, when it is analyzed with all the possible interest to who is focused on studying optimal struc-
combinations of upper and lower values of the un- tural design subject to uncertainties and considering
certain parameters. The designer might think that both continuous and discontinuous cost functions.
optimizing the truss loaded with one of the load
combinations of Table 5, e.g. UUUU where all the
loads are maximized would be sufficient. In reality, 7 FUTURE WORK
the latter design would be robust only against a few
of the other load conditions but not all (Ben-Haim et Given the attractive properties of GAs the authors of
al., 1996 and Ganzerli and Pantelides, 2000). this paper are now interested in expanding this study
to large structures and estimating the capability of
Table 5. Load conditions. the proposed method to handle them. The aim is to
Load P1 P2 P3 P4 research the capability of the GAs to be used to es-
condition kipa kipa kipa kipa timate a preliminary design using integer numbers
UUUU 330 110 330 230 for large structures.
ULUU 330 90 330 230
UULU 330 110 270 230
UUUL 330 110 270 170 ACKNOWLEDGEMENTS
LUUU 270 110 330 230
LLUU 270 90 330 230 Funding for this project has been provided by the
LLLU 270 90 270 230 McDonald Work Award. Mr. and Mrs. McDonald
LLLL 270 90 270 170 have generously established this grant to the benefit
ULLU 330 90 270 230 of undergraduate students at Gonzaga University.
ULLL 330 90 270 170 Professor Paul Depalma in the Mathematics De-
ULUL 330 90 330 170 partment at Gonzaga University is acknowledged for
LULL 270 110 270 170 having introduced the authors to one another and for
LULU 270 110 270 230 his technical support.
LUUL 270 110 330 170
UULL 330 110 270 170
LLUL 270 90 330 170
a
1 kip = 4.48 kN
REFERENCES
Thampman, C.K.P.V, and Krishnamoorthy C.S.
Ben-Haim, Y., and Elishakoff, I. 1990. Convex 2001. System Reliability-based Configuration
Models of Uncertainty in Applied Mechanics. Optimization of Trusses. Journal of Structural
New York, NY: Elsevier. Engineering. Vol. 127 (No. 8): 947-956.
Ben-Haim, Y., Chen, G., and Soong, T. T., 1996. Wang, C.K. 1986. Structural Analysis on Micro-
Maximum Structural Response using Convex computers. New York, NY: Macmillan.
Models. ASCE J. Engineering Mechanics. Vol.
122: 325-333.