Genetic Algorithm Based Storage and Retrieval System Optimization Considering Operational Constraints in a Multidimensional Warehouse

Efficient use of warehouse resources is an important issue that makes them more manageable and useful, also helps product flow faster. In multidimensional warehouses with many constraints such as weight, volume, product compatibility, etc., storage and retrieval processes are complex optimization problems that need to be solved. Considering the number of constraints, the solution to the storage and retrieval problems with traditional algorithms take a long time. Meta-heuristic algorithms are frequently used in the solution of many complex optimization problems as they can provide acceptable solutions in a short time. In this study, the Genetic algorithm which is one of the popular meta-heuristic methods was used to solve this problem, and the A-star algorithm was used to travel the shortest path between the shelves. A three-dimensional warehouse with operational constraints was designed. Storage and retrieval orders containing a different number of pallets were produced randomly to perform warehouse product flow, and some of these orders were assumed as storage requests and the remainder were retrieval requests. Results show that the proposed approach is capable of finding effective solutions for storage and retrieval problems with operational constraints in a short time.


Introduction
Storing products using manpower and deciding which product to take based on the retrieval order were increasing operating costs within the warehouse before using automated systems. Automated storage and retrieval systems are important to minimize operating costs and to aim to get maximum efficiency from the warehouse area [1]. With these systems, the product circulation time has been reduced compared to the warehouses decided by manpower and the losses in the products stored incorrectly due to operational constraints have been minimized.
When different types of warehouses are examined, many constraints are encountered while storing and retrieving products within the warehouse [2]. In some warehouses, it is undesirable to store two different types of products on adjacent shelves. For example, it is not preferred that a food product and a cleaning product be on adjacent shelves in the warehouses. Due to these and such constraints where manpower is used, losses may occur in products during the storage.
Another constraint is the selection of products based on the shelf life at the retrieval process. While meeting the retrieval request, the product with the closest shelf life should be preferred. When this and many other constraints are taken into consideration, the use of storage-retrieval systems developed with today's technology has become obligatory in order to reduce operating costs. Warehouse management systems are software systems that assist the business in many areas such as storing, counting, retrieving, and making monthly reports. Information about empty and full shelves is obtained from warehouse management systems during the storage and retrieval stages of the products [3].
There are many studies in the literature related to storage and retrieval systems. Roodbergen and Vis [4] summarized many studies on storage and retrieval systems, including location assignment. Kazemi et al. [5] addressed concurrent storage and retrieval system and storage location assignment. They proposed a solution combining an ant colony algorithm and an adaptive large neighborhood search. Yang et al. [6] examined storage location assignment and storage and retrieval scheduling in multi-shuttle storage and retrieval systems based on a variable neighborhood search algorithm. Van Den Berg and Gademann [7] studied a storage location assignment policy that shortens travel distance and compared some storage location assignment policies. Kasemset and Sudphan [8] proposed two different models which are mathematical model and class-based policy for use in a plastic bag manufacturer's warehouse. The main purpose of the study is the storage assignment using the proposed methods.
Decision making is a difficult optimization problem for the storage and retrieval of products, because the warehouse systems have multiple constraints, and the warehouses are multi-dimensional structures such as width, height, depth. So, heuristic methods are preferred instead of mathematical models in some studies. Hackman and Rosenblatt [1] have developed a method for the storage process with a heuristic approach to reduce the operating cost. They checked the success of the heuristic method with a priori and posteriori tests. Heragu et al. [9] proposed a study that divides the warehouse they use into functional sections such as order collation area, reserve storage area and cross-docking. In their work, they presented a heuristic approach and a mathematical model for product allocation to these functional sections. Guerriero et al. [10] proposed a mathematical linear formulation for the products allocation problem in a multilayer warehouse with compatibility constraints among the classes. They used an iterated local search-based heuristic to solve large scale scenarios within a reasonable time. Sanei et al. [11] aimed to use the warehouse area optimally considering various operational constraints and to decrease the transportation time during storage and retrieval processes. They presented a linear integer programming and a heuristic model in their work. Hu et al. [12] tried to solve the storage position allocation problem using the artificial bee colony algorithm in their work. El Hiri et al. [13] proposed a Genetic Algorithm (GA) based model to solve order allocation quantities problem according to their needs in a multi-supplier environment.
In this study, unlike the studies in the literature, a complex warehouse management system optimization with more constraints was carried out. Storage and retrieval under many constraints were successfully performed using GA. In the storage process, the minimum distance between the products was taken into consideration and the short distance between the shelves was calculated using the A-star algorithm (A*).

