Research on Logistics Distribution Vehicle Scheduling Based on Heuristic Genetic Algorithm

To study the genetic algorithm, this paper solves the problem of shop scheduling under the premise of layout Flying − V . Firstly, double-layer coding is used for optimization. When calculating ﬁtness, the time to return to the mouth P & D approaches the optimum through the greedy idea. Individual screening is carried out through the roulette method. Diﬀerent crossover and genetic operators are used for diﬀerent coding layers. Through thinking of elitism and catastrophe and the immigration operator to ensure the diversity of the algorithm in the calculation process, it can achieve the recommendation of the number of cars to control the cost. The stability of the algorithm is good. It can recommend a better picking sequence and number of carts for various types of picking problems.


Introduction
In recent years, Germany has proposed the "Industry 4.0" project, which uses the Internet of things information system to digitalize and intelligentize supply, manufacturing, and sales information in production. Finally, it achieves rapid effective and personalized product supply. e "smart logistics" of its three themes, "smart factory," "smart production," and "smart logistics," emphasizes the integration of logistics resources through the Internet, the Internet of things, and the logistics network. It gives full play to the efficiency of the supplier and accelerating the service of the demander match. e country also proposed China's smart manufacturing 2025 plan accordingly.
With the vigorous development of today's e-commerce and express delivery industry, the warehousing and logistics industry with its rigid demand has also entered a broad new situation. With the process of industrialization and the diversification of the service industry, the warehousing, logistics, and distribution industry have emerged with a new demand of "multiple varieties, small batches, and multiple batches." Today's traditional warehousing and logistics services have gradually been unable to adapt to my country's economic development. How to improve the circulation efficiency of warehousing logistics and reduce circulation costs has become a major and difficult problem for warehousing enterprises to solve urgently.
In recent years, foreign scholars have innovated the layout of warehouses. In 2009, the American scholars Gue and Meller [1] studied nontraditional layouts Flying − V, which shortened the picking distance of warehouses at the expense of warehouse utilization. A balance is reached between the two. For the use of optimization algorithms to solve similar optimization problems, many scholars have also conducted a lot of analysis from different angles. Liao et al. [2] introduced particle swarm optimization on the basis of traditional genetic algorithm to make the algorithm have more reliable optimization ability. Bo-Wen and Hua [3] based their work on the initial solution constructed by using chaotic initialization population and elite retention optimization results combined with parallel processing to increase the diversity of the genetic algorithm population and improve the quality of the solution. Minghai and Guihua [4], Li-Feng and Yong-Jie [5], and Meng et al. [6] analyzed the Chinese traveling salesman problem based on genetic algorithms and used them to achieve the optimal solution. Togan and Daloglu [7], based on the analysis of the characteristics of the initial population of genetic algorithm, proposed a new concept of group adaptation strategy and used the adaptive method of penalty function and mutation crossover operator to obtain adaptive genetic algorithm. Liu et al. [8,9] considered reconstructing the point set of the graph, which also has certain enlightening significance for the innovation of warehouse layout.
Regarding the use of optimization algorithms to sort warehouse goods, Steffey [10], Huang et al. [11], Opetuk and Dukic [12], Zhou et al. [13], Pohl et al. [14], Xu and Hu [15], and Ardjmand et al. [16] used fishbone layout and artificial fish school algorithm and improved cat group algorithm, respectively, and used genetic algorithm analysis and comparison to find the picking path and picking of the warehouse. Regarding the dispatching optimization plan of the cargo trolley, Venkitasubramony and Adil [17] and Le and Degui [18] (2013) constructed a warehouse location allocation model based on layout Fishbone, used a hybrid algorithm combining genetic algorithm and ant colony algorithm, and improved layout Fishbone methods to optimize the allocation of many locations. e model is solved, combined with warehouse examples, to find the best warehouse layout. Yang et al. [19] used the picking path algorithm optimized by ant colony algorithm, used it for robot autonomous navigation through simulation, and concluded that the ant colony algorithm optimized path problem can effectively and consistently generate a better collision-free path.
Mohamed et al. [20] proposed a novel nature-inspired algorithm called Gaining-Sharing-Knowledge-based algorithm (GSK) for solving optimization problems over continuous space. Experimental results indicate that in terms of robustness, convergence, and quality of the solution obtained, GSK is significantly better than, or at least comparable to, the state-of-the-art approaches with outstanding performance in solving optimization problems especially with high dimensions.
Mohamed et al. [21] proposed three new mutation strategies to improve the optimization performance of differential evolution algorithm, two of which are highly competitive, especially with the increase of dimension.
By referring to the methods of different scholars and the genetic algorithm mentioned above, the structure object is operated directly, without the limitation of derivation and function continuity, and has inherent implicit parallelism and better global optimization ability, so we adopt the genetic algorithm to optimize the structure. e topic will be based on the layout optimization; at the same time, through the genetic algorithm, the recommendation of the number of picking carts and the recommendation of the route can solve the problem of improving the circulation efficiency of warehousing logistics and reducing the circulation fee [22].

