Optimization of Ordering and Allocation Scheme for Distributed Material Warehouse Based on IGA-SA Algorithm

: The distributed material warehouse is the crucial link in the process of modern enterprise construction, and the goal of the enterprise is to save the cost of material distribution and reduce the time of distribution. In order to obtain the optimal ordering and allocation scheme, ﬁrstly, a distributed inventory system consisting of an ordering centre, a material coordination centre and n material warehouses are considered, and the cost model of ordering and allocation of the distributed material warehouse is established. Next, the safety stock and the ordering point of the distributed material warehouse are solved. Then the improved genetic algorithm-simulated annealing algorithm (IGA-SA) is used to solve the optimization of the distributed material warehouse. Finally, the application example is given. The results show that the IGA-SA algorithm can e ﬀ ectively reduce inventory cost and improve inventory utilization. Author and Q.Z.; H.J.; software, validation, Y.W.; formal analysis, visualization,


Introduction
In the process of module construction in traditional enterprises, the material management is mostly centred on the material warehouse, and each inventory centre has a high degree of autonomy to deliver materials directly to the construction centre. The material management department of the construction enterprise orders materials from the ordering centre and distributes them to each material warehouse, which makes decisions and operates independently [1]. This kind of inventory management method cannot consider the overall interests of the construction enterprise, and the lack of cooperation between the material warehouses leads to low construction efficiency and increasing the cost of material storage. Besides, it is easy to generate material accumulation. In order to realize the organic integration of each material warehouse, the concept of coordination centre is put forward to manage the material distributed system [2].
The so-called distributed inventory management refers to the inventory management system composed of multiple warehouses based on a coordination centre [3]. In terms of space, warehouses can be located in the same area or planned in different areas. However, most manufacturing enterprises, in order to facilitate production, set up the warehouses near the construction centre, i.e., production base.
At present, the research on the distributed material warehouse at home and abroad mainly focuses on the establishment of the distributed inventory model and the coordination of each storage point, and the analysis of the algorithm for solving the model is relatively less. The single algorithm is the main one. Concerning the establishment of the distributed inventory model, Literature [4] innovatively puts forward a cross-node inventory collaborative solution. It establishes a short-term (2) The improved algorithm based on genetic and simulated annealing is adopted, and IGA-SA algorithm is used to solve the best material ordering scheme and distribution scheme. (3) The programming solution simulates a real example to verify the effectiveness of the proposed algorithm in this paper, obtains the optimal configuration scheme, and compares the proposed method with the traditional one, proving that the proposed method is superior to the traditional one.

Conditional Hypothesis
The material distribution system studied in this paper is composed of a material coordination centre and multiple storage points. Among them, the material coordination centre mainly plays the role of managing distributed material system information, coordinating the material inventory information of each storage point and interacting the corresponding information with the reservation centre, and making the reservation or transfer operation in time. The concrete operation mechanism can be divided into two parts. First, the reservation management, which firstly provides the shortage information by each warehouse, then the material coordination centre judges whether the reservation operation is needed, and interacts with the reservation centre for the detailed information of the shortage of materials, finally, the reservation centre provides the materials to each warehouse. The second is allocation management, in which the shortage of information is directly provided by each warehouse and analyzed and processed by the material coordination centre. According to the information such as the quantity and time required by each warehouse, the inventory situation of each warehouse, etc., make a transfer plan, and other warehouses provide materials to the required warehouse. This material allocation scheme can maintain a specific inventory at each storage point, ensure that there is no shortage of materials and no surplus of materials, effectively reduce the storage cost of materials, and improve the construction efficiency of large modules. The assumptions are as follows [12]: (1) This material distributed system uses the method of regularly checking the inventory of each storage point, unifying the ordering, and using the (R, Q) ordering strategy [13], that is, each storage point continuously checks its material inventory. When the total material inventory level of all storage points is lower than the ordering point R, the material coordination centre issues the ordering request to the ordering centre, and orders the materials of Q units. (2) Supposing that the material demand Dit of any storage point i (1 ≤ i ≤ n) obeys the normal distribution N µ i , σ i 2 [14], and the material demand of each storage point every day is independent.
Therefore, in t (unit: day) days, the material demand Dit of the ith storage point obeys the normal distribution N tµ i , tσ i 2 .
Model optimization objective: under the premise of limited material inventory level of each storage point, with time t as the cycle and given service level y, the material inventory optimization scheme of each storage point is determined to minimize the inventory cost and material distribution cost, to achieve the purpose of cost optimization.

