# Bayesian Network Demand-Forecasting Model Based on Modified Particle Swarm Optimization
## 1 Introduction
### Review of PSO Algorithm
Especially for large-sized problems, MeanPSO outperforms PSO. In addition, it can be seen from Figure 1 that the particle search interval in the MeanPSO al  
Figure 1: Comparative movement of a particle in PSO and MeanPSO. makes the algorithm more likely to search for the global optimal solution in the early stage of evolution. [PERSON] proposed a hierarchical simplified particle swarm optimization algorithm with average dimension information (PHSPSO) [41]. The PHSPSO algorithm abandons the particle velocity update term in the PSO algorithm and introduces the concept of average dimension information, that is, the average value of all the dimension information of each particle. The calculation formula is shown in Equation (2). The PHSPSO algorithm decomposes the particle position update formula into three modes, namely, Equations (3)-(5). \[P_{ad}(t)=\frac{1}{D}\sum\limits_{i=1}^{D}x_{id}(t) \tag{2}\]  
\[x_{id}(t+1)=wx_{id}(t)+c_{1}r_{1}(pbest_{id}-x_{id}(t)) \tag{3}\]  
\[x_{id}(t+1)=wx_{id}(t)+c_{2}r_{2}(gbest_{d}-x_{id}(t)) \tag{4}\]  
\[x_{id}(t+1)=wx_{id}(t)+c_{3}r_{3}(p_{ad}-x_{id}(t)) \tag{5}\]  
where Equation (3) contributes to the global development ability of the algorithm, Equation (4) contributes to the local exploration ability of the algorithm, and Equation (5) helps to improve the convergence speed of the algorithm. In the iterative process, the algorithm selects different patterns based on probability to update the particle position. The work in [37] pointed out that using \"\(x=x+v\)\" to update the particle position helps to improve the local exploration ability of the algorithm, and \"\(x=wx+(1-w)v\)\" helps to improve the global development ability of the algorithm. In order to balance local development and global exploration, an adaptive position update mechanism is proposed. Using this mechanism, the particles can select the position update strategy according to the corresponding conditions to better balance the local exploration ability and the global development ability. The position update strategy of the adaptive strategy is expressed by Equation (6). \[P_{i}=\frac{exp(fit(x_{i}(t)))}{exp(\frac{1}{N}\sum\limits_{i=1}^{N}fit(x_{i}( t)))} \tag{6}\]  
where \(fit(\cdot)\) is the fitness value of the particle, and \(N\) is the number of particles in the population. In Equation (6), \(p_{i}\) denotes the ratio of the fitness value of the current particle to the average fitness value of all particles in the population. When the \(p_{i}\) value is greater than the random number, the fitness value of the current particle is much larger than the average fitness value of all particles in the population. At this time, \"\(x=wx+(1-w)v\)\" should be used to update the particle position to enhance the global development ability of the algorithm. Otherwise, \"\(x=x+v\)\" is used to update the particle position to ensure the local exploration ability of the algorithm. In order to improve the feasibility and effectiveness of the particle swarm optimization algorithm, [PERSON] et al. introduced the evolution speed factor and aggregation factor. By analyzing these two parameters, the author proposed a dynamic change strategy of inertia weight based on the running state and evolution state [42]. [PERSON] et al. proposed a comprehensive learning strategy of particle swarm optimization (CLPSO), which updated the speed by the historical best position of all other particles [43]. [PERSON] et al. made a series of improvements to the inertia weight \(w\) and proposed the group success rate reduction inertia weight (SSRDIW) and the group success rate random inertia weight (SSRRIW). These two strategies improved the convergence speed, the global search ability, and the solution accuracy of the algorithm [44]. Particle swarm optimization belongs to the stochastic optimization method and is mainly driven by the random streams utilized in the search mechanism.