# An Enhanced Particle Swarm Optimization (PSO) Algorithm Employing Quasi-Random Numbers
## 3 Results
### Test Cases
Similarly, this process is carried out for the second term and the third term with \(\alpha\) and Beta instead of \(\omega\). These three random numbers are generated together to maintain the k-dimensional uniformity of the quasi-random number sequence when Halton or SOBOL is used. Through the usage of this swapping method, the optimal order in which the cities must be visited is attained. For the \(i^{th}\) particle at the iteration index \(n\), to update the velocity, the following equation can be used. \[ \begin{split}& th:\\ & v_{n+1}^{i}=\big{\{}\omega*v_{n}^{i}\big{\}}\bigoplus\big{\{} \alpha*\big{(}P_{n}^{i}-X_{n}^{i}\big{)}\big{\}}\bigoplus\Big{\{}\beta*\Big{(} G_{n}^{j}-X_{n}^{i}\Big{)}\Big{\}}\end{split}  \tag{13}\]  
_Hence, \(v_{n+1}^{i}\) is a set of swaps._  
Here, the \(\oplus\) is the merging operator, which merges sequences of swaps into a new swap sequence. \[\alpha<1,\beta<1\text{ and }\omega<1 \tag{14}\]  
For the \(i^{th}\) particle at the iteration index \(n\), we can apply the new updated velocity \(v_{n+1}^{i}\) to the current position \(X_{n}^{i}\), ( which is a set of node sequences or a node list in TSP) and obtain the updated position \(X_{n+1}^{i}\). \[X_{n+1}^{i}=X_{n}^{i}\xleftarrow{\text{$A^{\text{$A$P$S$S$S$S}}}}v_{n+1}^{i} \tag{15}\]  
For \(\omega*v_{n}\), if \(v_{n}\) is a vector of L elements to begin with, then L random numbers are generated and for each random number that is less than \(\omega\), the corresponding swap in \(v_{n}\) is used. \(\big{(}P_{n}^{i}-X_{n}^{i}\big{)}\) is a swap sequence to move from \(X_{n}^{i}\) to \(P_{n}^{i}\). For example, if \(P_{n}^{i}\) is \(\{3,4,5,2,1\}\) and \(X_{n}^{i}\) is \(\{5,3,4,1,2\}\), the set of swaps needed to move from\(X_{n}^{i}\) to \(P_{n}^{i}\) is \(\{(1,3),(3,2),(4,5)\}\) (assuming that indices start from 1). \(\alpha*\big{(}P_{n}^{i}-X_{n}^{i}\big{)}\) is a set of swaps that are selected from the swap sequence vector \(\big{(}P_{n}^{i}-X_{n}^{i}\big{)}\) of length N based on the N random numbers generated that are less than \(\alpha\). During initialization, for each particle \(i\), \(X_{0}^{i}\) is set to a random selection of cities whose IDs are the city node index. If there are N cities to be visited, then \(X_{0}^{i}\) is a vector of length N.  
The following are tables comparing the results produced by Monte Carlo random number sampling with Sobol random number sampling and Halton random number sampling. **Sobol vs. Monte Carlo Random Numbers**  
We compare the performance of using SOBOL versus conventional random number approaches based on PSO for the three functions (continuous and mixed variable form) in Tables 2-7. In addition, we also compare the SALP algorithm for the continuous ellipse and paraboloid and mixed variable ellipse and paraboloid function optimizations. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Number of Dimensions**} & \multirow{2}{*}{**PSO Enhanced** **(Iterations)**} & **PSO** **Enhanced** & **PSO** **Enhanced** & **PSO** **Enhanced** & **PSO** **Enhanced** & **Iterations’** \\  & & **Conventional** & **Standard** & **Standard** & **Compute** & **Compute** & **Improvement** \\  & & **(Iterations)** & **Deviation** & **Deviation** & **Time (secs)** & **Time (secs)** & **Time (secs)** & **Percentage** \\ \hline
5 & 85 & 107 & 1.9 & 5.1 & 0.31 & 0.37 & 21\% \\ \hline
10 & 167 & 193 & 2.4 & 6.3 & 0.46 & 0.68 & 14\% \\ \hline
15 & 183 & 312 & 5.2 & 30.5 & 0.69 & 1.1 & 42\% \\ \hline
20 & 231 & 447 & 26.5 & 30.1 & 0.87 & 1.6 & 49\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of performances of both Monte Carlo and Sobol random number samplings in PSO for the continuous variable Cigar function.