# Applying Particle Swarm Optimization Variations to Solve the Transportation Problem Effectively
## 4 The Basic PSO for Solving the TP
accumulated 21 optimal solutions, was less effective than TOCM-MT (65.62%); the BCE method, which achieved 27 out of 32 test instances (84.4%), proved to be the most efficient compared to all previously mentioned methods; the classic PSO, the TVAC, the TrigAC-PSO and the FSVAG-PSO achieve the optimum in 31 out of 32 test instances (96.88%), while the PWPSO achieves the optimum in 30 out of the 32 (93.76%). One significant finding of our research is that the new PSO variation, TrigAC-PSO, which is first presented in this study, achieved very good results. The following table (Table 3) examines the deviation of VAM, TDM1, TOCM-MT, JHM, BCE, PSO, DuPSO, TVAC, TrigAC-PSO and FSVAC-PSO. The measurement of deviation shows the difference between the observed value and the expected value of a variable, and it is given by the following formula:

\[Dev=\frac{x_{ij}-optimal}{optimal}, \tag{17}\]

where \(x_{ij}\) is the current solution. Considering Table 3 and Figure 2, it is evident that method VAM, TDM1, TOCM-MT and 1 HM appear to be more inefficient, deviating from the optimal solution at a significant scale. More precisely, the results of Table 3 show that the solutions achieved by VAM differ from the optimal solution by 5.29%, the results of TDM1 by 3.58%, the results of TPCM-MT by 1.4% and the results of JHM by 1.4%. BCE method presented higher levels of efficiency since the values of deviation were negligible. Analysis of the data of Table 3 reveals that the percentage of the deviation in classic PSO, as well as in its variations, was almost zero. Furthermore, the TVAC method was nearest to the optimal solution, followed by TrigAC-PSO, FSVAC-PSO and finally by DWPSO. \begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline  & **VAM** & **TDM1** & **TOCMMT** & **JHM** & **BCE** & **PSO** & **DWPSO** & **TVAC** & **TrigAC-PSO** & **FSVAC** \\ \hline



verage** & 0.05292 & 0.03583 & 0.014023 & 0.01405 & 0.002168 & 0.001946 & 0.000158 & 0.000013 & 0.000054 & 0.00011 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The deviation (dev) of the methods for 32 numerical examples. The findings from the current study provide us with the basic information for an extensive meta-analysis, allowing us to investigate which of the presented PSO variations has better performance in solving the TP. To serve this cause, many experiments were carried out which investigated different values of PSO population size (number of particles). The classic PSO, as well as each one of its variations (DWPSO, TVAC, TrigAC-PSO, FSVAC-PSO), were tested for 10, 15 and 20 particles for all 32 numerical examples. The results presented in Tables 4-6 show the performance of the classic PSO as well of its variations for 30 independent runs. The number of generations was stable and equal to 100 for all runs. Evidence from this study, presented in Table 4, expounds the accuracy rate of each algorithm for 10 particles. The accuracy rate is given by the following formulation:

\[Accuracy=\frac{TOR}{TR}\, \tag{18}\]

where \(TOR\) is the total number of runs where optimal solution was found and \(TR\) is the number of runs. Table 4 shows that the classic PSO obtained 38.33% accuracy rate. A significant increase in accuracy rate, using 10 particles, was evident in DWPSO, which achieved 59.58% accuracy, almost twice as much as the percentage of the classic PSO. Moreover, TVAC obtain a 61.45% accuracy rate. The best results came from TrigAC-PSO, since this PSO variation achieved a 62.81% accuracy rate. Last but not least, FSVAC achieved a 59.5% accuracy rate.