## 5 Supply Chain Partnership Integration Algorithm Based on the Hybrid Algorithm
### Updating Particles' Positions and Velocities  
PSO starts with a random set of particles, each of which corresponds to a potential solution [42]. Each particle has a position and velocity. The position of each particle is represented by a \(m\) dimensional vector in problem hyperspace \(x_{i}=(x_{i1},x_{i2},\cdots,x_{im}),i=1,2,\ldots,n\), which can be mapped into a supplier selection problem. \(x_{ij}\) represents that select node supplier \(j\) from stage \(i\) in the supply chain and supplier performance is evaluated based on the predefined optimization mathematical model \(z\big{(}x_{ij}\big{)}\).  
As particles have a memory function, each particle will update its velocity based on two values. One is the best value found by the particle itself, the other value is the best-known value found by the whole particle currently. The velocity update rule is shown as below:  
\[v_{ij}^{t+1}=\omega v_{ij}^{t}+c_{1}rand_{1}\big{(}\textit{{{pbest}}}_{ij}^{t} -x_{ij}^{t}\big{)}+c_{2}rand_{2}\big{(}\textit{{{gbest}}}_{ij}^{t}-x_{ij}^{t} \big{)} \tag{22}\]  
where \(x_{ij}^{t}\) is the current position of particle \(i\), \(t\) represents iteration index, \(\textit{{{pbest}}}_{ij}^{t}\) is the best position at iteration number \(t\), and \(\textit{{{gbest}}}_{ij}^{t}\) is the best position among all particles. Each particle of \(v_{ij}^{t}\) is in the interval \([-v_{\text{max}},v_{\text{max}}]\) to avoid excessive movement of particles out of the search space. \(rand_{1}\) and \(rand_{2}\) are two random variables distributed in the interval \([0,1]\), \(c_{1}\) and \(c_{2}\) are cognitive and social learning coefficient, and \(\omega\) is the inertial weight.  
For general PSO, inertial weight is a fixed constant and it can easily control an algorithm's search ability and convergence speed. It has an important impact on operation process in algorithm. The larger the inertia weight is, the stronger the global detection ability and the weaker local detection will be; while a smaller inertia weight is good at search the local area and can obtain more precise solutions. We introduce a linear inertia weight to improve the performance of PSO. This method is better at controlling the capability of global search and local search, and accelerating the convergence speed. The inertia weight is updated by:  
\[\omega=(\omega_{\text{max}}-\omega_{\text{min}})*\frac{t_{\text{max}}-t}{t_{ \text{max}}}+\omega_{\text{min}} \tag{23}\]  
where \(\omega_{\text{min}}\) and \(\omega_{\text{max}}\) represent the minimum and maximum of \(\omega\) respectively, and \(t_{\text{max}}\) is the maximum number of iterations. Particle \(i\)'s best position \(\textit{{{pbest}}}_{ij}^{t}\) is calculated as:  
\[\textit{{{pbest}}}_{ij}^{t}=\left\{\begin{array}{c}x_{ij}^{t+1},\text{ if }Z\big{(}x_{ij}^{t+1}\big{)}<Z\Big{(}x_{ij}^{t}\Big{)}\\ \textit{{{pbest}}}_{ij}^{t},\text{ otherwise}\end{array}\right. \tag{24}\]  
The global optimal position in the problem space at time \(t\) can be calculated as:  
\[\textit{{{gbest}}}_{j}^{t}\in\Big{\{}\textit{{{pbest}}}_{1j}^{t},\textit{{{ pbest}}}_{2j}^{t},\ldots,\textit{{{pbest}}}_{n}^{t}\Big{\}}\big{|}Z(\textit{{{pbest}}}_{ j}^{t})\Big{\}}=\min\Big{\{}Z(\textit{{{pbest}}}_{1j}^{t}),Z(\textit{{{pbest}}}_{2j}^{t}), \ldots,Z(\textit{{{pbest}}}_{nj}^{t})\Big{\}} \tag{25}\]The position of particles update rules is shown below:  
\[x_{ij}^{t+1}=x_{ij}^{t}+v_{ij}^{t+1} \tag{26}\]