Problem Description
In storage and retrieval systems, determining the storage and retrieval locations of products for multi-dimensional warehouses with multiple constraints is a complex optimization problem. The GA-based approach proposed in the study can successfully process orders considering operational constraints.
While moving products in warehouses, operations are made based on units such as quantity, weight, length, or pallets. In this study, the pallets with different sizes formed by the combination of the same type of product group is used as storage and retrieval unit. 5 different types of products have been determined to be used in storage and retrieval orders. Each order consists of a different number of pallets. There can be multiple pallets of the same product in orders. The top view of the multi-dimensional warehouse created in the study is given in Figure 1. Experimental studies were carried out for the storage and retrieval system in the study, considering the real-life constraints. Depending on the constraints, it was aimed that the products were placed in the most suitable places for storage and taken from the most suitable places at the output for retrieval. If there were no constraints, storage and retrieval orders would be initiated from the place closest to the output gate.

Storage and Retrieval System Constraint
The constraints considered during the storage and retrieval process in this study are described below.
• A maximum number of pallets: If a product is stored more than the specified amount, spoilage may occur due to shelf life and expiry dates. For this reason, it should not be allowed to store any product over a specified limit. • A minimum number of pallets: It is not desirable that the quantity of any product falls below the specified value in the warehouse. If the suppliers need the product in large numbers urgently, the request cannot be met. If any product is below the specified limit, it should not be allowed to retrieve without storing it from the same product to the limit value. In the case of below the limit, a storage order should be sent to the relevant supplier. • Product size: Shelves and pallets used in warehouses may have different sizes. If the height or width of the shelf is smaller than the height or width of the pallet, it is not allowed to match the shelf with the product. • Product weight: All pallets have not the same weight due to the variety of materials carried. Shelves may also have different carrying capacities. If the maximum carrying capacity of a shelf is smaller than the weight of the pallet, it is not allowed to match the shelf with the pallet. • Closeness: The same products can be on multiple pallets in the warehouse. It is important to place products of the same type as close as possible to each other to make the retrieval process faster. • Environment (warm, cold, moisture): Some areas in the warehouse may cause some products to deteriorate quickly. Shelves in this area should be marked as prohibited for these products. For example, if moisture occurs in a particular area of the warehouse, paper products cannot be stored here. • Retrieval frequency: Storing the product close to the output gate means that the retrieval can be done faster. The more often a product has a retrieval process, the closer it should store to the output gate. • Product compatibility: It is not recommended to place it on adjacent shelves in the warehouse, as some products can create problems with each other. For example, cleaning and food products may not be desired to come to adjacent shelves. • Shelf life: Each stored product has a shelf life that can vary depending on the product type. During the storage processes, the choice of the first stored products means that the product with the nearest shelf life is sent from the warehouse. The selection of the products according to their order of storage is also one of the constraints to be taken into consideration in the retrieval process.

Proposed Method
In the study, A GA based approach is proposed that can perform storage and retrieval operations in accordance with warehouse constraints. GA, which is a meta-heuristic search method, is a robust search technique used in the literature for the solution of complex optimization problems [14]. It simultaneously evaluates many points as a parallel in the search space, thus it can reach the desired solutions faster [15].
GA [16] inspired by evolutionary processes is a population-based algorithm which has many candidate solutions. Each candidate solution is referred to as a chromosome. Each chromosome is evaluated according to the objective function value associated with the problem, and the chance of each to survive in the next generation is determined according to this evaluation. Traditional algorithms obtain only one solution by taking specific inputs for the solution of any problem, but GA can obtain multiple solutions for a problem due to its populationbased approach.
The GA starts with an initial population generated randomly. Then all chromosomes' objective function values are calculated and according to these values, chromosomes are assigned a fitness value. After the assignment of the fitness values, the selection process is started according to the fitness values of the chromosomes. The selected chromosomes are matched in pairs and the crossover operator is applied. The crossover operator is used to combine the genetic features of two parent chromosomes for generating two new offspring. Then, the mutation operator is applied to the offspring chromosomes with a probability referred to as mutation rate. The mutation operator is aimed to maintain diversity within the population. After all these steps, the production of the new generation is completed, and the previous steps are repeated until the algorithm is terminated. There are many options in determining the termination criteria of the algorithm, and the most used of these options is the number of iterations predefined at the beginning of the algorithm.
The GA operators used in this study for storage and retrieval processes are described below, respectively. The chromosome structure used in the algorithm is shown in Figure 2. Chromosome length is variable for each order, and twice the number of products.

