An Improved Gray Wolf Optimization Algorithm to Solve Engineering Problems

: With the rapid development of the economy, the disparity between supply and demand of resources is becoming increasingly prominent in engineering design. In this paper, an improved gray wolf optimization algorithm is proposed (IGWO) to optimize engineering design problems. First, a tent map is used to generate the initial location of the gray wolf population, which evenly distributes the gray wolf population and lays the foundation for a diversiﬁed global search process. Second, Gaussian mutation perturbation is used to perform various operations on the current optimal solution to avoid the algorithm falling into local optima. Finally, a cosine control factor is introduced to balance the global and local exploration capabilities of the algorithm and to improve the convergence speed. The IGWO algorithm is applied to four engineering optimization problems with different typical complexity, including a pressure vessel design, a tension spring design, a welding beam design and a three-truss design. The experimental results show that the IGWO algorithm is superior to other comparison algorithms in terms of optimal performance, solution stability, applicability and effectiveness; and can better solve the problem of resource waste in engineering design. The IGWO also optimizes 23 different types of function problems and uses Wilcoxon rank-sum test and Friedman test to verify the 23 test problems. The results show that the IGWO algorithm has higher convergence speed, convergence precision and robustness compared with other algorithms.


Introduction
Many countries see the importance of resource optimization and sustainable development and consequently direct research to save resources and maintain sustainable development. As an important part of the entire life cycle of engineering construction projects, engineering design is essential to transform science and technology into actual production and is also at the key stage of determining and controlling engineering costs. Engineering design directly affects the construction of the project.
In the process of engineering construction, an unreasonable construction process will consume large amounts of raw materials and produce large amounts of construction waste, lead to natural resources shortage and environmental pollution [1]. Reasonable engineering structure design can save materials and costs, thus saves resources and alleviates the disparity between resource supply and economic and social development. It is also important for achieving sustainable economic and social development and protecting national resources, security and the environment in the long run. Therefore, the engineering optimization design problem has attracted the increasing attention of scholars.
As a new optimization algorithm, an intelligent optimization algorithm can better solve engineering design optimization problems without global information and has gradually become a new method to solve engineering optimization problems [2]. It is based on learning and a simple method to solve the problem of poor population diversity and slow convergence speed of the GWO, which increased the population diversity of gray wolf and improved the exploration ability of gray wolf [26].
In the basic gray wolf algorithm, the initialization and evolution process of the gray wolf population is random, which produces certain blindness for the position and velocity update of the gray wolf, such as the tendency to fall into local optima and premature convergence. To solve the above problems, an improved optimization algorithm of gray wolf (IGWO) is proposed. The tent chaos is used to increase the population diversity, the Gaussian perturbation is used to expand the search range, and the cosine control factor is used to balance the global exploration and local development ability so as to avoid the basic gray wolf algorithm falling into the local optima and improve the solution accuracy. IGWO is applied to four engineering problems: pressure vessel design, spring design, welding beam design and three truss design. The results show that the cost of engineering problems solved by the IGWO algorithm is effectively reduced compared with other algorithms. The IGWO is also tested on seven unimodal, six multimodal and ten various fixed dimension multimodal functions, and the results are verified by a comparative study with SCA, MFO, PSO, BA, FPA and SSA. The validation of the proposed modification is done on a set of 23 standard benchmark test problems using the Wilcoxon rank-sum and Friedman test. The results show that the IGWO algorithm has higher convergence speed, convergence precision and robustness compared with other algorithms.

Gray Wolf Optimization
GWO is inspired by the hierarchy and hunting behavior of gray wolf populations. The algorithm achieves optimization by mathematically simulating the tracking, surrounding, hunting and attacking the process of gray wolf populations. The gray wolf hunting process involves three steps: social hierarchy stratification, encircling the prey and attacking the prey.

Social Hierarchy
Gray wolves are social canids at the top of the food chain and follow a strict hierarchy of social dominance. The best solution is marked as the α; the second-best solutions are marked as the β, the third-best solutions are marked as the δ, the rest of solutions are marked as ω. Its dominant social hierarchy, as shown in Figure 1:

