# Optimization of Warehouse Operations with Genetic Algorithms
## 2 Problem Statement  
The product placement determines the locations (usually shelves) of particular products in the warehouse. We define the cost of a product placement as the sum of the shortest order picking routes over all orders included in the order list for this product placement (Equation (1)). The assumption behind that is that if robots are used to collect the orders, then they will exactly follow the shortest routes found. If humans pick the orders, they will in most cases follow the same routes, however, sometimes they may decide to change the path. This can be however treated as random process and thus cannot be taken into account in the optimization.  
\[Cost=\sum_{n=1}^{N_{ord}}\cdot Route_{min}(n), \tag{1}\]  
where \(N_{ord}\) is the number orders in the order list and \(Rout_{min}(n)\) is the shortest order picking (order completion) route found for the \(n\)-th order.  
The problem to solve is to find a product placement with with as low cost as possible. In other words we need to minimize the cost given by Equation (1) by proper products placing at particular locations in a warehouse.  
For that purpose we developed the product placement optimization algorithm, which we describe in the following sections.  
The inputs to the algorithm are:  
* warehouse layout in the form of transition costs between neighboring locations
* the list of orders The outputs of the algorithm are:
* the optimized product placement in the warehouse
* shortest order picking routes for each order from the order list for the optimized product placement in the subsequent sections. The order list contains all considered orders, which should be the orders expected in a certain future period of time. In most cases these can be the past orders, as we can expect that the future orders will have the same distribution of products. Otherwise these can be the past orders from a corresponding season of the last year or the predicted future orders. Each order consists of several (at least one) products. To complete the order, the locations of all the products that are included in the order must be visited and the products must be picked. Thus a sub-problem of the main problem of product placement optimization is to find the quickest (shortest) order completion route for each order. This is necessary, as the sum of the quickest order picking routes is the main objective that we want to minimize by optimizing the placement of particular products in the warehouse.  
This sub-problem of finding the quickest order completion route is equivalent to the Traveling Salesman Problem (TSP). While, the whole optimization of product placement is a different, much more complex problem. The main differences are:  
1. In product placement optimization, the task is to find optimal product locations. In TSP the task is to find the shortest route connecting all considered locations.
2. In product placement optimization, the cost function that we use is the sum of the shortest order picking routes for a given product placement (Equation (1)). In TSP the cost function is the length a single route connecting all considered locations.
3. Product placement optimization is a two-level nested task, where the main (outer) process is the product placement optimization itself and the inner process calculates the cost (fitness) of each considered product placement by finding the shortest order picking routes and then summing them to obtain the cost. TSP is a single level problem, without any nested optimization.
4. In product placement optimization the methods developed especially for TSP as nearest neighbor, or HGeK crossover in genetic algorithms cannot be used in the main process, because we do not look for any route, there does not exist any sequence of locations and there is no such a concept as \"go to the next location\", which the methods use.