Designing an Intelligent Warehouse Based on Genetic Algorithm and Fuzzy Logic for Determining Reorder Point and Order Quantity

We develop a model to determine the reorder point and the optimal order quantity in a warehouse. Due to the maintenance costs, it is better to consider the order time period and the order quantity to prevent excessive inventory storage while reducing the cost on the other hand. In our study, we employ fuzzy logic as time decision aid and Genetic Algorithm for optimal order quantity. The decision making process is performed in an application software designed for a diary firm.


Introduction
Due to increase the customer satisfaction, the effective management of supply chain has become necessary [14].The excess or shortage inventories were very effective on the supply chain cost. Therefore inventory optimization has been emphasized in the supply chain management study [1], [9], [15].
The design and management of the storage policies and procedures for raw materials, work-in-process inventories, and typically, final products [3] are illustrated by the inventory control. The costs and lead times can be reduced and the response to the changing customer demands can be significantly improved and subsequently inventory can be optimized by the effective handling of the supply chain [16].
The inventory and supply chain managers are mainly concerned about the estimation of the exact amount of inventory at each point in the supply chain free of excesses and shortages. Owing to the fact that shortage of inventory yields to lost sales, whereas excess of inventory may result in unnecessary storage costs, the precise estimation of optimal inventory is indispensable [4].In other words, there is a cost involved in manufacturing any product in the factory as well as in holding any product in the distribution center and agent shop. More the products manufactured or held, higher will be the holding cost.
In order to minimize the total supply chain cost, the proposed approach clearly determines the most probable excess stock level and shortage level that are required for inventory optimization in the supply chain. In practice, the dynamic nature of the excess stock level and shortage level over all the periods is the typical problem occurring in inventory management.
Inventory control due to its importance, has always been considered in supply chain studies. Further, nowadays inventory control software's and its related issues have particular importance in the operational environment. According to inventory related cost, finding a solution for inventory optimization and achieving minimum costs is the main objective for companies to succeed and stay in the market. In one solution, we can determine the right time for replenishment and its optimal quantity.If we able to determine the parameters affecting the consumption of a good or product, then with controlling these parameters and compare them with current inventory levels, we can determine the right time to adjusting the new order. Comparing the order quantity in previous periods with the current sales growth rate and the forecasted quantity of consumption are being used in order to determining the optimal order quantity. Using the fuzzy theory and through determining the goods consumption parameters, we will specify the order optimal time and using the genetic algorithms, we will specify the optimal order quantity.

Problem Definition
With increasing competition among companies, considering effective issues related to competitiveness are important. Several issues should be considered in 2 Designing an Intelligent Warehouse Based on Genetic Algorithm and Fuzzy Logic for Determining Reorder Point and Order Quantity competition between companies. But some issues are importance and more sensitive than others, such as final price of products and also the level of customer satisfaction can be considered.But each of these stated cases are influenced by other factors. For example, we can note the costs related to energy or maintenance of machines and devices. But other factors such as inventory costs, including costs of materials, ordering, maintenance and product delivery (in the final price) and the product inventory levels (in customer satisfaction) are very important. Having a suitable order point for a product, according to the effective factors in market and request conditions of a particular product is, to a large extent depended on the maintenance costs and transferring and results in the final price reduction. Such that by determining of the proper and efficient order quantity, we can prevent unused product order causing the lack of product sale. The increase of return product, the increase of Transmission and maintenance costs and ultimately the increase of final cost, on other hand, this issue causes the reduction of the level of product inventory in a warehouse, also causes a loss of customer buying request (lost sales) and thus reduce the level of customer satisfaction. Thus, the impacts of inefficient product ordering will be lack of success of a company in all areas. Given the importance of the issue, here determining an appropriate order point and order volume is considered, and also some ways are proposed to achieve the more accurate order point.
In this paper, a model based on the fuzzy logic is employed to determine the order point and a Genetics Algorithm is developed to determining the optimal order quantity. As a result application warehouse software is elaborated to facilitate the usage of the proposed models.