Variable Provision
In the process of building the distributed centralized control model of this material, multiple variables are involved. In order to facilitate searching and model building, all variables are listed in Table 1. The number of materials provided by the ordering centre to storage point i in t time (unit: item)

Q ijt
The number of materials transferred from storage point i to storage point j in t time, with a negative value in the opposite direction (unit: item) D it The normal distribution of material demand at storage point i in t time (unit: item) The maximum storage capacity of storage point I (unit: item) BS i The lead time of materials provided by the ordering centre to storage point I (unit: day) FC t The maximum material supply capacity of the ordering centre in t time (unit: item) Y The service level of the enterprise construction process, i.e., probability of sufficient supply of materials BV it Initial material inventory level of storage point i in t time (unit: item) The probability of material demand at storage point i in t time, f (x) is its probability density function X it Safety material inventory of storage point i in t time (unit: item) C 1 Warehouse keeping cost (unit: yuan) C 2 Shortage cost when ordering materials (unit: yuan) C 3 Ordering cost when ordering (unit: yuan) C 4 Transportation cost when ordering (unit: yuan) C 5 Other costs when ordering (unit: yuan) C 6 Warehousing maintenance cost during transfer (unit: yuan) C 7 Shortage cost during transfer (unit: yuan) C 8 Transportation cost during transfer (unit: yuan) C 9 Other costs during transfer (unit: yuan) C Fit Unit material ordering fee when warehouse i orders materials from the ordering centre (unit: yuan/time) The total cost of ordering materials from the ordering centre at storage point i in t time (unit: yuan) Z 2 The total cost of materials ordered by the whole storage system from the ordering centre in t time (unit: yuan) Z 3i The total cost of material allocation at storage point i in t time (unit: yuan) Z 4 The total cost of material allocation between storage points in t time (unit: yuan) Z total Total cost (unit: yuan) ε 1-y Fencing point µ i Average daily material demand (unit: item) σ i The standard deviation of daily demand

Ordering Cost Model
The centralized ordering cost of the material distributed system includes warehouse keeping cost, shortage cost, ordering cost and transportation cost. Each cost will be calculated separately below.
(1) Warehouse keeping cost C 1 . The warehouse keeping cost is related to the number of materials stored in the storage point, including all expenses of materials in the storage process of the storage point, such as the funds occupied by materials, the storage fees of materials, the user fees of the storage point, taxes and security funds. In the calculation of warehouse keeping cost, some costs are allocated to each material in a particular proportion, such as the salary of warehouse management personnel and the loss of the materials during storage, and the storage cost of materials is determined reasonably and accurately as possible. Warehouse keeping cost C 1 can be calculated by the following Formula: (2) Shortage cost C 2 . Shortage cost refers to the cost of production and construction delay caused by the lack of a specific material at one or more storage points at the same time. In general, when one storage point is short of materials, there will be other storage points to supplement, so it also involves the transportation cost of materials. The shortage cost C 2 can be calculated by the following Formula: (3) Ordering cost C 3 . The ordering cost is the cost of ordering related materials from the ordering centre due to the lack of materials during the construction process. It is mainly divided into two parts. One is the fixed cost generated each time the materials are ordered. This part of the cost is not related to the ordering quantity. The other is the cost of purchasing materials. This model considers materials a discount when a large number of purchases are made, and this part of the cost is related to the number of materials purchased. The following Formula can calculate the ordering cost C 3 : (4) Transportation cost C 4 . C 4 is the transportation cost generated by allocating materials to each storage point when materials are ordered. Therefore, the transportation cost is counted into the storage management cost here. Transportation cost C 4 can be calculated by the following Formula: When calculating the total cost Z 1i of materials ordered by storage point i from the ordering centre in t time, it is necessary to include the labour cost C Pit of each time the materials are put into storage and the cost C It of materials input to storage point i, and set: Then the total cost Z 1i generated by storage point i when ordering materials from the ordering centre within t time is as follows: In Formulas (3)-(6), define: In t time, when the material mentioned above-distributed system orders materials centrally, the total order cost Z 2 generated by the whole storage system is as follows: When ordering materials at each storage point, the number of materials ordered shall be less than the maximum storage capacity of the storage point, and also less than the maximum supply capacity of the ordering centre. Besides, in order to ensure that the inventory number of each storage point meets the actual demand, the sum of the transferred-in material quantity of storage point i and the remaining material quantity of storage point i before transfer should be higher than the critical ordering point of the current storage point. Therefore, the constraints of the model are as follows:

