Truss Structure Optimization Based on Improved Chicken Swarm Optimization Algorithm

. To improve the eﬃciency of the structural optimization design in truss calculation, an improved chicken swarm optimization algorithm was proposed for truss structure optimization. The chicken swarm optimization is a novel swarm intelligence algorithm. In the basic chicken swarm optimization algorithm, the concept of combining chaos strategy and reverse learning strategy was introduced in the initialization to ensure the global search ability. And the inertia weighting factor and the learning factor were introduced into the chick position update process, so as to better combine the global and local search. Finally, the overall individual position of the algorithm was optimized by the diﬀerential evolution algorithm. The improved algorithm was tested by multipeak function and applied to the truss simulation experiment. The study provided a new method for the truss structure optimization.


Introduction
Engineering structure optimization is a problem that has plagued scholars for many years.Mechanical constraints and optimization methods are combined in engineering structure optimization.According to the different engineering requirements, some parameters in the project are involved in the optimization calculation of the engineering structure in the form of variables, thus forming a solution domain of the optimized structure.en, based on the constraints of the project, the mathematical model is established, and the mathematical solution is used to find the most reasonable design scheme in accordance with the design requirements.In 1974, Schimit and Farshi proposed an approximation problem in structural optimization [1].After that, with the application of computer technology, modern structure optimization become a real possibility.
e traditional structural optimization method had certain defects.
ere was no effective optimization design method.At first, it was judged by people directly, such as the limit stress method and the ultimate strain method.ese methods were difficult to find the best results, and there was no corresponding theoretical basis.Later, as the time passed, the corresponding mathematical theory support appeared, but it only existed in mathematical theory, and it still cannot describe the actual engineering structure problem.Faced with complex engineering optimization problems, more and more scholars had proposed the theory of bionic intelligent algorithms based on the habit of biological evolution and survival in nature.e optimization of structure was mainly focused on reducing the total quality of the structure, improving the design rationality, and reducing the engineering cost [2][3][4][5], for example, improving the application of artificial fish swarm algorithm in truss structure optimization, the truss optimization of artificial bee colony algorithm, and the application of firefly algorithm in truss structure optimization [6][7][8].
After years of research and development, intelligent optimization algorithms had been widely used in various fields.Fiore et al. proposed an improved differential evolution algorithm to optimize the structure of flat steel trusses.
e weight of the steel truss was designed as the minimum objective function, and the square hollow section was used as the calculation variable.e design optimization involved size optimization, shape optimization, and topology optimization [9].Karaboga et al. proposed an improved artificial bee colony algorithm (ABC) based on chaos theory, which was applied to the truss structure example to verify the effectiveness of the improved algorithm for truss engineering structure optimization [10].Kayabekir explored a new intelligent algorithm, the flower pollination algorithm (FPA), and discussed its practical application in civil engineering, mechanical engineering, electronic communication, and chemistry, In the civil engineering field, the FPA algorithm was applied to the 25-bar truss structure to optimize the structure, and the feasibility of the algorithm was verified [11].Chen et al. proposed a hybrid particle swarm optimization (PSO) algorithm based on the improved Nelder-Mead algorithm (NMA).e improved NMA selected a part of the n-simplex subplane for optimization, using modal strain energy.e index (MSEBI) to locate the damage effectively improved the convergence speed and accuracy of the PSO algorithm and greatly improved the computational efficiency in the field of structural damage detection (SDD) [12].Andrea Caponio et al. proposed a metaheuristic algorithm based on population distribution theory for the application of practical engineering structure optimization.
e proposed algorithm can converge well when faced with nonlinear and indistinguishable optimization problems.e optimization process was stable and provides a new way of thinking [13].
In 2014, Chinese scholar Meng proposed the chicken swarm optimization (CSO) [14], which was a group-based stochastic optimization algorithm.e advantage was that the implementation was simple.e disadvantage was that it was easy to fall into the local optimal solution, converges slowly, and is low in precision.Scholars had done a lot of research on this optimization algorithm.In 2015, Fei et al. proposed an improved chicken swarm optimization (CSO), which analyzed the weighting factors in the reference particle swarm optimization algorithm.e adaptive weight was introduced in the process of updating the individual position of the chicken, which solved the problem that the optimal search solution was easy to skip due to the large search space in the early stage of the algorithm; the late search space was small, the convergence was slow, and the learning part of the individual with the cock was added. is allowed the chick to enjoy a comprehensive learning mechanism [15].Yu et al. improved the chicken swarm optimization (CSO) in 2016 using a variety of hybrid methods.
e reverse direction learning method was used to initialize the population individuals to improve the quality of the population, and the variation idea was introduced in the boundary processing to enhance the diversity of the population, improving the global optimization ability of the algorithm.Finally, the idea of simulated annealing was used to accept the inferior solution with a certain probability, which enhanced the ability of the algorithm to jump out of local optimum [16].ese improved algorithms effectively improved the optimization performance of the algorithm, and the results of its function optimization proved that the improved algorithm was effective.e existing research showed that the chicken swarm optimization (CSO) had been successfully applied to resource scheduling [17], engineering optimization design [14], cluster analysis, and optimization of classifier coefficients [18,19].In 2016, Hafez et al. proposed a feature selection system based on chicken swarm optimization (CSO), which was used to select features in a wrapper mode to search for feature space for the best combination of features, thus maximizing classification performance while minimizing the number of selected features [20].Shayokh et al. used the chicken swarm optimization (CSO) to solve the wireless sensor network (WNS) node location problem [21].In 2016, Roslina et al. proposed an improved chicken swarm optimization (CSO) for ANFIS performance, which can more accurately solve the ANFIS network training classification problem [22].In 2017, Awais et al. combined the chicken swarm optimization (CSO) with energy optimization for home users, enabling home users to reduce power costs, power consumption, and peak-to-average ratio [23,24].Ahmed et al. improved the chicken swarm optimization (CSO) search ability by applying logistic and tend chaotic mapping to help the chicken swarm optimization (CSO) better explore search space [25].
ese successful applications show that the chicken swarm optimization (CSO) has a good development and application prospects.However, in these application studies, the chicken swarm algorithm (CSO) is also imperfect.For example, the algorithm is not initialized, the chicken position update does not prevent the individual from being out of bounds, and the algorithm has no overall individual optimization.
Based on the above research, this paper improved the chicken swarm optimization and applied to truss structure optimization; the concept of combining chaos strategy and reverse learning strategy was introduced in the initialization to ensure the global search ability.And the inertia weighting factor and the learning factor were introduced into the chick position update process, so as to better combine the global and local search.Finally, the overall individual position of the algorithm was optimized by the differential evolution algorithm.e improved algorithm was tested by multipeak function and applied to the truss simulation experiment.

