Distribution path optimization method and system, medium and equipment

Optimizing vehicle path planning through NSGA-II algorithm and edge search strategy has solved the lack of feasible domain exploration of vehicle path problems in the existing technology, and generated a path planning scheme that meets time window constraints and has the lowest driving cost, which has improved logistics and transportation efficiency and cost-effectiveness.

CN119887024APending Publication Date: 2025-04-25ANHUI UNIV

Patent Information

Application Number
CN202411968589.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

When dealing with vehicle path problems, the prior art cannot effectively explore feasible areas, resulting in low efficiency in vehicle transportation and distribution, especially when facing complex constraints, the feasible solution that meets the constraints, and the existing evolutionary algorithm ignores constraint processing, resulting in the inability to optimize vehicle path planning.

Method used

Using the non-dominant sorting genetic algorithm (NSGA-II) combined with edge search strategy, the initial population that meets the optimal time window constraints and driving costs are generated by constructing the objective function and constraints. The edge set is used to guide population evolution, perform cross-and-mutation operations, and temporary offspring is generated, and the optimal path planning that meets the time window constraints and driving costs are finally output.

Benefits of technology

It realizes the optimization of the total driving distance and cost while meeting the time window constraints, generates a balanced solution set on multiple goals, and improves logistics and transportation efficiency and cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887024A_ABST
    Figure CN119887024A_ABST
Patent Text Reader

Abstract

The invention provides a distribution path optimization method and system, a medium and equipment, and relates to the technical field of path optimization, and the method comprises the steps: defining a node set and a path set, constructing an objective function and constraint conditions based on vehicle cost, driving cost and time window penalty, and constructing a vehicle path planning model; designing an initial path detection strategy, and generating an initial population of a path planning scheme which meets time window constraints and is relatively short in driving cost: when the execution algebra of an optimization algorithm in the initial population reaches the execution path detection strategy, carrying out crossover and mutation operation on the population, and generating temporary filial generations; comparing the crossed population with the temporary offspring according to an environment selection path strategy to obtain a next-generation population; and when a set termination condition is reached, outputting a Pareto leading edge surface path planning scheme in the current population, namely a set of optimal solutions, and obtaining a path planning result. And the search direction of the population is guided, so that the convergence speed of the population is accelerated, and the distribution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of route optimization, and in particular to a distribution route optimization method, system, medium and equipment. Background Art

[0002] In recent years, the logistics industry has developed rapidly. The logistics costs of the takeaway and express delivery industries are huge and related to customer satisfaction. In addition, people have higher and higher requirements for quality of life, and the extension of delivery time is unacceptable. Major e-commerce platforms such as Meituan, Ele.me, and Express need a reasonable vehicle path planning solution to reduce corporate costs and improve delivery efficiency. How to optimize the logistics transportation path, reduce transportation costs by the shortest path, and how to optimize the vehicle loading capacity, the vehicle path planning problem has therefore become a difficult problem that needs to be solved urgently.

[0003] There are many algorithms for solving vehicle routing problems, such as exact algorithms, heuristic algorithms, evolutionary algorithms, etc. As the scale of the problem increases, combinatorial explosion will occur. Exact algorithms rely on manually designed initial solutions and local search operators, and are prone to fall into local optimality when solving relatively complex capacity-constrained vehicle routing problems.

[0004] Most of the existing evolutionary algorithms ignore the processing of constraints when solving vehicle routing problems, and use feasibility-oriented or penalty function-oriented methods for direct optimization. However, vehicle routing problems in real application scenarios often need to consider the influence of multiple factors such as vehicle capacity and service time. The existing processing methods are not only unable to fully explore the feasible domain, resulting in reduced efficiency of the entire vehicle transportation and distribution, but also unable to search for feasible solutions that meet the constraints when faced with solving complex constraint problems. The existence of these complex constraints makes the problem more difficult to solve. Therefore, how to effectively deal with these constraints in the optimization process has a crucial impact on the optimization results. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art that the feasible domain cannot be fully explored, resulting in reduced efficiency of the entire vehicle transportation and distribution, and even unable to search for feasible solutions that meet the constraints when solving complex constraint problems, the main purpose of the present invention is to provide a distribution path optimization method, system, medium and equipment.

[0006] To achieve the above object, the present invention adopts the following technical solution, a distribution path optimization method, comprising the following steps:

[0007] Define the delivery start node, delivery destination node and path set, build the objective function and constraints based on vehicle cost, driving cost and time window penalty, and build a vehicle path planning model;

[0008] According to the set initialization path strategy, an initial population of path planning that satisfies the time window constraint and the optimal driving cost is generated; each individual of the population includes a delivery start node, a delivery destination node and a path set;

[0009] When the number of generations executed by the second generation non-dominated sorting genetic algorithm in the initial population reaches the execution of the initialization path detection strategy, crossover and mutation operations are performed on the population composed of the time window and the formal cost to generate temporary offspring;

[0010] According to the environment selection initialization path strategy, the population after crossover and the temporary offspring are compared, and the next generation population is obtained according to the comparison results;