Modeling the Distance of Flying
In the paper [23], the layout of Flying − V of the warehouse is shown in Figure 1: the shelves are placed according to the layout Flying − V. e entire warehouse is divided into four areas, as shown in the figure, divided into areas 1-4. P&D is the entrance and exit of the warehouse. Each square represents an item storage position, and the black square represents the goods that need to be picked.
A set of data A, B, C, D { } is used to represent the information of the goods. e data are defined as follows: A(A � 1, 2, 3, 4) indicates the area number where the goods are located. B(B � 1, 2, 3, . . . , n) indicates the number of the container where the goods are located. A is 1, 4 is n � 104, otherwise. n � 91 indicates the number of layers of the container where the goods are located. e weight of the cargo is D(D � 1, 2, 3, 4, 5). e expression of mouth is (0, 0, 0, 0).

Distance
Matrix. Some symbol descriptions are given in Table 1.
Step 1. Establish a rectangular coordinate system, P&D with the coordinate to the right x as the positive semiaxis and y upward to the positive semiaxis. As shown in Figure 1, a grid is a unit.
Step 2. Convert the cargo i number into (x i , y i ).
Step 3. Calculate the distance from the goods to the P&D and bring the information of the two goods into the following formula: Step 4. Calculate the distance between the goods, and take the subscripts i, j of the two goods into the following formula: 2 Complexity

Genetic Algorithm to Solve the Problem
e genetic algorithm is a kind of algorithm idea that imitates the biological evolution process [24]. It firstly encodes the goods, then randomly generates the initial population, and calculates the fitness value of each individual. It goes through the genetics of replication, mutation, and crossover. After many iterations of the problem, in order to ensure biodiversity and avoid excessive concentration, it is considered to control elitism. Finally, it generates the optimal solution or the approximate optimal solution.
3.1. Coding. In this paper, the coding of goods adopts real number coding and coding rules. Using this coding method, we can effectively solve the situation of invalid coding in crossover and mutation.
In the coding of the picking trolley, we assume that the first-level coding of each individual is fixed. en this problem is converted into a knapsack problem. It is better to use binary coding, and in order to solve the two different number of individual cars can still cross. We abandoned the real number coding and chose the binary code. e bit binary i indicates whether the goods in i + 1 are moved by the new trolley. erefore, the code length is the cargo code length minus one.

Generation of the Initial Population.
It generated groups of N × M. at is, a population N with individuals M, in order to carry out immigration operations.

Fitness Function.
e fitness function in this problem is shown in where f(x) is the objective function. In f(x) � t 1 + t 2 + km, t 1 is the longest travel time of the car. t 2 is the shortest travel time of the car. m is the number of cars used. k is the consumption of each car.

Selection
Operator. Under normal circumstances, the setting of the selection operator follows the principle of survival of the fittest. e greater the fitness, the greater the possibility that an individual's genes will be inherited to the next individual. On the contrary, it reduces. According to the principle of the roulette method, this paper adopts the proportional operator: the calculation method of the proportional operator is e probability of an individual in the population being selected is proportional to the value of the individual's corresponding fitness function.
e fitness values of all individuals in the population are accumulated and then normalized. Finally the individuals corresponding to the area where the random number falls are selected by random numbers, which is used as the selection operator.

Crossover Operator.
According to the different situations of the two-level coding, two operators are adopted. For the first-level pickup order coding, we use multipoint crossover. Because there are more methods of permutation and combination, the possibility is great. e use of multipoint crossover can increase the possibility of individual combinations and try to avoid the algorithm from entering the local optimal under the premise of gene richness. e second layer of pickup trolley coding is relatively less likely because it uses binary coding. If multipoint crossover is used, invalid chromosomes are more likely to be Complexity 3 generated.
e number of carts used after multipoint crossover may exceed the predetermined maximum value. So this paper considers the use of single-point crossover.

Mutation
Operator. According to different coding conditions, two mutation operators are also adopted here. For the second-level pickup truck coding, we also adopt single-point mutation. But in the first-level pickup sequence, due to mutation, the diversity of the population will increase. erefore, we should control the degree of this mutation to achieve convergence and prevent local optimization. So as in (5), set the number of N node variance [25]: e number of node mutations is controlled within 3 nodes. If T is smaller, that is, less than 1, then set 1 node variation. If the value T is larger, even greater than 3, only 3 node variances need to be set.

Elitism and Concentration Control.
When crossover and mutation produce a new generation, we are likely to lose the optimal solution in the process of evolution. After many scholars have demonstrated the feasibility of elitism from different angles, this paper believes that it can be incorporated into genetic algorithms to simulate biological evolution. However, the emergence of elitism makes it easy for the algorithm to enter the local optimal situation. erefore, we need to control the concentration of the current optimal solution.
If the current generation is the best generation time in history, and its concentration is lower than 0.05%, we will randomly supplement 0.03% individuals. is ensures that the optimal solution obtained in the process can be preserved. e concentration will not be too high due to elitism and destroy the diversity of the group.

