## 4 Optimization Model Solution
### PSO Algorithm  
PSO is a global optimization algorithm based on swarm intelligence proposed by [PERSON] et al. in 1995 [PERSON] et al. (1995). The PSO algorithm is a search algorithm that can be used for different complex problems [PERSON] et al. (1995); [PERSON] et al. (1995); [PERSON] et al. (1995); [PERSON] et al. (1995); [PERSON] et al. (1995); [PERSON] et al. (1995); [PERSON] et al. (1995). It initializes a group of particles that do not have volume and mass first so that each particle is approximated as a feasible solution to the problem to be optimized. Within the large space of this feasible solution, the particles move randomly and find the optimal solution through iteration. The iteration depends on the experience of the particles, including the position and speed of the particles, and on the search for the best point or global optimal point of the particles. The particles will follow optimal particles in the solution space to search for the optimal solution.  
The PSO algorithm first initializes a group of random particles (random solutions), and then, the particles follow the current optimal particles to search in the solution space and find the optimal solution through iteration. Suppose the position and velocity of the \(i\)th particle in the d-dimensional search space are \(X^{i}=(x_{i,1}\ x_{i,2}\ldots x_{i,d})\) and \(V^{i}=(v_{i,1}\ v_{i,2}\ldots v_{i,d})\), respectively. In each iteration, the particle updates itself by tracking two optimal solutions. The optimal solution found by the first particle itself is the personal best value pbest, \(P^{i}=(p_{i,1}\ p_{i,2}\ldots p_{i,d})\). The other is the optimal solution currently found by the population, that is, the global best solution gbest, \(P_{g}\). When finding these two optimal values, the particle updates its velocity and new position according to the following formula:  
\[\left\{\begin{array}{l}v_{i,j}(t+1)=wv_{i,j}(t)+c_{1}r_{1}\big{[}p_{i,j}-x_{ i,j}(t)\big{]}+c_{2}r_{2}\big{[}p_{g,j}-x_{i,j}(t)\big{]}\\ x_{i,j}(t+1)=x_{i,j}(t)+v_{i,j}(t+1),j=1,2\ldots,d\end{array}\right. \tag{25}\]  
where \(w\) is the inertia weight, \(c_{1}\) and \(c_{2}\) are positive learning factors, and \(r_{1}\) and \(r_{2}\) are uniformly distributed random numbers between 0 and 1.  
The performance of particle swarm optimization depends largely on the control parameters of the algorithm, such as the number of particles, the maximum speed, the learning factor, the inertia weight, and so on.  
The learning factors \(c_{1}\) and \(c_{2}\) determine the influence of the empirical information of the particle itself and the empirical information of other particles on the particle trajectory, reflecting the information exchange between the particle swarms. If the value of \(c_{1}\) is larger, the particles will wander too much in the local range. If the value of \(c_{2}\) is larger, the particles will converge to the local minimum prematurely.  
In order to effectively control the flight speed of the particles and to make the algorithm achieve an effective balance between global detection and local mining, [PERSON] constructed a PSO algorithm with a contraction factor (CF-PSO) [34], and its speed update formula is as follows:  
\[V_{i,j}(t+1)=\varphi\left\{\begin{array}{l}v_{i,j}(t)+c_{1}r_{1}\left[p_{i,j }-x_{i,j}(t)\right]+\\ c_{2}r_{2}\left[p_{g,j}-x_{i,j}(t)\right]\end{array}\right\} \tag{26}\]  
where  
\[\varphi=\frac{2}{\left|2-C-\sqrt{C^{2}-4C}\right|}\]  
where \(C=c_{1}+c_{2}\). To ensure a smooth solution from the algorithm, \(C\) must be greater than 4.