Mathematical Problems in Engineering

Volume 2017, Article ID 1457297, 12 pages

https://doi.org/10.1155/2017/1457297

## Size and Topology Optimization for Trusses with Discrete Design Variables by Improved Firefly Algorithm

^{1}Key Lab of Structures Dynamic Behavior and Control of the Ministry of Education, Harbin Institute of Technology, Harbin 150090, China^{2}Faculty of Architecture and Built Environment, Delft University of Technology, Julianalaan 134, 2628 BL Delft, Netherlands^{3}Hangzhou Xiaoshan Urban Planning Institute, Hangzhou 311200, China^{4}Hangzhou Xiaoshan District Housing & Construction Bureau, Hangzhou 311200, China

Correspondence should be addressed to Qingpeng Li; moc.liamg@pqlcrsstih

Received 2 January 2017; Revised 14 March 2017; Accepted 23 April 2017; Published 4 June 2017

Academic Editor: Nantiwat Pholdee

Copyright © 2017 Yue Wu et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Firefly Algorithm (FA, for short) is inspired by the social behavior of fireflies and their phenomenon of bioluminescent communication. Based on the fundamentals of FA, two improved strategies are proposed to conduct size and topology optimization for trusses with discrete design variables. Firstly, development of structural topology optimization method and the basic principle of standard FA are introduced in detail. Then, in order to apply the algorithm to optimization problems with discrete variables, the initial positions of fireflies and the position updating formula are discretized. By embedding the random-weight and enhancing the attractiveness, the performance of this algorithm is improved, and thus an Improved Firefly Algorithm (IFA, for short) is proposed. Furthermore, using size variables which are capable of including topology variables and size and topology optimization for trusses with discrete variables is formulated based on the Ground Structure Approach. The essential techniques of variable elastic modulus technology and geometric construction analysis are applied in the structural analysis process. Subsequently, an optimization method for the size and topological design of trusses based on the IFA is introduced. Finally, two numerical examples are shown to verify the feasibility and efficiency of the proposed method by comparing with different deterministic methods.

#### 1. Introduction

Topology optimization is a rapidly expanding field of structural mechanics, which can result in greater savings than mere cross-section or shape optimization. Owing to its complexity, it is an intellectually challenging field (Rozvany and Olhoff 2001 [1]). Generally, the objective of topology optimization is to reduce the structural weight by adjusting the design variables under a set of predefined constraints imposed according to a selected code of design practice. As for topology optimization problems, the cross-sectional areas of structural members, shape parameters, and topology parameters can be treated as design variables. These variables can be divided into two categories as continuous variables and discrete variables. Actually, in practical engineering applications, discrete variables are used commonly as design or optimization variables, cross-sectional areas of the structural members, for instance. Therefore, size and topology optimization for trusses with discrete design variables is discussed in this study.

The first paper on topology optimization was published over a century ago by the versatile Australian inventor Michell (1904 [2]), who determined the first truss solutions of least weight and developed a general theory, which is a milestone in the theoretical research of structural topology optimization, for deriving them based on the work of Maxwell (1872 [3]). Several decades after that, many scholars joined in the field of optimization and a large number of papers were published. However, during that time, the research mainly focused on the development of optimization algorithms for continuous topology optimization. Typically, Dorn (1964 [4]) proposed the Ground Structure Approach, in which firstly they formed the ground structure containing all (or almost all) possible member connections among all nodes of the structure for a bridge truss, and then they applied the linear programming technique to optimize the structure subject to stress constraints and single loading case. Based on the Ground Structure Approach, Dobbs and Felton (1969 [5]) used a steepest descent-alternate mode algorithm to minimize the weight of the ground structure of truss subject to stress constraints and multiple loading cases. Kirsch and Topping (1992 [6]) applied a very attractive two-stage design approach, which evaluates an approximate solution at the first stage and modifies it at the second stage to achieve the final optimum, to optimize topologically the trusses subject to the constraints of stress and displacement.

Compared with topology optimization with continuous variables, the researches on topology optimization of trusses with discrete variables are much less. It is not easy to use the mathematical optimization methods to solve topology optimization problems with discrete variables. Lipson and Gwin (1977 [7]) adopted member areas and joint coordinates as design variables to minimize the cost of three-dimensional indeterminate truss structures subject to multiple loading conditions and design constraints, in which the constraints include Euler buckling and specified limits on member stresses, member sizes, and joint displacements. In their work, the design process was separated into two parts as geometry modifications and suboptimization. The complex method is applied in the geometry modifications part, and an analogous scaling procedure for displacement which constrains with the stress ratio method is applied in the suboptimization part. For each geometry change, discrete member sizes were selected from a table of allowable values. However, this method has the drawback of readily becoming trapped at a local optimum (Sun et al. 1995 [8]).