Allocation Cost Model
In the process of allocation, storage points transfer to each other. First, determine the optimal stock of each storage point, reasonably allocate the material resources of each storage point, and reduce the storage cost of materials. The total cost of material allocation includes storage and maintenance cost, shortage cost, allocation transportation cost, processing cost during allocation, material issue and receipt processing cost, etc. The total cost of the allocation cost model can be obtained by referring to the ordering cost model. The total cost Z 3i generated by warehouse i when transferring materials within t time is as follows: In this formula, C 6 is the storage and maintenance cost, C 7 is the shortage cost, C 8 is the transportation cost of the material, C 9 refers to the handling cost of material allocation, the cost of material issue and receipt, and the labour cost required for material allocation. Q ijt represents the material quantity transferred between storage point i and storage point j, the positive value represents the material quantity transferred from storage point i to storage point j, and a negative value is an opposite. Also, define: On this basis, the allocation cost model of storage point i is as follows: In the t time, the total allocation cost Z 4 generated by the whole storage system is as follows: When each storage point is transferred, the number of materials transferred to the warehouse shall be less than the maximum storage capacity of the storage point. At the same time, the number of materials transferred to the storage point after allocation shall be higher than the ordering point. Also, the sum of the transferred number of storage point I and the quantity of materials in storage point i before ordering shall be higher than the ordering point of the current storage point. Therefore, the constraints of the model are as follows:

Analysis of Cost Model
According to the assumptions of the cost model of the material distribution system, the material demand D i of any storage point i (1 ≤ i ≤ n) is subject to the normal distribution N µ i , σ i 2 , and the material demand of each storage point is independent every day. Therefore, within the material supply lead time BS i, the material demand D BSi of storage point i is subject to the normal distribution N BS i µ i , BS i σ i 2 . As shown in Figure 1. In Figure 1, the horizontal line on the left represents the situation without material shortage, and the vertical line on the right represents the situation with the material shortage. According to the image characteristics of the normal distribution function, the area of the shadow part represents the probability of a corresponding situation [15].
Take the probability that the material demand DBSi within the lead time BSi does not exceed the Rit of the order point as the service level y, then: In Figure 1, the horizontal line on the left represents the situation without material shortage, and the vertical line on the right represents the situation with the material shortage. According to the image characteristics of the normal distribution function, the area of the shadow part represents the probability of a corresponding situation [15].
Take the probability that the material demand D BSi within the lead time BS i does not exceed the R it of the order point as the service level y, then: because of the normal distribution N BS i µ i , BS i σ i 2 of material demand D BSi , the standard normal distribution can be obtained: in this formula, X is the random variable of the standard normal distribution, and ε 1-y is the quantile of the standard normal distribution [16]. According to the above formula: Then the ordering point of the storage point can be obtained as follows: According to the relationship between the order point and safety stock: It can be seen that the safety stock is:

Improvement of the Genetic Simulated Annealing Algorithm
The calculation speed of the genetic algorithm is fast, but it is easy to fall into the local extremum [17], while the convergence speed of simulated annealing algorithm is slow, but it is not easy to fall into the local extremum [18]. Therefore, some scholars put forward the genetic simulated annealing algorithm by combining the two algorithms [19]. Genetic simulated annealing algorithm is based on the idea of combination. It can not only keep the advantage of fast computing speed of the genetic algorithm but also integrate the advantage of strong local search ability of simulated annealing algorithm to improve the overall computing effect. This section will improve the genetic simulated annealing algorithm, propose IGA-SA algorithm, and analyze the main steps of the algorithm to solve the model.

