## 3 Bio-Inspired Optimization Methods
Particle Swarm Optimization, an optimization algorithm first developed by [PERSON] and [PERSON] in 1995 [58; 59], inspired by the behavior of schools of fish and flock of birds, and using the collective intelligence of these animals to maintain individuals (known as particles) in the search space. Each position represents a solution to a problem; PSO uses Equations (5) and (6) to update the position and velocity of each particle. PSO guides its particle through a multidimensional space using the collective intelligence of animals described in Equations (5) and (6). \[x_{i}(t+1)=x_{i}(t)+v_{i}(t+1) \tag{5}\]

\[v_{ij}(t+1)=C[v_{ij}(t)+c_{1}r_{1}(t)[y_{ij}(t)-x_{ij}(t)]+c_{2}r_{2}(t)[\hat{y }_{j}(t)-x_{ij}(t)]] \tag{6}\]Equation (5) represents the movement of a particle \(i\) from its actual position \(x_{i}(t)\) to the new position \(x_{i}(t+1)\) adding its new velocity \(v_{i}(t+1)\). Equation (6) represents the velocity of a particle \(i\) in its dimension \(j\). This equation is an update of the velocity from actual velocity \(v_{ij}(t)\) to its new velocity \(v_{ij}(t+1)\), adding the cognitive component \(c_{1}r_{1}(t)[y_{ij}(t)-x_{ij}(t)]\) and the social component \(c_{2}r_{2}(t)[\dot{y}_{i}(t)-x_{ij}(t)]\); this new velocity is also weighted with a constriction factor \(C\). The pseudocode of the original PSO method is illustrated in Algorithm 3. ```
01. Initialize size of the particle swarm n, and other parameters
02. Initialize positions and velocities for all particles randomly
03. While (end criterion is not met) do
04. Increment iteration counter
05. Calculate fitness value of each particle
06. Update new local and global best particle
07. Calculate new velocity of each particle
08. Update new position of each particle
09. End While
```

**Algorithm 3**Particle Swarm Optimization. The pseudocode of the modified PSO with parameter adaptation is illustrated in Algorithm 4. The main difference between Algorithm 3 and Algorithm 4 is the calculation of iteration and diversity from line 07 and the use of a fuzzy system to calculate the new \(C_{1}\), \(C_{2}\) and _Constriction factor_ from line 08. ```
01. Initialize size of the particle swarm n, and other parameters
02. Initialize positions and velocities for all particles randomly
03. While (end criterion is not met) do
04. Increment iteration counter
05. Calculate fitness value of each particle
06. Update new local and global best particles
07. Calculate iteration and diversity using Equations (10) and (11)
08. Calculate new \(C_{1}\), \(C_{2}\), and _Constriction factor_ using a fuzzy system
09. Calculate new velocity of each particle
10. Update new position of each particle
11. End While
```

**Algorithm 4**Fuzzy Particle Swarm Optimization. The Bat Algorithm uses echolocation to get the best value from the search space, all bats use echolocation and start iterations flying randomly with velocity \(v_{i}\) at position \(x_{i}\), wavelength and frequency values are varied in each iteration, the BA is idealized in the pseudocode shown in Algorithm 5[60,61]. The pseudocode of the modified BA with parameter adaptation is shown in Algorithm 6; the main difference between Algorithms 5 and 6 is that, in the last one, we have the calculation of iteration in line 04, the calculation of diversity in line 14 and the use of a fuzzy system to calculate the new _Pulse Rate_ and _Loudness_. To update velocities and locations of bats, Equations (7)-(9) are used: Equation (7) adjusts the frequency, while Beta is a random value in the range [0, 1]; Equation (8) updates velocities of all bats; and Equation (9) updates positions of all bats [62]. \[f_{i}=f_{\min}+(f_{\max}-f_{\min})\beta, \tag{7}\]

\[v_{i}^{t}=v_{i}^{t-1}+(x_{i}^{t-1}-x_{*})fi, \tag{8}\]

\[x_{i}^{t}=x_{i}^{t-1}+v_{i}^{t}, \tag{9}\]```
01. Initialize the bat population \(x_{i}\) (\(i\) = 1, 2,..., \(n\)) and \(v_{i}\)
02. Initialize frequency \(f_{i}\), pulse rates \(r_{i}\) and the loudness \(A_{i}\)
03. While (\(t<Max\) numbers of iterations)
04.