# Bayesian Network Demand-Forecasting Model Based on Modified Particle Swarm Optimization
## 1 Introduction
### Review of PSO Algorithm  
The particle swarm optimization (PSO) algorithm is an evolutionary computing technology based on swarm intelligence theory proposed by American psychologist [PERSON] and electrical engineer [PERSON], inspired by the foraging behaviors of birds and fish [35]. Because of its simple concept, few parameters, fast convergence, and easy implementation, it is widely used in function optimization, production scheduling, pattern recognition, parameter estimation, and other fields. Let \(M\) particles form a group in a D-dimensional search space, and each particle is regarded as a search individual. They search for the individual that makes the objective function optimal in the search space. By changing their position and velocity vectors, they follow the individuals with higher fitness for optimization. In the \(t\)-th iteration, the position vector of each particle can be expressed as \(X_{i}(t)=(x_{i1},\,x_{i2},\,\ldots,\,x_{iD})^{T}\), and the velocity vector can be expressed as \(V_{i}(t)=(v_{i1},\,v_{i2},\,\ldots,\,v_{iD})^{T}\). The equations for PSO can be expressed as follows:\[ \begin{cases}v_{id}(t+1)=wv_{id}(t)+c_{1}rand_{1}(pbest_{id}-x_{id}(t))+c_{2}rand_{2 }(gbest_{d}-x_{id}(t))\\ x_{id}(t+1)=x_{id}(t)+v_{id}(t+1)\end{cases}  \tag{1}\]  
where \(w\) is the inertia weight; \(c_{1}\) and \(c_{2}\) are acceleration coefficients; \(rand_{1}\) and \(rand_{2}\) are two uniformly distributed random numbers generated within [0,1]; _pbest_ is the personal best point for the \(i\)-th particle; and _gbest_ is the global best point. The PSO algorithm has been widely popular because of its advantages of fewer computational memory requirements and fewer control parameters. However, it is easy to fall into the local minimum solution when solving complex nonlinear multimodal functions. In order to solve this problem, many scholars have made improvements in the inertial weight \(w\) and particle update formula. [PERSON] et al. first introduced a linear decreasing inertia weight \(w\) in the speed update term, which can better balance the global development ability and local exploration ability of the algorithm [36]. [PERSON] et al. pointed out that the solution process of the PSO algorithm itself is a nonlinear process, and the nonlinear change of inertia weight can better improve the performance of the algorithm [37]. Therefore, the study proposed a nonlinear inertia weight based on a Logistic chaotic map. In addition, the improvement of \(w\) is based on the cosine function, and the nonlinear change of \(w\) is based on the Sigmoid function [38; 39]. [PERSON] et al. replaced the individual optimum and group optimum in the particle velocity update formula with the linear combination of the two; that is, \(\frac{pbest_{id}+gbest_{d}}{2}\) and \(\frac{pbest_{id}-gbest_{d}}{2}\) are used to replace \(pbest_{id}\) and \(gbest_{d}\) in the particle velocity update formula, respectively [40]. The study proposed a mean particle swarm optimization algorithm (MeanPSO) to increase the search space of particles. The second term of the particle velocity update formula in Equation (1) becomes \(c_{1}rand_{1}(\frac{pbest_{id}+gbest_{d}}{2}-x_{id}(t))\), which is responsible for attracting a particle's current position towards the mean of the positive direction of the global best position (_gbest_) and the positive direction of its own best position (_pbest_). The third term of the particle velocity update formula in Equation (1) becomes \(c_{2}rand_{2}(\frac{pbest_{id}-gbest_{d}}{2}-x_{id}(t))\), which is responsible for attracting the current position of a particle to the mean of the positive direction of its own best position (_pbest_) and the negative direction of the global best position (\(-gbest\)). The relative position of the new positions generated by PSO and MeanPSO can be visualized in Figure 1.  
Figure 1 comes from [40]. This study in [40] points out that the MeanPSO algorithm outperforms the PSO algorithm in terms of efficiency, accuracy, reliability, and robustness.