Synthesis of Truss Structure Designs by NSGA-II and NodeSort Algorithm

This paper presents a genetic algorithm based approach for synthesis of truss structure designs. Genotype represented as a collection of binary encoded nodes is decoded into the phenotype by applying the NodeSort algorithm. A genotype extension to consider a cross-section as variable and variable length chromosomes to produce designs to successfully meet the boundary conditions are all being incorporated into the NodeSort to provide an efficient truss structures synthesis framework. The introduction of multi-objective optimisation using NSGA-II will help to address more real life engineering problems.


INTRODUCTION
The work presented in this paper proposes a genetic algorithm based approach for synthesis of truss structure designs.It builds on the NodeSort [1] algorithm, which takes a collection of binary encoded nodes from a 2D domain and decodes these into a truss structure in a process similar to FEM meshing.In our previous work it was shown that the NodeSort is well suited for the generation of optimal truss structure designs [1].To continue the development of a truss structures synthesis framework, within this paper the following points are set as the research goals: • To account for the multiple search objectives a non-dominated sorting genetic algorithm II (NSGA-II) [2] and [3] will be applied.• Rather than being just a parameter, the crosssection area of trusses is defined as a variable what should improve the quality of produced solutions.Thus, the genotype is extended with one more binary encoded gene.• To avoid the formation of node clusters occurring in near-optimal designs that had excessive number of predefined nodes, or in the opposite, to provide nodes to resolve a design solution when the course of evolution demands more trusses, a variable length chromosomes are introduced.• To facilitate versatility and user-centricity, an arbitrary number of nodes with imposed loads are allowed to be specified.The next section will address the applicability of evolutionary algorithms as powerful and apt optimizers.Then, the related work section will provide an overview of truss structures optimization approaches and drawn from these will justify the motivation for the NodeSort.To be able to accomplish the genotype extension and the introduction of variable length chromosomes, the adjustments need to be performed at the evolutionary operators' level.
How are the crossover and mutation resolved to accommodate these changes, as well as the NodeSort algorithm, is presented in the third section.Section 4 gives FEM model of truss girder system and Section 5 formulates the objectives and constraints of multiobjective optimisation problem.Modifications of the search process parameters and penalty functions with the search algorithm given in pseudo-code are presented in Section 6. Case study and results discussion are presented afterwards.Conclusions and the future work notice close this paper.

EVOLUTIONARY ALGORITHMS
Evolutionary algorithms (EA) are population based stochastic optimisers that are built on mimicking the notions from the natural evolution.Charles Darwin stated that evolution begins with the inheritance of good gene variations and that basically defines what the evolutionary algorithms are all about.Enforcing the survival of the fittest principle is managed by allowing higher ranked solutions to participate in an evolution process by the most.In a random process of mixing together the building-blocks taken from two parent solutions an offspring is produced.Presumably, if building blocks originate from a higher fitness individuals than there is a chance that newly generated individual might get a bit closer to a solution optimum.With the whole process iterated over population generations to produce offspring which replace their parents at least to an extent, the emergence of solution occurs as a consequence of the most fit building-block combinations being frequently utilised in a solution construction.For such behaviour, it can be said that algorithm exhibited a learning process in identification of which building blocks to use and how [4] and [5].
The key issue of computational modelling [5] is to find out suitable problem representation acceptable both to the computational environment and to the task at hand.Thus, the problem representation has to concur to the algorithm's requirements and it should be devised in a fashion that captures the most of the form and attributes of the design search space.With EA's, the problem representation is most often brought down to finding out the appropriate genotype encoding and its counterpart, decoding into a phenotype, thus representing a key point in designing an evolutionary computation based optimization method [4] and [5].The extension of the genotype to include truss thicknesses, the utilization of variable length chromosomes, as well as the NodeSort dependent decoding are viewed as part of an effort to provide a good material for the truss design evolution process.In that way by expanding the set of means to realize the required behaviour, the navigation to more applicable design solutions is made possible.