Encircling the Prey
Gray wolves encircle prey during the hunt; in order to mathematically model encircling behavior, the following equations are used: where X indicates the position vector of the gray wolf, X p indicates the position vectors of prey, t indicates the current iteration, A and C are coefficient vectors, r 1 and r 2 are random vectors in [0, 1]ˆn, a is distance control parameter, and its value decreases linearly from 2 to 0 over the course of iterations, and Max_iter is the maximum iterations.

Attacking the Prey
Gray wolves have the ability to recognize the location of potential prey, and the search process is mainly carried out by the guidance of α, β, δ wolves. In each iteration, the best three wolves (α, β, δ) in the current population are retained, and then the positions of other search agents are updated according to their position information. The following formulas are proposed in this regard: In the above equation, X α , X β and X δ are the position vectors of α, β and δ wolves, respectively, the calculations of A 1 , A 2 and A 3 are similar to A, and the calculations of C 1 , C 2 and C 3 are similar to C.
the distance between the current candidate wolves and the best three wolves. As can be seen from Figure 2, the candidate solution finally falls within the random circle defined by α, β and δ. Then, under the guidance of the current best three wolves, the other candidates randomly update their positions near the prey. They start to search the prey position information in a scattered way and then concentrate on attacking the prey. The flowchart of the GWO is given in Figure 3.

Tent Chaos Initialization
When solving practical problems, GWO usually uses the randomly generated data as the initial population information, which will make it difficult to retain the diversity of the population and lead to poor results. However, chaotic motion has the characteristics of randomness, ergodicity and regularity [27], and using these characteristics to optimize the search can maintain the diversity of the population and improve the global searchability. In general, the random motion state obtained by the deterministic equation is called chaos, and the variable representing the chaotic state is called chaotic variable. Chaos is a common phenomenon in nonlinear systems [28].
Many scholars have introduced chaotic maps and chaotic search into the GWO. The existing chaotic maps include logistic maps, tent maps, etc. However, different chaotic maps have a great impact on the chaos optimization process. At present, most of the existing chaotic maps used in the literature contain logistic maps, and the inhomogeneity of logistic traversals will affect the optimization speed, thereby reducing the efficiency of the algorithm.
Reference [29] pointed out that tent map has better ergodicity, regularity and faster speed than a logistic map. It is also proved that the tent map has a prerequisite for optimizing the chaotic sequence of algorithms by strict mathematical reasoning. Tent map is a kind of piecewise linear mapping mathematically, which is named because its function is like tent [28]. Moreover, it is a 2D chaotic map, which is widely used in chaotic encryption systems (such as image encryption), and the chaotic spread spectrum code generation, chaos encryption system construction and implementation of the chaotic optimization algorithm are also often used. Figure 4 shows the distribution of logistic chaotic sequence and tent chaotic sequence. It can be found from Figure 4 that the probability of value in the interval of [0, 0.05] and [0.95, 1] is greater than that of other sections, and the probability of tent in each feasible region is relatively uniform. The uniformity of tent chaotic sequence generated by tent chaotic map is obviously better than that of logistic chaotic map. In this paper, the tent chaotic map is used to optimize the search by using randomness, ergodicity and regularity, which can effectively maintain the diversity of the population, suppress the algorithm to fall into the local optima, and improve the global searchability.
In recent years, tent chaotic map has been applied to various algorithms, and good results have been achieved. Li et al. proposed a new image encryption scheme based on the tent chaotic map. They used known methods to analyze the performance and security of the proposed image encryption scheme and proved the effectiveness and security of the scheme through fault security analysis [30]. Indu et al. proposed an improved tent map particle swarm optimization algorithm (ITM-CPSO), which solved the nonlinear congestion management cost problem, realized the nonlinear congestion management cost problem of the algorithm, and further reduced the deviation of the timing pulse generator output predetermined level to reduce the overall unloading and cost [31]. Gokhale SS et al. proposed a tent chaos firefly algorithm (CFA) to optimize the time coordination of the relay, and tested it in a number of systems, obtained better results [32]. Petrovic et al. added chaotic map to the initialization of the fruit fly optimization algorithm and studied 10 different chaotic maps. The statistical results showed that FOA was improved in terms of convergence speed and overall performance [33].
The tent mapping model, which generates a chaotic sequence for population initialization, and its mathematical expression is: Theoretical research shows that tent chaotic map is represented by Bernoulli shift transformation, as follows [29]: y i+1 = (2y i )mod1 (10) where y j i ∈ [0, 1] is a chaotic variable, i = 1, 2 . . . n represents the ordinal number of chaotic variables, j = 1, 2 . . . n represents the population size. In this paper, α = 0.7. Figures 5 and 6, respectively, show the initial population of the GWO and IGWO when solving the sphere function. Among them, n = 30, d = 3, and the search space range is [−100, 100]. The red circle represents the global optimal point, and the blue circle represents the gray wolf population. In the initialization phase of the algorithm, gray wolves are randomly dispersed in the search space, and the more uniform the population is, the stronger the global exploration ability will be. It can be seen from Figures 5 and 6 that the tent map makes the initial population distribution more uniform, enriches the diversity of the population, reduces the probability of the algorithm falling into local optima and improves the convergence accuracy.

