# Solving the Fuzzy Transportation Problem by a Novel Particle Swarm Optimization Approach
## 5 Particle Swarm Optimization (PSO)  
The particle swarm optimization (PSO) algorithm stands out as a contemporary and innovative heuristic approach, gaining widespread popularity over the years due to its straightforward implementation and ability to yield satisfactory solutions [26]. The PSO algorithm is inspired by the collective behavior of animals from studying their interactions to function, resulting in a strong approach that handles optimization challenges in various applications [27]. In the PSO framework, every potential solution is represented as a particle, and the complete set of particles constitutes the algorithm's population, known as swarm. The optimization process relies heavily on collaboration and exchange of information, with the particles improving their effectiveness through active cooperation within the swarm. Sharing information within the swarm, particles are empowered to consistently enhance their performance, striving towards optimal efficiency. In finer detail, each particle modifies its movement according to its own experience and its neighboring particle's experience. A particle is defined by three essential parameters:  
* Position, which indicates its location in the search space;
* Velocity, which dictates the direction and extent of particle movement;
* Its previous best position, which operates as a memory mechanism for the positions that the particle has already \"visited\". Consequently, in an \(n\)-dimensional search space, each particle of the swarm is represented by \(x_{ij}=\big{(}x_{i1},\;x_{i2},\;\ldots,\;x_{ij}\big{)}\), and the equation of its position is as follows:  
\[x_{ij}(t+1)=x_{ij}(t)+v_{ij}(t+1),\;i=1,\;2,\;n\;\text{and}\;j=1,\;2,\ldots n \tag{9}\]  
where  
* \(x_{ij}(t+1)\) is its current position;
* \(x_{ij}(t)\) is its previous position;
* \(v_{ij}(t+1)\) is the velocity in the current iteration \((t+1)\). In sequence, the particle's velocity is represented as \(v_{ij}\), and its expression is determined by the following equation:  
\[ \begin{split} v_{ij}(t+1)=wv_{ij}(t)+c_{1}r_{1}\Big{(}pbest_{ij} \left(t\right)-x_{ij}\left(t\right)\Big{)}+c_{2}r_{2}\Big{(}gbest_{ij}\left(t \right)-x_{ij}\left(t\right)\Big{)},\\ i=1,\;2,\ldots n\;\text{ and }j=1,\;2,\ldots n\end{split}  \tag{10}\]  
* where \(v_{ij}(t+1)\) represents the velocity of the particle in the current iteration, while \(v(t)\) is the velocity in the previous iteration;
* \(w\) denotes the inertia weight, balancing global and local exploitation by incorporating the memory of the previous particles' direction to prevent major changes in suggested directions;
* \(r_{1}\) and \(r_{2}\) are variables, randomly generated from uniform distribution, in the range \([0,\;1]\);
* \(c_{1}\) and \(c_{2}\) are defined as acceleration coefficients, impacting the efficiency of the PSO method. More precisely, \(c_{1}\) signifies the particle's confidence in itself, while \(c_{2}\) expresses the particle's confidence in the swarm;
* \(pbest_{ij}\left(t\right)\) denotes the best position of the particle up to iteration \(t\), while \(gbest_{ij}\left(t\right)\) is the finest position of the entire swarm up to the same iteration;
* The term \(c_{1}r_{1}\Big{(}pbest_{ij}(t)-x_{ij}\left(t\right)\Big{)}\) is known as the cognitive component, acting as a form of memory storing the particle's best previous positions. The cognitive component reflects the tendency of the particles to return to their best positions;
* The term \(c_{2}r_{2}\)\(\Big{(}gbest_{ij}(t)-x_{ij}\left(t\right)\Big{)}\) is known as the social component. In this context, particles follow the guidance of the swarm's best position, incorporating knowledge acquired from the swarm. The acceleration coefficients \(c_{1}\) and \(c_{2}\), along with random variables \(r_{1}\) and \(r_{2}\) significantly influence the evolution of the cognitive and social components, determining the velocity value, which is crucial for the search direction of the particles and the convergence of the algorithm.