Objective Function
The objective function establishes the connection between the problem and the problem solution. The purpose of this study using GA is to quickly solve storage and retrieval processes in warehouses with certain constraints and also minimize the travel distance between shelves. Two different objective functions are defined for storage and retrieval processes by considering the constraints in the warehouse given in the previous section. The objective functions used for storage are calculated with the equations below.
: objective function for storage : retrieval factor function : closeness distance function : penalty function : shelf location of the ith product : number of products in an order s : retrieval frequency of ith product : output gate In the storage process, it is aimed to store products with high retrieval frequency close to the output gate. Storing the products close to the output gate will reduce travel distance in the warehouse. The distance between the shelves and the output gate is calculated with the A*. Since the aim is to minimize the objective function, the product which is included in the retrieval orders with more pallets must have less impact on the objective function value. In this regard, the rf value is subtracted from '1' because of receiving large value for products with a lot of orders.
: total number of stored products in warehouse : total number of products for type of current product in the warehouse : penalty cost of ith product for weight ℎ : penalty cost of ith product for height : penalty cost of ith product for environment : penalty cost of ith product for compatibility Penalty values are added to each objective function of the chromosomes that do not comply with the constraints determined while operating the algorithm. Thus, it is aimed to eliminate bad solutions more easily than the population by increasing the difference between the chromosomes that comply with the constraints.
The objective function used for retrieval is given in equation (5 : objective function for retrieval : the storage sequence number of ith product In order to find the total travel distance in the warehouse while processing retrieval order, the distance between the products in the order are calculated respectively. The distance from the last product in the order to the output gate is also added. Due to the shelf life, the sequence of the products belong to the first stored order is added to the objective function. Since the values of the last stored products will be bigger, they enlarge the objective function. Thus, the first stored products will give better results. It is divided by the total number of products in the order to normalize.

Selection
GA depends on the basis of transferring their characteristics to new generations in order for good chromosomes to survive. Chromosomes are selected by using a selection method according to their fitness values and send into the matching pool to produce new chromosomes. In this study, the roulette wheel method, which is widely preferred among the selection methods, was used. The probability of being selected of chromosomes is calculated by equation (6).

= ∑ (6)
Si is the selection probability of the ith chromosome, is the fitness value of the ith chromosome. The chromosomes' fitness value is divided by the sum of all fitness values, and the probability of selection for the chromosome is calculated.

Crossover
The purpose of the crossover operator is to ensure diversity. Crossover is the process of mutually exchanging the genes of two chromosomes from a random one or more points. In this study, a single-point crossover was used. Crossover points are generated randomly for each different crossover process.  Figure 3 shows the crossover process of two parent chromosomes and the two acquired offspring chromosomes produced.

Mutation
The mutation operator refers to random changes in chromosomes' genes to maintain diversity within the population. The change in the chromosome after the mutation does not mean that the new chromosome will have a better value. Figure 4 shows an example of the mutation process used in the algorithm.

Elitism
Due to the random nature of the GA, the chromosome with the best objective function value obtained in the previous population may not be represented in the next population. The chromosome with the best objective function values is guaranteed to be represented in the next population applying an elitism operator.

Experimental Results
Storage and retrieval operations were carried out considering the different occupancy rates in the warehouse to evaluate the performance of the GA-based system. The chromosome length in GA varies depending on the number of products in each order. GA convergence graphics for storage and retrieval are given in Figure 5. The differences in the convergence values in the graphics are due to the distance between shelves where the products are stored. In this regard, the more the occupancy rate increase, the total distance increases. The optimum values obtained in the graphs for all results are the objective function values obtained by complying with the determined constraints. The results show that GA has successfully performed storage and retrieval operations considering all constraints. The experiments were implemented in C# programming to simulate the proposed method. In all experimental studies, the average solution time is about 5 seconds.

Conclusion
In this study, optimization of a complex warehouse management system with multiple constraints was performed using GA. A multidimensional warehouse was designed for simulation studies, and storage and retrieval operations were carried out for different numbers of products in each order. In addition to the constraints of the shelves, the distance between the shelves where the product was placed was also taken into consideration and it was aimed to minimize the travel distance. A-star algorithm was used to calculate the travel distance between shelf-shelf and shelf-output gate. Experiments were carried out with GA under different conditions according to the occupancy rates of the warehouse. The results showed that the algorithm, which provided acceptable solutions in a reasonable time, was extremely effective.