Improved Adaptive Crossover and Mutation Probability
The crossover probability P c and mutation probability P m in the genetic algorithm are the key factors affecting its performance [20]. Among them, the crossover probability determines the diversity of the population, and the mutation probability determines whether it can jump out of the local extremum, so choosing the appropriate crossover and mutation probability can get the optimal solution of the model faster. However, in the traditional genetic algorithm, the probability of crossover and mutation is constant, so it is difficult to ensure the optimal in the actual calculation. In this section, according to the population adaptability, the adaptive crossover and mutation probability are improved as follows: In this formula, f avg is the average value of fitness function, f max is the maximum value of fitness function, and c 1 , c 2 is the adaptive parameter.

Improved Fusion Metropolis Criterion
Metropolis criterion was put forward by Metropolis in 1953 and described by the process of substantial reaching thermal equilibrium at a constant temperature [21]. The physical system tends to be in a state of lower energy, while thermal motion prevents it from falling into the lowest state accurately. This phenomenon focuses on those states that have essential contributions when sampling by Metropolis criterion, and then better results can be obtained quickly.
The convergence speed of traditional simulated annealing algorithm is slow, and the modification of individuals by standard Metropolis criterion can only be divided into two cases, that is, to accept new individuals or to retain old ones, which makes the diversity of population insufficient [22]. In this section, we will propose the improved fusion Metropolis criterion, and modify the individual population in different situations to ensure the diversity of the population. The steps to improve the metropolis criteria for fusion are as follows: (1) Define the new solution acceptance probability P: In this formula, k is Boltzmann constant, f (x new (i)) is a fitness function value of the individual x new (i) in new species group, and f (x old (i)) is a fitness function value of the individual x old (i) in geriatric populations. The improved fusion Metropolis criterion can not only generate new individuals through gene exchange in individuals to improve the performance of individuals but also improve the diversity of individuals through probability method to improve the algorithm's solving ability.

Example Description
The necessary information of each storage point for a specific material is shown in Table 2. The expenses incurred in ordering or transferring materials at each storage point are shown in Table 3. When the storage point is short of materials and needs to order materials, the discount will be generated according to the number of materials ordered. The specific discount information is shown in Table 4.

