# Optimization of Warehouse Operations with Genetic Algorithms
## 5 The Proposed Method
### Data Format and Problem Encoding
This ensures that the re-scaled proportion between the maximal and minimal fitness is constant during the optimization (see Section 5.2 for explanations). * Nearest Neighbor Algorithm. This is the fastest method. It also does not guarantee finding the best solution, and in application to our problem it usually finds worse solutions than genetic algorithms. To provide the optimal trade-off between the accuracy and the speed of the route optimization, the three above algorithms can be applied and the values \(Threshold1\) and \(Threshold2\) are used to determine, which particular algorithm will be used for a given order, depending on the number of products in the order (see Algorithm 2 and Figure 4). The number of possible order picking routes is equal to the number of permutations of a \(k\)-element set, which is \(k!\). If there are fewer than \(k=7\) products in a given order than it is faster to evaluate half of possible permutations (for \(k=6\) there are \(6!/2=360\) various routes to examine.) than to use genetic algorithms. For \(k=7\) we need to evaluate \(7!/2=2520\) permutations. On the other hand genetic algorithms are usually able to find the solution evaluating fewer routes (e.g., with population of 50 individuals and 10 iteration, what gives only 500 evaluations). However, genetic algorithms

Figure 1:2 A sample route (in red) connecting the locations 0, 4, 6, 2, 1, 12 determined with the Nearest Neighbor Algorithm. have additional time overhead for operations as selection, crossover, generating random numbers, and so forth. So for 7 products in the order the calculation time is comparable and for more than seven products, genetic algorithms are faster. Thus we propose to set \(\textit{Threshold}1=7\). As can be seen in Section 6, the results obtained with genetic algorithms with multi-parent HGreX crossover are better those obtained with Nearest Neighbor Algorithms. On the other hand Nearest Neighbor Algorithm is faster than genetic algorithms. However, its speed advantage is much higher in a single optimization of the route, where it can be two orders of magnitude faster. In our system, when the route optimization is an iteratively performed sub-process of the product placement optimization, the differences in speed between these two methods is much lower, below one order of magnitude. There are two reasons for that. The first one is that there is implemented cashing of the already calculated routes (see details in Section 5.4.2). The caching overhead is comparable to the computational effort of Nearest Neighbor Algorithm, so it can only accelerate the genetic algorithm based route calculation. The second reason is that the time of running the main process (product placement optimization) is the same in both cases. \(\textit{Threshold}2\) indicates above which number of products in the order Nearest Neighbor Algorithm should be used to optimize this order picking route. The recommendation to obtain the best results is to set \(\textit{Threshold}2\) to such high value that the Nearest Neighbor Algorithm will not be used at all (e.g., \(\textit{Threshold}2=1000\)). However, if our data is very big and computational and time resources are limited, we can set \(\textit{Threshold}1=0\) and \(\textit{Threshold}2=0\) and thus only the Nearest Neighbor Algorithms will be used for the route optimization. Sometimes it happens that there are only very few long orders (e.g., two orders of 50 products and all remaining orders below 20 products), so these few orders will not have significant influence on the final product placement and we can use Nearest Neighbor Algorithm for them to accelerate the calculations and genetic algorithms for all other orders (in this case by setting for example, \(\textit{Threshold}2=30\)).