[0011] After reaching the preset number of iterations, the optimal population in the current population that meets the time window constraints and has the lowest driving cost is output. The optimal distribution start node, distribution destination node and path set are determined based on the optimal population to determine the distribution path planning result.

[0012] The objective function of the vehicle path planning model is to minimize the vehicle fixed cost and driving cost and minimize the penalty for client nodes violating the time window;

[0013] The constraints are vehicle capacity limit, each customer can only be served by one vehicle, the starting point and end point of each route are at the warehouse, each customer can only be served once, the waiting and service time limit of the warehouse, the waiting time limit of the customer node, the relationship between the arrival time and the departure time, and the time period limit of the time window.

[0014] The construction of the vehicle path planning model comprises the following steps:

[0015] Define a warehouse node, multiple distribution customer nodes and a set of routes, and establish a vehicle distribution task model;

[0016] A vehicle path planning model is constructed based on the fixed cost of vehicle travel in the path set and the penalty for violating the time window constraint during vehicle travel in the path planning solution.

[0017] The initial population for generating a path planning solution that satisfies the time window constraint and has the optimal driving cost includes the following steps:

[0018] Generate half P / 2 path planning solutions with shorter distances as individuals for target 1, and the population is recorded as S1 = {x1, x2, ..., x P / 2};

[0019] Generate half P / 2 path planning solutions that meet the time window constraint as individuals for target 2. This population is denoted as S2 = {y1, y2, …, y P / 2};

[0020] Merge populations S1 and S2 to construct the initial population;

[0021] Calculate the target values ​​f1(x) and f2(x) for each individual x in the initial population;

[0022] Assign multiple weight vectors uniformly distributed in the original objective space to the original problem, and divide the original problem into multiple single-objective sub-problems;

[0023] According to the two target values ​​of each individual x in the initial population, its solution is matched to the sub-problem that best suits it;

[0024] Record the current number of iterations t = 0, set the maximum number of iterations to t max , set the termination condition ω=0.001.

[0025] The generation of temporary offspring comprises the following steps:

[0026] The current population has not executed the path detection strategy for 50 generations, and is executing the edge search strategy:

[0027] According to the individuals in the current population with lower travel cost in the target space, edge search is performed to search out the edge set DisArc used to guide the evolution of the population.

[0028] According to the individuals in the current population that meet the time window constraint in the target space and have a lower target travel cost, edge search is performed to search out the edge set TWArc used to guide the population evolution.

[0029] Use the edges in the edge sets DisArc and TWArc corresponding to each client node in turn to guide the individuals in the population distributed at both ends of the Pareto frontier of the target space (denoted as population P) to evolve:

[0030] According to the weight vector corresponding to the individual sub-problem to be optimized, a suitable edge set is selected to guide the evolution of the individual;

[0031] According to the selected edge set, try to insert it into the original solution in turn. If the inserted solution is of higher quality than the current solution, keep it and jump to the previous step to continue the operation of the next node.

[0032] Calculate the target values ​​f1(x) and f2(x) for each individual x in the population P;

[0033] Sorting and comparing the population P paired by the second-generation non-dominated sorting and the initial population Population, and updating the initial population Population;

[0034] The NSGA-Ⅱ optimization method is used for the initial population Population, focusing the search resources on the individuals at both ends of the target space, and further optimizing the individuals at both ends;

[0035] Perform crossover and mutation operations on the population to generate temporary offspring:

[0036] Calculate the distances between sub-problems, and select the sub-problems with the top five distances from other sub-problems as the domain;

[0037] For each individual in the initial population S, randomly select the solution corresponding to another sub-problem according to the domain of the sub-problem to which the individual belongs;

[0038] Perform crossover mutation operation on the two selected individuals and store them in the temporary population Population1;

[0039] Randomly select one of the three local search operators Swap, InterChange, and TwoOpt, perform local search on each individual in the temporary population Population1, and update the temporary population Population1.

[0040] The method of obtaining the next generation population comprises the following steps:

[0041] Calculate the target values ​​f1(x) and f2(x) for each individual x in population Population1;

