# Optimization of Warehouse Operations with Genetic Algorithms
## 5 The Proposed Method
### Data Format and Problem Encoding
In order to keep the selection pressure constant and thus the exploration of the search space stronger at earlier stages and the convergence faster at later stages of the process [24] as well in product placement optimization as in the sub-process of order picking route optimization, we use use fitness

Figure 3: Product Placement Optimization (inner block of the algorithm shown in Figure 2). function normalization. Thus the cost of a given product placement and the lengths of the order picking routes are not used directly as fitness values, but they are re-scaled. We used roulette wheel selection as well for the product placement optimization as for the order picking route optimization. According to [PERSON] [25] and to our experiments, roulette wheel selection and tournament selection give comparable results. Also the selection pressure can be controlled in both (by number of candidates for a parent in tournament selection and by the shape of fitness function in roulette wheel selection). We chose roulette wheel selection for debugging purposes, as with this selection it was easier for to analyze the detailed algorithm behaviour and to fine-tune it. The cost of the \(i\)-th product placement \(costPP(i)\) expresses the sum of the shortest routes found for each order picking and is given by Equation (2):

\[CostPP(i)=\sum_{j=1}^{N_{diff}}N_{rep}(j)\cdot lengthR_{min}(j) \tag{2}\]

where \(N_{diff}\) is the number of different orders, \(N_{rep}(j)\) is the numbers expressing how many times the \(j\)-th order is repeated on the order list and \(lengthR_{min}(j)\) is the best (shortest) route found for the \(j\)-th order completion. The value \(costPP\) is used to assess the progress and the results of the optimization (see Figure 3). The fitness\(fitnessPP(i)\) of the \(i\)-th product placement used by the roulette wheel selection is given by Equation (3):

\[fitnessPP(i)=c_{1}+\frac{costPP_{max}-costPP(i)}{costPP_{max}-costPP_{min}}, \tag{3}\]

where \(c_{1}\) is a coefficient (the lower \(c_{1}\), the stronger preference for the individuals with lower cost), \(costPP_{max}\) is the maximal cost, \(costPP_{min}\) is the minimal cost and \(costPP(i)\) is cost of the \(i\)-th product placement in the population. The variable \(fitnessPP\) take larger values for better individuals to ensure that better individuals have higher probability of being selected as parents, while \(costPP\) take smaller values for better individuals, as they express the product placement cost, which equals the sum of lengths of the shortest routes. We use dynamic mutation probability (the probability of exchanging some places in the chromosome), which increases gradually during the optimization. Also the probability of mutation is higher for the individuals with lower fitness. This minimizes the chance of disrupting a high-fitness individual and enhanced the exploratory role of low-fitness individuals. Lower mutation rates also allow for more effective caching of the fitness values (see Algorithm 1). The effectiveness of this approach was based on various observations [26]. We use two different mutation operators--Reverse Sequence Mutation (RSM) with and Partial Shuffle Mutation (PSM) with the probability of applying RSM being three times higher. The choice of these mutation operators is based on the experimental study by [PERSON] et al. [27]. The total probability \(mutationProb(i)\) of applying mutation to the \(i\)-th chromosome is expressed by Equation (4). \[mutationProb(i)=(c_{i}\sqrt{iter}+c_{n}\cdot iter_{NBI})\frac{Fitness_{max}}{ Fitness(i)+c_{f}}, \tag{4}\]

where \(c_{i}\), \(c_{n}\) and \(c_{f}\) are coefficients, \(iter\) is the current iteration (epoch) of the genetic algorithm, \(iter_{NBI}\) is the number of iterations without improvement of the best individual. Default universal values of the coefficients for our purposes were experimentally set to \(c_{i}=0.00001\), \(c_{n}=0.00001\) and \(c_{f}=0.3\).