**2. Particle swarm optimization**

Particle Swarm Optimization (PSO) algorithm is a population metaheuristics created from models of the collective and social behavior of animals, in their coordination of movements in the tasks of searching and obtaining food. These models were simplified, losing the requirement to maintain a minimum distance between its neighbors. In addition, the communication architecture was transformed, which was initially inspired by spatial proximity and was changed to use a topology defined by a graph. Therefore, PSO ends up having, nowadays, more similarities with models of mutual influence between human beings in their ways of thinking and acting [5].

In the PSO there is a fixed amount of agents, called particles. This set of agents is called a swarm, designed in such a way that each agent is able to communicate with its neighbor, which is a subset of its peer, and can be defined in a static or dynamic way. Each of the particles moves in the solution space with a certain speed, always evaluating the solution corresponding to that occupied position in each iteration. The speed of the particles must be influenced by your own experience (cognitive factor), and also influenced by your neighbors (social factor). Such influences are implemented as two attractors, the first located in the best position already evaluated by the particle itself and the second located in the best position visited by the neighboring particles [6, 7].

In general, the position of a particle *i* at a time *k* is represented by a vector *x<sup>i</sup> <sup>k</sup>* and its respective speed as a vector *vi <sup>k</sup>*. Both vectors are stored during the learning process in generation *k* and used for updating in the next generation. In addition to the vectors *x<sup>i</sup> <sup>k</sup>* and *v<sup>i</sup> <sup>k</sup>*, PSO uses the best position of the particle *i* (*pi <sup>k</sup>*), as well as the position of the best particle of the whole swarm (*p<sup>g</sup> <sup>k</sup>*), both evaluated throughout the process until the moment *k* evaluated.

The equations that govern the PSO can be defined as

$$
\omega v\_{i+1} = \alpha v\_i + c\_1 r\_1 \left( p\_i - \varkappa\_i \right) + c\_2 r\_2 \left( p\_g - \varkappa\_i \right) \tag{1}
$$

$$\mathbf{x}\_{i+1} = \mathbf{x}\_i + \boldsymbol{\nu}\_{i+1} \tag{2}$$

where *x* is the position of the particle; *v* is the velocity of the particle; *w* is the inertial weight, controlling the impact of the previous speed at the current speed; *c*<sup>1</sup> and *c*<sup>2</sup> are positive constants, controlling the social and individual behavior of each particle; *r*<sup>1</sup> and *r*<sup>2</sup> are random numbers in the interval [0.1], contributing to diversify the exploration of the problem search space.

The basic PSO algorithm can be defined as follows.

Randomly initialize the particle positions *x<sup>i</sup> <sup>k</sup>* and speeds *vi <sup>k</sup>* within the search space at k = 0.

#### **Algorithm 1:** PSO algorithm

