# Binary Cockroach Swarm Optimization for Combinatorial Optimization Problem
## 4 Simulation Studies  
This section presents the performance of the proposed BCSO on different optimization problems, and comparisons are made with other meta-heuristic algorithms. The BCSO algorithm was implemented in MATLAB 7.14 (R2012a) and run on a computer with a 2.30-GHz processor with 4.00 GB of RAM. The performance of BCSO was first investigated on the minimization of benchmarks: Sphere, Rosenbrock, Griewangk and Rastrigin described by Equations (2)-(5), which many researchers have used for evaluating and comparing optimization algorithms. The optimum value for each benchmark is zero (0). 1 Sphere Function \[f(x)=\sum_{i=1}^{n}{x_{i}}^{2}\] (2)
2 Rosenbrock Function \[f(x)=\sum_{i=1}^{n-1}{[100(x_{i+1}-x_{i}^{2})^{2}+(1-x_{i})^{2}]}\] (3)
3 Griewank Function \[f(x)=\frac{1}{4000}\sum_{i=1}^{n}{x_{i}^{2}}-\prod_{i=1}^{n}{\cos(\frac{x_{i }}{\sqrt{i}})}+1\] (4)
4 Rastrigin Function \[f(x)=\sum_{i=1}^{n}[x_{i}^{2}-10\cos(2\pi x_{i})]+10\] (5)  
The dependence of the results on the parameters was thoroughly studied experimentally, and the selected values are those that give the best results in terms of solution quality and computational time. The stability of the swarm is enhanced by the parameter inertial weight \(w\), which controls the movement of cockroaches and helps the algorithm to avoid swarm explosion. Similarly, parameter \(step\) manages the step size of the cockroach agent in iterations towards the best solution in the local neighborhood and eventually towards the global best solution in the entire given search space. This enhances exploitation and exploration within the given region. Experiment parameters are as follows: D is the dimension of the search space for the selected benchmarks; D is set to 3, 5 and 10 with a maximum iteration of 1000; the cockroach range is set to \([-50,50]\); population size \(N=100\); perception distance \(visual=5\); step size \(step=2\); inertial weight \(w=0.618\); time \(t=5\), and dispersion coefficient \(g=20\). The hunger threshold \(hunger=0.5\), \(hunger\), is a randomly-generated number in the uniform interval \([0,1]\); speed controller \(c=5\); and food locations \(x_{food}\) are initialized randomly. Each experiment was run 10 times, and the Success Ratio (SRT), Success Performance (SP), average and best minimum optimum values are shown in Table 2. The numerical results of BPSO are adopted in [27]. During experiments, we noticed that BCSO was consistent in each iteration. This is proven by the low Standard Deviation (STD) of the minimum optima values of the algorithms shown in Table 2. The SRT of the BCSO algorithm on the selected benchmarks was evaluated during the experiments. A run is considered successful if an algorithm can find the optimal solution for a given problem. The SRT of an algorithm is determined by the number of successful runs out of the total number of runs [28]. SRT was computed using Equation (6). \[SRT=\frac{SR}{TR} \tag{6}\]  
where \(SR\) denotes the number of successful runs and \(TR\) denotes the number of total runs. The algorithm has a 100% success rate on the benchmarks. The results of SRT for the BCSO algorithm are shown in Table 2. Likewise, the SP of the BCSO was computed during experiments. SP can be used to estimate the number of function evaluations needed for an algorithm to successfully solve a problem [28; 29]. SP was computed using Equation (7). \[SP=Mean(FEs)\times\left(\frac{TR}{SR}\right) \tag{7}\]where _FEs_ is the function evaluations of successful runs, \(TR\) denotes the number of total runs and \(SR\) denotes the number of successful runs. The results of SP for the BCSO algorithm are shown in Table 2.  
A performance comparison of BCSO with that of BPSO was done on the average minimum optimum values. Table 3 shows the comparison results of BCSO and BPSO [27]. BCSO is shown to have a better performance than BPSO. In addition to the basic statistical analysis carried out, the Mann-Whitney U-test was conducted in this paper for comparison of the average performanceob BCSO and BPSO algorithms.