Solution and Analysis of the Ordering Process
According to formulas (19) and (20), the order point and safety stock of storage point 1-4 can be obtained. When y = 95%, the safety factor ε 1-y = 1.65. Thus, it can be calculated that the safety stock V 1 = 4, V 2 = 6, V 3 = 5, V 4 = 5, the order point R 1 = 34, R 2 = 66, R 3 = 26, R 4 = 37, and the total order point is 163. According to Table 2, the total initial inventory of the four storage points is 94. Since the total ordering point is 163, which is greater than the total initial inventory of 94, so it is necessary to order.
Using MATLAB to compile IGA-SA algorithm program to solve the optimal order quantity and the corresponding cost of the order model. With the iteration, the individuals with relatively low fitness function value in the population are eliminated, and the individuals with high fitness remain. They are concentrated near the optimal individuals so that the optimal solution or close to the optimal solution can be determined. The evolution process of the population is shown in Figure 2. The two curves in the figure, respectively represent the minimum value and average value of the cost function in the process of distributed material inventory ordering. It can be seen that when the population evolves to 50 generations, the two curves almost coincide and tend to converge at this time.
The optimal solution can be obtained in the 50th generation by outputting the optimal result after 100 iterations. At this time, the ordering scheme and cost of material distributed system are shown in Table 5.
fitness function value in the population are eliminated, and the individuals with high fitness remain. They are concentrated near the optimal individuals so that the optimal solution or close to the optimal solution can be determined. The evolution process of the population is shown in Figure 2. The two curves in the figure, respectively represent the minimum value and average value of the cost function in the process of distributed material inventory ordering. It can be seen that when the population evolves to 50 generations, the two curves almost coincide and tend to converge at this time. The optimal solution can be obtained in the 50th generation by outputting the optimal result after 100 iterations. At this time, the ordering scheme and cost of material distributed system are shown in Table 5. If according to the original ordering strategy of the enterprise, each storage point separately orders materials. According to each storage point to meet their minimum inventory demand, we can  If according to the original ordering strategy of the enterprise, each storage point separately orders materials. According to each storage point to meet their minimum inventory demand, we can get the best order quantity and make the total order cost the lowest. At this time, the ordering plan of the four storage points is shown in Table 6. The comparison between the two schemes is shown in Table 7. Compared with the traditional scheme, the centralized ordering scheme reduced the order quantity by 18.21%, totaling 53 item, and the total ordering cost decreased by 17.22%, totaling 10,705 yuan. It can be seen that the scheme of centralized ordering reduces the total inventory of materials, improves the utilization ratio of inventory and reduces the total cost of ordering. At this time, the centralized ordering scheme is better. GA is the abbreviation of genetic algorithm. In order to verify the effectiveness of algorithm proposed in this paper, GA and IGA-SA are used to calculate the above examples. The evolution process of the population is shown in Figures 3 and 4, respectively.
Compare the above results obtained by different algorithms, as shown in Table 8. It can be seen from Table 8 that the iteration time of IGA-SA is 33 times less than GA, and the total optimal ordering cost is reduced by 608 yuan. We can concluded that the simulated annealing process can effectively avoid GA falling into local extremum. The IGA-SA algorithm proposed in this paper can not only be further improved in evolutionary algebra but also get better model solution than GA algorithm.
Mathematics 2020, 8,1746 12 of 17 get the best order quantity and make the total order cost the lowest. At this time, the ordering plan of the four storage points is shown in Table 6. The comparison between the two schemes is shown in Table 7. Compared with the traditional scheme, the centralized ordering scheme reduced the order quantity by 18.21%, totaling 53 item, and the total ordering cost decreased by 17.22%, totaling 10,705 yuan. It can be seen that the scheme of centralized ordering reduces the total inventory of materials, improves the utilization ratio of inventory and reduces the total cost of ordering. At this time, the centralized ordering scheme is better.
GA is the abbreviation of genetic algorithm. In order to verify the effectiveness of algorithm proposed in this paper, GA and IGA-SA are used to calculate the above examples. The evolution process of the population is shown in Figures 3 and 4, respectively.   Compare the above results obtained by different algorithms, as shown in Table 8. It can be seen from Table 8 that the iteration time of IGA-SA is 33 times less than GA, and the total optimal ordering cost is reduced by 608 yuan. We can concluded that the simulated annealing process can effectively avoid GA falling into local extremum. The IGA-SA algorithm proposed in this paper can not only be further improved in evolutionary algebra but also get better model solution than GA algorithm.

Solution and Analysis of Allocation Process
When the initial inventory of each storage point is shown in Table 9, it can be seen that at this time, the total initial stock of materials in each storage point is 163, while the total order point is 245, so the initial stock is larger than the order point, so there is no need to order. However, since the initial inventory of storage points 2 and 4 are smaller than their ordering points, the allocation operation is adopted. The distance between the four storage points is shown in Table 10.

