Use of Genetic Algorithms in Topology Optimization
Use of Genetic Algorithms in Topology Optimization
net/publication/240623182
CITATIONS READS
15 619
2 authors:
All content following this page was uploaded by Rimantas Belevičius on 10 April 2014.
tive function. Additionally, the individual may contain nodes and search for optimal connection of the nodes
other information, for example, on his parents. The superi- (Fig. 2).
ority of individuals is estimated by their objective values.
Schematically the genetic algorithm is shown in Node 1 Truss 1 Node 2
Fig. 1. The algorithm is illustrated by the following simple
example. Let four individuals form the initial population:
11111111 Truss 3
00000000 Truss 2 Truss 4
10101010
01010101 Truss 5
For instance, during selection for reproduction the sets of
individuals 1 - 2, and 3 - 1 are taken. Then the following Node 3 Truss 6 Node 4
results of crossover will be obtained (Table 1).
The operator of mutation reverses the value of bit. Fig. 2 Possible connections of the nodes
Thus, if the individual is 11111111 and we know the third
bit from the right side has to mutate, resulting individual The external loads and supports are given as ini-
will be 11111011. The probability of mutation is usually tial data and therefore, for the sake of simplification, will
low. Say, if we have a population consisting of 10 indi- not be considered here.
viduals of 20 bits each, and the probability of mutation is As shown in Fig. 2, six possible trusses can con-
0.01, then during mutation only the values of nect the 4 nodes. Let us assign for a possible truss code “1”
10*20*0.01=2 bits will be reversed. – if the element is presented in the structure, and “0” – if
not. Then, after numbering the trusses (Fig. 2), the fully
Start linked structure will be denoted by the following string of
bits: 111111. The structures in Fig. 3 are coded 110010
and 011001 accordingly.
Generation of initial population
Selection
Table 2
Structure of individual data
More
Yes generations No INDIVIDUAL
needed ? Parameter Value
String of bits Coded design parameter for objective
function
End
Objective Value of objective function
Parent 1 Number of the 1st parent in previous
Fig. 1 Scheme of genetic algorithm generation
Parent 2 Number of the 2nd parent in previous
Table 1 generation
Operation of crossover Xsite Position of crossover
Stresses Stresses in each element (i.e., in gene)
Selected Position of Crossover Resulting
Individuals Crossover Individuals Struct individual
11111111 3 11111|111 11111000 {
00000000 3 00000|000 00000111 int A[lchrom]; // string of 0 and 1 (design parameter)
10101010 4 1010|1010 10101111 double B[lchrom]; // stresses in each element
11111111 4 1111|1111 11111010 double fitness; // value of merit function
int parent1;
4. Genetic algorithm for truss structures int parent2;
int xsite; // position of crossover
Here we explain our coding of truss (or frame) };
structures for genetic algorithms. Let us have 4 immovable Fig. 4 C++ structure for individual
36
All the necessary information for the algorithm ate code in APDL. APDL stands for ANSYS Parametric
(total mass of truss structure, stresses in elements) is ob- Design Language, a scripting language that can be used to
tained with finite element package ANSYS; the interface build finite element models in terms of parameters (vari-
rendering truss structure from individual data is written in ables). APDL also encompasses a wide range of other fea-
C++. The scheme below shows the connection of genetic tures such as repeating a command, macros, if-then-else
algorithm in C++ and package ANSYS trough intermedi- branching, do-loops, etc. [7].
Start
RESULTS.dat
8. Obtaining values of objective function and stresses
for readjusted population: repeating steps 3 to 5
Number of generation 1:
11010001000110001...
01111001010111101...
...
10101111001110011...
More
Yes generations No Number of generation 2:
needed? 10010100000110001...
01111001010111100...
...
10101111011110000...
Number of generation N:
...
9. Selection of individuals. Crossover and mutation.
Creation of new population
End
00000000000000010100000000000000000100000000000 Table 3
00. Only 8 genes of this chromosome have the value 1, i.e. Objective values of the best individual and all population
only 8 elements remained in the truss structure (Fig. 10).
Average objec-
Number of Objective of best tive of all gen-
population individual, mm eration, mm
0 26316 31206
1 19405 25768
2 19405 21048
3 13679 16821
4 6058 13536
5 5387 10534
6 5387 5387
7 5387 5387
8 5387 5411
9 5387 5427
10 5387 5500
35000
objective function
20000
15000
10000
5000
Fig. 9 The best individuals of the third and fourth genera- 0
tions 0 1 2 3 4 5 6 7 8 9 10
population number
populations on AMD Athlon 1.09 GHz processor, 1 GB įtempiai strypuose neviršytų leistinųjų ir nebūtų mažesni
RAM took 20 min, while the best solution is obtained after už tam tikrą slenkstinę vertę). Tikslo funkcijos reikšmė
12 min. (truss structure has about 1,57*1057 different pos- apskaičiuojama naudojant ANSYS paketą, o genetinis al-
sible patterns). goritmas ir programos sąsaja su vartotoju sudaryti C++
Solving the topology optimization problem with kalba. Duomenimis tarp C++ ir ANSYS programų keičia-
the proposed technology, it is necessary only to code the masi per tarpines rinkmenas. Pateikiama skaitinių pavyz-
design parameters as string of bits; no additional informa- džių.
tion on objective function (sensitivity, continuity) is re-
quired. Moreover, it greatly reduces the costs of program-
ming, as all the mechanical responses of constructed struc- D. Šešok, R. Belevičius
ture are obtained with commercially available finite ele-
ment packages. USE OF GENETIC ALGORITHMS IN TOPOLOGY
OPTIMIZATION OF TRUSS STRUCTURES
References
Summary
1. Lingyun, W., Mei, Z., Guangming, W., Guang, M. In this paper, a technology enabling to optimize
Truss optimization on shape and sizing with frequency the topology of truss or frame structures with genetic algo-
constraints based on genetic algorithm.-Comput. Mech., rithms is presented. The objective function is total mass of
2005, v.35, p.361-368. the structure elements. Constrains consist of equilibrium
2. Chaman, C., Saitou, K., Jakiela, M. Genetic algo- equations and conditions on stresses in the elements:
rithms as an approach to configuration and topology stresses cannot exceed allowable value and must be above
design.-In Advances and Design Automation, ASME, some threshold value. The values of the objective function
1993, v.65, p.485-498. are calculated with package ANSYS. Genetic algorithm
3. Smith, J., Hodgins, J., Oppenheim, I. Creating mod- with interface is implemented in C++. Exchange of data
els of truss structures with optimization.-ACM Tracsac- between ANSYS and C++ goes through temporary files.
tions on Graphics (SIGGRAPH 2002), 2002, 21(3), Numerical examples are presented.
p.295-301.
4. Puiša, R. The adaptive stochastic algorithms for CAD-
based structure optimization of mechanical parts.-Doc- Д. Шешок, Р. Белявичюс
toral dissertation, Vilnius, 2005, p.129-144.
5. Holland, J.H. Adaptation in Natural and Artificial Sys- ИСПОЛЬЗОВАНИЕ ГЕНЕТИЧЕСКИХ
tems.-Ann Arbor: The University of Michigan Press, АЛГОРИТМОВ ДЛЯ ОПТИМИЗАЦИИ ТОПОЛОГИИ
1975.-211p. СТЕРЖНЕВЫХ КОНСТРУКЦИЙ
6. Goldberg, D. Genetic algorithms in search, optimiza-
tion and machine learning.-Addison-Wesley, New- Резюме
York, 1989, p.59-70.
7. ANSYS Release 8.0 Documentation. APDL Program- В статье описана технология, позволяющая
mer’s Guide. - http://www.ansys.com/ services/ss- оптимизировать топологию стержневых конструкций
documentation-manuals.asp. (ферм), используя генетические алгоритмы. За целе-
вую функцию взята общая масса стержней фермы, а
граничные условия включают в себя требования рав-
D. Šešok, R. Belevičius новесия и ограничения напряжений (т. е. требуется,
чтобы напряжения в стержнях фермы не превышали
GENETINIŲ ALGORITMŲ TAIKYMAS допустимых и не были бы меньше определенного зна-
OPTIMIZUOJANT STRYPINIŲ SISTEMŲ чения). Значение целевой функции вычисляется с по-
TOPOLOGIJĄ мощью пакета ANSYS, а генетический алгоритм и
диалог программы с пользователем реализованы на
Reziumė языке C++. Обмен данными между C++ и ANSYS про-
граммами осуществляется посредством промежуточ-
Straipsnyje aprašyta technologija, leidžianti opti- ного файла. В статье также приведены численные при-
mizuoti strypinių sistemų (santvarų arba rėmų) topologiją меры.
taikant genetinius algoritmus. Kaip tikslo funkcija imama
visa santvaros strypų masė, o apribojimų sistemą sudaro Received January 10, 2007
pusiausvyros ir įtempių sąlygos (t. y. reikalaujama, kad