Over the last decade, the emergence of a new class of optimization methods, called metaheuristics, has marked a great revolution in the optimization field (Jarraya and Bouri 2012 [9]). These methods, which include the simulated annealing method, genetic algorithms, taboo search method, the Ant Colony Algorithms, and particle swarm optimization (PSO), are applicable to almost all types of combinatorial optimization problems. They also have been devised to topology optimization problems with discrete variables and to overcome the drawbacks of mathematical optimization methods. For example, Genetic Algorithm was researched by Wang and Tai (2005 [10]), Zhou (2010 [11]), Balamurugan et al. (2008 [12], 2011 [13]), Jain and Saxena (2010 [14]), and Madeira et al. (2010 [15]). Besides, Artificial Immune Algorithm was researched by Luh and Chueh (2004 [16]). Taboo Search method was researched by Bennage and Dhingra (2005 [17]). Ant Colonies Algorithm was researched by Kaveh et al. (2008 [18]) and Luh and Lin (2009 [19]) and Particle Swarm Optimization (PSO) was researched by Luh et al. (2011 [20]). Simulated Annealing method was researched by Shim and Manoochehri (1997 [21]), while Harmony Search was researched by Lee and Geem (2004 [22]). Differential Evolution schemes were researched by Wu and Tseng (2010 [23]). Some of these metaheuristics like Ant Colonies Algorithms and Particle Swarm Optimization may actually converge to reasonable designs within an acceptable number of iterations if combined with some kind of filtering algorithms (Sigmund 2011 [24]).

The Firefly Algorithm (FA, for short) developed recently by Yang (2009 [25]) is one of the newest nature-inspired metaheuristic algorithms (2013 [26]). It has been verified that FA is more accurate and efficient than Genetic Algorithm and Particle Swarm Optimization algorithm when solving continuous optimization problems, combinatorial optimization problems, constrained optimization problems, multiobjective optimization problems, and dynamic and noisy optimization problems. The FA has been applied in almost all areas of optimization, as well as in structural engineering practice (Fister et al. 2013 [26]). Size and topology optimization of trusses with discrete variables can be regarded as a kind of combinatorial optimization problem, because its solution space is disjoint and nonconvex, and feasible solution set is discrete. Therefore, it can be solved by FA as well (Miguel et al. 2013 [27]). However, the standard FA shows a slow rate of convergence towards the optimum and needs a high number of structural analyses.

The aim of this paper is to propose a modified Improved Firefly Algorithm (IFA, for short) based on the random-weight and improved attractiveness to solve the size and topology optimization of trusses with discrete design variables. In this method, the topology variables are included in size variables, unstable topologies are disregarded as possible solutions by the measure of geometric construction analysis, and the singular optimal problem can be avoided by the technique of variable elastic modulus. The IFA can speed up the convergence and then obtain a reasonable result, and the effectiveness of the IFA is demonstrated through a selection of benchmark examples.

The remainder of this paper is structured as follows. Section 2 describes the fundamentals of the FA and IFA. Section 3 presents a general framework of the size and topology optimization of trusses with discrete design variables. Additionally, two numerical examples are presented in Section 4. Finally, the paper ends in Section 5 with main conclusions.

#### 2. Firefly Algorithm (FA) and Improved Firefly Algorithm (IFA)

##### 2.1. Standard FA

The FA is a recent nature-inspired metaheuristic algorithm developed by Yang (2009 [25]) which is inspired by the flashing behavior of fireflies. The FA has the following three idealized assumptions.

(a) All fireflies are unisex, so that one firefly can be attracted to other fireflies regardless of their sexes.

(b) Attractiveness is proportional to brightness; thus for any two flashing fireflies, the less bright firefly will move towards the brighter one. Both attractiveness and brightness decrease as the distance between fireflies increases. If there is no firefly brighter than a particular firefly, that firefly will move randomly.

(c) The brightness of a firefly is affected or determined by the landscape of the objective function.

Based on these three assumptions, there are two essential components of the FA, the variation of the light intensity and the formulation of the attractiveness. The latter one is assumed to be determined by the brightness of a firefly which in turn is related to the objective function of the problem being studied. Based on the idealized assumption (c), the original light intensity of firefly is the objective function value of the optimization problem:where is the objective function of the problem being studied, and is a vector which represents the position of the firefly .