RELATED WORK AND PROBLEM FORMULATION
From the literature review, it can be found that the methods for the truss structure optimization are specialized either for the structure properties optimization [6] and [7] or the structure topology optimization [8] to [10].By all means not diminishing the complexity of the problem, still the parametric optimisation genotypes are easily encoded because the layout of trusses is known and remains unchanged during the optimisation.As the initial variability of the shape is not being accounted for; instead the optimisation is carried over the usual truss design related variables, i.e. cross-sectional area, length, etc.By contrast, a different type of encoding is applied in the topological optimum design (TOD) cases [8] to [10].The structure is represented in a discrete domain, most often in the form of material distribution, which is a straightforward approach in shape optimization.The genotype encodings may be accomplished in many ways, for example as matrices, Voronoi representations [9], or even by using 3-D FEM building blocks.The phenotype representation then visually depicts the resulting structure.An interesting cantilever optimization problem has been researched by Kim and de Weck [10], who addressed the quality of search with the domain resolution and chromosomal length [5].They increased domain resolution gradually throughout the evolution to simulate the concretization process starting up from a vague concept as a small sized matrix to end up with a refined and concrete solution.TOD is computationally very demanding, it optimizes the structure in the form of the in-domain material distribution, but the other design variables, such as the cross-sectional area, remain predefined and out of reach.
A more subtle approach using the simulated annealing (SA) method together with shape grammars for the structural optimization purposes was developed by Shea and Cagan (1998) [11].Shape grammars provide a formal language, a design language for the structure shape manipulation.Grammars are driven by a set of production rules, or simply productions, by which the solution is obtained from a series of transformations according to possible rules implementation sequences.However, for the description of all the possible truss structures, the set of rules must be equally large.Therefore, for a generic approach, to evolve the structures, the rules should be evolvable as well [12].The problem of truss structure design in the 2-D continuous domain as seen within this work is pictured in Fig. 1.Assuming a random distribution of nodes and a number of predefined fixed nodes (supports and load nodes) all of which are contained within a chromosome, the topology of truss girder design emerges after the application of the NodeSort decoding algorithm [1] (Section 3.3 of this paper).
The genotype encoding and decoding applied in the NodeSort enable the search space to be as large and unconstrained as possible.It goes beyond parametric optimisation by allowing the optimisation of topology, it surpasses TOD approaches since it is much less computationally demandable with girder FEM's being parametric and optimised in a continuous domain.The phenotype represented as a truss structure emerging out of inter-nodal arrangement is an algorithmically driven approach.It offers an alternative to shape grammars which being knowledge-driven achieve the increase in the performance by addition of new rules, thus retaining the same rule transformation principles.Usually, there is a trade-off between the Synthesis of Truss Structure Designs by NSGA-II and NodeSort Algorithm algorithmic and the knowledge-driven approaches since the former requires code interventions for the performance increase and the latter requires the shared understanding about the domain and objective rule definitions, otherwise formalized knowledge becomes inconsistent and biased.Extensions to our previous work reflecting the new encoding/decoding scheme are presented within the next section.

EXTENDED ENCODING/DECODING SCHEME FOR 2D CONTINUOUS DOMAINS
The model of truss structure is defined as the system comprised of a number of trusses and nodes.Boundary conditions specify the load cases, thus taking into account the amount of the loads being applied, as well as the type and the location of truss girder's supports.The load is modelled as a distribution of nodal forces.Within each of the evolution turns for every candidate solution the FEM system stiffness matrix is re-calculated.The position and length of the truss elements are defined as a consequence of the nodal arrangements within the 2-D domain.Assuming circular cross-section, an extension of previous work is the introduction of a truss cross-section diameter as a variable.Hence, a new structural model that is established with the addition of the cross-section diameter enables refinement in the search thus, allowing getting closer to the optimal system topology.Not being explicitly written in the chromosomal genes, the trusses emerge as a consequence of in-plane nodal positions.Thus, in order to be able to introduce a truss cross-section dependant attributes it has been decided to extend the length of the binary encoded node by one gene to contain a gamete of a truss crosssection.The diameter of each truss is then obtained as an average calculated over two gametes belonging to the nodes which define the span of a truss.
According to [1], both fixed nodes and free nodes where predetermined in numbers.To clarify a distinction, in contrast to free nodes, the fixed nodes have a static position in the 2-D search domain thus not being subjected to a position change during the course of the evolution.However, because of the way the cross-section area is calculated, the new thickness gamete addition has to be taken into account even with the fixed nodes.The number of fixed nodes is denoted as NoNx.The improvement introduced within this work enables an increase or decrease of free nodes to occur as demanded by the course of evolution.For example, by prescribing the boundary conditions including the maximal allowed crosssection thickness, the search might be put in a dead end situation with no feasible results being generated unless it is allowed to increase the number NoN of free nodes.Hence, the increase in node numbers creates the possibility to generate more trusses since they appear as the result of nodal arrangements within the 2-D search domain.Consequently, a more stiffened and load capable structure will be designed.In contrast, by allowing the number of free nodes to be decreased is required in the case where the search has strayed in producing too complex solutions in respect to the defined loads.Then, it is necessary to reduce the number of trusses in order to obtain a best-fit solution.