[0042] According to the target values ​​f1(x and f2(x) of each individual x in population Population and population1, calculate their target values ​​for each subproblem, find the most suitable individual solution for each subproblem, update population Population, and obtain the next generation of population.

[0043] The step of obtaining the path planning result comprises the following steps:

[0044] Calculate the diversity of the population. The diversity of the population is measured by Shannon entropy.

[0045] Calculate the relative difference between the current entropy and the minimum entropy.

[0046] When the relative difference is equal to or less than the relative distance represented by the parameter ω, the number of times the population has not been updated is increased by 1;

[0047] Determine whether the population has not been updated for more than 10 times or the number of iterations exceeds t max If the termination condition is not met, it returns to the previous execution, otherwise it outputs the current population Pareto frontier solution to generate the optimal distribution path planning result.

[0048] A system for a distribution path optimization method, comprising:

[0049] The conditional constraint module is used to define the delivery start node, delivery destination node and path set, build the objective function and constraint conditions based on vehicle cost, driving cost and time window penalty, and build a vehicle path planning model;

[0050] The optimization analysis module is used to generate an initial population of path planning that meets the time window constraint and has the optimal driving cost according to the set initialization path strategy; each individual of the population includes a delivery start node, a delivery destination node and a path set; when the second generation non-dominated sorting genetic algorithm in the initial population executes the number of generations to execute the initialization path detection strategy, the population is crossover and mutation operations are performed to generate temporary offspring; the crossover population and the temporary offspring are compared according to the environment selection initialization path strategy to obtain the next generation population;

[0051] Obtain the path planning module. When the preset number of iterations is reached, the optimal population in the current population that meets the time window constraints and has the lowest driving cost is output. The optimal delivery start node, delivery destination node and path set are determined based on the optimal population to determine the delivery path planning result.

[0052] Compared with the prior art, the beneficial effects of the present invention are:

[0053] 1. For two targets in different directions of the soft time window, we conduct separate detections. One focuses on reducing transportation costs by reducing other costs related to the degree of violation of the time window, and the other focuses on reducing the length of the vehicle's driving path to reduce the vehicle's driving costs. This method of detecting both ends separately helps to better explore the edges that have a greater impact on the two targets, so that customized search strategies can be designed later to guide the evolution of the population based on the explored edges and find better solutions. This new detection method combined with the formulated search strategy can effectively guide the algorithm's search direction and find a path planning solution with a shorter distance and lower cost.

[0054] 2. An initialization strategy specifically for vehicle paths with soft time windows is applied. For the vehicle travel cost target, the edges that rank first and second in distance between nodes are used as the basic edges. The initial structure of the solution is created using the basic edges, and then the missing nodes are inserted into the existing solution using the greedy insertion method to construct a complete solution. For the vehicle time window violation target, the customer nodes are clustered first. The clustering is divided into two time window distances or spatial distances as clustering indicators according to the width of the customer node time window in the instance. Customer nodes with similar distances are clustered into one category, and then a path is formed in this category. Taking different initialization methods for different target directions can help generate an initial population with diverse and high-quality characteristics. Subsequently, the algorithm alternates between population-based search and neighborhood-focused exploration, aiming to guide the population to evolve toward the Pareto optimal frontier. Through a carefully designed initialization and iterative search-exploration process, the algorithm can find solutions that meet the time window constraints while optimizing the total travel distance and cost, and finally generate a set of solutions that are balanced on multiple targets.

[0055] 3. The present invention optimizes the two objectives of total delivery distance and time window violation degree at the same time, and uses multi-objective optimization technology to obtain multiple allocation schemes that are balanced on the Pareto front surface, which is beneficial for logistics companies to choose more appropriate implementation plans according to actual conditions, thereby achieving the goals of saving transportation costs and balancing labor time. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0057] Figure 1 is a flow chart of the method of the present invention;

[0058] Figure 2 A schematic diagram of the edge set-guided population evolution of the present invention;

[0059] Figure 3 This is an example diagram of the correlation between nodes of the present invention;

[0060] Figure 4 It is a schematic diagram of the process framework of the present invention. DETAILED DESCRIPTION

[0061] Vehicle routing problems in real-world application scenarios often need to consider the influence of multiple factors such as vehicle capacity and service time. The existence of these complex constraints makes the problem more difficult to solve. How to effectively handle these constraints in the optimization process has a crucial impact on the optimization results. Therefore, the research on constraint processing technology in vehicle routing problems has important theoretical and practical value. However, most of the existing evolutionary algorithms ignore the processing of constraints when solving vehicle routing problems, and use feasibility-oriented or penalty function-oriented methods for direct optimization. These processing methods not only fail to fully explore the feasible domain, resulting in a reduction in the efficiency of the entire vehicle transportation and distribution, but also fail to search for feasible solutions that meet the constraints when solving complex constraint problems.

[0062] In order to solve the shortcomings of the above-mentioned prior art, the present invention proposes a delivery path optimization method for vehicle delivery tasks with time windows with edge search, so that according to a given vehicle delivery task, the total driving distance and the number of vehicles used can be minimized as much as possible while finding a path planning scheme that meets the time window constraints and capacity constraints, thereby reducing the transportation distance and transportation costs and improving the efficiency and benefits of logistics transportation.

[0063] The main purpose of the present invention is to provide a distribution path optimization method, comprising the following steps:

[0064] Define the node set and path set, build the objective function and constraints based on vehicle cost, driving cost and time window penalty, and build the vehicle path planning model;

[0065] Design an initial path detection strategy to generate an initial population of path planning solutions that meet time window constraints and have the best travel cost:

[0066] When the number of generations executed by the optimization algorithm in the initial population reaches the execution path detection strategy, crossover and mutation operations are performed on the population to generate temporary offspring;

[0067] According to the environmental selection path strategy, the population after crossover and the temporary offspring are compared to obtain the next generation population;

[0068] When the set termination condition is reached, the Pareto frontier path planning scheme in the current population, i.e., a set of optimal solutions, is output to obtain the path planning result.