Solution and Analysis of Allocation Process
When the initial inventory of each storage point is shown in Table 9, it can be seen that at this time, the total initial stock of materials in each storage point is 163, while the total order point is 245, so the initial stock is larger than the order point, so there is no need to order. However, since the initial inventory of storage points 2 and 4 are smaller than their ordering points, the allocation operation is adopted. The distance between the four storage points is shown in Table 10. The IGA-SA algorithm is still used to solve the optimal allocation scheme and allocation cost of the allocation model. The evolution process of the population is shown in Figure 5. It can be seen that when the population evolves to 60 generations. The optimal value curve tends to converge, and the allocation cost is the lowest at this time. The best allocation scheme and allocation cost of the distributed material system are shown in Table 11.
The IGA-SA algorithm is still used to solve the optimal allocation scheme and allocation cost of the allocation model. The evolution process of the population is shown in Figure 5. It can be seen that when the population evolves to 60 generations. The optimal value curve tends to converge, and the allocation cost is the lowest at this time. The best allocation scheme and allocation cost of the distributed material system are shown in Table 11.  If the centralized feeding scheme is still adopted at this time, the population evolution process is shown in Figure 6. It can be seen that when the population evolves to 35 generations, the two curves almost coincide and tend to converge at this time.  If the centralized feeding scheme is still adopted at this time, the population evolution process is shown in Figure 6. It can be seen that when the population evolves to 35 generations, the two curves almost coincide and tend to converge at this time.
By outputting the optimal result after 100 iterations of the population, the centralized ordering scheme of the material distribution system can be obtained, as shown in Table 12. It can be seen from Tables 11 and 12 that if the centralized order scheme is adopted, the order quantity of all storage points is Q 1 = 66, and the total ordering cost is 16,819 yuan; if the mutual allocation scheme is adopted, the total allocation quantity of all storage points is 53, and the total allocation cost is 13,899.7 yuan.
Through the above comparison, it can be concluded that: (1) When the total initial inventory of materials in each storage point does not reach the total ordering point, the strategy of transferring materials among storage points can reduce the overall inventory level of materials in enterprises and effectively avoid the problem of material backlog caused by traditional methods; (2) This strategy greatly reduces the occupation of material funds, that is, it increases the liquidity of enterprises and optimizes the overall level of material inventory. By outputting the optimal result after 100 iterations of the population, the centralized ordering scheme of the material distribution system can be obtained, as shown in Table 12. It can be seen from Tables 11 and 12 that if the centralized order scheme is adopted, the order quantity of all storage points is Q1 = 66, and the total ordering cost is 16,819 yuan; if the mutual allocation scheme is adopted, the total allocation quantity of all storage points is 53, and the total allocation cost is 13,899.7 yuan.
Through the above comparison, it can be concluded that: (1)When the total initial inventory of materials in each storage point does not reach the total ordering point, the strategy of transferring materials among storage points can reduce the overall inventory level of materials in enterprises and effectively avoid the problem of material backlog caused by traditional methods; (2)This strategy greatly reduces the occupation of material funds, that is, it increases the liquidity of enterprises and optimizes the overall level of material inventory.
Through the above calculation and analysis of the ordering cost model and transfer cost model of the material distributed system, we can know that: (1) when the total initial inventory of materials at each storage point does not reach the total ordering point, the unified ordering scheme has more advantages than the individual ordering at each storage point; (2) When the total initial stock of materials in each warehouse exceeds the total ordering point, but the initial stock of materials in some warehouses does not reach its ordering point, it is more advantageous to adopt the scheme of mutual transfer between warehouses than to order materials separately in shortage warehouses. Besides, the IGA-SA algorithm proposed in this paper is compared with GA algorithm, and the validity of the IGA-SA algorithm is verified. Through the above calculation and analysis of the ordering cost model and transfer cost model of the material distributed system, we can know that: (1) when the total initial inventory of materials at each storage point does not reach the total ordering point, the unified ordering scheme has more advantages than the individual ordering at each storage point; (2) When the total initial stock of materials in each warehouse exceeds the total ordering point, but the initial stock of materials in some warehouses does not reach its ordering point, it is more advantageous to adopt the scheme of mutual transfer between warehouses than to order materials separately in shortage warehouses. Besides, the IGA-SA algorithm proposed in this paper is compared with GA algorithm, and the validity of the IGA-SA algorithm is verified.

Discussion
In this paper, the improved IGA-SA algorithm is used to solve the optimal cost based on the material distribution model. Through the data, we can see that the convergence speed and the cost of this method are greatly optimized compared with the traditional algorithm. And there are many researches on distributed material management, such as the establishment and solution analysis of multi-coordination center model, the establishment and analysis of evaluation system model and scheme decision model, and the retrieval and storage of open source database information suitable for distributed material management.

Conclusions
The key to the distributed material warehouse system is inventory optimization. Based on the IGA-SA algorithm, this paper studies the centralized ordering and allocation scheme of the distributed material warehouse. With fewer iterations, the inventory quantity and inventory cost are effectively reduced, and the effectiveness of the algorithm proposed in this paper is verified. It can effectively improve the speed of ordering and allocation scheme planning, and significantly improve the calculation efficiency. It is very suitable for the application of modern enterprises in modular construction, especially in the process of large-scale modular construction. It is also of great significance in logistics management. Besides, it has some reference significance for other aspects of distributed system optimization.