Genotype Encoding
The genotype is assembled two folded; on the primary level each of the nodes is represented as a bit string, and the secondary level comprises of a collection of decoded nodes from which truss structure will be determined.For free nodes, three binary encoded genes are required, two to represent in-plain positioning of the node and one for the determination of the cross-section diameter (Table 1).Fixed nodes only comprise one gene to participate in the crosssection diameter calculation.Genotype encoding with chromosome represented as a collection of nodes is shown in Table 2. Parameter n max represents the allowed number of nodes per chromosome.
Decoding is performed using standard decoding function γ [5].Decoding per gene i for desired interval   ∈  is defined by the following expression: The complete decoding of each gene within a single free node i produces a vector of real numbers: (2)

Evolutionary Operators
The mutation is performed simply, in a bit-flip manner, thus directly altering the nodal position or changing the cross-section diameter gamete in a random fashion.In order to improve the search process in the early stages of the solution evolution it was necessary to introduce scaling of the mutation rate.In the literature, there are a number of such mutation approaches [4] and [5].They are driven by the notions from the natural evolution, justifying the initial mutation rate levels by the harsh environmental conditions.A bit-flip mutation rate is defined as a function of its initial rate p′ m = 0.1 and the number of evolution iterations N. The static mutation rate is being set to p′′ m = 0.02.The bit-flip mutation probability is calculated by a linear scaling formula defined over a desired number of iterations: Random addition or subtraction of nodes is performed by a node mutation procedure with the mutation probability taken the same as defined in Eq. (3).A simple random coin toss trial is performed to determine whether a point will be added or subtracted from the chromosome.Currently, only the free nodes are considered as legible for addition or subtraction.The following formalism defines the procedure for the node mutation of chromosome providing the maximal length n max and the mutation triggering condition p ≤ p m : add new randomly initilzed free node randomly delete a sin ngle free node Chromosome transcription during crossover acts to copy sequences of genetic material belonging to both parents in order to produce an offspring.However, to be able to perform the crossover on the chromosomal structure as shown in Tables 1 and 2, a slight adaption of the usual operator is required; namely to address all of the genetic material, a crossover has to be performed on both levels of the genotype.The crossover procedure is defined with the following: • firstly, by randomly selecting one crossover point per each parent on the nodal levels, then, • corresponding to selected nodes, the crossover points are randomly chosen again but on the bitstring level.
After the crossover it may turn out that the length of an offspring violates the condition n k > n max , as the result of an arbitrary nodal level crossover point selection.The formalism in Eq. ( 5) presents a way how to keep the size of the offspring k within the preset boundaries as defined by n max : if For the condition n k > n max , both chromosome segments are being shortened for one node in a turn wise manner until the condition n k = n max has been met.The turn wise relocation of the crossover point tries to average the loss in diversity of genetic material to both parents.Afterwards, the standard one point crossover is performed separately on the collections of free nodes and fixed nodes.At the end, the nodes are unified into a single collection to form new offspring individual.

