# Structural Topology Design Optimization Using the Binary Bat Algorithm
## 2 Topology Optimization: Problem Formulation  
The main aim of structural topology optimization is to maximize the stiffness of a structure subjected to a volume constraint or to minimize the material used to construct a structure subject to stress and/or deflection constraints. Specifically, the optimization problem is to minimize an objective function subjected to some constraints by gradually distrusting the material or removing the low stressed material in a predefined domain [26]. In general, the structural topology optimization problem can be stated as follows:  
\[\min_{\rho}:F=F(\mathbf{u}(\rho),\rho)=\int_{\Omega}f(\mathbf{u}(\rho),\rho)dVol \tag{1}\]\[\text{subjected to :}g_{0}(\rho)=\int_{\Omega}\rho(\mathbf{x})dVol-Vol_{max}\leq 0 \tag{2}\]  
\[g_{k}(\mathbf{u}(\rho),\rho)\leq 0;\;k=1,2,\ldots,K \tag{3}\]  
\[h_{l}(\mathbf{u}(\rho),\rho)=0;\;l=1,2,\ldots,L \tag{4}\]  
\[\rho(\mathbf{x})\in\{0,1\}\;\forall\mathbf{x}\in\Omega \tag{5}\]  
where \(F\) is an objective function (e.g., strain energy), \(g_{0}\) is a volume constraint, \(Vol_{max}\) is a volume limit, \(g_{k}\) are other possible inequality constraints (e.g., displacement), \(h_{l}\) are other possible equality constraints, \(\rho(\mathbf{x})\) is the density variable that describes the material distribution in the design domain (\(\Omega\)), and \(\mathbf{x}\) is the vector of all points in the design domain [27]. The reader is referred to References [28; 29; 30] for more details.  
For topology optimization using the BBA (or any metaheuristic algorithm), the problem can be stated as follows:  
\[\min_{\mathbf{X}}:c(\mathbf{X})=\mathbf{U}(\mathbf{X}).\mathbf{L} \tag{6}\]  
\[\text{subjected to :}g(\mathbf{X})=Vol(\mathbf{X})/Vol_{max}-1\leq 0 \tag{7}\]  
where \(\mathbf{X}\) is the design vector (each design variable has a value of 0 or 1), \(c(\mathbf{X})\) is the compliance, \(\mathbf{U}\) is the displacement vector, \(\mathbf{L}\) is the load vector, and \(Vol\) is the total volume. The formulation above (Equations (6) and (7)) is combined to define what is called the penalty (merit) function, which can be used in metaheuristic algorithms as follows:  
\[\min_{\mathbf{X}}:C(\mathbf{X})=c(\mathbf{X})[1+G(\mathbf{X})]^{\xi} \tag{8}\]  
\[G(\mathbf{X})=\max(0,g(\mathbf{X})) \tag{9}\]  
\[\xi=3+2*Iter/maxIter \tag{10}\]  
where \(G(\mathbf{X})\) is a constraint violation function, \(\xi\) is a penalty function exponent, \(maxIter\) is the limit number of iterations, and \(Iter\) is the current iteration. Note that the penalty function exponent is a linearly increasing function (3-5) [31]. In the first iterations of the BBA, a relatively large volume constraint violation was observed; thus, \(\xi\) is about the value of 3. In the later iterations, the \(\xi\) increases to guarantee that feasible designs were obtained (not even a very small volume constraint violation). Solving the numerical design problems (Section 5) shows that this type of merit function is very effective in comparison with penalizing the violation using a constant positive number (i.e., \(C(\mathbf{X})=c(\mathbf{X})+\text{\emph{postve number}}*G(\mathbf{X})\)).