[0069] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.

[0070] Embodiment 1:

[0071] The present invention discloses a distribution path optimization method based on path detection and applicable to vehicle distribution tasks with soft time windows, which is applied to vehicle distribution tasks consisting of a single warehouse, N task nodes with distribution time constraints and undifferentiated vehicles with capacity constraints, and includes:

[0072] 1. Establish a vehicle delivery task model;

[0073] 2. Generate an initial population of path planning solutions that meet the time window constraints and have a shorter travel cost according to the initialization strategy;

[0074] 3. Determine whether to execute the path detection strategy for the current population according to the current algorithm execution algebra. If it reaches the implementation of this strategy, otherwise execute step 4;

[0075] 4. Perform crossover and mutation operations on the population to generate temporary offspring;

[0076] 5. Compare the population after crossover and temporary offspring according to the environmental selection strategy to obtain the next generation population;

[0077] 6 If the termination condition is met, the Pareto front path planning scheme in the current population is output; otherwise, return to step 3 to execute.

[0078] The present invention can utilize the local information of the problem itself and the high-quality solutions obtained during the detection process to detect edges that are beneficial to the direction of population evolution, and guide the search direction of the population based on these detected edges to accelerate the convergence speed of the population, thereby improving the distribution efficiency.

[0079] The present invention will be further described below in conjunction with the accompanying drawings and implementation modes.

[0080] Embodiment 2:

[0081] See also Figure 1-Figure 4 In this embodiment, a distribution path optimization method based on path detection for vehicle distribution tasks with soft time windows is designed to solve the vehicle distribution task consisting of a single warehouse, N task nodes with delivery time constraints, and K undifferentiated vehicles with capacity constraints. The distribution path optimization method can combine the advantages of path planning schemes generated by different search operators, and find a low driving distance path planning scheme that meets the time window and capacity constraints, thereby improving the distribution efficiency. Specifically, if Figure 1 As shown, the distribution path optimization method is carried out in the following steps:

[0082] Step 1: Establish vehicle delivery task model:

[0083] Step 1.1: Define a node set V=v consisting of a warehouse node v0 and N delivery customer nodes i,i=0,1,2,…,N,v i represents the i-th node; define the path set E = {e ij |i,j=0,1,2,…,N},e ij represents the i-th node v i To the jth node v j Path;

[0084] Step 1.2: Use equations (1) and (2) to construct the objective function of the vehicle path planning model:

[0085]

[0086]

[0087] In formula (1), h k represents the transportation cost per unit distance of vehicle k, and f k is the fixed cost of using vehicle k, c ij is the vertex v i and vertex v j The distance between ijk =1, indicating that there is a vehicle k traveling from vertex i to vertex j, otherwise it is 0, so f1 represents the fixed cost of vehicle travel in the path planning scheme, including travel cost and vehicle cost. In formula (2), z i Indicates visiting the i-th node v i Time, μ i (z i ) represents the client node v i The degree of violation of the time window is calculated by formula (3), e i , l i Respectively represent the i-th node v i The left port and the right port of the time window, so f2 represents the penalty for violating the time window constraint during the vehicle driving process in the path planning scheme. The ultimate goal of the problem model is to find a set of path planning schemes for the vehicle so that under the premise of satisfying the constraints, a set of Pareto front solutions are found that consider the degree of time window violation and the fixed cost of the vehicle respectively.

[0088] Step 1: Establish a vehicle delivery task model;

[0089] Step 1.1: Define a node set V=v consisting of a warehouse node v0 and N delivery customer nodes i ,i=0,1,2,…,N,v i represents the i-th node; define the path set E = {e ij |i,j=0,1,2,…,N},e ij represents the i-th node v iTo the jth node v j Path;

[0090] Step 1.2: Use equations (1) and (2) to construct the objective function of the vehicle path planning model:

[0091] f1=K (4)

[0092]

[0093] In formula (4), K represents the number of vehicles, so f1 represents the total number of vehicles used in the path planning scheme. In formula (5), N represents the number of delivery customer nodes, d ij represents the i-th node v i To the jth node v j The distance, a ijk Indicates whether the kth vehicle in the path planning solution passes through the i-th node v i To the jth node v j Path, if it passes through a ijk =1, otherwise a ijk = 0. The ultimate goal of the problem model is to find a set of path planning solutions for the vehicle so that the number of vehicles used and the total distance traveled can be minimized while satisfying the constraints;

[0094] Step 1.3: Use equations (6) to (14) to construct the constraints of the vehicle path planning model.

[0095]

[0096]

[0097]

[0098]

[0099]