Related Works
In the modern commerce, the supply chain management field is more sensitive. Warehouse in supply chain management is essential. One of the approaches being used in this area is genetic algorithm that is used to solve the problems in recent years. According to the surveys conducted and the nature of genetic algorithms, in most cases and almost in all the articles that the genetic algorithm is used, the aim was trying to reduce the maintenance costs and therefore the system total cost by inventory management and finding the optimal inventory level (in Production, ordering, maintenance) in different environments and industries.
In addition to the use of genetic algorithms to reduce the system total cost , in some studies the researcher used one type of genetic algorithm that is called multi-purpose genetic algorithm, in order to achieve several goals such as reducing The total cost (through reduced maintenance costs and storage) and JIT(just in time) distribution.
In a study by Yao et al. [20] an idea of the optimal cycles, in order to the optimal use of warehouse space in warehouse replenishment time was introduced and the genetic algorithm was used to find the best cycle to reduce the maximum required space in the warehouse.
In another study by Farahani and Elahipanah [7] a solution for a distributed network of JIT (Just in Time) was developed and a genetic algorithm (GA multi-purpose) was employed to solve the real size problems.
In another study that was presented by Pan et al. [17], a supply chain in the apparel industry was considered and by designing a multi agent system that increases the integration among all agents on the entire supply chain, the order point was optimized. In this study, the genetic algorithm was used for optimization and reducing the total cost of the warehouse by specifying the optimal point of order.
Limin et al. [12] proposed a model in the field of inventory control on the distributed inventory system. In the distributed Inventory system, multiple warehouses exist that a coordination center is responsible to relate the inventory among all warehouses. The problem is, when the customer present an order to this center, how we respond it, so that the Supplier and customer satisfaction is attracted, in order to the limited capital in inventory and supplier capacity. For this work the researcher used a genetic algorithm to reduce the total cost of inventory.
In another study by Mo et al. [10] presented a method to reduce the average cost of inventory in a manufacturing line using the fuzzy control mechanism and genetic algorithm for optimization purpose.
In a study by Shen et al. [21], a Genetic algorithm was used to solve a problem that was called production-inventory, under the FIFO and LIFO Inventory management methods, to decision making on the good's best distribution policy.
In a paper by Radhakrishnan et al. [19], due to the importance of effective and efficient management of inventory on the entire supply chain, the product safety stock level and a genetic algorithm was used to find a product optimal safety stock levels for all agents that store or maintain the goods throughout the supply chain.
Aziz et al. [2] proposed an inventory routing problem (IRP). Solving this problem cause to find an optimal route for transporting goods and thus, reduce the inventory management and transportation related cost. In this study, a genetic algorithm was used to determine the optimal policies for inventory and transportation that reduce the total cost.
In another study by Fengjiao and Qingnian [8] like the above study that to solving the inventory routing problem (IRP) has been paid, emphasizing on coordination of all sectors and improves the overall performance. The integration of two basic issue, inventory management and transportation regarded and then followed optimal solutions for the integration related issues rather than separate solutions for each of them. To solve the inventory routing problem, a genetic algorithm was used.
Using fuzzy logic in inventory control is very less than the genetic algorithm, so that just considered in some articles that is used with genetic algorithm. The use of fuzzy logic in these studies is according to the application of fuzzy logic in control systems and decision-making, and in order to make decisions in some case such as create order, or for special cases [3].
Moreover, in a study of the Kamal and Sculfort [11], a fuzzy model for displaying the continuous inventory control system, has been developed. In this paper, the vagueness such as customer requirements and delivery time has been considered, and a fuzzy model has been created for them.

Optimal Order Point
To determine the optimal order point, first we specify the effective factors for product consuming, including market factors and customer. Then, in order to find the value of these Factors, we apply fuzzy logic and determine the optimal reorder point.