Gaussian Perturbation
According to Equation (1), the GWO's C also plays a decisive role, Equation (3) shows that C is a random vector in [0, 2], the C provides random weights for prey, which can increase (|C| > 1) or reduce (|C| < 1) distance between the gray wolves and the prey. The size of C helps GWO to display random search behavior during the optimization process so as to avoid the algorithm falling into local optima [16]. The leading wolf position in a population plays an important role in guiding the group to move towards the best solution. If the leading wolf's position falls into local optima, it is easy to stop searching and lack diversity within the group. During the movement of wolves, their leading wolves were randomly generated and unpredictable. In order to avoid the premature convergence and balance the global and local exploration capabilities, the original random generation coefficient C was changed to Gaussian perturbation, which will cause some perturbation to the leader and maintain the diversity of the population. Figure 7 is the random value generated by the original C and Gaussian distribution. It can be clearly seen from the figure that the random number generated by Gaussian distribution has a wider range, which can show the random walk behavior of gray wolves in the GWO algorithm more accurately.

Cosine Control Factor
In the GWO, the coefficient vector A balances the global and local search capabilities. When |A| > 1, the gray wolves will expand the search scope, namely global searching. When |A| < 1, the gray wolves will shrink the search scope to attack their prey, namely local search. In the early-stage of optimization, gray wolf individuals should be widely distributed in the entire search space. In the late-stage of optimization, gray wolf individuals should converge to the optimal global value by using the collected information. According to Equation (2), the attenuation factor a affects the coefficient vector A, which further affects the balance between GWO's exploration and development capacity. When a > 1 (the exploration stage), the gray wolves will engage in search and hunting activities, and when a < 1 (the development stage), the gray wolves will only engage in hunting activities.
In the GWO, the convergence factor A decreases linearly with the number of iterations from 2 to 0, but the individual gray wolf does not change linearly in the process of searching prey, so the linear decline of the convergence factor A cannot fully reflect the actual optimization search process. It can be seen from Figures 8 and 9, the improved a and A can better reflect the actual optimization search process.  Therefore, inspired by reference [34], the control factor a of linear change is replaced by the control factor a of cosine change, and its expression is as follows: The inertia weight factor is a very important parameter [35]. When the inertia weight is large, the algorithm has a strong global searching ability, which can expand the search range. When the inertia weight is small, the local search ability of the algorithm is strong, and it can search around the optimal solution and accelerate the convergence speed.
Combined with the cosine change of the control parameter a above, this paper introduces a weight cosine control factor B(t) that changes synchronously with a into the position update of the GWO to further enhance the global exploration capability. With the increase of iterations, the algorithm adjustment step length becomes smaller, the global search ability gradually weakens, and the local search ability gradually strengthens. When B(t) is very small, the position of the individual population is finetuned instead of approaching the origin.

