Harris Hawks Optimization for Optimum Design of Truss Structures with Discrete Variables

This article investigates the use of Harris Hawks Optimization (HHO) to solve planar and spatial trusses with design variables that are discrete. The original HHO has been used to solve continuous design variables problems. However, HHO is formulated to solve optimization problems with discrete variables in this research. HHO is a population-based metaheuristic algorithm that simulates the chasing style and the collaborative behavior of predatory birds Harris hawks. The mathematical model of HHO uses a straightforward formulation and does not require tuning of algorithmic parameters and it is a robust algorithm in exploitation. The performance of HHO is evaluated using five benchmark structural problems and the final designs are compared with ten state-of-the-art algorithms. The statistical outcomes (average and standard deviation of final designs) show that HHO is quite consistent and robust in solving truss structure optimization problems. This is an important characteristic that leads to better confidence in the final solution from a single run of the algorithm for an optimization problem.


Introduction
For several decades, the development of optimization methods for structures has attracted considerable attention to achieving economic designs. In many real-life design cases, structures are geometrically complex and consist of a large number of members. In size optimization, these members are variables to be designed for minimal weight under certain limitations imposed by a design code. Thus, the optimization process requires considerable computational effort because the number of structural members to be designed is high. Thus, an efficient and robust optimization algorithm is vital for the optimization of structures.
Deterministic optimization methods (e.g., linear programming (LP), nonlinear programming (NLP), and dynamic programming (DP)) were developed more than 50 years ago. They need gradient information to improve the current solution estimate and they search for designs in the proximity of the current point (Arora, 2017). These methods were mainly developed to solve problems with design variables that are continuous. Most design applications in structural engineering; however, involve selecting sections available in commercial catalogs. In this type of problem, the design variables are discrete. Namely, they are integers where the value that is signed to a design variable refers to a specific selection in the design set. Metaheuristic algorithms (such as Genetic Algorithm (Goldberg and Samtani, 1986), Ant Colony Optimization (Xie and Steven, 1997), and Particle Swarm Optimization (Kennedy and Eberhart, 1995) are another optimization approach. They utilize only simulation results to search for solutions. These algorithms do not require starting points and they search not only in the proximity of the current design but also globally. Metaheuristic algorithms can be used to solve continuous and discrete design variables problems whether functions (cost function and constraints) are differentiable or not. The fundamental disadvantage of metaheuristic algorithms is that they relatively require a large number of simulations to improve designs. The computation time relies on the size of the structure, type of analysis (e.g., static, dynamic, linear, or nonlinear), the number of members to be designed, and the number of sections in the design domain. These algorithms may get trapped in local minima. The best approach is to run the algorithm more than once and choose the best solution among different runs. However, this requires more computational time (Al-Bazoon, 2019). In recent years, many studies have been dedicated to developing robust and efficient metaheuristic techniques for the optimization of structures.
Many metaheuristic algorithms were used to tackle discrete variables truss structure problems. Rajeev and Krishnamoorthy (1992) and Wu and Chow (1995) used the Genetic Algorithm (GA) to solve discrete variables optimization structural problems. Harmony Search (HS) was used by Lee et al. (2005) to solve structural optimization problems where members must be selected from set of sections. Li et al. (2006) solved some benchmark structural optimization problems using Particle Swarm Optimization (PSO). Other algorithms such as Simulated Annealing (SA) by Xiang et al. (2009), Big Bang-Big Crunch (BB-BC) by Camp (2007), Improved Ray Optimization (IRO) by Kaveh and Mahdavi (2015), Hybrid Harmony Search-Particle Swarm Optimizer-Ant Colony (DHPSACO) by Kaveh and Talatahari (2009), Colliding Bodies Optimization (CBO) and its improved version called Enhanced Colliding Bodies Optimization (ECBO) by Kaveh and Mahdavi (2015) were used to find the minimal structural weight of truss problems. A hybrid algorithm combined biogeography-based optimization and differential evolution method was used to find the minimal structural weight of trusses with discrete and continuous variables (Jalili and Hosseinzadeh, 2018). In 2020, another hybrid algorithm is developed and used to design truss structures (Omidinasab and Goodarzimehr, 2020). The algorithm is based on Particle Swarm Optimization and Genetic Algorithm. Although many of these algorithms found the optimal design for the problems discussed in this study, they require many iterations to find the best design, and the mean and standard deviation of all runs show that they are not very robust. In addition, they required algorithmic parameter(s) to be tuned of which is problem-dependent.
Harris Haws Optimization has been utilized to tackle optimization problems in many fields such as overcurrent relay coordination problems (Yu et al., 2020), image processing (Rodríguez-Esparza et al., 2020;Wunnava et al., 2020), chemical engineering (Houssein et al., 2020), and mechanical engineering (Ewees and Abd Elaziz, 2020). HHO outperforms many well-known metaheuristic algorithms as to convergence rate and statistical analysis. That is, the major motivation for this work is to investigate the use of HHO to solve truss structure optimization problems with design variables selected from a set of sections. The original HHO was designed to tackle optimization problems with continuous design variables problems. In this study, however, HHO is modified so that it can suit the discrete design variables problems. HHO has not been used to solve truss optimization problems with design variables that are discrete, to the author's knowledge.
The remainder sections are arranged as follows: Section 2 presents the formulation of the problem. HHO is reviewed briefly and the main changes to make it suitable for discrete design variables problems are described in Section 3. The reader is referred to Heidari et al. (2019) for details about HHO. The design examples and the outcomes are discussed in Section 4. Lastly, the conclusions of this study are discussed in Section 5.

Formulation of the Optimization Problems
When structural components have to be chosen from available sections in a manufacture's catalog, they must be considered discrete design variables. The formulation of discrete design variables optimization problem can be written as: = [ 1 , 2 , … , ]; ∈ ; i = 1,2, … . , where is the vector of design variables with members, is a set of members (in this study, it is set of cross-section areas) for the th design variable, ( ) is a cost function (in this research, ( ) is the total weight or mass of the truss), and ( ) is th a constraint function.
Constraints are combined with the cost function to generate a penalty function. Then, it is minimized: where, ( ) is function sums all the violations if there is any, = 10 is an exploration penalty coefficient, is a penalty function exponent, max (0, ( )) ≥ 0 is the violation value of the th constraint, is the present iteration, and is the maximum number of iterations. Note that ( ) exponent is increasing linearly from 3 to 5 (Kaveh and Mahdavi, 2015).

Harris Hawks Optimization
The algorithm simulates the behaviors of Harris hawks (birds of prey) of chasing a prey. Their chasing behavior is based on different possible escaping patterns of the prey (specifically rabbits). Harris hawks live in a very tied group. In nature, they show a distinguished cooperative foraging activities behavior with other family members. They use what is called "surprise pounce" or "seven kills" strategy. That is, seven hawks simultaneously attack a prey from various directions. Based on the escaping patterns of a prey, they change their chasing styles. When the prey is exhausted, the most experienced hawk among the group captures the exhausted prey and shares it with besiege (Heidari et al., 2019). In HHO, hawks are modeled as the possible solution ( ).
In the HHO mathematical model, there are two states: exploration and exploitation. The best solution in every step is a potential optimum design in the exploration phase. The pseudocode of the HHO algorithm is explained in Algorithm. Hawks roost randomly on some positions to detect a rabbit using two strategies: the position of other members and the position of the rabbit. This behavior is modeled in Eq. (7).
where, is a function that rounds off every component in the design vector to the closest integer. This is the main change on the original HHO to solve an optimization problem with discrete variables.
( ) is the location of the rabbit, 1 , 1 , 3 , 4 , and are random values in the range of 0 and 1, and are the variables' lower and upper bounds, respectively, is the mean position of the current population of hawks, and ( ) is the position of each hawk in iteration .
Depending on the escaping energy of the rabbit, HHO transfers from exploration to exploitation phases and between various exploitative styles. The mathematical model of the escaping energy of the rabbit is as follows: where, is the escaping energy and 0 is the initial value of its energy. Note that the value of decreases as increases. When 1 ≤ | |the exploration phase happens, while the exploitation phase happens when 1 > | | in later iterations. In the exploitation phase, there are two besiege: soft and hard. That is when 0.5 ≤ | | the soft besiege happens and when 0.5 > | | the hard besiege happens. The soft besiege is mathematically modeled as follows: The mathematical form of the hard besiege is as follows: when 0.5 > and 0.5 ≤ | |, the rabbit has enough energy to escape. The mathematical model of the escaping types of the prey and leapfrog movement ( ) is modeled as follows: where, is the merit function, , , and are random vectors by the size of 1 × . This step is called soft besiege with progressive rapid dives. In this paper, Eq. (17)  When 0.5 > and 0.5 > | |, the rabbit does not have enough energy to escape. This step is called hard besiege with progressive rapid dives. The following rule is performed to mimic this behavior: Algorithm. Pseudocode of Harris Hawks Optimization algorithm (Heidari et al., 2019).

Inputs:
The population size ( ) and . Initialize the HHO population Outputs: Best design ( ) and its fitness value While < Find the fitness values of each design using Eq. (4) Set as the current best design For (every design ( )) Update the initial energy E0 (Eq. (10)), the energy E (Eq. (9)), and the jump strength J (Eq. (12)) If (1≤|E|) (Exploration phase) Calculate the position vector using Eq.

Numerical Examples
Before the suggested HHO algorithm can be used to solve more complex and larger structural problems, it must be tested to solve some standard problems to study its performance. In the following subsections, five well-known truss optimization examples with design variables that should be selected from a defined set of members are solved to find the minimum weight or mass of the structure to compare the effectiveness of HHO with ten metaheuristic algorithms. Structures are modeled and analyzed using the finite element method (linear static analysis) and HHO is coded using MATLAB © . For all problems, is set to 10000 iterations and is 50.
Since HHO is stochastic, each example was run 50 times to examine the performance of HHO. Two metrics will be used in evaluations: (1) Average of the final merit function values obtained with different runs. An average value that is closer to the best solution will indicate the ability of the algorithm to obtain the best design more often.
(2) Standard deviation (SD) of the final weight or mass. A smaller value of the standard deviation will imply robustness of the algorithm to obtain the best design with different runs for the problem. Figure 1 explains the schematic of the 10-bar truss. This benchmark structure has been discussed by several researchers, e.g., Rajeev and Krishnamoorthy (1992), Camp (2007) Figure 2 demonstrates the best fitness at each iteration of the best run of HHO. The optimum design was obtained after 2430 iteration. Table 1 summarizes results available in the literature with four different algorithms and results from the present study. It also shows the mean values and standard deviations of the best structural weight from 50 independent for HHO. HHO was able to find the best design (5490.738 lb). This is the same weight as obtained by SA, BB-BC, ECBO. However, HHO was able to find the optimal design in every run (the standard deviation of 50 runs is 0).  Figure 3 explains the schematic of the 15-bar truss. Previously, this example was solved in Li et al. (2006) and Li et al. (2009). For all members, Young's modulus is 200 GPa and material density is 7800 kg/m 3 . The maximum displacement for all joints in both X and Y directions equals ±10 mm. Also, the stress in all members must not exceed ±120 MPa. As shown in Figure 3, the structure is subjected to three vertical point loads with three independent load cases: case 1: P1 =35 kN, P2 =35 kN, and P3 =35, case 2: P1 =35 kN, P2 = 0 kN, and P3 =35, and case 3: P1 =35 kN, P2 =35 kN, and P3 = 0. Design variables are selected form the discrete set of 16 cross-sections: =[113.2, 143.2, 145.9, 174.9, 185.9, 235.9, 265.9, 297.1, 308.6, 334.3, 338.2, 497.8, 507.6, 736.7, 791.2, 1063.7] (mm 2 ).  Figure 4 demonstrates the convergence curve of HHO. After 108 iterations HHO reaches the best design of 105.735 kg. Similar to the previous numerical example, HHO finds the best design in each run. Table 2 shows that the average of 50 runs is 105.735 kg and the standard deviation is 0.
HHO reaches the best design of 1902.605 kg after 7106 iterations (Figure 8).

Concluding Remarks
Harris Hawks Optimization (HHO) is a stochastic algorithm mimicking the behavior of Harris hawks of chasing a prey. Previously, HHO was used to solve mechanical, chemical, electrical engineering optimization problems with design variables that are continuous. In this research, HHO was utilized to solve truss structure optimization problems with discrete design variables. Unlike competing metaheuristic algorithms, HHO does not require tuning of parameters. This feature improves the stability of the algorithm. The original HHO for continuous design variables is modified to suit the discrete variables problems and used to solve well-known five truss structure problems. These standard problems are considered to verify the effectiveness and stability of HHO. The comparison of the numerical results of these structures using HHO with those available in the literature demonstrates the consistency of the HHO. The consistency of the results is shown by the small standard deviations and lowest averages of final cost function values of 50 independent runs. This implies that fewer runs are needed to obtain the best design in comparison with many other metaheuristic algorithms. Also, HHO shows good convergence speed. For future work, it is suggested to use Harris Hawks Optimization to solve more complex structural optimization problems such as frame structures and large-scale trusses.

Conflict of Interest
For this publication, the author ensures that there is no conflict of interest to declare.

Acknowledgments
The author wishes to show his appreciation to the editor and reviews for their valuable suggestions.