As light intensity transmitting in nature, the light intensity decreases as the distance from the light source increases. Therefore, a monotonically decreasing function can express the variation of light intensity. For a given medium with a fixed light absorption coefficient , the light intensity of firefly seen by firefly whose distance from firefly is can bewhere the distance between fireflies and at and can be defined as the Cartesian distance .

Inspired by (2), the attractiveness also decreases as the distance from the light source increases. Since a firefly’s attractiveness is proportional to the light intensity seen by other fireflies, the variation of attractiveness should be a monotonically decreasing function as well. Therefore, the attractiveness of firefly to attract firefly whose distance from firefly is can be defined bywhere is the attractiveness; when it is commonly set to 1.

Based on these, the firefly is attracted to another more attractive (brighter) firefly and its next iteration position is determined bywhere is the iteration number, is a random vector (e.g., the standard Gaussian random vector in which the mean value is 0 and the standard deviation is 1), and is the randomization parameter. The second term of (4) represents the attraction between the fireflies and the third term is the random movement. Equation (4) can be called the position update formula.

A swarm of fireflies which contains fireflies is generated in the preliminary stage of optimization process. A firefly whose position is a multidimensional vector containing multiple design variables corresponds to a candidate solution of optimization problem. Under the effect of attraction, new candidate solutions are chosen in the process in which fireflies update their position constantly.

##### 2.2. Improved Firefly Algorithm (IFA)

###### 2.2.1. Discretization of FA

The FA has proven to be an effective metaheuristic search mechanism on continuous optimization problems (Fister et al. 2013 [26]). Clearly, the standard FA cannot be applied directly to deal with size and topology optimization with discrete design variables as their positions are real numbers. There are many different techniques proposed to solve this problem, such as (1) utilizing a binary-coded technique to handle discrete variables (Datta and Figueira 2011 [30], Datta and Figueira 2013 [31]), (2) replacing the continuous variables by the closest discrete variables, (3) transforming the design variable to and carrying out the algorithm operation on , (4) representing each discrete variable by an integer in ascending order and performing the algorithm operation on the integer (Ho-Huu et al. 2015 [32]), and (5) forming a linking relationship between the integers and discrete variables as in technique (4) and carrying out the algorithm operation on the integer by a series of formulas (T. Y. Chen and H. C. Chen 2009 [33]).

In this study, the discrete variables are arranged in ascending order. Represent each discrete variable by an integer in ascending order. Perform the algorithm operation on the integer. In addition, the initial positions of fireflies and the position updating formula are discretized to avoid the appearance of noninteger.

*(**1) Discretization of Initial Positions of the Fireflies*. Initial positions of the fireflies, which consist of continuous real variables in standard FA, demand to be discretized so that they can be composed of discrete integer variables. The modified initial position of firefly can bewhere is the th element of position of firefly , is the number of optimization variables, and the product round means integer conversion.

*(**2) Discretization of the Position Updating Formula*. As the second term and third term of position update formula may be nonintegers, these terms need to be discretized to ensure the updated positions of fireflies are integers. The modified position updates formula can beThe above two parts of discretization can ensure that the initial and updated positions of each firefly are discrete integer variables, and then the FA can be applied to optimization problems with discrete design variables.

###### 2.2.2. Improved Strategies of IFA

There is a drawback that the standard FA algorithm performs in a slow speed and with a high risk of falling in one of the poor local optima when solving a large solution space optimization problem. The reason is obviously that the initial individuals widely distributed in the large solution space lead to larger distances among each individual and smaller attractiveness. As a result, the moving distance of each individual is too small to find better solutions. To make up the defect which is difficult to be solved by tuning the parameters of and , the IFA is proposed by adding the linear attractiveness and improving the original attractiveness.

*(**1) Random-Weight*. In order to enhance the global exploration in the initial stage of the search process in which fireflies move in a large space, the strategy of random-weight is embedded in the proposed algorithm. The strategy of random-weight can bewhere and are upper and lower limit of random-weight *ω*, respectively, determined based on plenty of trial calculation.

*(2) Improved Attractiveness*. To improve the local exploration (the ability of escaping from poor local optima accurately and fast), avoid excessive pace for location updating, and lead to repeated oscillation in the last stage of the search process where the algorithm depends mainly on the local search, the attractiveness is improved as follows:where can be called basic attractiveness which is a constant value and fixed in 0.15 in this paper. and are commonly set to 1 and , respectively, where is the length of position vector of firefly, and is the range of th element of firefly.

With the strategies of random-weight and improved attractiveness, the improved position update formula is proposed:where is the number of iteration step which embeds the strategy of random-weight.