Optimization Function and Experimental Environment
In this section, to analyze the performance of the IGWO algorithm, 7 unimodal test functions, 6 multimodal optimization functions and 10 fixed dimensional multimodal optimization functions in reference [15] are selected. Tables 1-3 show the names, specific expressions, search space and optimal values of these functions. Among them, F1-F7 are the unimodal optimization functions, F8-F13 are the multimodal optimization functions, F14-F23 are the fixed dimensional multimodal functions. The unimodal test function is mainly used to estimate the solution accuracy and convergence speed of the IGWO, and the multimodal test function is mainly used to estimate the global surveying ability of the IGWO. Table 1. Unimodal optimization function.

Number
Name Step u(x i , 10, 100, 4) Goldstein-Price function In order to improve the accuracy of the experiment, the 8 selected algorithms all adopt the same experimental parameters, namely, the swarm size n = 30, dimension d = 30, the maximum iterations Max_iter = 500, each algorithm is run 30 times independently and the results recorded. In, which C1 = C2 = 2, W = 0.7294 in PSO, A = 0.5, r = 0.5 in BA and P = 0.2 in FPA. In the simulation experiment, the hardware configuration of the simulation environment is Windows 10 Professional operating system; the CPU is Intel ® Celeron ® CPU N3060 @1.60 GHz processor, 4 GB memory, and the software configuration of the simulation environment is MATLABR2016a.

Analysis of Different Strategies
Different improvement strategies have different effects on the optimization results, and their contributions to the whole improved algorithm are also different. In order to analyze the effectiveness of the improved strategy of the IGWO algorithm, three strategies of Tent map, Gaussian distribution and cosine control factor are combined with the basic GWO, respectively, to study the influence of each strategy on the effectiveness of the algorithm. GWO1 means the combination of the GWO algorithm and tent map, GWO2 means the combination of the GWO algorithm and Gaussian distribution, and GWO3 means the combination of the GWO algorithm and cosine control factor. The test results are shown in Table 4 below.
From Table 4, it can be seen that different strategies can improve the performance of the GWO algorithm, and GWO2 plays a greater role in improving the performance of the GWO algorithm. Overall, the combination of different strategies makes the performance of the IGWO algorithm greatly improved.

Compared with Other Algorithms
To further evaluate the performance of the IGWO, the IGWO algorithm was tested on     The average values and standard deviation in Tables 5-7 can reflect the convergence accuracy and optimization capability of the IGWO. For the 7 unimodal functions, the IGWO performs better in accuracy and standard deviation when solving F1, F2, F3, F4 and F6 functions, although the optimization accuracy does not reach the theoretical optimal value of 0. For the 7 multimodal functions, the optimization accuracy reaches the theoretical optimal value 0, and the standard deviation is also 0 when solving the F9 and F11 functions, which fully demonstrates the algorithm's solution accuracy and strong robustness. Meanwhile, compared with other optimization algorithms, the IGWO also achieves a better value when solving the F10 function. For the 10 fixed dimensional multimodal functions, F15 gets a better value than other algorithms, and the results of the remaining functions are less different from those of the contrast algorithm. It can be seen that the IGWO has advantages in solving unimodal, multimodal and fixed dimensional multimodal functions.

Convergence Analysis
The convergence rate of the algorithm is an important index to measure the performance of the algorithm, and the algorithm convergence curve can directly compare the convergence performance of the algorithm. Figure 10a-   According to (a-w) in Figure 10, when solving the unimodal test function, the convergence curve of the IGWOS algorithm decreases to the lower right corner as the iterations increase, and the convergence accuracy is higher than other algorithms. Among the multimodal test functions, the IGWO tests other functions except F8 have better performance. In particular, F9 and F11 can quickly find the optimal solution with fast convergence speed and high precision. For the fixed dimensional multimodal functions, most of the function curve drops in a stepped way. This is because the algorithm keeps exploring in the iterative process, jumps out of the optimal local solution and looks for the optimal global solution, and its convergence accuracy is relatively good.
In conclusion, the IGWO algorithm combining tent maps, Gaussian distribution and control factor can fully expand the search range in the early iteration, avoid the algorithm falling into local optima, and better balance the global and local search capabilities.