Market and Customer Parameters
As the case study in this article is in a dairy environment, influential factors in this complex environment can be as follows.

Weather conditions
One important factor is weather conditions. Weather has a direct impact on demand for dairy products so that in different climatic conditions, different demands are discussed. For example, hot weather increase the request for dairy products, especially drinks product and against the demand sharply reduced in cold weather like winter or cold areas especially for drinks.

Status of rival companies
Commercial competitors are always trying to determine the market and products. When the companies have good condition in market, missing the market is difficult or impossible, but competitors should always analyze the market situation at the right time in order to act for obtaining advantages. If a competitor who have a Good position in the market face a problem not to be able to respond the demands, the competitor Companies have a suitable opportunity to attract the market. Thus, if competitors' condition is not suitable, the amount of demand for the products can be more than before.

Customer income status
When the purchasing power of individuals is not in good condition, certainly, the amount of products and goods are reduced and vice versa. Therefore, this parameter is an important factor in increasing or decreasing demand.

Religious and secular status
This factor that has influenced the culture of each region or country, depending on the type of ceremony is influencing the product demand. In other words, religious or weddings may have different effects on demand for products.

Effect of holidays and the tourism
The holidays and attendance of tourists to a region cause changes in demands 4.1.6. Customer satisfaction Customer satisfaction includes satisfaction of all products or satisfaction of a particular product that increase demand.Any reason making customer dissatisfy, will have negative effect on product demand.

Fuzzy Logic
Fuzzy Logic was firstly introduced by Zadeh being suggested against classic logic or binary logic determined through a set of mathematical principles for knowledge representation.
There are many fuzzy systems, but we use TSK (Takagi Sugeno Kang) fuzzy system in our work, which includes multiple parts namely Fuzzification, rules base, fuzzy inference engine and deFuzzification.
Our Input membership functions in fuzzy systems are including Air conditions (AS), the competitor companies (CS), customer income level (CI), Religious and non-religious ceremony (RS), Passenger and vacation (PVS), customer satisfaction (CSF).Also product consumption is a Fuzzy output function of Fuzzy System. Types of fuzzy variables are linguistic variable. The linguistic variables for input functions, including "Good", "fairly good" and "bad". Also, the fuzzy variable for Fuzzy output function is including "High", "medium" and "low".

Fuzzification
In Fuzzyfication, membership degree determines fuzzy sets according to fuzzy membership function. According to the fuzzy input membership functions related to this issue, here are a few sets. The Air condition membership function is given below in which x get several interval values.
The customer satisfaction membership function is shown below; where Y is a variable to imply the status of for instance weather condition. Designing an Intelligent Warehouse Based on Genetic Algorithm and Fuzzy Logic for Determining Reorder Point and Order Quantity customer satisfaction set, therefore we won't list them again. According to the above representation of fuzzy sets, graphical representation of Air conditions Fuzzy set is displayed below.

Rules base
The rules are a vital part of a fuzzy system that includes necessary rules to inference from fuzzy input sets. Set of existing rules in rules Base created through experts that have enough experience in this area. Below, some of existing rules in this rule base are listed in table 1.
According to table 1, AS: air state; CS: competitor companies; CI: customer income; RS: religious and none-religious; PVS: passenger and vacation; CSF: customer satisfaction;

Fuzzy inference
Fuzzy inference engine infer the existing rules in rule base by using membership degree of fuzzy input functions. Multiple methods exist for inference that here, the ROOT-SUM-SQUARE (RSS) method is used, due to the better performance.