Chicken Swarm Optimization Algorithm
e traditional chicken swarm optimization mainly treats the optimization problem as the process of chickens' searching for food.e whole chicken swarm is divided into several chicken flocks, each of which has a cock, several hens, and several chicks.
ere is a competition between each chicken swarm, and the best cluster individuals are obtained through competitions.
e process of simplifying is as follows: (1) In each chicken swarm, there are many subchicken swarms, each of which included one cock, several hens, and several chicks.(2) e chicken swarm divides several subchicken swarms and determines the fitness value of individuals on which cocks, hens, and chicks depend.Several individuals with the best fitness values can act as cocks.Each cock is a leader of a chicken swarm.e worst fitness can be used as a chicken, and the 2 Advances in Civil Engineering rest can be hens.e hens randomly follow a cock, and the relationship between the hen and the chick is randomly formed.(3) e dominance relationship, hierarchy, and motherchild relationship in the chicken swarm are unchanged; chickens regroup and update roles every G generation. (4) e subchicken swarms look for food with the cock, the chicks look for food around the hens, and the individual has an advantage in finding food.e cocks, hens, and chicks in the chicken swarms perform different ways of optimizing.Individuals in the chicken swarm move according to their own rules until they find the best position.erefore, the individual position in the chicken swarm correspond to a solution to the optimization problem, and finding the best position is the optimal solution to the optimization problem.In the whole chicken swarm optimization, the number of individuals in all flocks is set to N, and the position of each chicken swarm individual is represented by x i,j (t), and its meaning indicate the position obtained in the t-th iteration of the i-th flock individual in the j-th dimension.erefore, there are different positions for the three different types of chickens in the chicken swarm optimization; that is, the position update of the individual flocks is changed with different positions depending on the type of chicken.e cock has the best fitness value in each subgroup, and it can find and locate food in a wide range of spaces.
e position corresponding to the cock is updated as follows: x i,j (t + 1) � x i,j (t) * 1 + Rand n 0, σ 2    , where Rand n(0, σ 2 ) produces a mean of 0 and Gaussian distribution random number with standard deviation σ, ε is an extremely small number to prevent the denominator from being zero, f i is the fitness value of individual i, and f k is the fitness value of the individual k.Individual k is randomly selected from the rooster population and k ≠ i. e location of the hen is updated as follows: where rand is a random number between 0 and 1, r1 is the spouse cock of the i-th hen, r2 is any individual of all cocks and hens in the flock, and r1 ≠ r2.
e location corresponding to the chick is updated as follows: where m represents the hen corresponding to the i-th chick and F is the follow-up coefficient, which means that the chick follows the hen to find food.