Numerical Result Test
In this section, Wilcoxon rank-sum test [36] will be carried out on the algorithm results of 30 independent runs, and the Friedman test will be carried out on the average values in Tables 5-7. The following results were analyzed in IBM SPSS Statistics 21, and the significance level was set at 0.05. Table 8 shows the Wilcoxon rank-sum test results based on the IGWO algorithm. The bold data indicates that there is no significant difference between the comparison algorithm and the calculation results of the IGWO algorithm. Table 9 shows the rank generated by the Friedman test according to the mean values in Tables 5-7.  IGWO and SCA. IGWO compared with MFO p = 0.001 < 0.05 indicates that there is a statistically significant difference between IGWO and MFO. IGWO compared with PSO p = 0.002 < 0.05 indicated that there was a statistically significant difference between IGWO and PSO. IGWO compared with BA p = 0 < 0.05 indicates that there is a statistically significant difference between IGWO and BA. IGWO compared with FPA was p = 0.01 < 0.05 indicated that there was a statistically significant difference between IGWO and FPA. IGWO compared with SSA p = 0.005 < 0.05 indicates that there is a statistically significant difference between IGWO and SSA.

Application to Solve Engineering Optimization Problem
In this section, four structural design problems with constraints in mechanical engineering are optimized to reduce the cost of engineering design and save resources. For these constraints, the penalty function method is used to construct the fitness function. For the objective problem f (x), the constraint g i (x) ≤ 0, h = 0 is treated, as shown in Equation (17), f (x) is a newly constructed objective function. Both β 1 and β 2 represent a positive integer large enough (such as 10 × 10 12 ). m and l are the numbers of inequality constraints and equality constraints. Parameters α 1 and α 2 take 2 and 1, respectively. When dealing with the objective problem, this method excludes all the solutions that do not meet the constraints from the candidate solutions. If the search solution satisfies the constraints, then the objective function is f (x) = f (x). When solving these engineering optimization problems, the population size n = 30, the maximum iteration number Max_iter = 500, and the results in the table are the best values obtained by running 30 times independently. The bold values indicate the best one among all methods. Figure 11 shows that the objective of the pressure vessel design optimization problem is to minimize the sum of material cost, synthesis cost and welding cost while satisfying the decision variables of pressure tube thickness Ts(x 1 ), head cover thickness Th(x 2 ), inner radius R(x 3 ) and cylindrical length. Equation (18) gives its mathematical model. Figure 11. Pressure vessel design problem.

Pressure Vessel Design Problem
In order to objectively demonstrate the performance of the IGWO, the MVO in [37], GSA algorithm in [38], PSO algorithm in [39], MSCA algorithm in [40], GA (Coello) algorithm in [41], GA (Coello and Montes) algorithm in [42], GA (Deb et al.) algorithm in [43], ES algorithm in [44], DE (Huang et al.) algorithm in [45], ACO (Kaveh et al.) algorithm in [46], IHS algorithm in [47] and WOA algorithm in [48] are selected. Table 10 suggests that the IGWO finds a design with the minimum cost for this problem. According to the results of Table 10, the IGWO, obtaining the optimum cost of 5888.6000, found the best feasible optimal design among all these algorithms. Therefore, it can be concluded that the IGWO is excellent in solving the pressure vessel design problem.

Spring Design Problem
This subsection is an optimized test of the spring design problem. When the spring is applied in engineering, it is necessary to minimize the gravity of the spring and reduce the waste of materials under the setting conditions of factors, such as tortuosity, shear pressure, impact frequency and outer diameter. A schematic diagram of the spring design structure is shown in Figure 12; the effect variable is the diameter of the coil d (x 1 ), the wire diameter D(x 2 ), the number of effective windings P(x 3 ). For this problem, the mathematical model of the objective function and constraint function is shown in Equation (19). In order to objectively demonstrate the performance of the IGWO, the mathematical optimization method (Belegundu) algorithm in [49], GSA algorithm in [38], GSA algorithm in [46], SCA algorithm in [6], and MVO algorithm in [37] are selected. The comparison results are shown in Table 11. As can be seen from Table 11, the IGWO outperforms other comparison algorithms except for the GWO. However, the difference between IGWO and GWO is small.

