# Genetic Algorithm for the Retailers' Shelf Space Allocation Profit Maximization Problem
## 6 Computational Experimental Results
### Genetic Algorithm vs. Cplex
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Products**} & \multirow{2}{*}{**Shelf Width**} & \multicolumn{2}{c}{**Two Rankings**} & \multicolumn{2}{c}{**Roulette Wheel**} & \multicolumn{2}{c}{**Tournament**} \\  & & **CPLEX Is Better** & **GA Is Better** & **CPLEX Is Better** & **GA Is Better** & **CPLEX Is Better** & **GA Is Better** \\ \hline \multirow{4}{*}{\(10\)} & 100 & \(1.57\%\) & & \(1.57\%\) & & 1.57\% \\  & 200 & \(7.03\%\) & & \(7.03\%\) & & 14.31\% \\  & 250 & \(6.80\%\) & & \(7.05\%\) & & 7.05\% \\  & 375 & \(5.92\%\) & & \(6.15\%\) & & 27.07\% \\  & 500 & \(0.26\%\) & & \(0.26\%\) & & \\ \hline \multirow{4}{*}{\(15\)} & 100 & \(1.24\%\) & & \(1.24\%\) & \\  & 200 & \(1.35\%\) & & \(1.02\%\) & & 1.35\% \\  & 250 & \(0.27\%\) & & \(0.18\%\) & & 0.18\% \\  & 375 & \(5.20\%\) & & \(0.83\%\) & & 0.83\% \\  & 500 & \(0.50\%\) & & \(0.22\%\) & & \\ \hline \multirow{4}{*}{\(20\)} & 100 & \(1.0\%\) & & \(0.86\%\) & & 0.86\% \\  & 200 & \(0.45\%\) & & \(0.40\%\) & & 0.36\% \\  & 375 & \(0.49\%\) & & \(0.49\%\) & & 0.46\% \\  & 500 & \(0.26\%\) & & \(0.42\%\) & & 0.42\% \\ \hline \multirow{4}{*}{\(25\)} & 200 & \(0.05\%\) & & \(0.05\%\) & & 0.05\% \\  & 250 & \(375\) & \(0.13\%\) & & \(0.20\%\) & & 0.17\% \\  & 500 & \(0.49\%\) & & \(0.49\%\) & & 0.41\% \\ \hline \multirow{4}{*}{\(50\)} & 250 & \(1.05\%\) & & \(0.03\%\) & & 0.03\% \\  & 500 & \(0.30\%\) & & \(0.21\%\) & & 0.77\% \\ \hline \multirow{4}{*}{\(50\)} & Min & \(0.05\%\) & & \(0.03\%\) & & 0.03\% \\  & Avg & \(1.83\%\) & & \(1.53\%\) & & 3.49\% \\ \cline{1-1}  & Max & \(7.03\%\) & & \(7.05\%\) & & 27.07\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Quality of the best solution of GA\({}^{+}\) compared to the CPLEX solution (Time_CPLEX = Time_GA). respectively. GA\({}^{+}\) with Two Rankings found the solution in 2.81 min on average, with its minimum 0.02 min and maximum 27.15 min values. The question arises: why are the results for GA\({}^{+}\) with Tournament for the set of 10 products and shelf sizes 200 cm and 375 cm so much higher (14.31%, 27.07%) than the CPLEX solution compared to the other methods? As written above, the Tournament selection method gives the least number of distinct solutions. The bulk of the time is spent in checking and correcting the solution, i.e., if the criteria are not met, the procedure deletes redundant product items, and then the procedure adds product items where the requirements are met. The problem for allocating 10 products is easy enough compared to larger product sets; the Tournament selection gives fewer product permutations. Thus, fewer solutions need to be checked and corrected. That is why GA\({}^{+}\) faster finds the result (1 s for 375 cm for GA\({}^{+}\) with Tournament compared to 2 s both for GA\({}^{+}\) with Two Rankings and GA\({}^{+}\) with Roulette Wheel). Thus, in 2 s, CPLEX found a significantly better solution than in 1 s. A similar situation is with 200 cm shelves. Here GA\({}^{+}\) with Tournament found the solution in 2 s, but GA\({}^{+}\) with Tournament compared to 2 s for GA\({}^{+}\) with Two Rankings and GA\({}^{+}\) with Roulette Wheel, found the solution in 3 s and 4 s, correspondingly. N.B. : CPLEX accepts seconds as integers, so the GA solution time was rounded. For the case with 15 products and 100 cm shelves, the CPLEX solution was better by 1.24% for all GAs\({}^{+}\). Table 4 presents the quality of the GA\({}^{+}\) solution compared to the CPLEX solution. As previously, the best solution with the maximum total profit was selected from the testing sets. CPLEX was run, limited by the maximum time in which the result of the GA\({}^{+}\) was found. Figure 8: The computational time for the best solution of GA\({}^{+}\) in [s]. It should be noted that GA\({}^{+}\) with Two Rankings and GA\({}^{+}\) with Tournament were better in 14 cases out of 22, GA\({}^{+}\) with Roulette Wheel was better in 15 cases.