Research on Logistics Distribution Path Planning Based on Genetic Algorithm

In this paper, SF express company Jinzhou Guta District Pinganli business point as an example, to investigate its distribution, statistical analysis of the survey results, summed up the problems in logistics and distribution. Through the systematic study of the problem, a planning model with time window and with the objective of minimizing the total cost of distribution is established. At the same time, an intelligent algorithm for distribution path optimization - Genetic Algorithm (GA) is designed. Genetic algorithm is used to design chromosome coding methods and genetic operators for solving the planning model with the objective of minimizing the total cost of distribution. Finally, the simulation experiment is carried out. MATLAB software is used to solve the distribution route and the total driving distance of vehicles, and the distribution route with the goal of minimizing the total distribution cost is obtained.


Introduction
As an important part of China ' s economy, logistics has developed rapidly in recent years. On the one hand, due to the strong support of the government, the government has paid more and more attention to the logistics industry and formulated a lot of relevant policies. On the other hand, thanks to the development of economy and science and technology, the rapid development of economy has promoted the development of the whole logistics industry. The development of science and technology has gradually made China move from traditional logistics to intelligent logistics, which greatly saves the manpower consumption of the logistics industry and improves the efficiency of the logistics industry in China.
Logistics distribution is a crucial link in the logistics system of the logistics industry. However, due to the relatively large proportion of logistics distribution costs in all logistics costs, and whether the selection of distribution lines is appropriate or not directly affects the speed of vehicles, the total cost of distribution, customer satisfaction and enterprise benefits in the distribution process, especially when the lines are more complex for multiple customers with time requirements to deliver goods. Using scientific and reasonable methods to optimize the distribution line is a key link in logistics distribution. Therefore, selecting a simple, appropriate and efficient distribution route in the distribution process of distribution vehicles can not only reduce the distribution time, shorten the driving distance of vehicles, reduce the distribution cost, and improve the efficiency of enterprises, but also take the time window This paper mainly studies the logistics distribution path problem with time windows, namely the vehicle routing problem with time windows (VRPTW). Taking Shunfeng Company as the research object, through investigation and data collection, this paper finds out some problems existing in the terminal distribution path of Shunfeng Company. Through the analysis of the problems found and the systematic study of the logistics distribution path problem, a planning model with time windows and the goal of minimizing the total distribution cost is established. At the same time, the genetic algorithm is used to solve the end logistics distribution path problem of Shunfeng Company with time window. Therefore, this paper has a strong practical significance to solve VRPTW.

