## 2 Optimization of Concrete Rectangular Cross-Sections
### Optimization Methodology  
#### 2.6.1 Firefly Algorithm (FA)  
Highly non-linear optimization problems are common in structural design. Most of them include many variables that can be discrete and/or continuous, and complex, non-linear constraints [24]. Among the advantages of the FA is that it efficiently overcomes these problems [1; 32]. In the previous formulation, a sample of non-linear functions (objective function, fitness function, and constraints) was proposed.  
The FA is a swarm-based method whose search process depends on two combined strategies: exploration and exploitation. The former focuses on searching for the global optimum, whereas the latter focuses on selecting the best design found thus far. During the process of design, the parameters of the algorithm allocate more weight to one of the strategies than to the other.  
The FA ideally reproduces the behavior of fireflies. Three rules are considered:  
1. All the fireflies in a population have just one gender and any of them can be attracted to another.
2. The attraction between two fireflies in the whole population is directly proportional to the brightness of their luminescence. This attraction lessens when distances increase. Observing a pair of fireflies, the less bright one moves toward the brighter one.
3. The brightness of a specific firefly is linked to the value of its fitness function.  
The attraction \(\beta\) between two fireflies is  
\[\beta(r)=\beta_{0}\frac{1}{1+\gamma r^{m}} \tag{19}\]  
where \(\gamma\) is the absorption coefficient for a given medium; \(m\) is an integer; \(r\) is the distance between these two fireflies; and \(\beta_{0}\) is the attraction at \(r=0\).  
The movement of a firefly \(i\), which is attracted to another, brighter firefly \(j\), is expressed by the following expression:  
\[\mathbf{p}_{i}^{k+1}=\mathbf{p}_{i}^{k}+\left(\mathbf{p}_{j}^{k}-\mathbf{p}_{i}^{k}\right)\beta _{0}\frac{1}{1+\gamma r_{ij}^{m}}+\alpha\left(rand-\frac{1}{2}\right)\left(\mathbf{ X}^{L}-\mathbf{X}^{L}\right) \tag{20}\]  
where \(k\) is the current iteration; \(\mathbf{p}_{i}^{k}\) is the spatial coordinate vector of the \(i\)-th firefly at the \(k\)-th iteration; \(\mathbf{p}_{j}^{k}\) is the spatial coordinate vector of the \(j\)-th firefly at the \(k\)-th iteration; \(\alpha\) is the randomization parameter; rand is a random number generator uniformly distributed in [0, 1]; \(\mathbf{X}^{L}\) is the optimization variable lower bound vector; and \(r_{ij}\) is the Cartesian distance  
\[r_{ij}=\|\mathbf{p}_{i}^{k}-\mathbf{p}_{j}^{k}\| \tag{21}\]The potential oscillatory behavior of the algorithm can be avoided by reducing the randomization parameter \(\alpha\) as the process progresses. Research by [PERSON] et al. [18] has established that \(\alpha\in[0.01\,\ 1]\) can be taken.  
The absorption coefficient \(\gamma\) controls the speed of the process convergence. If \(\gamma\) is near zero, the attraction is constant, and each firefly can be seen by the whole population. However, if \(\gamma\) is large, the attraction decreases and the fireflies become almost blind. This situation is as if they were flying in the fog, with almost random movement.