Phenotype Generation with the NodeSort Algorithm
Performing an automated search for the optimal system topology which employs the FEM methods for the system behaviour evaluation requires a creation of structural stiffness matrices absent of any singularities.Although the singular solutions can be ranked as infeasible by the constraint handling, their frequent occurrences will slow down and complicate the search process.To overcome the latter, drawn up on the engineering practice it is known that arranging trusses to form triangular substructures is the least requirement for the avoidance of mechanical joints formation in truss structures.Thus, if all of the substructures are triangular, the search space is narrowed down only to computable non-singular solutions, which helps to boost the efficiency of the search.Therefore, the NodeSort employs a mapping to create phenotype out of the encoded chromosome resulting in a mesh composed of triangular schemes to satisfy topological stiffness requirement.This mapping is similar to the meshing techniques applied within various FEM methods.The NodeSort algorithm for generating a phenotype based on the nodal positions and truss thickness gametes is presented with the following pseudo-code: The NodeSort algorithm starts with all of the nodes being sorted ascending based on their x coordinate.The first node from chromosome is taken into consideration by setting the counter i to zero (see pseudo-code line 2).the following whiledo loop which is marked with 3, the algorithm will search for possible ways to define truss elements between the considered node i and all of the nodes with greater x coordinate.The resulting structure must be composed of triangular schemes with no trusses creating intersections.Inside the while-do loop two possibilities which are marked with letters A and B can appear: based on its position the first following node i + 1 can either be below or on equal height (A) or above the considered node i (B).Inside A all of the nodes will be ranked legible for truss definition if they do not violate the conditions a, b and c.The first condition (a), makes sure whether all of the following i+k+1 nodes are in an ascending order over y, the following (b) stops the search if the node is the second one above the node i and in the end (c) it is prevented for the counter to be larger the number of nodes n i .The condition B takes into account situations opposite of A -the first following node being above node i thus collecting truss definition nodes in a descending order.Except for the step (c) which considers the counter exceeding the number of nodes, the break criteria (a) and (b) are redefined for B to consider descending order of nodes as shown in pseudo-code.Afterwards, the trusses are defined (C) over all possible attributes including truss cross-section diameter and the whole procedure is repeated for the following node (D).Fig. 2 pictures a truss structure phenotype generated by the NodeSort algorithm which corresponds to the nodal arrangement which has already been shown in Fig. 1: 1 [1] The singular condition that may occur when two or more nodes are very close to each other or when they overlap is regulated with a constraint that proscribes the minimal allowed length of trusses: l ≥ l min . (6)

STRUCTURAL FEM MODEL
The structure is modelled using FEM planar trusses with possessing in total 6 degrees of freedom each.It was necessary to introduce bending to trusses and implicitly convert them into beams.Otherwise, the result of the evolution taking the infinite stiffness to bending of truss FEM element will always converge to a single horizontal truss.Such structure would have zero displacement since it cannot bend, it would be minimal in mass since it is just a horizontal line.
Normal forces would also be equal to zero for the force vector put vertically as in Fig. 1.The relation between load F and the system's nodal displacement u is given here by with the following expression: The [K] is a standard stiffness matrix defined for planar girder elements.The load vector considering the start and end points of each of the trusses is given in its transposed form as: The vector of displacements per truss element is given with the following expression:

MULTI-OBJECTIVE OPTIMIZATION MODEL
The search goal is to find an optimal distribution of trusses that comprise topology of the structure in respect to minimal mass m and minimal deflection δ.The results will be obtained as a Pareto optimal front of truss structure designs.The optimisation problem is formulated with the following expression: The overall mass of individual solutions m′ is also being accounted for as an increase to the imposed loads.Empirically within this research it was determined that an addition of m′ to the imposed loads pushes the search towards the optimum much earlier in the course of evolution.
The optimization parameters, variables and constraints are given as follows: • F -load vector -fixed node/nodes only, • d max -allowed truss cross-section diameter, • E -Young's modulus, • n max -allowed number of nodes, • NoNx -predefined number of fixed nodes, • BC -boundary conditions -type of supports at particular fixed nodes, load distribution.Problem variables: • x and y coordinates of each node considered, • d -truss cross-section diameter, • l -length of respective truss, • m′ -mass of individual truss design added to the overall loads.Constraints within the search domain are defined as follows: • δ max -allowable nodal deflection, • l min -minimally allowable truss length, • n t -dynamical and recursive constraint which proscribes that each population at step t is allowed to have the number of trusses less than or equal to the least number of trusses found in feasible solutions of the previous t -1 step, • σ T -allowable tensile stress in trusses, and • σ B -the Euler buckling stress for trusses.
It is assumed that compression stress state is calculated less than zero, and that the buckling strength will be entered as a parameter in its absolute value.Design search space is defined within 2-D bounding box.

