Improved Genetic Algorithm with Two-Level Approximation for Truss Optimization by Using Discrete Shape Variables

This paper presents an Improved Genetic Algorithm with Two-Level Approximation (IGATA) to minimize truss weight by simultaneously optimizing size, shape, and topology variables. On the basis of a previously presented truss sizing/topology optimization method based on two-level approximation and genetic algorithm (GA), a new method for adding shape variables is presented, in which the nodal positions are corresponding to a set of coordinate lists. A uniform optimization model including size/shape/topology variables is established. First, a first-level approximate problem is constructed to transform the original implicit problem to an explicit problem. To solve this explicit problemwhich involves size/shape/topology variables, GA is used to optimize individuals which include discrete topology variables and shape variables.When calculating the fitness value of eachmember in the current generation, a second-level approximationmethod is used to optimize the continuous size variables.With the introduction of shape variables, the original optimization algorithmwas improved in individual coding strategy as well as GA execution techniques. Meanwhile, the update strategy of the first-level approximation problem was also improved. The results of numerical examples show that the proposed method is effective in dealing with the three kinds of design variables simultaneously, and the required computational cost for structural analysis is quite small.


Introduction
The optimal design of a truss structure has been an active research topic for many years.Important progress has been made in both optimality criteria and solution techniques.As is well known, the optimal shape design of a truss structure depends not only on its topology but also on the element cross-sectional areas.This inherent coupling of structural shape, topology, and element sections explicitly indicates that the truss shape or topology or sizing optimization should not be performed independently.To date, most researchers focus on the subject of truss shape and sizing optimization [1][2][3] or topology and sizing optimization [4,5], while relatively little literature is available on truss shape, topology, and sizing simultaneous optimization [6,7].The main obstacle is that shape and topology and sizing variables are fundamentally different physical representations.Combining these three types of variables may entail considerable mathematical difficulties and, sometimes, lead to ill-conditioning problem because their changes are of widely different orders of magnitude.
GA has been widely applied in truss topology optimization, especially for mixed variable problems.Based on various given problems, many specific GA methods have been proposed [8,9].However, they are still not completely satisfactory owing to their high computational cost and unstable reliability, especially for large scale structures [10,11].It is, therefore, apparent that the efficiency and reliability of GA retain large space to be improved further.
To improve the efficiency of truss sizing/topology optimization, Dong and Huang [12] proposed a GA with a two-level approximation (GATA), which obtains an optimal solution by alternating topology optimization and size optimization.As the structural analyses are used for building a series of approximate problems and the GA is conducted based on the approximate functions, the computational efficiency is greatly improved and the number of structural analyses can be reduced to the order of tens.Later, Li et al. [5] improved the GATA to enhance its exploitation capabilities and convergence stability.However, the shape variables are not involved in their research.
In this paper, based on the truss topology and sizing optimization system using GATA [5], a series of techniques were proposed to implement the shape, topology, and sizing optimization simultaneously in a single procedure.Firstly, a new optimization model is established, in which the truss nodal coordinates are taken as shape variables.To avoid calculating sensitivity of shape variables, discrete variables are used by adding the length of the individual chromosome.Therefore, sizing variables are continuous and shape/topology variables are discrete.To solve this problem, a first-level approximate problem is improved for the change of truss shape.Then, GA is used to optimize the individuals which include discrete 0/1 topology variables representing the deletion or retention of each bar and the integer-valued shape variables corresponding to nodal coordinates.Within each GA generation, a nesting strategy is applied in calculating the fitness value of each member [5,12].That is, for each member, a second-level approximation method is used to optimize the continuous size variables [5,12].In terms of GA, hybrid gene coding strategy is introduced, as well as the improvement of genetic operators.The controlled mutation of shape variables is considered in the generation of initial population.The uniform crossover is implemented for discrete topology variables and shape variables independently.Meanwhile, the first-level approximation problem update strategy was also improved in this paper.The proposed method is examined with typical truss structures and is shown to be quite effective and reliable.
This paper is organized as follows.In Section 2, we describe the optimization formulation for truss sizing/shape/ topology optimization.In Section 3, we describe the optimization method GATA and in Section 4 the details of improvements for the optimization method are stated.In Section 5, we present our numerical examples and the algorithm performance and conclusion remarks are given in Sections 6 and 7, respectively.

