## 2 Materials and Methods
### Particle Swarm Algorithm  
In the theory of particle swarm algorithm, each bird in the space is regarded as a particle in the \"solution space\". The current position of each particle is considered to be a solution to the optimization problem of the solution space, and each solution corresponds to an answer, which is called the objective function value or fitness value of the solution space. Each particle has its own speed (\(V_{i}\)) and uses its own speed direction, the best solution (_pbest_) currently found by itself, and the best solution (_gbest_) found by the current group to generate a new particle speed. After determining the update speed and direction of the particles, the conditions are used to generate a new update position. Subsequently, the value of the objective function is brought into the position of each particle to judge the pros and cons of the current position. If it is better than the previously searched solution, replace it. Otherwise, keep the original best solution. We used this mechanism to iteratively search in the solution space to find the best solution in the space and used the following Equations (1) and (2) to express the search mechanism for finding the best solution:  
\[V_{i}(k+1)=V_{i}(k)+c_{1}r_{1}\Big{(}P^{l}_{i}(k)-p_{i}(k)\Big{)}+c_{2}r_{2}(P^ {g}(k)-p_{i}(k)) \tag{1}\]  
\[p_{i}(k+1)=p_{i}(k)+V_{i}(k+1) \tag{2}\]  
where \(i=1,2,\ldots,m\) (\(m\) denotes the number of particles); \(k\) represents the iteration index; \(V_{i}(k)\) denotes the velocity vector of the \(i\)-th particle in the \(\theta\) dimension; \(p_{i}(k)\) represents the position of the \(i\)-th particle in the \(\theta\) dimension vector; \(P^{l}_{i}(k)\) denotes the position vector of the best solution \(\theta\) dimension of each iteration; \(P^{g}(k)\) represents the position vector of the best solution \(\theta\) dimension of the group; \(c_{1}\) denotes the individual learning parameter; \(c_{2}\) represents the group learning parameter; \(r_{1}\) and \(r_{2}\) denote random numbers between 0 and 1; \(\theta\) represents the dimensionality of the search space.  
The individual learning parameter \(c_{1}\) and the group learning parameter \(c_{2}\) represent the acceleration weights of the best solution and the best solution of the group that advances the particle to each iteration, respectively. When the value of \(c\) is small, the particle is allowed to perform multiple searches near the target area before reaching the best solution of its own or the best solution of the group in each iteration. This increases the probability of finding the best solution in the entire domain but at the cost of more computation power and time. When the value of \(c\) is large, the particles are allowed to reach their own best solution or the best solution of the group at a faster speed in each iteration. This will save some unnecessary calculations and time and improve the convergence speed. Moreover, when the value \(c_{1}\) or \(c_{2}\) is 0, the particle swarm algorithm will have different characteristics [24].  
The first part of Equation (1) is the particle's previous inertia, i.e., the velocity of its previous experience. The second part is the \"cognition\" part, which represents the thinking of the particle itself. Finally, the third part is the \"social\" part, which implies that the information among particles is shared such that the particles can cooperate. Therefore, the core of the particle swarm algorithm is to use these three parts to update the particle speed and position in a linear combination and to calculate the fitness value to complete the problem optimization.