Route planning method and system for large-scale vehicle route problem
Through the clustering and double-layer optimization framework methods, the problems of increased computational complexity and insufficient generalization capabilities in large-scale vehicle path problems are solved, and more reasonable path planning and higher reliability are achieved.
Patent Information
- Application Number
- CN202411967007.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-30
AI Technical Summary
When the prior art deals with large-scale vehicle path problems, the calculation complexity increases, resulting in insufficient generalization capabilities and affects the acquisition of the optimal solution.
Through clustering, the task nodes are assigned to the corresponding grouping, a more suitable clustering scheme is found, and path optimization is performed through a two-layer optimization framework to generate the optimal path.
The problem of unsatisfactory clustering results caused by improper selection of initial centroids and cluster number is effectively overcome, which reduces the complexity of the problem and improves the reliability of path planning.
Smart Images

Figure CN119886483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle path planning, and more specifically to a route planning method and system for large-scale vehicle path problems. Background Art
[0002] The Vehicle Routing Problem (VRP) is an important problem in the field of operations research and logistics management. It involves how to effectively plan the delivery routes of multiple vehicles to meet customer needs while minimizing transportation costs and time. VRP is a typical NP-hard problem, which means that the solution time will increase dramatically as the problem size increases. The Large Scale Vehicle Routing Problem (LSVRP) is an extension of the vehicle routing problem. It involves a large number of customer points and vehicles, making the problem more complex and difficult to solve. As the problem size increases, traditional heuristic algorithms and exact algorithms face huge challenges in computing time and resource consumption.
[0003] At present, traditional route planning methods for large-scale vehicle routing problems mainly include heuristic algorithms, exact algorithms, and machine learning methods. Among them, heuristic algorithms, such as ant colony algorithms, genetic algorithms, simulated annealing, taboo search, etc., although these algorithms can give approximate optimal solutions within an acceptable time, they may fall into local optimal solutions and the convergence speed may be slow. Exact algorithms, such as branch and bound methods and dynamic programming methods, etc., although these methods can obtain optimal solutions for small-scale problems, become impractical for large-scale problems due to the increase in computational complexity. Machine learning methods, by learning patterns in data, can provide new solutions to VRP problems, but when processing large-scale data, they may have insufficient generalization capabilities on different data distributions.
[0004] In summary, the route planning method for large-scale vehicle routing problems in the prior art, because large-scale vehicle routing problems involve a large number of customer points and vehicles, will lead to increased computational complexity when processing large-scale data, and has insufficient generalization ability on different data distributions, which affects the determination of the optimal solution. Summary of the invention
[0005] In response to the problems existing in the above-mentioned fields, the present invention proposes a route planning method and system for large-scale vehicle routing problems. This method assigns task nodes to corresponding groups through clustering, so as to find a more suitable clustering scheme, which can effectively overcome the problem of unsatisfactory clustering results caused by improper selection of initial centroids and number of clusters. The path of the selected new generation population is optimized to obtain the corresponding optimal path, and a two-layer optimization framework is used to find a path planning scheme with shorter distance and lower cost. By selecting a new generation population, filtering out individuals with better performance, and filtering the upper-level clustering scheme, the large-scale vehicle routing problem with capacity constraints can be well solved, the complexity of the problem can be effectively reduced, and the reliability of path planning can be further enhanced.
[0006] In order to solve the above technical problems, the present invention discloses a route planning method for large-scale vehicle routing problems, comprising the following steps:
[0007] Obtain multiple task nodes for large-scale vehicle routing;
[0008] Group multiple task nodes, determine the cluster center and the number of task node groups of each group; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity restriction requirement, assign the task node to the corresponding group, and form the corresponding population of the upper-level clustering scheme with each group;
[0009] Determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model;
[0010] Generate the offspring population by performing differential mutation operation on the contemporary population;
[0011] The offspring population is input into the trained SVM model to obtain the classification results of each individual in the offspring population, select the excellent offspring and perform lower-level path optimization to obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, a non-dominated sort is performed at the upper level to select a new generation of population; it is iteratively executed until the new generation of population meets the preset termination conditions, and the optimal route planning solution is output.
[0012] Preferably, the step of determining the cluster center and the number of task node groups of each group specifically comprises the following steps:
[0013] Determine the current generation gen=1, the gen generation population:
[0014]
[0015] in, represents the clustering scheme of the num-th individual in the gen-th generation, Represents the number of cluster centers of the num-th individual in the gen-th generation and whether to select the i-th task node as the cluster center. Indicates that the i-th task node is selected as the cluster center. Indicates that the i-th task node is not selected as the cluster center, N u Indicates the population size;
[0016] Initialize population grouping information Indicates the grouping information of the numth individual in the genth generation;
[0017] according to Initialize the individual task node group Group and get:
[0018]
[0019] in, g represents the number of task node groups, and
[0020] Preferably, the assigning of task nodes to corresponding groups and forming the groups into corresponding populations of the upper layer clustering scheme specifically includes:
[0021] Determine the minimum number of groups C based on the ratio of task demand and vehicle load, and sort the tasks from largest to smallest in terms of demand;
[0022] According to the clustering scheme individuals generated by the upper layer, the task nodes are clustered, and the ones with larger demand are allocated first when allocating task points;
[0023] Step 3.1: Initialize num=1;
[0024] Step 3.2: Get the task grouping plan for the current individual
[0025] Step 3.3: Initialize index = 1;
[0026] Step 3.4: Calculate the distance between the task node index and each cluster center, and determine whether the task node index is assigned to the group j with the smallest distance. Then, determine whether the remaining capacity of group j meets the capacity limit requirements of the warehouse. If the capacity limit requirements of the vehicle are met, assign the task node index to group j and record tc in TaskGroup. index = j; otherwise, assign the task node index to cluster j with the second best distance next , and judge whether it satisfies group jnext The remaining capacity of the task node is repeated until the task node index is assigned and j=j next ;
[0027] Step 3.5: Take index = index + 1. When index is less than or equal to L, execute the distribution process center of the index-th task node, where L represents the number of distribution task nodes. When index is greater than L, it proves that all task nodes of the num-th individual have been assigned to the group. Through the group information of each task node recorded in TaskGroup, update the task grouping plan of the current individual.
[0028] Step 3.6: Take num=num+l, when num is less than or equal to N u When num is greater than N, execute step 3.2; u When , it means that all individuals in the current population have completed the grouping process of the task nodes and the iteration is terminated.
[0029] Preferably, the step of determining the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group comprises the following steps:
[0030] Step 4.1: Initialize num=1;
[0031] Step 4.2: Get the task grouping plan for the current individual
[0032] Step 4.3: Initialize j=1;
[0033] Step 4.4: Execute the lower layer optimization process of the current group and obtain the current group k represents the number of task nodes in the current group. The coordinates of the warehouse and the task nodes in this group are obtained, and the optimal driving path is sought through the ant colony algorithm. The 2-opt algorithm is used to perform local optimization on the optimal driving path and obtain the access order of the task nodes TaskOrder num ={Order1, Order2,..., Order k} and the total length of the path Dist num ;
[0034] Step 4.5: Update the total path length of the current task group and node access order
[0035] Step 4.6: Let j = j + 1. When j <= g, execute the lower-level optimization process of the jth group. When j > g, it means that the task grouping scheme of this individual has completed the lower-level optimization process, and update the total path length of this individual. Number of individual vehicles and node access order
[0036] Step 4.7: Let num = num + 1, when num is less than or equal to N u When num is greater than N, execute step 4.2; u When , it means that all individuals in the current population have completed the lower-level optimization process and the iteration is terminated.
[0037] Preferably, the training of the model specifically includes:
[0038] Get the total path length of each individual in the current population and the number of vehicles required
[0039] Determine the non-dominated sorting level of each individual based on the total path length and number of vehicles of each individual in, represents the non-dominated ranking of the i-th individual in the genn-th generation; Greater than or equal to 1, Less than or equal to N u ;
[0040] Set the individual label of level 1 to 1, and the individual labels of other levels to -1 to get the label of the current population
[0041] Get the clustering scheme of the population represents the numth individual of the gennth generation;
[0042] The clustering scheme P gen and Tags gen Input into the SVM model and train the model.
[0043] Preferably, the generating of the progeny population specifically comprises:
[0044] Step 6.1: Initialize the offspring population
[0045] Step 6.2: Initialize num=1;
[0046] Step 6.3: Get the clustering scheme for the current individual Randomly select a non-dominated sorting level Clustering scheme for individuals Randomly from this clustering scheme Get an individual And res is not equal to num;
[0047] Step 6.4: Perform the difference operation to obtain the individuals in the offspring population after the difference operation:
[0048]
[0049] Where F is the differential scaling factor;
[0050] Step 6.5: Determine the individuals in the offspring population after the difference operation Whether the variable in exceeds the limit, if it is greater than the upper limit, modify the variable value to the upper limit, if it is less than the lower limit, modify the variable value to the lower limit;
[0051] Step 6.6: Perform polynomial mutation operation and check again whether the variables after the operation meet the requirements. If not, modify the variables after the mutation operation according to step 6.5;
[0052] Step 6.7: Let num = num + 1, and determine whether num > N u Is it true? If true, it means that the gennth generation offspring population is obtained. Otherwise, proceed to step 6.3.
[0053] Preferably, the obtaining of the optimal route corresponding to the excellent offspring specifically includes:
[0054] Input the offspring population Childgen into the trained SVM model to obtain the offspring population label
[0055] Calculate ChildTag gen The number of tags greater than 0 in the query, and get the corresponding index ChildIndex gen ={i1, i2, ..., i k}, when the number is greater than or equal to SubCount, execute the next step; when the number is less than SubCount, select individuals with negative prediction results and good performance to fill in, ChildIndex gen ={i1, i2, ..., i k , j1, ..., j l}, k+l==SubCount;
[0056] By the index of the outstanding child ChildIndex gen Get the corresponding outstanding offspring:
[0057]
[0058] For excellent offspringgen Execute the lower-level optimization process. When the excellent child gen When all individuals in have completed the lower-level optimization process, the number of vehicles and the total path length corresponding to the excellent offspring are obtained.
[0059] Preferably, the step of selecting a new generation population comprises the following steps:
[0060] The parent population P gen and the offspring population Child gen Merge into temporary population Pop gen ;
[0061] The size of the temporary population is recorded as PopCount, and the temporary population is non-dominated sorted according to the two target values of total path length and number of vehicles, and the non-dominated sorting level and congestion distance of each individual are calculated;
[0062] The crowding distance calculation formula is as follows:
[0063]
[0064] Where i is the i-th individual in the temporary population, i<PopCount, M is the number of targets, j=0 means the target is the number of vehicles, j=1 means the target is the total length of the path traveled by the vehicles, when the non-dominated levels are the same, the crowding distance of the i-th solution is the sum of the differences between the targets of each dimension of its two adjacent solutions, where the crowding distance between the first individual and the last individual is set to infinity;
[0065] The temporary population is screened according to the non-dominated level and crowding distance, and the individuals on the first frontier are screened. When the screened individuals on the first frontier exceed N u When N u individuals, otherwise all individuals on the frontier are selected; when the first frontier individual screened is less than N u When , continue to select individuals on the remaining frontier according to this rule until the selection is completed and output the final population P gen+1 For the new generation of population;
[0066] The new generation population P will be output gen+1 Input into the SVM model to update the model.
[0067] Preferably, the outputting of the optimal route planning solution specifically includes the following steps:
[0068] According to the new generation population P gen+1, take gen = gen + 1, determine whether the current iteration number gen is greater than the preset population number Gen, when the preset population number Gen condition is not met, continue to execute the iterative optimization process; when the condition is met, calculate the hypervolume HV value of the most recent Gen generation population, that is Get the maximum and minimum values in HVgen and record them as hv respectively max and hv min ;
[0069] By calculating the diversity change of the new generation population H l :
[0070]
[0071] When H l When the diversity change degree of the population is greater than the preset threshold, the iterative optimization process continues; otherwise, an individual with a dominance level of IndividualLevel = 1 is randomly selected from the current new generation population, and its index is index, and its optimal route solution TaskOrder is obtained. index , and output the number of vehicles and the total length of the optimal path corresponding to the new generation population as the optimal route planning solution.
[0072] Preferably, a route planning system for large-scale vehicle routing problems is also included, comprising:
[0073] Task node acquisition module, used to obtain multiple task nodes of large-scale vehicle paths;
[0074] The upper layer clustering module is used to group multiple task nodes, determine the cluster center of each group and the number of task node groups; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity limit requirement, the task node is assigned to the corresponding group, and each group forms the corresponding population of the upper layer clustering scheme;
[0075] The lower-layer path optimization module is used to determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model; generate the offspring population by performing differential mutation operations on the contemporary population; input the offspring population into the trained SVM model to obtain the classification result of each individual in the offspring population, select the excellent offspring and perform lower-layer path optimization to obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, perform non-dominated sorting at the upper layer and select a new generation population; iteratively execute until the new generation population meets the preset termination conditions, and output the optimal route planning plan.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] The route planning method for large-scale vehicle path problems proposed by the present invention converts the actual path optimization problem into a two-layer optimization problem, and assigns the task nodes to the corresponding groups by clustering in the upper layer of the two-layer optimization framework, so as to find a more suitable clustering scheme, which can effectively overcome the problem of unsatisfactory clustering results caused by improper selection of the initial centroid and the number of clusters. By optimizing the lower layer path for each individual in the population corresponding to each group, the number of vehicles and the total length of the path corresponding to each individual are determined, and a training sample is constructed to train the SVM model. The trained SVM model is used to screen out potential individuals from the offspring population to perform the lower layer optimization. The generated offspring population is input into the trained SVM model to divide each individual in the offspring population into positive and negative classes, select excellent offspring and perform lower layer path optimization, and obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, non-dominated sorting is performed in the upper layer, and a new generation population is selected to update the SVM model. When the selected new generation population meets the preset termination condition, the optimal route planning scheme is output. This method optimizes the path of the new generation population to obtain the corresponding optimal path, and uses a two-layer optimization framework to find a path planning solution with shorter distance and lower cost. By selecting a new generation population, filtering out individuals with better performance, and filtering the upper-layer clustering solution, it can well solve the large-scale vehicle path problem with capacity constraints, effectively reduce the complexity of the problem, and further enhance the reliability of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A flow chart of a route planning method for large-scale vehicle routing problems proposed by the present invention;
[0079] Figure 2 A double-layer optimization framework diagram in the route planning method proposed in the present invention;
[0080] Figure 3 A flow chart for classifying each individual in a progeny population into positive and negative categories provided by an embodiment of the present invention;
[0081] Figure 4 An example diagram of the screening strategy for upper layer clustering and lower layer optimization provided in an embodiment of the present invention;
[0082] Figure 5 This is an example diagram of a strategy for generating a new generation population provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0083] The following will be combined with the attached embodiment of the present invention Figure 1-Figure 5, the technical solutions in the embodiments of the present invention are clearly and completely described. It should be understood that the terms described in the present invention are only used to describe specific implementation methods and are not used to limit the present invention.
[0084] like Figure 1 As shown, the present invention proposes a route planning method for large-scale vehicle routing problems, comprising the following steps:
[0085] Step 1: Obtain multiple task nodes of large-scale vehicle paths;
[0086] Step 2: Group multiple task nodes, determine the cluster center and the number of task node groups of each group; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity limit requirements, assign the task nodes to the corresponding groups, and form the corresponding population of the upper-level clustering scheme with each group;
[0087] Step 3: Optimize the lower-level path for each group to determine the number of vehicles and the total path length corresponding to each individual; perform non-dominated sorting on each individual and label the sorting results according to the number of vehicles and the total path length corresponding to each individual, and construct training samples; input the training samples into the SVM model to train the model;
[0088] Step 4: Determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model;
[0089] Step 5: Generate a descendant population by performing differential mutation operations on the contemporary population; input the descendant population into the trained SVM model to obtain the classification results of each individual in the descendant population, select excellent descendants and perform lower-level path optimization to obtain the optimal route corresponding to the excellent descendants; select a new generation population by merging the contemporary population and excellent descendants, perform non-dominated sorting at the upper level; iterate until the new generation population meets the preset termination conditions, and output the optimal route planning solution, such as Figure 2 shown.
[0090] Specifically, in step S2, the cluster center and the number of task node groups of each group are determined, which specifically includes the following steps:
[0091] Determine the current generation gen=1, the gen generation population:
[0092]
[0093] in, represents the clustering scheme of the num-th individual in the gen-th generation, Represents the number of cluster centers of the num-th individual in the gen-th generation and whether to select the i-th task node as the cluster center. Indicates that the i-th task node is selected as the cluster center. Indicates that the i-th task node is not selected as the cluster center, N u Indicates the population size.
[0094] Initialize population grouping information Represents the grouping information of the num-th individual in the gen-th generation.
[0095] according to Initialize the individual task node group Group and get:
[0096]
[0097] in, g represents the number of task node groups, and
[0098] Assign the task nodes to the corresponding groups, and form the corresponding populations of the upper-level clustering scheme, including:
[0099] Determine the minimum number of groups C based on the ratio of task demand and vehicle load, and sort the tasks from largest to smallest in terms of demand;
[0100] According to the clustering scheme individuals generated by the upper layer, the task nodes are grouped, and the ones with greater demand are given priority when allocating task points;
[0101] Step 2.1: Initialize num=1;
[0102] Step 2.2: Get the task grouping plan for the current individual
[0103] Step 2.3: Initialize index = 1;
[0104] Step 2.4: Calculate the distance between the task node index and each cluster center, and determine whether to assign the task node index to the group with the smallest distance. Finally, determine whether the remaining capacity of the group meets the capacity limit requirements of the warehouse. When the capacity limit requirements of the vehicle are met, assign the task node index to group j and record tc in TaskGroup. index = j; otherwise, assign the task node index to cluster j with the second best distance next , and judge whether it satisfies group j next The remaining capacity of the task node is repeated until the task node index is assigned and j=j next ;
[0105] Step 2.5: Take index = index + 1. When index is less than or equal to L, execute the distribution process center of the index-th task node, where L represents the number of distribution task nodes. When index is greater than L, it proves that all task nodes of the num-th individual have been assigned to the group. Through the group information of each task node recorded in TaskGroup, update the task grouping plan of the current individual.
[0106] Step 2.6: Take num=num+1, when num is less than or equal to N u When num is greater than N, execute step 2.2; u When , it means that all individuals in the current population have completed the grouping process of the task nodes and the iteration is terminated.
[0107] In step S3, the number of vehicles and the total path length corresponding to each individual are determined, including the following steps:
[0108] Step S3.1: Initialize num=1;
[0109] Step S3.2: Obtain the task grouping scheme for the current individual
[0110] Step S3.3: Initialize j=1;
[0111] Step S3.4: Execute the lower layer optimization process of the current group to obtain the current group k represents the number of task nodes in the current group. The coordinates of the warehouse and the task nodes in this group are obtained, and the optimal driving path is sought through the ant colony algorithm. The 2-opt algorithm is used to perform local optimization on the optimal driving path and obtain the access order of the task nodes TaskOrder num ={Order1, Order2,..., Order k} and the total length of the path Dist num ;
[0112] Step S3.5: Update the total path length of the current task group and node access order
[0113] Step S3.6: Let j = j + 1. When j <= g, execute the lower-level optimization process of the jth group. When j > g, it means that the task grouping scheme of the individual has completed the lower-level optimization process, and update the total path length of the individual. Number of individual vehicles and node access order
[0114] Step S3.7: Set num=num+1, when num is less than or equal to N u When num is greater than N, execute step S3.2; u When , it means that all individuals in the current population have completed the lower-level optimization process and the iteration is terminated.
[0115] Training the model includes:
[0116] Get the total path length of each individual in the current population and the number of vehicles required
[0117] Determine the non-dominated sorting level of each individual based on the total path length and number of vehicles of each individual in, represents the non-dominated ranking of the i-th individual in the gen-th generation; Greater than or equal to 1, Less than or equal to N u ;
[0118] Set the individual label of level 1 to 1, and the individual labels of other levels to -1 to get the label of the current population
[0119] Get the clustering scheme of the population represents the numth individual of the gennth generation;
[0120] The clustering scheme p gen and Tags gen Input into the SVM model and train the model.
[0121] In step S4, a progeny population is generated, which specifically includes:
[0122] Step S4.1: Initialize the offspring population
[0123] Step S4.2: Initialize num=1;
[0124] Step S4.3: Get the clustering scheme for the current individual Randomly select a non-dominated sorting level Clustering scheme for individuals Randomly from this clustering scheme Get an individual And res is not equal to num;
[0125] Step S4.4: Perform the difference operation to obtain the individuals in the offspring population after the difference operation:
[0126]
[0127] Where F is the differential scaling factor;
[0128] Step S4.5: Determine the individuals in the offspring population after the difference operation Whether the variable in exceeds the limit, if it is greater than the upper limit, modify the variable value to the upper limit, if it is less than the lower limit, modify the variable value to the lower limit;
[0129] Step S4.6: Perform polynomial mutation operation and check again whether the variables after the operation meet the requirements. If not, modify the variables after the mutation operation according to step S4.5;
[0130] Step S4.7: Let rum = num + 1, and determine whether num > N u Is it true? If true, it means that the gern generation offspring population is obtained. Otherwise, execute step S4.3.
[0131] Get the optimal route corresponding to the excellent offspring, including:
[0132] like Figure 3 As shown, the offspring population Childgen is input into the trained SVM model to obtain the offspring population label
[0133] Calculate ChildTag gen The number of tags greater than 0 in the query, and get the corresponding index ChildIndex gen ={i1, i2, ..., i k}, when the number is greater than or equal to SubCount, execute the next step; when the number is less than SubCount, select individuals with negative prediction results and good performance to fill in, ChildIndex gen ={i1, i2, ..., i k , j1, ..., j l}, k+l==SubCount;
[0134] By the index of the outstanding child ChildIndex gen Get the corresponding outstanding offspring:
[0135]
[0136] For excellent offspring gen Execute the lower-level optimization process. When the excellent childgen When all individuals in have completed the lower-level optimization process, the number of vehicles and the total path length corresponding to the excellent offspring are obtained.
[0137] Selecting a new generation of population includes the following steps:
[0138] The parent population p gen and the offspring population Child gen Merge into temporary population Pop gen ;
[0139] The size of the temporary population is recorded as PopCount, and the temporary population is non-dominated sorted according to the two target values of total path length and number of vehicles, and the non-dominated sorting level and congestion distance of each individual are calculated;
[0140] The crowding distance calculation formula is as follows:
[0141]
[0142] Where i is the i-th individual in the temporary population, i<PopCount, M is the number of targets, j=0 means the target is the number of vehicles, j=1 means the target is the total length of the path traveled by the vehicles, when the non-dominated levels are the same, the crowding distance of the i-th solution is the sum of the differences between the targets of each dimension of its two adjacent solutions, where the crowding distance between the first individual and the last individual is set to infinity;
[0143] The temporary population is screened according to the non-dominated level and crowding distance, and the individuals on the first frontier are screened. When the screened individuals on the first frontier exceed N u When N u individuals, otherwise all individuals on the frontier are selected; when the first frontier individual screened is less than N u When , continue to select individuals on the remaining frontier according to this rule until the selection is completed and output the new generation population P gen+1 ;
[0144] The new generation population P will be output gen+1 Input into the SVM model to update the model.
[0145] In step S5, the optimal route planning solution is output, which specifically includes the following steps:
[0146] According to the output new generation population, determine whether the current iteration generation number gen is greater than the preset population generation number Gen. The preset population generation number Gen of the present invention is 10 generations. When the preset population generation number Gen condition is not met, continue to execute the iterative optimization process; when the condition is met, calculate the hypervolume HV value of the most recent Gen generation population, that is, Get HV genThe maximum and minimum values in are denoted as hv max and hv min ;
[0147] The population diversity change threshold is set to 0.0001, and the population diversity change degree H is calculated. l , when H l When the diversity change degree threshold of the population is greater than that of the population (that is, when H l > 0.0001), continue the iterative optimization process; otherwise, randomly select an individual with a dominance level of IndividualLevel = 1 from the current population, index it as index, and obtain its optimal route solution TaskOrder index And output the number of vehicles and total length of the optimal path corresponding to the new generation population, which is the optimal route planning solution:
[0148]
[0149] The present invention also proposes a route planning system for large-scale vehicle routing problems, comprising:
[0150] Task node acquisition module, used to obtain multiple task nodes of large-scale vehicle paths;
[0151] The upper layer clustering module is used to group multiple task nodes, determine the cluster center of each group and the number of task node groups; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity limit requirement, the task node is assigned to the corresponding group, and each group forms the corresponding population of the upper layer clustering scheme;
[0152] The lower-layer path optimization module is used to determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model; generate the offspring population by performing differential mutation operations on the contemporary population; input the offspring population into the trained SVM model to obtain the classification result of each individual in the offspring population, select the excellent offspring and perform lower-layer path optimization to obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, perform non-dominated sorting at the upper layer and select a new generation population; iteratively execute until the new generation population meets the preset termination conditions, and output the optimal route planning plan.
[0153] The route planning method for the large-scale vehicle routing problem proposed in the present invention can well solve the large-scale vehicle routing problem with capacity constraints, effectively reduce the complexity of the problem, and thus obtain the optimal route implementation plan.
[0154] Specifically, the present invention initializes different clustering schemes in the upper layer of the two-layer optimization framework to find a more suitable clustering scheme, which can effectively overcome the problem of unsatisfactory clustering results caused by improper selection of the initial centroid and the number of clusters. In the lower layer, the path optimization is performed according to the clustering scheme presented by the upper layer to obtain the corresponding optimal path, and the two-layer optimization framework is used to find a path planning scheme with shorter distance and lower cost.
[0155] The present invention proposes a target domain determination method based on an SVM model, which trains an SVM model to filter out newly generated upper-level clustering solutions, wherein if a solution is non-dominated, it is marked as a positive class, otherwise it is marked as a negative class. Since path optimization is limited to promising upper-level solutions, the reliability of path planning can be further enhanced.
[0156] The present invention determines the optimal path of the vehicle through a simulated annealing algorithm combined with a local search. The task nodes are grouped according to the clustering scheme generated by the upper layer, and the simulated annealing algorithm is used to find the optimal path for each group. Since the simulated annealing algorithm is a global search algorithm, the generated solutions are relatively random, so it cannot be guaranteed that the obtained "optimal route" is the optimal one in practice. The local search algorithm can be used to optimize the above solutions to obtain a better path planning solution.
[0157] Large-scale vehicle routing problem (VRP) is a key challenge in the logistics field, which requires efficient planning of delivery routes for multiple vehicles. Properly optimizing the routes can significantly reduce costs, improve delivery efficiency and service quality.
[0158] Example
[0159] like Figure 4 As shown, the number of vehicles and the total path length corresponding to each parent generation in the parent generations 1, 2 and 3 obtained in an embodiment of the present invention are shown. Figure 4 The 0 and 1 after the number of clusters of each parent in respectively represent whether the i-th task node is selected as the cluster center. When the i-th task node is selected as the cluster center, the value is 1; otherwise, it is 0.
[0160] Offspring 1'-5' are generated according to parent generations 1-3, and the categories of offspring 1'-5' are predicted according to the trained SVM model. Offspring 1'-3' in offspring 1'-5' are predicted as positive by the trained SVM model, and offspring 4' and 5' are predicted as negative by the trained SVM model. The paths of these three offspring 1'-3' individuals with positive prediction results are screened out for lower-level optimization, and computing resources are allocated. The best individual in offspring 1'-3' is offspring 2', and the corresponding total path length is 170. Offspring 4' and 5' with negative prediction results are discarded.
[0161] like Figure 5As shown, the newly generated offspring 1'-3' and the parent 1-3 are merged to obtain a temporary population, and the temporary population is non-dominated sorted. The non-dominated sorting is performed according to the two goals of the number of vehicles and the total length of the path, and the dominance level corresponding to each individual is obtained respectively.
[0162] According to the dominance level and congestion distance corresponding to each individual, the number of vehicles and the total length of the path are taken as comprehensive considerations, and the three individuals of parent generation 1 and offspring 2'-3' are comprehensively selected as the new generation population to perform the subsequent path optimization process.
[0163] Since path optimization is limited to promising upper-level solutions, this embodiment can well solve large-scale vehicle routing problems with capacity constraints by filtering upper-level clustering solutions, effectively reducing the complexity of the problem, so that the reliability of path planning can be further enhanced.
[0164] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
[0165] In addition, unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as commonly understood by those skilled in the art to which the present invention belongs. All documents mentioned in this specification are incorporated by reference to disclose and describe the methods related to the documents. In the event of any conflict with any incorporated document, the content of this specification shall prevail.
Claims
1. A route planning method for large-scale vehicle routing problems, characterized in that: The following steps are involved: Obtain multiple task nodes for large-scale vehicle routing; Group multiple task nodes, determine the cluster center and the number of task node groups of each group; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity restriction requirement, assign the task node to the corresponding group, and form the corresponding population of the upper-level clustering scheme with each group; Determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model; Generate the offspring population by performing differential mutation operation on the contemporary population; The offspring population is input into the trained SVM model to obtain the classification results of each individual in the offspring population, select the excellent offspring and perform lower-level path optimization to obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, a non-dominated sort is performed at the upper level to select a new generation of population; it is iteratively executed until the new generation of population meets the preset termination conditions, and the optimal route planning solution is output.
2. The route planning method for large-scale vehicle routing problem according to claim 1, characterized in that: Determining the cluster center and the number of task node groups of each group specifically includes the following steps: Determine the current generation gen=1, the gen generation population: in, represents the clustering scheme of the num-th individual in the gen-th generation, Represents the number of cluster centers of the num-th individual in the gen-th generation and whether to select the i-th task node as the cluster center. Indicates that the i-th task node is selected as the cluster center. Indicates that the i-th task node is not selected as the cluster center, N u Indicates the population size; Initialize population grouping information Indicates the grouping information of the numth individual in the genth generation; according to Initialize the individual task node group Group and get: in, g represents the number of task node groups, and 3. The route planning method for large-scale vehicle routing problem according to claim 2 is characterized in that: The task nodes are assigned to corresponding groups, and each group is formed into a corresponding population of the upper layer clustering scheme, specifically including: Determine the minimum number of groups C based on the ratio of task demand and vehicle load, and sort the tasks from largest to smallest in terms of demand; According to the clustering scheme individuals generated by the upper layer, the task nodes are grouped, and the ones with greater demand are given priority when allocating task points; Step 3.1: Initialize num=1; Step 3.2: Get the task grouping plan for the current individual Step 3.3: Initialize index = 1; Step 3.4: Calculate the distance between the task node index and each cluster center, and determine whether the task node index is assigned to the group j with the smallest distance. Then, determine whether the remaining capacity of group j meets the capacity limit requirements of the warehouse. If the capacity limit requirements of the vehicle are met, assign the task node index to group j and record tc in TaskGroup. index = j; otherwise, assign the task node index to cluster j with the second best distance next , and judge whether it satisfies group j next The remaining capacity of the task node is repeated until the task node index is assigned and j=j next ; Step 3.5: Take index = index + 1. When index is less than or equal to L, execute the distribution process center of the index-th task node, where L represents the number of distribution task nodes. When index is greater than L, it proves that all task nodes of the num-th individual have been assigned to the group. Through the group information of each task node recorded in TaskGroup, update the task grouping plan of the current individual. Step 3.6: Take num=num+1, when num is less than or equal to N u When num is greater than N, execute step 3.2; u When , it means that all individuals in the current population have completed the grouping process of the task nodes and the iteration is terminated.
4. The route planning method for large-scale vehicle routing problem according to claim 3 is characterized in that: Determining the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group includes the following steps: Step 4.1: Initialize num=1; Step 4.2: Get the task grouping plan for the current individual Step 4.3: Initialize j=1; Step 4.4: Execute the lower layer optimization process of the current group and obtain the current group k represents the number of task nodes in the current group. The coordinates of the warehouse and the task nodes in this group are obtained, and the optimal driving path is sought through the ant colony algorithm. The 2-opt algorithm is used to perform local optimization on the optimal driving path to obtain the access order of the task nodes TaskOrder num ={Order1, Order2,..., Order k } and the total length of the path Dist num ; Step 4.5: Update the total path length of the current task group and node access order Step 4.6: Let j = j + 1. When j < = g, execute the lower-level optimization process of the jth group. When j > g, it means that the task grouping scheme of this individual has completed the lower-level optimization process, and update the total path length of this individual. Number of individual vehicles and node access order Step 4.7: Let num = num + 1, when num is less than or equal to N u When num is greater than N, execute step 4.2; u When , it means that all individuals in the current population have completed the lower-level optimization process and the iteration is terminated.
5. The route planning method for large-scale vehicle routing problem according to claim 4, characterized in that: The training of the model specifically includes: Get the total path length of each individual in the current population and the number of vehicles required Determine the non-dominated sorting level of each individual based on the total path length and number of vehicles of each individual in, represents the non-dominated ranking of the i-th individual in the gen-th generation; Greater than or equal to 1, Less than or equal to N u ; Set the individual label of level 1 to 1, and the individual labels of other levels to -1 to get the label of the current population Get the clustering scheme of the population represents the numth individual of the gennth generation; The clustering scheme P gen and Tags gen Input into the SVM model and train the model.
6. The route planning method for large-scale vehicle routing problem according to claim 5, characterized in that: The generating of the offspring population specifically comprises: Step 6.1: Initialize the offspring population Step 6.2: Initialize mum=1; Step 6.3: Get the clustering scheme for the current individual Randomly select a non-dominated sorting level Clustering scheme for individuals Randomly from this clustering scheme Get an individual And res is not equal to num; Step 6.4: Perform the difference operation to obtain the individuals in the offspring population after the difference operation: Where F is the differential scaling factor; Step 6.5: Determine the individuals in the offspring population after the difference operation Whether the variable in exceeds the limit, if it is greater than the upper limit, modify the variable value to the upper limit, if it is less than the lower limit, modify the variable value to the lower limit; Step 6.6: Perform polynomial mutation operation and check again whether the variables after the operation meet the requirements. If not, modify the variables after the mutation operation according to step 6.5; Step 6.7: Let num = num + 1, and determine if num > N u Is it true? If true, it means that the gennth generation offspring population is obtained. Otherwise, proceed to step 6.
3.
7. The route planning method for large-scale vehicle routing problem according to claim 6, characterized in that: The method of obtaining the optimal route corresponding to the excellent offspring specifically includes: Input the offspring population Childgen into the trained SVM model to obtain the offspring population label Calculate ChildTag gen The number of tags greater than 0 in the query, and get the corresponding index ChildIndex gen ={i1, i2, ..., i k }, when the number is greater than or equal to SubCount, execute the next step; when the number is less than SubCount, select individuals with negative prediction results and good performance to fill in, ChildIndex gen ={i1, i2, ..., i k , j1, ..., j l }, k+l==SubCount; By the index of the outstanding child ChildIndex gen Get the corresponding outstanding offspring: For excellent offspring gen Execute the lower-level optimization process. When the excellent child gen When all individuals in have completed the lower-level optimization process, the number of vehicles and the total path length corresponding to the excellent offspring are obtained.
8. The route planning method for large-scale vehicle routing problem according to claim 7, characterized in that: The step of selecting a new generation of population comprises the following steps: The parent population P gen and the offspring population Child gen Merge into temporary population Pop gen ; The size of the temporary population is recorded as PopCount, and the temporary population is non-dominated sorted according to the two target values of total path length and number of vehicles, and the non-dominated sorting level and congestion distance of each individual are calculated; The crowding distance calculation formula is as follows: Where i is the i-th individual in the temporary population, i<PopCount, M is the number of targets, j=0 means the target is the number of vehicles, j=1 means the target is the total length of the path traveled by the vehicles, when the non-dominated levels are the same, the crowding distance of the i-th solution is the sum of the differences between the targets of each dimension of its two adjacent solutions, where the crowding distance between the first individual and the last individual is set to infinity; The temporary population is screened according to the non-dominated level and crowding distance, and the individuals on the first frontier are screened. When the screened individuals on the first frontier exceed N u When N u individuals, otherwise all individuals on the frontier are selected; when the first frontier individual screened is less than N u When , continue to select individuals on the remaining frontier according to this rule until the selection is completed and output the final population p gen+1 For the new generation of population; The new generation population P will be output gen+1 Input into the SVM model to update the model.
9. The route planning method for large-scale vehicle routing problem according to claim 8, characterized in that: The outputting of the optimal route planning scheme specifically includes the following steps: According to the new generation population P gen+1 , take gen = gen + 1, determine whether the current iteration number gen is greater than the preset population number Gen, when the preset population number Gen condition is not met, continue to execute the iterative optimization process; when the condition is met, calculate the hypervolume HV value of the most recent Gen generation population, that is Get HV gen The maximum and minimum values in are denoted as hv max and hv min ; By calculating the diversity change of the new generation population H l : When H l When the diversity change degree of the population is greater than the preset threshold, the iterative optimization process continues; otherwise, an individual with a dominance level of IndividualLevel = 1 is randomly selected from the current new generation population, and its index is index, and its optimal route solution TaskOrder is obtained. index , and output the number of vehicles and the total length of the optimal path corresponding to the new generation population as the optimal route planning solution.
10. A route planning system for large-scale vehicle routing problems, characterized in that: include: Task node acquisition module, used to obtain multiple task nodes of large-scale vehicle paths; The upper layer clustering module is used to group multiple task nodes, determine the cluster center of each group and the number of task node groups; when the vehicle delivery task corresponding to the group to which the cluster center belongs meets the vehicle capacity limit requirement, the task node is assigned to the corresponding group, and each group forms the corresponding population of the upper layer clustering scheme; The lower-layer path optimization module is used to determine the number of vehicles and the total path length corresponding to each individual in the population corresponding to each group, perform non-dominated sorting on each individual, determine the non-dominated sorting level of each individual, and use it as a label to construct training samples; input the training samples into the SVM model to train the model; generate the offspring population by performing differential mutation operations on the contemporary population; input the offspring population into the trained SVM model to obtain the classification result of each individual in the offspring population, select the excellent offspring and perform lower-layer path optimization to obtain the optimal route corresponding to the excellent offspring; by merging the contemporary population and the excellent offspring, perform non-dominated sorting at the upper layer and select a new generation population; iteratively execute until the new generation population meets the preset termination conditions, and output the optimal route planning plan.
Citation Information
Patent Citations
Vehicle path planning method with time window based on multi-population evolutionary algorithm
CN114330870A
Particle swarm-genetic-large neighborhood search algorithm for processing multi-warehouse vehicle path problem with time window constraint
CN118536580A
Multi-distribution-center electric vehicle intelligent path optimization method based on dynamic fuzzy prediction
CN118761534A
Dynamic vehicle routing in multi-stage distribution networks
US20130159206A1