Defuzzification
The results of the operations in this stage are Fuzzy value that specified for each fuzzy Output. But here in order to decide on the optimal order time, we require a crisp value. To achieve an exact value the Center-Of-Gravity (COG) method is used that provides a more accurate result. The Mathematical presentation of the center of gravity method is as follows. [5,6] That µY(Xi) = membership degree in membership function Xi = center of membership function It should be noted that the values of fuzzy outputs are based on past order data, and will be set dynamically. In other words, the previous recorded orders in the same period of the new order will be sorted from lowest to highest values and the fuzzy outputs are chosen between these values.
Finally, the output of fuzzy system will be a value which we call the fuzzy consumption that means the goods consumption value determined by fuzzy input values in fuzzy system. Therefore, to determine the optimal time of ordering, we calculate difference of current inventory and fuzzy consumption. If this difference is less than the safety stock level then this time is optimal to order, otherwise don't need to order.

Optimal Quantity Order (Genetic Algorithm)
Methods and classical search techniques have problems such as local optimum or need to analyze a large amount of data to finding the problem solutions. So, intelligent techniques described for problem solving and genetic algorithm is one of them. Genetic algorithm is based on genetic principles in the structure of life and is a technique for finding exact or approximate solutions to optimization or search problems. Today, the intelligent techniques are very applicable in different fields such as commerce [7,9,17,18].

Create an Initial Population
Each chromosome that is a binary string, display the order quantity of a product in one period. While diversity of order quantity in different periods is various, chromosome length may also be different. One of related items in the genetic algorithm is the initial population size or pop-size. Here, initial population size may be different according to the number of order periods or size of company and its sales volume, so this item is selected depending on the problem condition.

Evaluate Chromosomes
In our problem, the cost associated with each chromosome is calculated by the following equation being called the cost function. According to this function each chromosome that has a few costs will have a better fitness and optimality. Possible values for fitness is in the interval [0, 1], therefore the suitable chromosome for this Problem is a chromosome with fitness value equal to or greater than 0.5.
Total Cost (TC)) = waste product cost of period i + turnover cost of period i + inventory cost in period i with fuzzy consumption + inventory difference cost in period i with order quantity based on growth rate. Waste product cost=Rate of wasted product x Order quantity x product price Turnover cost =Rate of turnover x order quantity x order cost Inventory difference cost with fuzzy consumption = (cost of excess inventory + cost of fuzzy lost sale); Inventory difference cost with relate on growth rate = (cost of excess inventory based on growth rate + cost of lost sale based on growth rate). Some of above mentioned parameters are described below: •Fuzzy consumption: the amount specified by fuzzy linguistic variable for optimal order point decision making. •Sales growth rate: sale amount prediction in next period based on the current period. (Decreasing or increasing) •Lost sales: if inventory level of one period is less than the calculated consumption quantity (fuzzy or growth rate), then lack of inventory cause sales to be lost. •Excess inventory: if inventory level of one period is greater than the calculated consumption quantity (fuzzy or growth rate), which means then increase in inventory is occurred.

Parents Selection
In order to selected parents, we use the elitism method. According to elitism method, a part of chromosomes (30 to 50 percent) as parents directly move into the mating pool and other parents are selected through the tournament method.

Cross Over
At each stage, the two chromosomes are selected randomly. A number in the interval [0,1] produces and if this number is less than or equal to the cross over rate, using two chromosomes and the cross over operation, the children are created and are to the mating pool, but not be replaced with their parents. If the generated random number is greater than the cross over is done and two parents chromosomes are transmitted directly to the mating pool.
For this issue, we use multi-point (two points) crossover. But maybe since two selected parents length are not equal, according to the chromosomes representation method, a sufficient number of zero "0" to are added into little chromosome to equalize their length.

Mutation
Every child in the mating pool, with the possible mutation rates (Mute_rate), are changed. For this, a random number for each chromosome in the interval [0, 1] produces. A chromosome with greater random number than mutation rate will not change. Otherwise, according to chromosome length, a random number in the interval [0, Chromosomal length] will be generated to specify the mute genes position.
After determining the position of the desired gene, the gene value will be changed to zero if its value is 1 and vice versa. The mutation rate for this issue is the same with usual mutation rate that is 0.01.

