# Optimization of Warehouse Operations with Genetic Algorithms
## 5 The Proposed Method
### Data Format and Problem Encoding
Figure 1:5 A sample warehouse structure (floor plan) of the warehouse w2 used in the experiments. Each numbered cell represents one product location. Blue lines show the distance of 1 unit, red lines of 2 units and green lines of 3 units. The number of iterations used by the genetic algorithm with the HGreX crossover is comparable to that required by other modern crossover operators to find the shortest route for comparable population size [34]. Even if running the optimization for more iterations may find a little shorter route, there is usually no further gain for the product placement cost, as this only very rarely triggers the change of product locations. For the very rarely occurring orders it is enough to run the optimization for fewer epochs or to use Nearest Neighbor Algorithm, independently of the order length, because the quickest improvement occurs at the beginning of the optimization and the influence on the optimal product placement of very rare orders is also very low, as they are dominated by the more frequent orders. Next we tested the usefulness of the multi-parent AEX crossover in product placement optimization. Since AEX does not use the cost of transitions between two elements, the parents for each element were chosen randomly. The results for a warehouse with 232 locations (chromosome length was 232 elements) are presented in Figure 1:6 Based on the experiments we concluded that it is enough to use two-parent AEX crossover in product placement optimization, as increasing the number of parents did not cause any gain and if the number was 20 or more, the drop in the method effectiveness was observed. Multiple restart of the product placement optimization with AEX crossover (MR-AEX) proved quite useful (see Algorithm 1). In the last row of Table 4 the optimization was restarted 5 times and each time it was run for 10 iterations and then we continued only with the population of the best individual, as described in Section 5.4.3. It allowed not only to obtain lower cost, but also the standard deviation of the results was about twice lower. In the experiments presented in Table 4 we used the population size of 100 individuals for product placement optimization. For order picking route optimization we used a size of 100 individuals if the number of items was 25 or more and four times the number of items for shorter orders. The reason for choosing that population size is based on this fact, that the main cost of genetic algorithms is the evaluation of the fitness function (especially for product placement optimization). The number of the fitness function evaluations can be expressed by the multiplying population size by the number of epochs. Using larger populations, we can obtain the same results in fewer epochs. For smaller populations we also need to increase the mutation rate. However, the dependence between the population size and number of required epochs is not linear and there exists an optimal population \begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline
**Number of Parents** & **2** & **3** & **4** & **6** & **8** & **10** & **14** & **20** & **35** & **50** & **80** & **NN** \\ \hline avg. \(lengthR\) & 325 & 323 & 320 & 315 & 310 & 312 & 315 & 321 & 326 & 331 & 339 & 355 \\ agv. \(iterR\) & 217 & 199 & 147 & 128 & 103 & 124 & 155 & 182 & 191 & 220 & 243 & - \\ std. dev. \(lengthR\) & 3.5 & 3.8 & 3.9 & 3.4 & 3.4 & 3.8 & 4.0 & 5.4 & 5.2 & 9.2 & 8.8 & - \\ std. \(iterR\) & 46 & 52 & 39 & 26 & 33 & 31 & 38 & 68 & 70 & 79 & 67 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 2: A sample route length \(lengthR\) and number of iterations \(iterR\) to obtain this length for a modified multi-parent HGreX crossover operator for an order of 60 products with fixed product placement (averages of 10 runs). \(NN\) in the last column denotes the result obtained for the Nearest Neighbor Algorithm.