[0100] w0=s0=0(11

[0101]

[0102]

[0103]

[0104] In this model:

[0105] Constraint (6) ensures that the vehicle capacity is not exceeded;

[0106] Constraint (7) ensures that each customer has only one car;

[0107] Constraint (8) ensures that the start and end points of each route are at the parking lot;

[0108] Constraints (9) and (10) ensure that each client is served only once;

[0109] Constraint (11) defines the waiting and service time at the warehouse;

[0110] Constraint (12) defines the waiting time.

[0111] Constraint (13) expresses the relationship between the time to reach a vertex and the time to depart from its previous vertex;

[0112] Constraint (14) defines that the time window must be greater than or equal to 0;

[0113] Step 2: Randomly initialize and generate an initial population that meets the constraints:

[0114] Step 2.1: Generate P / 2 short-distance path planning solutions as individuals for target 1. The population is denoted as S1 = {x1, x2, …, x P / 2}; Individual x in the vehicle routing optimization problem with time windows is usually represented by the arrangement of customers (1~N) and warehouse nodes (0), where the routes of different vehicles are separated by warehouses, starting from the warehouse and returning to the warehouse after the service is completed. For distance target initialization, the edges that rank first and second in distance between nodes are usually used as the basic edges, such as (1-2, 2-3, 5-6), and the initial structure of the solution (0-1-2-3-5-6-0) is created using the basic edges. Then, the missing nodes are inserted into the existing solution (0-1-2-3-4-5-6-0) using the greedy insertion method, and then divided according to the capacity limit (0-1-2-0-3-4-5-6-0) to construct a complete solution;

[0115] Step 2.2: Generate P / 2 path planning solutions that meet the time window constraint as individuals for target 2. The population is denoted as S2 = {y1, y2, …, y P / 2}; Aiming at the target direction of vehicle time window violation degree, the customer nodes are clustered first. The clustering is divided into two time window distances or spatial distances as clustering indicators according to the width of the customer node time window in the instance. Customer nodes with similar distances are clustered into one category, and then customer nodes are selected in this category in turn to form a path in the individual, and all categories are traversed to complete the construction of a complete solution.

[0116] Step 2.3, merge populations S1 and S2 to construct an initial population, which is recorded as Population;

[0117] Step 2.4, calculate the target values ​​f1(x) and f2(x) of each individual x in the initial population S according to equations (1) and (2);

[0118] Step 2.4: Assign multiple weight vectors uniformly distributed in the original target space to the original problem, and divide the original problem into multiple single-target sub-problems.

[0119] Step 2.5: Calculate the fitness of each subproblem based on the two target values ​​of each individual x in the population S, and match their solutions to the subproblem that best suits them. The fitness calculation formula is as follows:

[0120] FIT=λ i (f j -z * ) (15)

[0121] Among them, λ i represents the i-th subproblem, f j represents the jth individual in the population, z * Represents the reference node, and the entire fitness value represents the distance between the individual and the reference node. The smaller the distance, the higher the fitness.

[0122] Step 2.6: Record the current number of iterations t = 0, and set the maximum number of iterations to t max , set the termination condition ω=0.001;

[0123] Step 3: Determine whether to execute the path detection strategy for the current population according to the current algorithm execution algebra. If it reaches this strategy, execute step 4:

[0124] Step 3.1: The current population has not executed the path detection strategy for 50 generations, so it executes the edge search strategy:

[0125] Step 3.1.1, according to the individuals in the current population with lower driving cost targets in the target space, edge search is performed to search out the edge set used to guide the population evolution, which is recorded as DisArc. The specific steps of the detection method are as follows: for each edge, insert it into each vehicle segment of the elite solution set that contains the detection node in turn. For example, to detect the edge (i, j), two aspects must be considered in calculation. One is the insertion cost of this edge. This edge insertion is to insert the edge (i, j) into the position where the original i customer node is located to calculate the growth cost. After the edge is inserted, the second aspect must be considered, which is the impact of the removal of node j from the original vehicle segment on the vehicle driving cost. The combination of these two aspects is the degree of influence of the edge on this elite solution (the change in driving cost), which is represented by Di,j. The top five edges of each node are selected and inserted into the edge set.

[0126] Step 3.1.2: Based on the individuals in the current population that meet the time window constraint in the target space and have a lower target travel cost, edge search is performed to find the edge set that guides the population evolution, denoted as TWArc. The detection method is mainly to calculate the time-space distance (DST) between nodes. i,j ), select the top five edges in terms of space-time distance and insert them into the edge set. The space-time distance calculation formula is as follows.

[0127]

[0128] Among them, the space-time distance is represented by DS Ti ,j, represents the temporal and spatial distance between customer i and customer j. DT i,j and Disi,j represent the time and space distances between customer points i and j, respectively. Based on this index, the top five edges are selected for each node as the detected set.

[0129] Step 3.2: Use the edges in the edge sets DisArc and TWArc corresponding to each client node in turn to guide the individuals in the population distributed at both ends of the Pareto frontier of the target space (denoted as population P) to evolve.

[0130] Step 3.2: Use the edges in the edge sets DisArc and TWArc corresponding to each client node in turn to guide the individuals in the population distributed at both ends of the Pareto frontier of the target space (denoted as population P) to evolve:

[0131] Step 3.2.1: For the elite solutions at both ends of the Pareto front surface, edges of different modes are mixed in proportion according to their target directions (MOEAD target weight vectors) to form the edge set ArcIn to be inserted.

