## 2 Material and Methods
### Particle Swarm Optimization Algorithm
During the optimization process, the swarm of particles moves through the search space, with each particle adjusting its position and velocity based on its own experience and the experiences of its neighbors. This collective behavior allows the swarm to effectively explore the search space and converge towards an optimal solution [52]. The velocity \(V_{i}^{k}\) and the position \(X_{i}^{k}\) of the ith particle are updated as follows [50]:  
\[V_{i}^{k}\gets V_{i}^{k}+C1*rand1_{i}^{k}*\left(pbest_{i}^{k}-X_{i}^{k} \right)+C2*rand2_{i}^{k}\left(gbest^{k}-X_{i}^{k}\right) \tag{15}\]  
\[X_{i}^{k}\gets X_{i}^{k}+V_{i}^{k} \tag{16}\]  
where \(X_{i}\) is the position of the ith particle, \(V_{i}\) is the velocity of the particle \(i\), \(pbest\)\(i\) represents the best position yielding the best fitness value of the ith particle, and gbest is the position discovered by the whole population. \(C1\) and \(C2\) are acceleration coefficients that control the influence of \(pbest\) and \(gbest\) on the particle's movement. \(rand1\) and \(rand2\) are used to introduce randomness into the particle's movement. The values of \(rand1\) and \(rand2\) are multiplied by the acceleration coefficients \(C1\) and \(C2\), respectively [53]. Since its debut by [PERSON] [PERSON] in 1995, PSO has attracted significant attention [54]. Numerous researchers have sought to improve its performance in a variety of ways, resulting in the development of many intriguing varieties. One of the variants [55] introduces an inertia weight parameter to the basic PSO algorithms as follows:  
\[V_{i}^{k}\gets w*V_{i}^{k}+C1*rand1_{i}^{k}*\left(pbest_{i}^{k}-X_{i}^{k} \right)+C2*rand2_{i}^{k}*\left(gbest^{k}-X_{i}^{k}\right) \tag{17}\]  
\[W=w_{max}-iter\cdot(w_{max}-w_{min})/iter_{max} \tag{18}\]  
where \(iter\) and \(iter_{max}\) are, respectively, the current iteration and maximum iteration, and \(w_{min}\) to \(w_{max}\) is the range of inertia weight [0.4, 0.9], commonly. If w is too high, particles will move too quickly and may overshoot the optimal solutions. On the other hand, if w is too low, particles will move too slowly and may get trapped in local optima [56]. A range of values for \(w\) between 0.4 and 0.9 has been found to work well in many applications [39; 57; 58; 59]. The lower bound of this range, 0.4, corresponds to a high degree of exploration, meaning that particles are more likely to explore new regions of the search space. The upper bound of the range, 0.9, corresponds to a high degree of exploitation, meaning that particles are more likely to converge towards the best solutions found. This is useful in the later stages of the search process, when the algorithm has already explored much of the search space and has a good idea of the problem landscape [60; 61]. At each iteration, the particles adjust their position based on a combination of their best-known position and the best-known position of the swarm. The algorithm continues to iterate until a stopping criterion is met, such as a maximum number of iterations or a satisfactory solution is found. PSO has been used to solve a variety of optimization problems, including function optimization [62], neural network training, and image segmentation [63]. One advantage of PSO is its simplicity and ease of implementation, making it a popular choice for researchers and practitioners.