# Binary Cockroach Swarm Optimization for Combinatorial Optimization Problem
## 4 Simulation Studies
In order to validate the effectiveness of the proposed algorithm on the combinatorial optimization problem, its performance was investigated on the TSP instances as shown in Table 9. The experiments were run 10 times for each TSP instance, with a cockroach population size of 20 and a maximum iteration of 20,000. Sixteen instances of TSP with a different number of cities were solved, from 30-1432 cities. Figures 1-5 show the results of some of the experiments on instances of 30, 431, 535, 1060 and 1432 cities, respectively. Table 9 shows the summary of the results of the experiments; the instances of TSP solved are shown in the first column; the optimum solution length retrieved from the TSP library is shown in the second column; the column \"Best\" shows the length of the best solution found by the proposed algorithm; the column \"Average\" shows the average of the solution length for 10 independent runs; the column \"Worst\" shows the length of the worst solution found by the proposed algorithm; the percentage of deviation of the average solution length over the optimum solution length of 10 runs is shown in column \"% error on Average\"; the column \"% error on Best\" shows the percentage of deviation of the best solution over the optimal solution length of 10 runs, and the average time in seconds for 10 runs is depicted in column \"time\". \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**FN** & **DIM** & **Average** & **STD** & **Best** & **SRT** & **SP** \\ \hline \multirow{3}{*}{Sphere} & 3 & 2.6752 \(\times\) 10\({}^{-5}\) & 2.2209 \(\times\) 10\({}^{-5}\) & 1.7892E \(\times\) 10\({}^{-7}\) & 10/10 & 15,100 \\  & 5 & 2.9979 \(\times\) 10\({}^{-5}\) & 3.1602 \(\times\) 10\({}^{-5}\) & 2.5382 \(\times\) 10\({}^{-9}\) & 10/10 & 16,160 \\  & 10 & 2.4621 \(\times\) 10\({}^{-5}\) & 2.6383 \(\times\) 10\({}^{-5}\) & 1.7144 \(\times\) 10\({}^{-6}\) & 10/10 & 22,160 \\ \hline \multirow{3}{*}{Rosenbrock} & 3 & 2.8385 \(\times\) 10\({}^{7}\) & 8.8471 \(\times\) 10\({}^{7}\) & 2.6665 \(\times\) 10 \({}^{1}\) & 0/10 & - \\  & 5 & 1.9639 \(\times\) 10\({}^{8}\) & 4.1771 \(\times\) 10\({}^{8}\) & 1.2105 \(\times\) 10\({}^{4}\) & 0/10 & - \\  & 10 & 1.4063 \(\times\) 10\({}^{9}\) & 1.9187 \(\times\) 10\({}^{9}\) & 5.1766 & 0/10 & - \\ \hline \multirow{3}{*}{Griewangk} & 3 & 8.0108 \(\times\) 10\({}^{-1}\) & 7.3733 \(\times\) 10\({}^{-1}\) & 7.9784 \(\times\) 10\({}^{-6}\) & 4/10 & 93,875 \\  & 5 & 6.4033 \(\times\) 10\({}^{-1}\) & 6.1688 \(\times\) 10\({}^{-1}\) & 3.2160 \(\times\) 10\({}^{-6}\) & 4/10 & 108,935.50 \\  & 10 & 5.8016 \(\times\) 10\({}^{-1}\) & 6.1612 \(\times\) 10\({}^{-1}\) & 1.4066 \(\times\) 10\({}^{-6}\) & 5/10 & 106,200 \\ \hline \multirow{3}{*}{Rastrigin} & 3 & 1.9667 \(\times\) 10\({}^{3}\) & 5.0469 \(\times\) 10\({}^{3}\) & 3.1611 \(\times\) 10\({}^{-7}\) & 5/10 & 75,080 \\  & 5 & 5.3334 \(\times\) 10\({}^{2}\) & 7.5380 \(\times\) 10\({}^{2}\) & 2.6625 \(\times\) 10\({}^{-5}\) & 2/10 & 143,000 \\ \cline{1-1}  & 10 & 1.4396 \(\times\) 10\({}^{2}\) & 2.9803 \(\times\) 10\({}^{2}\) & 7.4533 \(\times\) 10\({}^{-7}\) & 7/10 & 55,469 \\ \hline \hline \end{tabular} FN, Function; DIM, Dimension; STD, Standard Deviation of the mean; SRT, Success Ratio; SP, Success Performance; \({}^{a}\).” indicates that SP cannot be computed because there is no successful run.  
\end{table} 
Table 6: Simulation results of the original CSO. The percentage deviation from the best solution is given as:  
\[Best-Error=\frac{|f(x^{*})-f_{minBest}|}{f(x^{*})}\times 100\% \tag{8}\]  
where \(f(x^{*})\) is the best-known tour from TSP library, and \(f_{minBest}\) is the best tour found. The percentage deviation from the average solution is given as:  
\[Average-Error=\frac{|f(x^{*})-f_{minAve}|}{f(x^{*})}\times 100\% \tag{9}\]  
where \(f(x^{*})\) is the best known tour from TSP library, and \(f_{minAve}\) is the average tour length for 10 independent runs. The proposed algorithm can solve optimally the instances of TSP evaluated.