[0132] Step 3.2.2. According to the selected edge set ArcIn, try to insert it into the original solution in turn. The insertion method is to remove all the nodes of this edge in the original solution and then try to insert this edge as a whole. After insertion, determine whether it is optimized. If it is optimized, keep it and continue to explore the next node. Insert different edges into the elite solutions at both ends one by one to try to find a better solution, which helps further convergence and escape from the local optimum.

[0133] Step 3.3: Calculate the target values ​​f1(x) and f2(x) for each individual x in population P according to equations (1) and (2).

[0134] Step 3.4: Sort and compare the population P and the population Population according to non-domination, and update the population Population.

[0135] Step 3.5: Use the NSGA-Ⅱ optimization method for population, concentrate search resources on individuals at both ends of the target space, and perform several local searches on the individuals at both ends to further optimize the individuals at both ends.

[0136] Step 4: Perform crossover and mutation operations on the population to generate temporary offspring:

[0137] Step 4.1 calculates the distances between sub-problems, and selects the sub-problems with the top five distances from each sub-problem to other sub-problems as the domain.

[0138] Step 4.2 For each individual in the population S, randomly select the solution corresponding to another subproblem according to the domain of the subproblem to which the individual belongs.

[0139] Step 4.3 performs crossover mutation operation on the two selected individuals and stores them in the temporary population Population1.

[0140] Improved crossover operator for vehicle routing problem with time window: For the two selected parents, the crossover operator randomly selects a path from each of the two parent individuals and randomly selects a position in the path to divide each path into two sequences. Then the first half of the sequences of the two paths are exchanged to generate a new path, which in turn constitutes a new child individual. If some customers are missing in the child individuals, the child is repaired by randomly inserting the missing customers into a feasible position; if there are duplicate customers in the two paths, the duplicate customers are randomly deleted.

[0141] Removal and reinsertion mutation operator for the vehicle routing problem with time windows: For the offspring individuals generated after crossover, the mutation operator randomly selects two paths from the individuals. If the two paths are the same, a redistribution operation is performed, otherwise an exchange operation is performed. The redistribution operation selects a sequence from the path and checks whether each customer in the sequence can be inserted into other routes to obtain a feasible solution with a shorter total distance. If there are multiple positions that can be inserted, a position is randomly selected and inserted; if there is no position that can be inserted, the position remains unchanged. The exchange operation selects a sequence from each path and checks whether each customer in each sequence can be inserted into another route to obtain a feasible solution with a shorter distance. If there are multiple positions that can be inserted, a position is randomly selected and inserted; if there is no position that can be inserted, the position remains unchanged.

[0142] Step 4.4, randomly select one of the three local search operators Swap, InterChange, and TwoOpt, perform local search on each individual in the temporary population Population1, and update the temporary population Population1;

[0143] Step 5: Compare the crossover population and temporary offspring according to the environmental selection strategy to obtain the next generation population:

[0144] Step 5.1 Calculate the target values ​​f1(x) and f2(x) for each individual x in population Population1 according to equations (1) and (2).

[0145] Step 5.2: Based on the target values ​​f1(x) and f2(x) of each individual x in Population and Population1, calculate their target values ​​for each subproblem, find the most suitable individual solution for each subproblem, and update Population.

[0146] Step 6: Determine whether the termination condition is met. If so, output the current population Pareto frontier path planning scheme; otherwise, return to step 3 to execute:

[0147] Step 6.1 calculates the diversity of the population. The diversity of the population is measured by Shannon entropy.

[0148] Step 6.2 calculates the relative difference between the current entropy and the minimum entropy.

[0149] Step 6.3: When the relative difference is equal to or less than the relative distance represented by the parameter ω, the number of times the population has not been updated is increased by 1;

[0150] Step 6.4 determines whether the number of times the population has not been updated is greater than 10 times or whether the number of iterations exceeds tmax. If the termination condition is not met, return to step 3 to execute, otherwise output the current population Pareto front solution.

[0151] Embodiment 3:

[0152] In this example, a logistics company needs to provide delivery services to 20 customer nodes distributed in different areas of the city. The company has 5 delivery vehicles, the fixed cost of each vehicle is 100 yuan, the driving cost is 2 yuan per kilometer, and the penalty for violating the time window is 10 yuan per minute. The capacity of all vehicles is 500 kg, and the demand of each customer node does not exceed 50 kg. The warehouse operates from 8 am to 5 pm.

[0153] The specific steps to obtain the optimal delivery route include:

[0154] Define node sets and path sets: warehouse node: 1 (marked as 0), customer nodes: 20 (marked as 1 to 20), path set: contains all possible vehicle driving paths, and build a vehicle path planning model:

[0155] Objective function: Minimize vehicle fixed cost (100 yuan / vehicle) + driving cost (2 yuan / km) + time window penalty (10 yuan / minute)