Problem Formulation
The truss sizing/shape/topology optimization problem is formulated in (1).Here, three kinds of design variables are defined as follows.
(3) Topology Variables. = { where  is the total weight of the truss structure and   (, ) denotes the weight of th group.  (, ) represents th constraint in the model, which could be constraints of element stresses, node displacements, mode frequency, or buckling factor. denotes the total number of constraints, and V is the number of frequency or bulking constraints.If some bar members are removed, the corresponding constraints are eliminated, such as the stress constraints of the removed members.Thus,   indicates whether the respective constraint is eliminated; if   = 0, th constraint is eliminated; otherwise if   = 1, th constraint is retained.
To facilitate describing the optimization model, a truss structure is taken as an example, which is shown in Figure 1. coordinate of node 1 could be 100, 120, 140, and 160, while  coordinate of node 2 could be 200, 240, and 280.It is required that the coordinate variation of node 1 and node 2 is independent and that node 1 should be symmetric with node 3 along the dotted line, which means that there are two independent shape variables.In addition, the cross-sectional dimension of each bar element is required to be optimized independently and each bar element is allowed to be deleted or retained, which means that there are 7 size variables and 7 topology variables.Coordinates 1 (120, 120, 0), 2 (240, 60, 0), 3 (120, 0, 0), 4 (0, 0, 0), 5 (0, 120, 0)

Optimization Method
where   () and   () are upper and lower bounds of size variable   at th stage; x () and x () are the moving limits of   at th stage;  ()  () are th approximate constraint function at th stage, which is constructed as follows.First, structural and sensitivity analysis are implemented at the point  () = { 1() ,  2() , . . .,  () }  to obtain the constraint response.Second, the results of structural and sensitivity analysis are used to construct a branched multipoint approximate (BMP) function (( 5)-( 8)) [5,12]: where   is th known point,  is the number of points to be counted, and  = min{,  max }.When the number of known points is larger than  max (always set as 5), only the last  max points are counted; ℎ  () is a weighting function, which is defined in ( 7)-( 8);  , and  , are the adaptive parameter controlling the nonlinearity of  ()  (), which are determined by solving the least squares parameter estimation in (9).When  = 1,  , = −1 and  , = 3.5.For more details of BMP function, please see the work by Dong and Huang (2004) [12].Though problem ( 2) is explicit, it involves topology and shape variables which cannot be directly solved by mathematical programming method.Thus a GA is implemented for explicit mixed variables problem (2).

GA to Deal with Mixed Variables
Problem.GA is used to generate and operate on sequences of mixed variables vector  = { 1 ,  2 , . . .,   ,  1 ,  2 , . . .,   }  representing the truss shape and topology, in which   ( = 1, . . ., ) is 0/1 variables and   ( = 1, . . ., ) is integer-valued variable.Based on the optimum vector  * −1 obtained in the last iteration, the GA generates an initial population randomly, in which the vector  ,, ( = 1) represents th individual in th generation at th iteration of the first-level approximate problem.Then, for every individual in the current generation, the optimal size variables vector  * ,, is obtained by solving a second-level approximation problem, which will be described later in Section 3.3.To reduce the structural analyses, the objective value  () ( * ,, ) is calculated accurately with analytic expressions, and the constraint value  ()  ( * ,, ) is calculated with approximate functions (( 5)-( 9)).Then,  () ( * ,, ) and  ()  ( * ,, ) are used to calculate the fitness of individual  ,, with penalty function method (10).For more details of penalty functions, please see work by Li et al. (2014) [5].Consider After the fitness value of all the members in the initial generation is calculated, the genetic selection, crossover, and mutation operators work on the vector  ,, in sequence based on the individual fitness value fitness( * ,, ) to generate the next generation ( =  + 1).The different genetic operations on 0/1 variables vectors  = { 1 ,  2 , . . .,   }  and integer-valued variables vectors  = { 1 ,  2 , . . .,   }  will be described in Section 4. When the maximum generation (max ) is reached, the optimum vectors  *  and  *  are obtained for the next iteration ( =  + 1) of the first-level approximate problem.

The Second-Level Approximate Problem.
After constructing first-level approximate problem (2) and implementing GA to generate sequences of vector  ,, , original problem (1) is transformed to an explicit problem with continuous size variables only.To improve the computational efficiency, a second-level approximate problem is constructed using linear Taylor expansions of reciprocal design variables [5,12].In th step, the second-level approximate problem is stated in where  () ( X) is the approximate objective value and  ()  ( X) is the approximate value of th constraint in th step; x () and x () are move limits of X and   () and   () are upper and lower bounds of   in th step.After constructing the second-level approximate problem, a dual method and a BFGS are used to seek the optimal size variable  * ,, [5,12].

Improvements in GATA for Adding Shape Variables
To facilitate describing the improvements for adding shape variables in GATA, the truss structure in Figure 1 is also taken as an example.

Definition of Shape Variables and Variable Link.
In problem (1),  = { 1 ,  2 , . . .,   }  is the shape variable vector;   = 1 ∼   ( = 1, 2, . . ., ) denotes the identifier number of the possible coordinates.Each shape variable is defined with an array.As shown in Figure 2,  represents the identifier number of shape variables;  is the identifier number of the nodes to be moved;  means the direction of coordinate, which could be 1 or 2 or 3, corresponding to or or -axis coordinate, respectively;  is the number of possible discrete coordinate values of node ;  denotes the identifier number of node coordinates of the initial truss structure; { 1 ,  2 , . . .,   } denotes the discrete coordinate set of node , or variable , and The shape variables can be linked with each other; that is, some node coordinates could vary with a given relation, such as symmetric variation.The definition of shape variable link relation is explained in Figure 3.  represents the identifier number of shape variables;  is the identifier number of the nodes that is expected to link;  denotes the direction of coordinate which is expected to link,  = 1 or 2 or 3, corresponding to or or -axis coordinate, respectively; Δ is defined as a moving scaling factor, which means that the linked coordinate value is Δ ⋅  when the coordinate value of shape variable  is ; Δ = −1 for symmetric nodes.
According to the shape variable definition rules described above, the shape variables of node 1 and node 2 could be defined as follows: 1, 1, 2, 4, 2, 100, 120, 140, 160, The node 3 is symmetric with node 1 along the dotted line in Figure 1; thus, a sentence should be defined to describe the shape variable link relationship; that is, The definitions of shape variables and variable link are further explained in Figures 2 and 3, respectively.

Hybrid Coding Strategy of Shape and Topology Variables.
In GATA, discrete variables are optimized through GA.After introducing the discrete shape variables, the string of genes should include the information of both topology variables and shape variables.Decimal coding is adopted for nodal positions, while the topology variables keep using binary format.The gene of each individual could be written as represent the code of shape variables and topology variables, respectively.For instance, there are 2 shape variables and 7 topology variables in the truss of Figure 1; the gene of an individual is 1-3-1-1-1-1-1-0-1, which means the first shape variable taking the 1st coordinate in {100, 120, 140, 160} and the second shape variable taking the 3rd coordinate in {200, 240, 280}.The corresponding truss configuration is shown in Figure 4.

Generation of the Initial Population.
The generation mechanism of the initial population is updated for involving shape variables.At the first/initial calling of GA, the initial population of the designs is generated randomly.Once the optimal members of the population have been obtained, the initial population of the next generation is generated according to the elite of former generations of the GA.That is to say, from the second calling of the GA, the initial population consists of three parts: (1) there are the optimal individuals of the former generations; (2) members which are generated according to the optimal individuals of the last generation; that is,   ( = 1, . . ., ) sequentially mutate under control with a low probability (Section 4.2.4), while   will approach 0 with a greater probability if the corresponding optimal size variable   is small; (3) the mutation of   is the same as that in (2), while   mutate randomly with a given low probability.The mutation control technique of shape variables will be explained in Section 4.2.4.
According to our calculation experience, the population size and maximum evolutional generation should exceed twice the total design variables.If it is more than 100, then it will take 100.

Roulette-Wheel Selection.
Roulette-wheel selection is used to select a father design and a mother design from the parent generation, which is easy to be executed.Suggesting that the population size is , the fitness value of th individual in th generation is   ; then the probability of individual  to be selected in the next generation is It can be seen from ( 12) that the individual of higher fitness value has greater probability to be selected.The fitness value of each individual is obtained using (10), as described in Section 3.2.

Uniform Crossover.
Uniform crossover is popularly applied in the GA since it could produce better individuals and has lower probability to break good individuals.Since decimal coding is adopted for nodal coordinates, while the topology variables keep using binary format, crossover operator could not be carried on between these two kinds of code.Uniform crossover which operates gene by gene is implemented to the two areas independently.Before crossover, two individuals are selected randomly as mother and father chromosomes.Then, for each gene, a random value  within 0∼1 is generated.Let  1 = value of gene from the mother and let  2 = value of gene from the father.Let  1 = value of gene from the first child and let  2 = value of gene from the second child.For 0/1 topology genes and integervalued shape genes, where   is the crossover probability.Repeat this process until a new population is generated with  individuals.

Controlled Uniform Mutation of Shape Variables.
Uniform mutation and controlled uniform mutation are implemented for 0/1 topology genes and integer-valued genes, respectively.For each gene, a random number  between zero and one is generated.If  ≤  mutate (mutating probability), the gene is mutated.For 0/1 valued topology genes, the gene is mutated to its allelomorph (0 → 1,1 → 0).For an integer-valued coordinate gene, a controlled mutation technique is implemented to limit the mutation range, which could decrease the numerical instability induced by the large change of coordinates and improve the accuracy of the firstlevel approximation functions.
Two parameters are included in the control mutation technique, which are mutation probability   and move limit  move .Mutation operation is implemented to each point of shape gene sequentially with   .First, if a particular point needs to mutate, let us assume that the number of coordinate positions with respect to this shape variable is  and the present identifier number is , and then the upper limit UP mute and lower limit DO mute of allowable mutation range are obtained as Note that [] denotes the maximum integer not larger than .
Then, an integer between UP mute and DO mute will be generated as the mutation result.Normally,   = 0.001∼0.5 and  move = 0.3∼0.5.

Update Strategy of the First-Level Approximation Problem.
In th iteration process of GATA for truss shape and topology optimization, the results of the structural and sensitivity analysis at   are used to construct the first-level approximation problem using the multipoint approximation function.After introducing the shape variables, the truss shape  = { 1 ,  2 , . . .,   }  |  might be different from that in the last iteration.Therefore, it is necessary to update the firstlevel approximation problem, so as to make it correspond to the present shape.The update strategy of the first-level approximation problem is then modified as follows.If the shape code of the optimal individual is inconsistent with that of the last iteration, a new first-level approximation problem will be built, and the number of known points  will be set as 1; else the first-level approximation problem is consistent with the last iteration and increases the number of known points .The update strategy of the first-level approximate problem in the whole optimization process is emphasized in the algorithm flowchart (Figure 5).

Algorithm Flowchart.
The flowchart of the IGATA (Improved Genetic Algorithm with Two-Level Approximation) for truss size/shape/topology optimization is shown in Figure 5.After getting the optimal  *  from the GA, a convergence criterion in ( 15) is used to determine whether the first-level approximate problem is terminated.Here,  1 is size variables convergence control parameter,  3 is weight convergence control parameter,  2 is the constraints control parameter, and  max is the maximum iterative number for first-level approximate problem.The computational cost of IGATA is low because the first-level approximate techniques reduce the number of structural analyses significantly and the second-level approximate techniques reduce the number of the design variables significantly [5,12]: (15)

Ten-Bar Truss.
The ten-bar truss has been studied by Rajan [6], as shown in Figure 6.The unit of length is inch.Node 6 is the original point.The length of bars 1, 2, 3, 4, 5, and 6 is 360 in.Nodes 4 and 6 are separately applied to a force of 100000 lb.Young's modulus is  = 10 7 Psi and material density is 0.1 lb/in. 3.The section area of each bar is taken as independent variable, which is originally 10 in. 2 and is permitted to vary between 1 in. 2 and 34 in. 2 . coordinates of nodes 1, 3, and 5 are taken as independent shape variables.The moveable range of  coordinate is 180 in. to 1000 in.Discrete coordinates are preset for the shape variables, as shown in Table 1.The shape variables and link relation are defined as definition.Therefore, there are 10 size variables, 10 topology variables, and 3 shape variables in all.The stress of each bar should not exceed ±25,000 Psi.The parameters of GA are set as follows: population size 30, evolution generations 35, crossover probability 0.8, and mutation probability 0.05.The optimized solution of Get the optimal S * p Get the optimal X * l,k,p Initial design X 1  the shape, topology, cross-sectional areas, structural weight, and constraint obtained by the present approach is listed in Table 2, for comparison with [6].It is seen from Table 2 that the critical constraint is very close to the boundary and the optimal weight of this paper is 3173 lb, which is lower than the result of [6] by 81 lb.The optimized shape and topology configuration are contrasted in Figure 7.The iteration history is shown in Figure 8.It is seen that the optimized solution is obtained after only 4 iterations.This example demonstrated the validity and efficiency of the proposed method.

Twelve-Bar Truss.
A twelve-bar truss has been studied by Zhang et al. [13], as shown in Figure 9.The unit of length is mm.The structural symmetry should be kept in the design process.Young's modulus is  = 1000 Pa and material density is 1 kg/mm 3 .The section area of each bar is taken as independent variable, which is originally 10 mm 2 , and is permitted to vary between 1 mm 2 and 100 mm 2 . and  coordinates of nodes 2 and 5 are taken as independent shape variables.The moveable range of  coordinate is 0 mm to 50 mm, and the moveable range of  coordinate is 0 to ∞. Discrete coordinates are preset for the shape variables, as shown in Table 3.The shape variables and link relation are defined as definition.Therefore, there are 12 size variables, 12 topology variables, and 4 shape variables in all.The stress of each bar should not exceed ±450 Pa.The parameters of GA are set as follows: population size 50, evolution generations 50, crossover probability 0.9, and mutation probability 0.05.The optimized solution of the shape, topology, cross-sectional areas, structural weight, + (a) Optimal shape and topology in this paper + (b) Optimal shape and topology in [6] Figure 7: The optimized shape and topology of ten-bar truss structure.and constraint obtained by the present approach is listed in Table 4, for comparison with [13].The optimized shape and topology configuration are contrasted in Figure 10.The iteration history is shown in Figure 11.It is seen that the final structural weight is 1023 kg, which is lower than the result in [13] by 109 kg, and the critical constraint is very close to the boundary.The optimized solution is obtained after only 4 iterations.This example demonstrated the validity and efficiency of the proposed method.

Algorithm Performance
Consider the example of ten-bar truss in Section 5, with population size and maximum generations (max ) set from 10 to 100, respectively, which is shown in Figure 12, while other parameters remain as given before.At each parameter set point, 100 independent runs of IGATA are executed.Since there are 100-parameter set points, IGATA is executed in a total of 10,000 times.For each parameter set point, the average weight is shown in Figure 13.It can be seen from Figure 13 that the minimum weight is 2800 lb, which is less than the weight of the initial structure by 32.6%.To describe the efficiency of the IGATA involving size/shape/topology variables, we counted the number of the results that are lower than 3254 lb, which is the optimal result in [6].It can be seen that 8 results with lower weight are obtained within the 100-parameter set points.
As compared with the IGATA only including size and topology variables [5], the algorithm performance in this paper is not so satisfactory.To test the reason for this situation, continuous shape variables instead of discrete variables were used in the hybrid coding strategy in GA.The results of repeated tests show that the algorithm performance does not improve obviously.Thus the main reason may not lie in the continuity of shape variables but lie in the quality of the first-level approximation function induced by the shape variables.When executing GA in th iteration process of IGATA for truss shape and topology optimization, the objective and constraint approximation functions of the optimal individual from the last iteration are used, which do not change along with the structure shape, although controlled mutation has been implemented.
To improve the accuracy and efficiency of IGATA, we will use continuous shape variables and add sensitivity information of shape variables in the first-level approximation problem in the subsequent work.

Conclusion
In this paper, aiming at simultaneous consideration of sizing, shape, and topology optimization of truss structures, a design method IGATA is presented, which is based on the truss sizing and topology optimization method GATA.The shape variables are involved by using GA and are considered as discrete to avoid the sensitivity calculation, through which the computational cost is decreased significantly.A comprehensive model is established for involving the three kinds of design of variables, in which the shape variables are corresponding to a set of discrete node coordinates.GA is used to solve the first-level approximate problem which involves sizing/shape/topology variables.When calculating the fitness value of each member in the current generation, a secondlevel approximation method is used to optimize the continuous size variables.The definition, link, and code of the shape variables are presented, and the crossover and mutation of the decimal/binary mix-coding population are realized.The update strategy of the first-level approximation problem is also improved for the cases when the truss shapes are different from the neighbor iterations, so as to ensure that the truss shape is corresponding with the approximation problem.The results of numerical example demonstrated the validity of the method.Moreover, truss optimization problem with sizing/shape/topology variables can be treated effectively with the proposed method.The total number of constraints V: The number of frequency constraints.

Figure 2 :
Figure 2: The definition of shape variables.

Figure 3 :
Figure 3: The link method of shape variables.

Figure 4 :
Figure 4: Example of individual gene code.

Figure 5 :
Figure 5: The flowchart of the present approach.

+
(a) Optimal shape and topology in this paper + (b) Optimal shape and topology in[13]

Figure 10 :Figure 11 :
Figure 10: The optimized shape and topology of twelve-bar truss structure.
ev a ria b l ev ect o r   : Cross-sectional area of bar members in th group : S h a p ev a r i a b l ev e c t o r   : Identifier number within the possible coordinates set [ ,1 , . . .,  ,  ] : T o p o l o g yv a r i a b l ev e c t o r : Total weight of the truss structure   (, ): The weight of th group   (, ): th constraint : is set to a very small value    , which is generally calculated as 10 −4 multiplied by the initial value of   ; if   = 1, members in th group are retained, and   is optimized between the upper bound    and the lower bound    : Find  = { 1 ,  2 , . . .,   } 1 ,  2 , . . .,   }  is the topology variable vector.If   = 0, members in th group are removed, and  ,  = { 1 ,  2 , . . .,   }  ,  = { 1 ,  2 , . . .,   }  , min  =  ∑ =1     () () and   () into a sequence of nonlinear explicit approximate functions.In th stage, the approximate explicit problem can be stated as Find  = { 1 ,  2 , . . .,   }

Table 1 :
Shape variables and coordinates identifier number.
Note: S.V. are shape variables.

Table 2 :
Comparison of optimized design of ten-bar planar truss.

Table 3 :
Shape variables and coordinates identifier number of 12-bar planar truss.

Table 4 :
Comparison of optimized design of twelve-bar planar truss.