6
Designing an Intelligent Warehouse Based on Genetic Algorithm and Fuzzy Logic for Determining Reorder Point and Order Quantity

Select a New Generation
After evaluating all chromosomes in the mating pool, if the number of feasible chromosomes in the pool is equal to the initial population size, all selected as the new generation. If the number of feasible chromosomes is greater than population size, first sorting all chromosomes according to their fitness value, then population size number of the fittest ones selected as the new generation. If the number of feasible chromosomes is less than initial population size, randomly select one chromosome between the feasible chromosomes and add a copy of it to the mating pool. This act is performed to compensate the deficiency.

End
The algorithm reaches the end of new generation production, when the maximum number (Max_ Generation) of the generations is achieved. At this time, the best chromosome (a chromosome with the best fitness) of the first generation to the last generation, when creating a new generation is maintained, will be displayed as the optimal value.

Testing the Algorithm
Our proposed software that is called intelligent warehouse system is implemented using ASP.Net 3.5 technology, C # programming language and SQL server 2000 database server Hypothetical parameters are listed in the following tables (2,3,4), and final results calculated using these parameters are reported in figure 4.  Table 3. Selected products for ordering with their order point values and current inventory quantities (Hypothetical parameters for goods inventory and they order point).  10 20 Final result of this test will be listed in the order list page, as shown in figure 4. According to The Figure 4, the order volume for some products is zero, which means for these products, no need to adjust the order. Non-zero values indicate the suitability of the current time for ordering and therefore the amount of volume calculated by the genetic algorithm shows the optimal inventory quantity.

User Interface
Intelligent warehouse system is composed of the following section: 1 -Market and customer information completion 2 -Desired products selection for ordering 3 -View order list

Market and Customer Information
According to stated content in market and customer information parameters (Figure 3), factors affecting the order, were identified and described. First step of intelligent warehouse system is to specify the appropriate values for each of these factors based on market information and customer requirements. Representatives of the company before adjusting the order must first complete the required information in this step. For each of the items in this stage, there are certain values that must be chosen based on the market and customer. Condition For example, for the "weather conditions" parameter, according to the air temperature in the desired region, we select a value. If the choice is closer to the reality, Therefore the operation's result in the next stages would be more accurate. After completing the existing items in this step, using the next button, enter to the second stage to select the "desired product" for ordering.

Order Products
In this stage, we should select a product that we want to order. According to figure 4, in the "Good Name" section, select a product that is going to be ordered. Reason of using the "Order Date" field is extracting the orders information in past same periods related to the selected product, for decision making about optimal order quantity.
After specifying the above fields, press the "OK" button. To do this, first depend on the entered information in previous step, the software will decide that is it required to put for this product (fuzzy system). It is needed to order for this product, according to orders information in previous weeks, months, or years, calculate the optimal order quantity for this product using the proposed genetic algorithm. Then we store the order information of this product, and then show it in the next stage by The "Order List". We can do this operation for unlimited number of products that we want to order.
After doing this for the desired amount of products, to show the final status of the order products, press the "next stage" button and enter into next page to view the order list.
If it is required to go back for editing the market and customer information, it is possible by pressing the back button.

List
This stage is the final stage of this system. According to the figure 5, all selected products are listed in this section. About the "order state" column, it is necessary to explain that when for a Product, according to the market and customer information and product inventory level, an order decision is show by(√) in the order state field. Otherwise, this field will be asymptomatic, which means that for this product it not required to order. Value of The "order quantity" column is zero if order is not required for a product and not zero (that shows the optimal order quantity) for a product that is requires to be ordered.

Conclusions
We have developed a new model for determining the optimal reorder point and order quantity. In this paper , we specified the effective factors for product consumption, and then applying the fuzzy logic we determined the optimal time to adjusting the order. Then using the genetic algorithm we found the optimal order quantity. The whole optimization process was worked out in and intelligent warehouse system.