Welded Beam Design Problem
In practical engineering application, the stressed part of the engineering can be described as a welded beam design problem. That is, one end of the beam wall does not produce axial direction, does not rotate and has no vertical displacement, and the other end is a free end. As shown in Figure 13, this problem is very widespread in engineering design. The mathematical model is shown in Equation (20), where the function represents the shear stress of the joint, the bending stress of the member, the buckling stress of the member and the deflection function of the end of the member. The optimization goal of the welded beam design problem is to minimize the total manufacturing cost when the constraints are met, that is, to reduce the waste of resources. IGWO was used to solve the welding beam problem. The comparison algorithm includes NGS-WOA [50], WOA algorithm [48], RO algorithm [51], MVO algorithm [37], CPSO algorithm [52], CPSO algorithm [53], HS algorithm [54], GSA algorithm [38], GA algorithm [55], GA algorithm [56], Coello algorithm [40], and Coello and Monters algorithm [41]. The comparison results are shown in Table 12. According to Table 12 statistics, the data results of each algorithm in solving the welding beam design problem; compared with the basic GWO algorithm, the solution result of the IGWO algorithm is better than that of the GWO algorithm. Judging from the results of other algorithms, the IGWO algorithm is superior to other algorithms except for MVO.

Three Truss Design Problem
The three-truss design problem is a nonlinear optimization problem with three nonlinear inequality constraints and two continuous decision variables to minimize the cost. The goal is to optimize the cross-sectional areas of rod 1 and 3, x 1 , and the cross-sectional areas of rod 2, x 2 . The mathematical model is shown in Equation (21). The schematic diagram is shown in Figure 14.
Min In order to objectively demonstrate the performance of the IGWO, the PSO-DE in [39], MBA algorithm in [57], DEDS algorithm in [58] CS algorithm in [59], Ray and Sain algorithm in [60], and Tsa algorithm in [61] are selected. Table 13 shows the comparison of solution results between the IGWO algorithm and other algorithms. It can be seen from Table 13 that the solution result of the IGWO algorithm is slightly inferior to the Tsa algorithm. However, compared with other algorithms, the IGWO algorithm still has some advantages. Therefore, the IGWO algorithm has certain practicability in the engineering design of three truss structures.

Conclusions and Future Work
To save materials and cost in the process of engineering construction, an improved gray wolf optimization algorithm termed IGWO is proposed. It combines tent chaos, Gaussian perturbation and cosine control factor to achieve a better promote the conservation and rational use of resources, alleviate the contradiction between resource supply and socioeconomic development. Twenty-three functions with different characteristics of unimodal, multimodal and fixed dimensional multimodal with different characteristics are tested, and the results are compared with seven algorithms. The experimental results show that the IGWO optimization performance and stability of the algorithm are superior to the other seven different types of comparable algorithms. Then four challenging engineering constraint optimization problems with different objective functions, constraint conditions and properties, including pressure vessel design, spring design, welded beam design and truss design, are solved. Meanwhile, the Wilcoxon rank-sum test and Friedman were used to evaluate the results of the IGWO algorithm. The experimental results show that the IGWO is more competitive than other comparison algorithms and can be an effective tool to solve engineering design problems and save resources.
For the study of this paper, the results show that the IGWO was successfully implemented to solve the practical constraints of engineering design problems. Additionally, the IGWO is able to provide very competitive results in terms of minimizing total cost. It was observed that the IGWO has the ability to converge to a better quality near-optimal solution and possesses better convergence characteristics than other prevailing techniques reported in the literature. It is also clear from the results obtained by different functions that the IGWO shows a good balance between exploration and exploitation that results in high local optima avoidance. It can be concluded that the IGWO is an effective and efficient algorithm.
However, the IGWO algorithm still has some shortcomings in some aspects, for example, it cannot be effectively applied to all problems, and the convergence accuracy can be further improved. Therefore, research on the IGWO still has much room for improvement. Our future work is divided into two parts: (1) to apply the proposed method to more practical cases to exert its full effective merits, especially in the areas of engineering optimization control; and (2) to reconstruct the proposed method as a fusion procedure with other metaheuristics to further investigate its performance thoroughly. Institutional Review Board Statement: Not applicable.

Informed Consent Statement: Not applicable.
Data Availability Statement: The study did not report any data.