# Genetic Algorithm for the Retailers' Shelf Space Allocation Profit Maximization Problem
## 6 Computational Experimental Results
### Genetic Algorithm vs. Cplex  
Tuning was performed without the improvement parameters and with the improvement procedure because the goal was to select the most profitable parameters regardless of the improvement procedure. The improvement procedure was applied in the second stage of the developed algorithm. Moreover, the aim was also to compare the quality of GA with and without the improvement procedure. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Parameter** & \multicolumn{5}{c}{**Product Number \(P\)**} \\  & **10** & **15** & **20** & **25** & **50** \\ \hline Crossover & & & & & \\ Crossover rate & 0.6 & 0.6 & 0.6 & 1.0 & 0.9 \\ Mutation & & & & & \\ Mutation rate & 0.02 & 0.1 & 0.01 & 0.01 & 0.01 \\ Mutation repeat rate & 0.1 \(P\) & 0.06 \(P\) & 0.05 \(P\) & 0.04 \(P\) & 0.02 \(P\) \\ Selection & & & & & \\ Selection method & T & T & TR & T & RW \\ Improvement & & & & & \\ Number of individuals to be moved & 0.4 \(P\) & 0.27 \(P\) & 0.2 \(P\) & 0.16 \(P\) & 0.08 \(P\) \\ Number of individuals to be paired & 0.2 \(P\) & 0.14 \(P\) & 0.1 \(P\) & 0.08 \(P\) & 0.04 \(P\) \\ Number of individuals to be improved & 1 & 1 & 1 & 1 & 1 \\ Iteration without improvement step & 1 & 1 & 1 & 1 & 1 \\ Max number of individuals to be improved & 2 & 2 & 2 & 2 & 2 \\ Max number of individuals & \(P\) & \(P\) & \(P\) & \(P\) & \(P\) \\ after improvement & & & & & \\ Termination condition (which ever & & & & \\ met earlier): & & & & & \\ Max number of iterations & 100 & 100 & 100 & 100 & 100 \\ Number iterations without improvement & 12 & 12 & 12 & 12 & 12 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Tuning parameters. As shown in Table 3, the Tournament selection method gives a more profitable result (without improvement). Because Tournament is a two-stage selection of the better results, it provides the least amount of different selected solutions in the end. The Two Rankings selection method selects the largest number of different solutions because they are based on the two sorted sequences. Roulette Wheel selects a medium number of distinct solutions because the most profitable solutions are selected more frequently. At this point, we predicted that Two Rankings would be the best choice to test the improvement procedure, and therefore we decided to test and compare all three selection methods. For evaluating the GA solution, 20 tests were done for each problem size instance. In this part of the paper, the following notation will be used:  
* GA\({}^{-}\)--GA without the improvement procedure;
* GA\({}^{+}\)--GA with the improvement procedure;  
Table 3 presents the quality of the GA\({}^{+}\) solution compared to the CPLEX solution. The best solution with the maximum total profit has been selected from the testing sets. CPLEX was run limited by the time taken for the result of GA\({}^{+}\) to be found. It should be noted that GA\({}^{+}\) with Two Rankings and GA\({}^{+}\) with Roulette Wheel were better in 18 cases out of 22. GA\({}^{+}\) with Two Rankings was better than CPLEX by approximately 1.83%, with its minimum and maximum values 0.05% and 7.03%, respectively. GA\({}^{+}\) with Roulette Wheel was better than CPLEX by approximately 1.53%, with its minimum and maximum values 0.03% and 7.05%, respectively. In three cases, CPLEX found the same solution as GA\({}^{+}\) with Two Rankings and GA\({}^{+}\) with Roulette Wheel. GA\({}^{+}\) with Tournament was also better in 16 cases out of 22 than CPLEX by approximately 3.49%, with its minimum and maximum values 0.03% and 27.07%respectively. In five cases, CPLEX found the same solution as GA\({}^{+}\) with Tournament. Figure 8 presents the computational time for the best solution of GA\({}^{+}\). GA\({}^{+}\) with Tournament was the fastest and found the solution on average in 2.52 min with its minimum 0.01 min and maximum 10.39 min values. GA\({}^{+}\) with Roulette Wheel was the slowest, averaging 3.29 min with its minimum and maximum solutions of 0.02 min and 40.63 min,