[0156] Constraints: vehicle capacity limit (500 kg / vehicle), each customer is served by one vehicle, the starting and ending points of each route are at the warehouse, each customer is served once, waiting and service time limits at the warehouse (8:00-17:00), waiting time limits for customer nodes, the relationship between arrival time and departure time, and time window time phase limits

[0157] Design an initial path detection strategy: Generate 10 path planning solutions with shorter distances (for target 1); Generate 10 path planning solutions that meet the time window constraint (for target 2); Merge two populations to construct an initial population with 20 individuals; Assign 10 weight vectors to the original problem and divide the original problem into 10 single-target sub-problems. Record the current iteration number as 0 and set the maximum iteration number t max is 1000, and the termination condition ε=0.001

[0158] Generate temporary offspring: When the number of iterations reaches 50, execute the edge search strategy: select some individuals with lower travel cost targets from the current population, perform edge search, and obtain the DisArc set; select some individuals that meet the time window constraints and have lower travel cost targets from the current population, perform edge search, and obtain the TWArc set. Use the edges in the DisArc and TWArc sets to guide the evolution of individuals at both ends of the Pareto frontier in the population; perform crossover and mutation operations on individuals in the population P to generate temporary offspring; perform local search on each individual in the temporary population and update the temporary population;

[0159] To obtain the next generation population: obtain the target value of each individual in the population; calculate the target value of each individual on 10 sub-problems; find the optimal individual solution for each sub-problem, update the population, and obtain the next generation population

[0160] To obtain the path planning results: obtain the diversity of the population and measure it using Shannon entropy; calculate the relative difference between the current entropy and the minimum entropy; when the relative difference is equal to or less than 0.01, the number of times the population has not been updated is increased by 1; determine whether the number of times the population has not been updated is greater than 10 times or the number of iterations exceeds tmax ; When the termination condition is met, the current population Pareto frontier solution is output to generate the optimal path planning result

[0161] After 1000 iterations, a set of Pareto optimal solutions was finally obtained, which included 5 vehicle delivery routes. Each route met the vehicle capacity limit and time window constraint, and the total cost (fixed cost + driving cost + time window penalty) was minimized.

[0162] The specific path planning results are as follows:

[0163] Vehicle 1: Warehouse->Customer 1->Customer 3->Customer 5->Warehouse, total cost: 320 yuan;

[0164] Vehicle 2: Warehouse->Customer 2->Customer 4->Customer 6->Warehouse, total cost: 300 yuan;

[0165] Vehicle 3: Warehouse->Customer 7->Customer 8->Customer 9->Warehouse, total cost: 280 yuan;

[0166] Vehicle 4: Warehouse->Customer 10->Customer 11->Customer 12->Warehouse, total cost: 260 yuan;

[0167] Vehicle 5: Warehouse->Customer 13->Customer 14->Customer 15->Customer 16->Warehouse, total cost: 350 yuan;

[0168] The above is a specific implementation case, which demonstrates the application of distribution path optimization method in actual logistics distribution.

[0169] It should be noted that, in the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0170] The above embodiments are merely examples of the present invention and do not limit the protection scope of the present invention. All designs that are the same or similar to the present invention fall within the protection scope of the present invention.

Claims

1. A distribution path optimization method, characterized in that: The following steps are involved: Define the delivery start node, delivery destination node and path set, build the objective function and constraints based on vehicle cost, driving cost and time window penalty, and build a vehicle path planning model; According to the set initialization path strategy, an initial population of path planning that satisfies the time window constraint and the optimal driving cost is generated; each individual of the population includes a delivery start node, a delivery destination node and a path set; When the number of generations executed by the second generation non-dominated sorting genetic algorithm in the initial population reaches the execution of the initialization path detection strategy, crossover and mutation operations are performed on the population composed of the time window and the formal cost to generate temporary offspring; According to the environment selection initialization path strategy, the population after crossover and the temporary offspring are compared, and the next generation population is obtained according to the comparison results; After reaching the preset number of iterations, the optimal population in the current population that meets the time window constraints and has the lowest driving cost is output. The optimal distribution start node, distribution destination node and path set are determined based on the optimal population to determine the distribution path planning result.

2. The delivery route optimization method according to claim 1, characterized in that: The objective function of the vehicle path planning model is to minimize the vehicle fixed cost and driving cost and minimize the penalty for client nodes violating the time window; The constraints are vehicle capacity limit, each customer is served by one vehicle, the starting point and end point of each route are at the warehouse, each customer is served once, waiting and service time limit of the warehouse, waiting time limit of the customer node, the relationship between the arrival time and the departure time, and the time stage limit of the time window.

3. The delivery route optimization method according to claim 1, characterized in that: The construction of the vehicle path planning model comprises the following steps: Define a warehouse node, multiple distribution customer nodes and a set of routes, and establish a vehicle distribution task model; A vehicle path planning model is constructed based on the fixed cost of vehicle travel in the path set and the penalty for violating the time window constraint during vehicle travel in the path planning solution.