In this section, the IFA is presented by discretizing the initial positions of fireflies and the position updating formula, embedding the random-weight and improving the attractiveness. This algorithm will be applied in the size and topology optimization for trusses with discrete design variables with an enhanced performance based on the Ground Structure Approach. Some essential techniques will be introduced in the next section.

#### 3. Size and Topology Optimization for Trusses

The Ground Structure Approach is followed in the proposed methodology. This scheme, initially proposed by Dorn et al., starts with a universal truss containing all (or almost all) possible member connections among all nodes in the structure. Afterwards, the topology optimization procedure is applied to discard the unnecessary members. Simultaneously, the size optimization for the trusses is performed by changing the cross-sectional area of the remaining structural members. This optimization procedure seeks the minimum structural weight of the truss subject to stress and displacement constraints.

##### 3.1. Problem Formulation

With the Ground Structure Approach, size and topology optimization can be transformed into size optimization, while the vector only includes size design variables. When the value of size variables becomes zero, this member is removed and topology of the structure changes. Thus, the optimization problem can be posed aswhere is a candidate solution of the optimization problem, is the cross-sectional area of the th member, is the structural weight, is the specific weight of the th member material, is the length of th member, and are the stress and the maximum allowable stress of the th member under th load case, respectively, and are the displacement and maximum allowable displacement of the node underth load case, respectively, is the discrete set of member cross-section, means that the member is deleted, and is the number of elements of . It should be mentioned here that , , and are equivalent to the location of firefly, the th element of location of firefly, and the light intensity of firefly, respectively, in IFA. In the optimization process, the member’s cross-section and structural topology are adjusted by changing the cross-section number of each member which represents a cross-section area arranged in the discrete set with the order from small to large.

In this methodology, the penalty function method, one of the most common constraint handling approaches, is employed to handle the constraints. The penalty function is defined as follows:where is the th constraint of the optimization problem; is the allowable value of th constraint; denotes the sum of the violated constraints; is the number of constraints in the problem; is chosen considering the exploration and the exploitation rates of the search space. In this study, the parameter starts from 1 and then linearly increases to 5. Then, the objective function is defined as follows:

##### 3.2. Variable Elastic Modulus Technique

Researchers are apt to be confronted with singular optimums when using Ground Structure Approach to solve topology optimization problems. The singular optimums problems are caused by replacing the section of canceled member with a smaller value for the purpose of changing the topology. They may cause great difficulties of member removal or insertion during the process of optimization. Essentially, the measure using a smaller value to replace the section of canceled member may cause its stress (which is supposed to be zero) to be greater than the allowable stress. Therefore, we can set the stress of canceled member to zero to avoid the singular optimums problems.

In the static analysis by Finite Element Method, the displacement of structure can be obtained bywhere is the structure global or total stiffness matrix, is the vector of nodal displacement, and is the vector of global nodal force. Then, the internal forces of the structural elements can be obtained bywhere , , , and are the vector of internal forces, the stiffness matrix, transfer matrix, and the vector of nodal displacement of th element, respectively.

From (13) and (14), there are two measures to set the axial forces of canceled members to zero in the static analysis with Finite Element Method. One is setting the displacement of nodes connected to the canceled members to be zero, and the other is setting the element stiffness matrix of the canceled members to null matrix. However, observing from (13), the displacement of nodes connected to many members including canceled ones is difficult to be set to zero in practice; this is because as long as retained members are connected, the displacement of nodes cannot be set to zero. Thereupon, from (14), the measure of variable modulus of elasticity by which the element stiffness matrix of canceled member is set to null matrix is the only feasible method to set the axial forces of canceled members to zero and avoid the singular optimum problems.

##### 3.3. Geometric Construction Analysis

Because structural topology is randomly generated by the IFA, the geometric construction analysis is implemented as a necessary measure to disregard the presence of unstable systems. This measure is applied by checking the positive definiteness of the global stiffness matrix of structure. After geometric construction analysis, a static analysis is performed for each structure and a large value is assigned to unstable systems to reduce unnecessary computation cost. And then, the penalty function whose value has the function of reflecting the degree of a structure in violation of the constraint is applied to the stable structures.

It is notable that, in the process of geometric composition analysis, useless nodes will turn up without connected member in the structure. There is no doubt that the useless nodes should be deleted. In this paper, these nodes are treated as fixed hinge bearing to avoid causing the singular global stiffness matrix of the structure if these nodes were deleted.

##### 3.4. Truss Size and Topology Optimization Process

A size and topology optimization framework of trusses with discrete variables based on the IFA is put forward in this section. Its flow chart is shown in Figure 1, where means the iteration number. And the optimization will stop when the iteration number reaches the maximum number of iterations which is set artificially.