CONTROL PARAMETERS, CONSTRAINT HANDLING AND ALGORITHM
Control parameters of the search algorithm for the evolution of truss girder designs are given as follows: • population size: μ = 60, • offspring population size: μ = λ, • crossover probability for both genotype levels: p c = 1.0, • static mutation probability: p′′ m = 0.02, • search halt criteria: either user defined or predefined by N≤ 5000, • bit-strings lengths in genotype (Table 1): Both feasible and unfeasible solutions enter a constrain-domination [2] and [3] process meaning that Pareto ranking is performed over all solutions to maintain diversity within the population.The feasible solutions are Pareto ranked over objective functions and the unfeasible ones are ranked according to their constraint violations.When comparing feasible and unfeasible solutions, the feasible always dominate the unfeasible ones.Constraint violation measure Ω i (a i ) of i th solution a i ∈ P(t) from population P at iteration step t is derived as the summation of product between normalized violations ω j (a i ) and the corresponding weighting factor R j (R j is normalized over the summation of all weighting factors).The expression for Ω i (a i ) is given as follows: Normalizations and weights per constrain violation of i th solution are defined as follows: Violation of minimal length is regarded as a severe constraint violation since it may lead to overlapping of the nodes in the search domain thus resulting in the systems singular stiffens matrix.Secondly the violation of allowed deflection is also significant.These two constraints influence the initial search stages the most thus requiring the formation of so severe weighting factors.The other two constraints begin to significantly influence the search only in the later stages when most of the solutions being generated are meaningful solutions.Therefore, the weighting factor is set to 1.0 for the last three constraint violations.For the recursive constraint the normalized violations are calculated by subtracting the number of trusses of the considered solution and the least number of trusses found in feasible solutions of the previous iteration step.For the last two constraints the normalized violations are calculated by a division of current stresses found in trusses with the corresponding allowed stresses for tension and buckling.

The Search Algorithm
The pseudo-code of the search algorithm is given in concordance with the general model of evolutionary algorithm [5] A random creation of the initial population composed of μ chromosomes refers to step 2 of the pseudo-code.Populations of free and fixed nodes are created separately and then joined together.The evaluation considers decoding (A) form integer to real values (as given by Eq. ( 1)), displacing overlapping nodes (B), applying NodeSort (see Section 3.3), calculating displacements and stresses in trusses (steps D-G) as explained in Section 4.
Step H concludes the evaluation by applying a constraint check using the Eqs.( 11) and ( 12) to obtain constraint violation measure.For the sake of convenience all the relevant constraint parameters are denoted as θ c .Step 4 onwards denotes the iterative while-do loop which lasts until the halting condition is satisfied.The crossover in step a. which produces offspring population of size λ is defined as given by the Eq. ( 5).To stress out the difference in respect to the parent population, the offspring population generated at step a is denoted with P′(t).The mutation of offspring's involving steps b and c is defined by expressions for mutation probability calculation (Eq.( 3)) for bit-flip mutation to form P′′(t) and nodal mutation (Eq.( 4)) to form P′′′(t), respectively.The evaluation procedure at step d is comprised of the same subroutines as in the initial in steps D-G.The difference is that the evaluation is being applied to offspring population P′′′(t).Finally, the NSGA-II (e) creates a new population of size μ involving the Pareto based ranking.

TEST EXAMPLE
Test example involves a multi-objective optimisation case with the boundary conditions selected as shown in Fig. 1.The input parameters are: load F = 2 t (~20 kN), maximal truss thickness d max = 50 mm, Young's modulus of elasticity for steel E = 210 MPa, maximal number of nodes involved n max = 13, number of fixed nodes NoNx = 3.In respect to formalism in Eq. ( 11) the optimisation problem is given by the following Eq.13: The scatter plot m -δ (Fig. 3) shows the the Pareto optimal front formation during 5000 iterations recorded for every 100 th step of truss design evolution.The distinctive points on the Pareto curve which define the span (designs 1 and 3) are shown in Figs. 4  and 5, and the knee solution (design 2) is shown in Fig. 6.Crossed-out points within the scatter plot denote the infeasible solutions which violate the constraints according to Eqs. ( 11) to (13) taken without n t-1 ≤ n t .
Corresponding to labelling defined in the scatter plot m -δ (Fig. 3) and Figs. 4 to 6 the truss cross-section diameters and positions of nodes for designs 1, 2 and 3 of non-dominated set are shown in Tables 3 and 4.
The optimisation of the averages of objectives with standard deviation calculated at generation 5,000 during 10,000 evolution runs for distinctive points on the Pareto curve are shown in Table 5.
The algorithm score presented in Table 5 states high repeatability of the results in respect to the overall objectives.The only significant dispersions are noted over δ for Design@1 and Design@3.However, a 1/10 and 3/10 of a millimetre are more than acceptable for the proposed search domain as defined in Eq. ( 13).The repeatability achieved over the design topology is shown in Fig. 7.The picture shows the spread of free nodes in knee solutions recorded for 5,000 th iteration through 10,000 evolution runs.

Table 1 .
Binary encoding of nodes

Table 5 .
Averages of objectives with standard deviations