4. The delivery route optimization method according to claim 1, characterized in that: The generating of the initial population of the path planning scheme that satisfies the time window constraint and has the optimal driving cost comprises the following steps: Generate half of the path planning solutions with shorter distances as individuals for target 1, and the population is recorded as S1 = {x1, x2, ..., x P / 2 }; Generate half of the path planning solutions that meet the time window constraint as individuals for target 2, and the population is denoted as S2 = {y1, y2, …, y P / 2 }; Merge populations S1 and S2 to construct the initial population; Get the target values ​​f1(x) and f2(x) for each individual x in the initial population; Assign multiple weight vectors uniformly distributed in the original objective space to the original problem, and divide the original problem into multiple single-objective sub-problems; According to the two target values ​​of each individual x in the initial population, its solution corresponds to the sub-problem that best suits it; Record the current number of iterations t = 0, set the maximum number of iterations to t max , set the termination condition ω=0.

001.

5. The delivery route optimization method according to claim 4, characterized in that: The generation of temporary offspring comprises the following steps: The current population has not executed the path detection strategy for 50 generations, and is executing the edge search strategy: According to the individuals in the current population with lower travel cost in the target space, edge search is performed to find the edge set DisArc used to guide the population evolution; According to the individuals in the current population that meet the time window constraint in the target space and have a lower target travel cost, edge search is performed to search out the edge set TWArc used to guide the population evolution; Use the edges in the edge set DisArc and TWArc corresponding to each client node in turn to guide the individuals distributed at both ends of the Pareto frontier of the target space in the population to evolve, and the individuals are recorded as populations; select a suitable edge set to guide the evolution of the individual according to the weight vector corresponding to the individual subproblem to be optimized; According to the selected edge set, try to insert it into the original solution in turn. If the inserted solution is of higher quality than the current solution, it is retained and jumps to the previous step to continue the operation of the next node; Get the target values ​​f1(x) and f2(x) for each individual x in the population P; Sorting and comparing the population and population processed by the second generation non-dominated sorting genetics, and updating the population; The NSGA-Ⅱ optimization method is used for the updated population, focusing the search resources on the individuals at both ends of the target space, and further optimizing the individuals at both ends; Perform crossover and mutation operations on the population to generate temporary offspring: Calculate the distances between sub-problems, and select the sub-problems with the top five distances from other sub-problems as the domain; For each individual in the initial population, randomly select the solution corresponding to another sub-problem according to the domain of the sub-problem to which the individual belongs; Perform crossover mutation operation on the two selected individuals and store them in the temporary population; Perform local search on each individual in the temporary population and update the temporary population.

6. The delivery route optimization method according to claim 5, characterized in that: The method of obtaining the next generation population comprises the following steps: Get the target values ​​f1(x) and f2(x) for each individual x in the temporary population; According to the target values ​​f1(x) and f2(x) of each individual x in the updated population and temporary population, calculate their target values ​​for each subproblem, find the optimal individual solution for each subproblem, update the temporary population, and obtain the next generation population.

7. The delivery route optimization method according to claim 1, characterized in that: The method of obtaining the optimal distribution path planning result includes the following steps: Get the diversity of the population, measured using Shannon entropy; Based on Shannon entropy, get the relative difference between the current entropy and the minimum entropy. When the relative difference is equal to or less than the relative distance represented by the parameter ω, the number of times the population has not been updated increases by 1; Determine whether the population has not been updated for more than 10 times or the number of iterations exceeds t max , until the termination condition is met, the current population Pareto frontier solution is output to generate the optimal distribution path planning result.

8. A system for a delivery route optimization method, characterized in that: include: The conditional constraint module is used to define the delivery start node, delivery destination node and path set, build the objective function and constraint conditions based on vehicle cost, driving cost and time window penalty, and build the vehicle path planning model; The optimization analysis module is used to generate an initial population of path planning that meets the time window constraint and has the optimal driving cost according to the set initialization path strategy; each individual of the population includes a delivery start node, a delivery destination node and a path set; when the second generation non-dominated sorting genetic algorithm in the initial population executes the number of generations to execute the initialization path detection strategy, the population is crossover and mutation operations are performed to generate temporary offspring; the crossover population and the temporary offspring are compared according to the environment selection initialization path strategy to obtain the next generation population; Obtain the path planning module. When the preset number of iterations is reached, the optimal population in the current population that meets the time window constraints and has the lowest driving cost is output. The optimal delivery start node, delivery destination node and path set are determined based on the optimal population to determine the delivery path planning result.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Multi-target vehicle path optimization method and system, electronic equipment and medium

    CN116384602A

  • Double-target emergency material transportation optimization method, system and equipment

    CN116432883A

  • Power grid material distribution path planning method using big data

    CN116882883A

  • Integrated learning-based path planning method for vehicle distribution task with time window

    CN117391573A

  • Computerized system and method for developing optimized cargo transportation solutions

    US20220156693A1

Cited By

  • Dynamic planning method and device for air-ground cooperative end distribution, and medium

    CN120688967A

  • A dynamic programming method, device and medium for air-ground cooperative terminal distribution

    CN120688967B

  • Path planning method for transportation of bulk edible oil tank truck

    CN120806321A