Initial Selection.
As can be seen from above, the population described in the traditional chicken swarm optimization is not initialized, which brought disadvantages to the traditional algorithm, and there is no guarantee that the optimal solution of the algorithm can evenly distribute your distribution in the search space, which limits the efficiency of the algorithm and reduces the performance of the algorithm.Chaos strategy and reverse learning strategy were combined in the initialization of the algorithm [26][27][28].Firstly, the chaotic strategy was used to make the state nonrepetitive and ergodic, and then the reverse learning strategy was used to reduce the blindness of the algorithm to expand the initial search range of the whole population; the global detection capability of the algorithm is ensured, so as not to fall into local optimum.e process was as follows: (1) Select the chicken swarm optimization population (2) Generate chaotic sequences by model iterations and describe the logistic mapping of equation ( 4) where the parameter μ � 4. (3) Find the inverse solution corresponding to NP 2 individual by equation ( 5) was obtained: where is the dynamic boundary of the search space and K ∈ [0, 1] is a random number subject to uniform distribution.(4) NP 2 ∪ NP op and choose the best fitness for x best , calculate x mean � ( , and finally get the inverse optimal solution as follows:

Advances in Civil Engineering
By introducing chaos strategy and reverse learning strategy, the chicken swarm optimization could find the optimal solution in a larger search space and can guide the individual to evolve to the optimal solution, so that the overall convergence speed is improved.

Chick Location Update.
In the traditional chicken swarm optimization, the position update of the chick is only related to the position of the hen, but not to the position of the cock with the best fitness in the algorithm [29,30].It can cause the algorithm to fall into local optimum to a certain extent, resulting in a lower overall efficiency.It is not difficult to see that the chicks in the chicken swarm optimization and the particles in the particle swarm optimization have similarities [31][32][33].In order to improve the position update of the chicks, we referred to the particle swarm optimization to obtain the position of the particles locally and globally, so that the chicks can obtain the local position in the hen's side and the optimal position in the whole cock-guided group.In this paper, the inertia weight value ω and the learning factor φ in the particle swarm optimization algorithm were used to improve the chick position update.Equation ( 3) was improved as follows: where m is the individual in the subgroup and the individual corresponding to the hen; r is the individual of the cock corresponding to the chick in the subgroup; φ 1 and φ 2 are the two learning factors, respectively, indicating the degree of learning of the chick to the hen and the cock; and ω(t) is the weight value.

Setting the Weight Value.
e setting of the weight value is related to whether the algorithm can better achieve local and global search, which is related to the diversity of the algorithm population in the later stage.
is paper introduced a nonlinear inertia weight value ω(t), as follows: where ω max is the maximum inertia weight, ω min is the minimum inertia weight, T max is the maximum number of iterations, and floor is the rounding function, in order to ensure that ω(t) is an integer.After introducing the nonlinear weight value, it can ensure the global search of the individual chicken in the early stage of the algorithm, thereby improving the accuracy of the algorithm and strengthening the local search later.

Setting the Learning Factor.
e learning factors φ 1 and φ 2 , appearing in the chick position update, indicate the degree of learning of chicks to hens and cocks to some extent, just like the individual learning factors and social learning factors in the particle swarm optimization [33].From the learning factor in the particle swarm optimization, it can be inferred that, in the initial stage of the search, the larger φ 1 makes the chicks search for a greater probability around the hen and more is to find the optimal solution globally; in the later stages of the search, the larger φ 2 makes the chicks search for a greater chance around the cocks, which is a local search near the optimal solution [34]. is paper introduced a nonlinear learning factor that allowed chicks to perform local and global searches.e formula was as follows: 3.3.Select the Best Individual.In the selection of the optimal position of the chicken swarm optimization, a differential algorithm was used, which consists of three processes: variation, intersection, and selection [35,36].e main formula was as follows: (1) Variation Process.Two bodies x r1,j (t) and x r2,j (t) of the same iteration number were randomly selected, and the mutation operation was performed according to the following equation: where v i,j (t + 1) is the mutated individual and F is a random factor of [0, 1], which controls the degree of expansion of the check score vector.(2) Cross Process.
e cross-probability factor P was introduced, and the cross operation was performed according to the following equation: x i,j (t), otherwise.
(3) Selection Process.For comparing the fitness function values of two individuals, select individuals with large function values to perform mutation and crossover operations and compare the generated new individuals with the previous generation.If the former was larger than the latter, enter the next iteration; otherwise, remain unchanged.

Improved Chicken Swarm Optimization Steps and Flow
Chart. e steps to improved chicken swarm optimization are described as follows: Step 1: set relevant parameters of the algorithm, population size, cock, hen, chick scale factor, update iteration number, etc.
Step 2: initialize the population by combining chaos strategy and reverse learning strategy Step 3: determine the fitness value of the individual, the ratio of cock, hen, and chicken, grouping, and various relationships; record the current global optimal fitness value, that is, the optimal individual position 4 Advances in Civil Engineering Step 4: enter the iterative update to determine whether the update condition is met; the order of the flock, the mother-child relationship, and the partnership are updated; the position of the cock, hen, and chick is updated; and the boundary is processed Step 5: select the optimal individual through three steps mutation, intersection, and selection Step 6: when the number of iterations is less than the maximum number of iterations, go to step (4) to continue execution; otherwise, perform step (7) Step 7: the individual who chooses the best position is the optimal solution e flow chart of the improved chicken swarm optimization is shown in Figure 1.

Multipeak Function Tests
e experimental environment in this paper used 3.5 GHz CPU, 4 GB memory, 64 bit operating system, Windows 10 Professional, and the programming environment is MAT-LAB R2017b.
To verify the effectiveness of the improved chicken swarm optimization and to analyze the improved convergence and performance of the improved chicken swarm optimization, five well-known test functions, which are adopted from the IEEE CEC competitions, were applied in the experiments [37][38][39][40] and compared with the traditional chicken swarm optimization (CSO), bat algorithm (BA), and particle swarm optimization (PSO) [14,41].
e setting parameters of the algorithm are shown in Table 1.e specific forms of the test functions are shown in Table 2.
Among them, the dimension of the test function was set to 30, and the number of iterations was 200.e calculation results are shown in Table 3, and Figures 2-6 are iterative diagrams of the test function.
It can be seen from Table 3 and the iterative graph of the test function that the improved chicken swarm optimization is more powerful than three other optimization algorithms, regardless of the convergence accuracy of the algorithm and the ability to find the optimal value or the robustness of the algorithm; and it is better than the traditional chicken swarm optimization in the optimization accuracy and convergence speed.us, after the multipeak function test, it shows that improved chicken swarm optimization has great advantages.

Engineering Applications
In industrial production, the cross-sectional area of the truss members is generally standardized; that is, the cross-sectional area is selected from a given set of discrete real numbers.Due to different conditions and different requirements, truss structure optimization can have multiple optimization objectives, such as minimum total mass of structure, minimum displacement of specified nodes, and maximum natural frequency.In this paper, the optimal cross-sectional area of the member was found under the condition of the stress constraint of the member, so that the truss mass was minimized and the node displacement was minimized.e n-bar truss structure system was studied.
e basic parameters of the system (including elastic modulus, material density, maximum allowable stress, and maximum allowable displacement) were known.Under the given load conditions, the optimal cross-sectional area of the N-bar truss was found to minimize the mass.
Four typical truss optimization examples were chosen to demonstrate the efficiency and reliability of the improved chicken swarm optimization for solving the shape and size of trusses with multiple frequency constraints.

Optimization Design of Cross Section of the 25 Bar Space
Truss Structure.Figure 7 shows the 25 bar space truss structure model [42].
e known material density is the search space dimension is 10.We compared improved chicken swarm optimization with improved particle swarm optimization (IPSO), improved fruit fly optimization algorithm (IFFOA), and improved genetic algorithm (IGA) [43][44][45].e node loads are shown in Table 4, and the bars are grouped in Table 5.
Results after optimization are shown in Table 6.
It can be concluded from Table 6 that, under the same constraints, the improved chicken swarm optimization algorithm was used to optimize the 25 bar truss structure.e optimized total mass of the structure is 211.48 kg, which is lighter than the improved particle swarm optimization algorithm, and the quality is reduced to (219.38 8.As can be seen from Figure 8, the improved chicken swarm optimization can Function form Bounds Optimum   Advances in Civil Engineering search for the global optimal solution.It has higher convergence precision and convergence speed, and the effect is obvious.

Optimization Design of Cross Section of the 52 Bar Plane
Truss Structure.As shown in Figure 9, the space 52 truss structure model is established, and the bars are divided into 12 groups according to the force of the members [44].e specific grouping situation is shown in Table 7.We compared improved chicken swarm optimization with improved particle swarm optimization (IPSO), improved fruit fly optimization algorithm (IFFOA), and improved genetic     [43][44][45].e optimization results of each algorithm are shown in Table 8. e structural members are all made of the same material; material density is ρ � 7860.0 kg/m 3 , the elastic modulus E � 2.07 × 10 5 MPa, the lateral load P x � 100 kN, and the vertical load P y � 200 kN.e allowable stress of each member in the structure is ± 180 MPa.It can be concluded from Table 8 that, under the same constraints, the improved chicken swarm optimization was used to optimize the 52-bar truss structure, and the total mass of the optimized structure is 1895.45kg.Compared with the improved particle swarm algorithm, the quality is reduced to (1938.36 − 1895.45)/1895.45 � 2.26%; compared with the improved genetic algorithm, the quality is reduced to (1912.61 − 1895.45)/1895.45 � 0.91%; compared with the improved fruit fly optimization algorithm, the quality is reduced to (1900.37 − 1895.45)/1895.45� 0.26%; and the optimization results have been improved very well.
e four algorithm optimization iteration curves are shown in Figure 10.As can be seen from Figure 10, the improved chicken swarm optimization can search for the global optimal solution.Compared with the other three optimization algorithms, it has a higher convergence precision and convergence speed, and the effect is obvious.

Optimization Design of Cross Section of the 72 Bar Space Truss Structure.
e 72 bar space truss structure is shown in

Advances in Civil Engineering
Figure 11 [46].e structure considers two load conditions.e specific working conditions are shown in Table 9.According to the force of the rod, the 72 rods in the structure are divided into 16 groups.e specific grouping of the rods is shown in Table 10.e rods are made of the same material, the material density is ρ � 2 678 kg/m 3 , the elastic modulus is E � 68950 MPa, the maximum displacement variation range of each joint of the rods in each direction is ± 6.35 mm, the allowable stress range is [− 172.375, 172.375], we compared the results with the improved particle swarm optimization algorithm (IPSO), the improved fruit fly optimization algorithm (IFFOA), and the improved genetic algorithm (IGA) [43][44][45], and the optimized results are shown in Table 11.
It can be concluded from Table 11 that, under the same constraints, the improved chicken swarm optimization was used to optimize the design of the 72 bar truss structure, and the total mass of the optimized structure is 170.24 kg.12.It can be seen from Figure 12 that the improved chicken swarm optimization can search for the global optimal solution.Compared with the improved genetic algorithm (IGA), the improved particle swarm optimization algorithm (IPSO), and the improved fruit fly optimization algorithm (IFFOA), it has higher convergence precision and convergence speed, and the effect is obvious.

Optimization Design of Cross Section of the 200 Bar Plane Truss Structure.
e structure of the 200 bar truss is shown in Figure 13 [47].e grouping of the structural members is shown in Table 12.
e specific optimization results are shown in Table 13.
e modulus of elasticity is  e design variable has 29 dimensions and is a relatively complex structural optimization problem.We compared the improved chicken swarm optimization with the results of the improved gravitational search algorithm (IGSA), improved genetic algorithm (IGA), and improved fruit fly optimization algorithm (IFFOA) [44,47,48].
It can be concluded from Table 13 that, under the same constraints, the improved chicken swarm optimization was used to optimize the 200 bar truss structure, and the optimized total mass of the structure is 2147.92  It can be seen from Figure 14 that the improved chicken swarm optimization can find the global optimal solution after iteration for about 170 times.
e gravitational search algorithm is iterated about 210 times, and the genetic algorithm is iterated about 220 times to find the global optimal solution, and the improved fruit fly    Advances in Civil Engineering optimization algorithm is iterated about 180 times to find the global optimal solution.For the quality problem of the optimal global solution, the improved chicken swarm optimization is better than other three optimization algorithms.It is proved that, in the process of optimizing in the face of complex optimization problems, the improved chicken swarm optimization is stable and not easy to fall into the local optimal solution.It can be seen that the improved chicken swarm optimization is effective.

Conclusion
Structure optimization is more and more important in civil engineering.In order to find more effective optimization method, the chicken swarm optimization was introduced, For the NP hard problems, the chicken swarm optimization performs better than common algorithms.It has the shortcoming of the premature.So, we improved the algorithm and applied to truss structure optimization; the concept of combining chaos strategy and reverse learning strategy was introduced in the initialization to ensure the global search ability.And the inertia weighting factor and the learning factor were introduced into the chick position update process, so as to better combine the global and local search.Finally, the overall individual position of the algorithm was optimized by the differential evolution algorithm.e multipeak function was used to prove its validity.Finally, the improved chicken swarm optimization was applied to the truss structure optimization design.e mathematical model of the truss section optimization was given.e example verification shows that the improved chicken swarm optimization has a faster convergence speed which makes the results more optimal.

Conflicts of Interest
e authors declare that they have no conflicts of interest.

Figure 7 :
Figure 7: Schematic diagram of the 25 bar space truss structure.

Figure 9 :
Figure 9: Schematic diagram of the 52 bar plane truss structure.

Figure 10 :
Figure 10: Four algorithms for finding the iterative curve of 52 bars.

Figure 11 :
Figure 11: Schematic diagram of the 72 bar space truss structure.

Figure 12 :
Figure 12: Four algorithms for finding the iterative curve of 72 bars.

Figure 13 :
Figure 13: Schematic diagram of the 200 bar plane truss structure.

Figure 14 :
Figure 14: Four algorithms for finding the iterative curve of 200 bars.

Table 1 :
e related parameter value.

Table 6 :
Comparison of optimization results for 25 bar space truss.

Table 8 :
Comparison of optimization results of the 52 bar plane truss structure.

Table 11 :
Comparison of optimization results for 72 bar space truss.

Table 13 :
Comparison of optimization results of the 200 bar plane truss structure.