Description of Vehicle Routing Problems
Vehicle routing problem (VRP) is obtained by a series of evolution of Traveling Salesman Problem (TSP). Traveling Salesman Problem (TSP) is a kind of problem that is difficult to solve in combinatorial optimization, which belongs to the NP difficulty level. The TSP problem is easy to describe, that is, the distance between n cities has been known in advance. The existing passenger needs to start from a certain city, and all cities should be passed by. Each city only walks once and does not allow repetition. Finally, it needs to return to the starting point, and how to arrange the route to make the shortest route.
The general description of vehicle routing problem (VRP) is as follows. For a series of given customer points ( delivery points or pick-up points ), when the demand of each customer point and the distance between each customer point are known and the parameters are set up completely, the appropriate vehicle distribution and driving path is formulated, so that the distribution vehicle starts from the distribution center, and under certain constraints ( such as time window limit, vehicle number, vehicle load limit, customer demand, etc. ), the goods are sent to the designated location of the customer orderly through each customer point, and each customer can only be visited once, and finally returns to the distribution center, and finally achieves certain goals ( such as the minimum transportation cost, the shortest vehicle driving distance or the minimum vehicle driving time ). The vehicle routing problem can be described as follows ( Figure.

Vehicle routing Problems With Time Windows
The so-called time window is actually a time range, which can be expressed as an interval [ai, bi]. This time range is an access time interval determined by the earliest access time ai and the latest access time bi required by the i customer who needs to be served. If the distribution center does not meet the customer ' s time range requirements when distributing goods to customers, it is bound to produce certain economic losses. Therefore, in the pursuit of minimizing the total distribution cost, it is necessary for logistics enterprises to consider the economic losses caused by time window constraints into the total distribution cost.
Based on customer satisfaction, time windows can be divided into two categories according to whether the constraints of time windows are strict or not: soft time windows (STW) and hard time windows (HTW). Therefore, VRP with time window can also be divided into two categories: soft time window VRP and hard time window VRP. (1) The requirement for the soft time window VRP is that the delivery vehicle delivers the goods to the customer as far as possible within the time window constraints, otherwise a penalty will be imposed ( i.e., if the delivery vehicle arrives before the earliest visit time is required, it must wait at the task point, wait until the visit time for customer service, the cost lost during the waiting time, or the penalty imposed when the vehicle arrives after the request for the latest visit time ). As shown in Fig.2, is a possible penalty function of soft time window.

Fig. 2 Soft time window penalty function graph
(2) The requirement of hard time window VRP is that the delivery vehicle must deliver the goods to the customer within the time window constraints, otherwise the customer will refuse the delivery service. When the time of delivery vehicles accessing customers is within the time range required by customers, the penalty function value P (t) = N (M represents a large positive number). As shown in Figure 2.3, a Penalty Function for a hard time window.

Fundamental Assumption
The vehicle routing problem of logistics distribution with time window constraints is modeled. The ultimate goal of the problem is to find a vehicle routing with the minimum total cost of distribution on the premise of meeting the needs of all customers. Now make the following basic assumptions :  The goods are unidirectional, i.e. the work of the distribution vehicle is only delivery.  There is a linear relationship between vehicle routing and distribution cost.  The geographical coordinates of the distribution centre and each customer point are known.  There is only one distribution center, and each distribution line starts with the distribution center and ends with the distribution center.
 A region is distributed by a distribution vehicle.

The Establishment of Penalty Function
The following is the corresponding penalty cost function established in this paper.
Define the parameters used in the above : Pi ( t ) : represents the penalty cost when the vehicle reaches customer i at time t. ai : represents the earliest service time allowed by customer i. bi : represents the latest service time allowed by customer i. si : represents the time when the vehicle reaches customer i. h1 : Unit time penalty factor for vehicles ahead of time window requirements. h2 : Penalty factor per unit time required for vehicles to be later than the time window. The objective of this paper is to minimize the total cost of distribution. The cost consists of two parts : the whole travel cost of the distribution vehicle returning to the distribution center after completing the distribution tasks of all customers from the distribution center and the penalty cost when the distribution time is inaccurate. Distribution vehicles return to the distribution center after completing the distribution tasks of all customers from the distribution center. Each customer is served only once by a delivery vehicle.

algorithm design
In view of the above established mathematical model of logistics distribution vehicle routing problem with time windows, an intelligent algorithm for VRPTW optimization, Genetic Algorithm, is designed. The genetic algorithm uses the idea of natural selection to encode each customer point as the gene of chromosome, encodes the arrangement of n customer points into chromosomes, and takes the reciprocal of total distribution cost as the fitness function of genetic algorithm. Through random selection, crossover and mutation genetic operators, the offspring with high fitness are searched. Among them, the selection operator and the hybrid operator realize the search of the descendants. To realize every point in the problem, the mutation operator plays a role, so as to ensure the global optimal effect.

Actual data and parameters
In this paper, SF Express Co., Ltd. is selected for research. Through consulting the heads of the research sites, the current situation of the logistics terminal distribution of SF Co., Ltd. is roughly understood. According to the information obtained from the investigation, the problems existing in the logistics terminal distribution are summarized. In particular, 20 customer points of one of the distribution vehicles passing through the distribution task in one day were selected as the research object, and the distribution route (under the constraint of time window) was optimized. This example assumes that the average service time per customer point is the same (5 minutes). The rectangular coordinates and time window constraints of each customer point are shown in Table 5 The following table summarizes the basic data.

Fig. 5 Graph of optimal test results
The optimal distribution route of delivery vehicles is shown in the figure below.

Conclusion
In the era of rapid socio-economic development, with the rapid development of e-commerce industry, online shopping groups are increasing. At the same time, customers also put forward higher requirements for the operational efficiency and service quality of express delivery. In order to solve a series of problems existing in the development of express transportation at the present stage, this paper combines the current situation of the transportation development of SF express in Jinzhou City, according to the information and data obtained from the survey, analyzes the statistical results of the survey, summarizes the problems existing in express delivery, and then uses genetic algorithm to optimize the distribution vehicle routing problem based on customer satisfaction ( customer time requirement ), and solves the optimal distribution path.