Catastrophe Algorithm.
From the perspective of elitism, we consider if the algorithm loses the optimal solution in the  process of divergence. Catastrophe is a way to prevent limiting local optimality. From the perspective of biological evolution, every new overlord has a common prerequisite, which is the decline of the previous overlord. Catastrophe has become a way to break the local optimum. e condition of catastrophe [26] is that the optimal fitness of successive generations N is the same. 95% of the individuals are eliminated. New individuals are randomly generated. However, at the end of the algorithm, we need to converge the results, so we need to close in the last period of time.
But catastrophe should not happen frequently or otherwise the algorithm will drop to random search.
3.9. Immigration Algorithm. For x individuals in a population of the usual genetic algorithm, in this paper, they are divided into population individuals. is increases the diversity of genes. It is not easy to lose the diversity of other populations because of a local optimum.
But for this population N, we still need to connect them to achieve convergence. erefore, this paper considers the immigration method, where a probability judgment is made for each population. When the conditions are met, the optimal solution of the population is randomly covered to random individuals in the random population. is maintains the diversity of the population. It can also converge in individual n regions.

Termination Condition.
e termination condition is consistent with the basic genetic algorithm idea, and the algorithm is stopped by determining algebra.

Algorithm Structure
Step 1: randomly it generated initial population of N × M.
Step 3.2: the roulette method is carried out through (4) to select the group.
Step 3.3: single-point crossover and multipoint crossover are used for the two coding layers, respectively. Single-point crossover and adaptive number point crossover are used for the two coding layers, and the number of adaptive points is calculated by (5).
Step 3.4: judge whether the new individual generated meets the elitism condition, and if it meets the condition, the optimal solution is randomly reserved.
Step 3.5: it is judged whether the newly generated individual meets the conditions of catastrophe, and if so, the random individual will be regenerated and coded.
Step 3.6: probabilistically determine whether immigration is required for each population, and, if necessary, move its optimal solution to random individuals in a random population.
Step 3.7: determine whether the algebra that needs to be calculated has been reached, and if it is reached, stop and output the optimal solution. If not, jump to Step 3.1. e flow chart is shown in Figure 2.

Experimental Results and Analysis
e experimental parameter data are given in Table 2.
(1) e average picking time and average unloading time will not be calculated temporarily (2) e trolley ignores mutual collisions during operation

Bicycle Pickup Problem.
When the number of picking carts is fixed at 1 and the cost of picking carts is 0, enter different quantities to be picked up to get the data in Table 3.
From Table 3, we can see that when solving the bicycle problem, the stability of the algorithm is good, but the stability gradually decreases with the increase of the number of pick-ups. When the number of pick-ups is too large, because the value of the objective function becomes larger, the adaptation is too small and it is not easy to observe. However, in general, the algorithm can still approach the optimal solution. Based on the variance judgment, the algorithm is more stable in solving the single-vehicle pickup problem.

Fixed Multivehicle Pickup Issue.
When the quantity to be picked up is fixed at 20 and the price of the picking cart is 0, enter the number of different pickup trucks to get the data in Table 4.
From Table 4, we can see that when solving the multivehicle problem, the stability of the algorithm is related to the number of cars. As the number of cars increases, the stability begins to decline due to the increase in combinations. But according to the nature of the combination number and the last set of data, we can infer that when the number of trolleys reaches half of the total number of goods, the stability begins to rise due to the reduction of the combination.
According to the experimental results, we can see that the algorithm can approach the optimal solution when solving multivehicle problems and can solve such problems more stably.

Number of Recommended Carts.
When the quantity to be picked up is fixed at 20 and the maximum number of carts is 10, enter the different cost of each car to get the data in Table 5.
From Table 5, we can see that as the cost of the pickup truck increases, the recommended pickup truck also gradually decreases when the cost is infinite. Complexity e number of carts becomes 1. At the same time, when the cost is higher, since the range of the recommended number of cars is reduced, the algorithm is more stable and the variance is smaller. e information obtained in Table 5 shows that the algorithm can recommend the path and the number of cars that approximate the optimal solution in a relatively stable situation. After several generations of evolution, the fitness of the     Note. e average fitness is the average of 10 runs of the algorithm.
6 Complexity population of genetic algorithm would ideally reach an approximately optimal state, so we believe that the result mentioned above is acceptable.

Conclusion
From the results, we can see some advantages of the genetic algorithm: the ability to search quickly and randomly without concern for the problem domain. Starting from the group, the search has potential parallelism and can be compared with multiple individuals at the same time with good robustness. e search is inspired by evaluation function and the process is simple. Using a probabilistic mechanism to iterate, it has randomness. It is extensible and easy to combine with other algorithms. Optimizing the picking path plays an important role in reducing the operating cost of the logistics distribution center, improving logistics efficiency and customer service capabilities. A mathematical model is established for the characteristics of the problem. e load constraint and the number of picking trucks in the actual situation are considered. A two-layer coding genetic algorithm was designed to solve the problems raised, which achieved the goal of reducing the cost by recommending the number and path of picking carts. rough testing, it is believed that the algorithm under small data tends to be stable. It can achieve the goal of improving the circulation efficiency of warehousing and logistics and reducing circulation fees.
Data Availability e data supporting this study are included in the paper.

Conflicts of Interest
e authors declare that they have no conflicts of interest.