# An Enhanced Particle Swarm Optimization (PSO) Algorithm Employing Quasi-Random Numbers
## 3 Results  
### Test Cases  
To perform simulation and to estimate the standard deviations and the computation times, all the following algorithms were on a Windows 10 laptop equipped with an i7 core processor and with inbuilt 16 GB RAM. The simulations were run for 50 iterations and averaged to estimate the elapsed time. The computation elapsed times were estimated using the times associated with the start time and end time of the algorithm execution. These elapsed times were averaged across multiple runs and were used to measure the average elapsed time. The mean values for the number of iterations were estimated and rounded to provide the number of iterations in the following tables. All PSO variants implemented the mutation scheme that used uniformly generated random numbers. To test the efficiency improvements of the enhanced PSO suggested in this paper, both mixed and continuous versions of three well-known benchmark functions, namely the Cigar, Ellipsoid, and Paraboloid functions, along with the famous Travelling Salesman Problem, were taken as test cases (Table 1). Three algorithms consisting of one PSO code with no enhancement (using Monte Carlo random number samplings), a second PSO code that uses Sobol random number samplings, and a third PSO code that uses Halton random numbers each ran for 5, 10, 15, and 20 decision variables to optimize both the mixed and continuous versions of the three benchmark functions and to solve the TSP problem. The number of iterations taken to achieve an optimum is recorded for all three algorithms to reach the global optimum. Traveling Salesman Problem Optimization Procedure  
The Traveling Salesman Problem is a discrete combinatorial optimization problem [12; 13; 14; 15]. The locations of many cities are given, and an optimal order in which the cities are traversed is calculated. A position vector is the suggested order of cities. The velocity vector is a sequence of two-element tuples in which each tuple consists of two indices of elements to be swapped to make the path more optimal. For example, if there are five cities labeled with indices {1, 2, 3, 4, 5}, the population matrix could consist of different suggested orders in which they are to be traversed, such as {2, 4, 3, 5, 1} and {5, 4, 3, 1, 2}. The velocity vector for the first suggested order of cities could be {(1, 2), (3, 2), (4, 5)}, while for the second, it could be {(5, 1)}. In this case, the first element would be swapped with the second, the third with the second after that, and the fifth with the fourth after that, in the first suggested sequence of cities. For the second, the fifth and first elements are to be swapped. \begin{table}
\begin{tabular}{l l l} \hline \hline  & **Function** & **Formula** & **Range** \\ \hline \multicolumn{3}{l}{Continuous Optimization Problems} \\ \hline
1 & Cigar & \(f(x)=x_{1}{}^{2}+10^{4}\sum\limits_{i=2}^{NC}x_{i}{}^{2}\) & \([-3,\,3]^{NC}\) \\ \hline
2 & Parabolic & \(f(x)=\sum\limits_{i-1}^{NC}x_{i}{}^{2}\) & \([-3,\,3]^{NC}\) \\ \hline
3 & Ellipsoid & \(f(x)=\sum\limits_{i-1}^{NC}5^{\frac{i-1}{NL}}x_{i}{}^{2}\) & \([-3,\,3]^{NC}\) \\ \hline \multicolumn{3}{l}{Mixed-Variable Combinatorial Optimization Problems} \\ \hline
4 & Cigar & \(f(x,\,y)=x_{1}{}^{2}+10^{4}\sum\limits_{i=1}^{ND}x_{i}{}^{2}+y_{1}{}^{2}+10^{4} \sum\limits_{i=2}^{ND}y_{i}{}^{2}\) & \([-3,\,3]^{NM}\) \\ \hline
5 & Parabolic & \(f(x,\,y)=\sum\limits_{i=1}^{NC}x_{i}{}^{2}+\sum\limits_{i=1}^{ND}y_{i}{}^{2}\) & \([-3,\,3]^{NM}\) \\ \hline
6 & Ellipsoid & \(f(x,\,y)=\sum\limits_{i=1}^{NC}5^{\frac{i-1}{NL}}x_{i}{}^{2}+\sum\limits_{i=1}^{ ND}5^{\frac{i-1}{NL}}y_{i}{}^{2}\) & \([-3,\,3]^{NM}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Test cases for algorithm testing [11]. \(\omega\), \(\alpha\), and \(\beta\) are pre-determined constants used in this algorithm. A random number is generated for each swap in the previous velocity vector. For each random number that is less than \(\omega\), the corresponding swap is included in the new velocity vector.