A method and system for path planning of multi-warehouse distribution tasks
By optimizing multi-warehouse vehicle routing using a two-layer optimization model and a proxy model, the problem of insufficient adaptability of the optimal planning path and waste of computational resources in the multi-warehouse vehicle routing problem is solved, and efficient path planning is achieved in various scenarios.
Patent Information
- Application Number
- CN202411980691.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2044-12-31
AI Technical Summary
Existing technologies cannot effectively address the adaptability of optimal route planning in multi-warehouse vehicle routing problems, especially under uncertain demand scenarios where computational resources are consumed excessively.
A two-layer optimization model is adopted, which combines simulated annealing genetic algorithm and surrogate model with path distance fitting model to generate multiple path planning schemes, and optimize the optimal path through local search and environment selection strategies.
It can obtain the optimal planning path in various scenarios, reduce the consumption of computing resources, and improve the adaptability and accuracy of path planning.
Smart Images

Figure CN119783933B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of path planning, in particular to a multi-warehouse distribution task path planning method and system. BACKGROUND
[0002] Vehicle Routing Problem (VRP) is a basic problem in operations research and logistics, which focuses on optimizing the paths of vehicles to effectively serve a group of customers. It involves finding the best possible routes for a fleet of vehicles while meeting various constraints such as vehicle capacity, travel time, and service preferences. Traditional VRPs, such as Capacitated Vehicle Routing Problem (CVRP) and Vehicle Routing Problem with Time Windows (VRPTWs), typically assume that all vehicles start and end their routes at a single, ample warehouse, serving only a group of customers with predefined and fixed demands.
[0003] In the prior art, the planning of multi-warehouse vehicle routing problems uses the whole method, two-stage method, and double-layer optimization. The whole method usually establishes a virtual center to convert the multi-warehouse problem into a whole; the two-stage method first groups the customers and then decomposes them into multiple single-warehouse path planning problems for solution; the double-layer optimization method establishes an upper and lower layer related problem model for customer allocation and path optimization of such problems, and iteratively performs overall path planning, which can perform comprehensive search in the decision space to obtain a satisfactory delivery plan. However, such methods usually require a large amount of computational resources, and for uncertain demand, multiple scenarios need to be sampled and evaluated, further exacerbating the consumption of computational resources.
[0004] In summary, the above-mentioned technologies cannot obtain optimal planning paths that can adapt to multiple scenarios. SUMMARY
[0005] The embodiments of the present application provide a multi-warehouse distribution task path planning method and system, which can solve the problem that the prior art cannot obtain optimal planning paths that can adapt to multiple scenarios.
[0006] The embodiments of the present application provide a multi-warehouse distribution task path planning method, which is applied to a vehicle distribution task composed of M warehouses, N task nodes with distribution time limits, and K vehicles with capacity limits. The path planning method includes the following steps:
[0007] The travel cost reflecting the vehicle driving path cost, the warehouse inventory sum reflecting the inventory cost, and the robustness of the vehicle distribution task model are taken as the objective function; each customer is only assigned to one customer, each customer only accepts one distribution service, each vehicle cannot drive from one warehouse to another warehouse, customers assigned to different warehouses cannot receive distribution services from the same vehicle, the initial and ending locations of each vehicle distribution route must be in the same warehouse, and the elimination of sub-routes are taken as the constraint conditions, so as to construct a vehicle distribution task model capable of generating multiple path planning schemes and take the vehicle distribution task model as the upper model of the bi-level optimization model;
[0008] The minimum travel cost is selected from the travel costs of the multiple path planning schemes randomly generated from the upper model by the simulated annealing method, and the path planning scheme corresponding to the minimum travel cost is obtained, so as to construct the lower model of the bi-level optimization model;
[0009] The multiple path planning schemes obtained according to the bi-level optimization model are taken as the initial population of the simulated annealing genetic algorithm, so as to train the Kriging model, obtain the path distance fitting model for describing the correlation between the customer allocation relationship and the path distance, and take the path distance fitting model as the surrogate model;
[0010] The multiple path planning schemes as the initial population are crossed and mutated to generate offspring, and the offspring are input into the surrogate model to evaluate the offspring; according to the evaluation results, the non-dominated sorting is used to find the solutions not dominated by any other solutions from all solutions, and the new offspring is obtained by the local search method and the simulated annealing method; the surrogate model is retrained using the new offspring to update the surrogate model, and the parent generation is updated by the environmental selection strategy; when the termination condition is met, the simulated annealing genetic algorithm is stopped, and the new offspring is taken as the optimal planning path.
[0011] Further, the specific steps of selecting the minimum travel cost from the travel costs of the multiple path planning schemes randomly generated from the upper model by the simulated annealing method include:
[0012] Randomly generating multiple path planning schemes meeting the objective function and the constraint conditions;
[0013] Obtaining the solution results of the first objective function, the second objective function and the third objective function of the initial population;
[0014] Designing the simulated annealing method, including setting the initial temperature to 1000 degrees Celsius, setting the stop temperature to 1 degree Celsius, and setting the annealing rate to 0.999 degrees Celsius / second;
[0015] Using the simulated annealing method to process the solution results of the first objective function, the second objective function and the third objective function to obtain the final solution;
[0016] In the iterative process of simulated annealing, a local search heuristic algorithm optimized by re-insertion, swap, or 2-Opt is used to generate offspring. The value suitable for the objective function is selected from the offspring and the final solution to update the final solution.
[0017] Furthermore, the specific steps of obtaining a path distance fitting model to describe customer allocation relationships and path distance correlation, and using the path distance fitting model as a surrogate model, include:
[0018] Based on multiple path planning schemes used as the initial population, two feature parameters are extracted for each scheme; wherein, the two feature parameters are the average distance from the customer to the warehouse and the aggregation degree of the customer allocation scheme;
[0019] A surrogate model is obtained by training a Kriging model based on two feature parameters.
[0020] Furthermore, the specific steps for generating offspring by crossover and mutation of multiple path planning schemes used as the initial population include:
[0021] Based on multiple path planning schemes used as the initial population, a binary bidding method is used to generate a population of size [size missing]. The mating pool; where the mating pool contains the sum of minimum travel cost, maximum warehouse inventory, and the path planning scheme corresponding to maximum robustness;
[0022] Two individuals are selected from the mating pool as parents, Parent1 and Parent2, and the crossover probability pc is generated;
[0023] If p is less than pc, then: randomly select warehouses d∈[1,N], and select the route to which the d-th warehouse of Parent1 and Parent2 belongs. and Delete the elements in Parent1(Parent2) that are related to... Duplicate customer nodes, merge and As a new router R d And replace the routes in Parent1 (Parent2) To generate offspring Off1 and Off2; p is a random number between 0 and 1;
[0024] If p is greater than or equal to pc, then: randomly select two customer nodes v1 and v2 from each parent solution that do not belong to the same warehouse, and swap the two customers to generate offspring;
[0025] Adjust the total warehouse inventory of the offspring. When the total warehouse inventory is less than the actual total demand, adjust the total warehouse inventory to the actual total demand. When the total warehouse inventory is greater than the actual total demand, adjust the total warehouse inventory according to a fixed percentage of the difference between the total warehouse inventory and the actual total demand.
[0026] Furthermore, the specific steps of retraining the agent model using the new offspring to update the agent model include:
[0027] The true target value is used as the child solution set. Individuals are selected from the child solution set and assigned to the surrogate model. The child solution set is then added to an archive A used to store a fixed number of solutions. s middle;
[0028] When save file A s If the number of solutions is less than the maximum number of archives in the proxy model archive, then the proxy model is retrained to update the proxy model;
[0029] Otherwise, from archive A s Select the solution corresponding to the maximum number of archives, and select the solution with the optimal objective function value as the Leader based on the objective function value of the selected solution.
[0030] Based on the true target value and prediction error, non-dominated sorting and crowding degree are obtained, and the results of the first two levels of the results are selected as elite solutions.
[0031] Obtain the Euclidean distance between each elite solution and two feature parameters of the Leader; if the Euclidean distance is less than 40, obtain the next elite solution; otherwise, add the elite solution archive A. e Add archive A s Elite solutions whose Euclidean distance from the elite solution is less than 40; if A e If the number of solutions is greater than 30, then use A. e Train the agent model and from A s Remove the solutions used in training and update the surrogate model; if none of the above conditions are met, only update the surrogate model.
[0032] Furthermore, the specific steps of updating the parent generation through the environment selection strategy include:
[0033] Merge the child and parent generations to obtain multiple path planning schemes; obtain the values of the three objective functions of the upper-level model based on the merged multiple path planning schemes; obtain the solution using non-dominated sorting and crowding based on the values of the three objective functions; select the path planning scheme corresponding to the solution that meets the requirements as the new parent generation.
[0034] Furthermore, the specific steps for stopping the simulated annealing genetic algorithm when the termination condition is met include:
[0035] The method based on the entropy-based termination condition is used to obtain the diversity of the population;
[0036] According to the diversity change degree of the population as the termination condition, when the diversity change degree is less than 0.001 in the genetic algorithm of three generations in succession, the iteration of the algorithm is stopped, otherwise the operation of crossing and mutating the parent generation is returned to continue iteration.
[0037] The embodiment of the application provides a path planning system for a multi-warehouse distribution task, comprising:
[0038] The upper model construction module is configured to take the travel cost reflecting the vehicle driving path cost, the warehouse inventory sum reflecting the inventory cost, and the robustness of the vehicle distribution task model as a target function, take each customer being assigned to only one customer, each customer accepting only one distribution service, each vehicle being unable to drive from one warehouse to another warehouse, the customers assigned to different warehouses being unable to receive the distribution service of the same vehicle, the initial place and the end place of the distribution route of each vehicle being required to be in the same warehouse, and the elimination of sub-routes as constraint conditions, to construct a vehicle distribution task model capable of generating multiple path planning schemes, and take the vehicle distribution task model as an upper model of a bi-level optimization model.
[0039] The lower model construction module is configured to select the minimum travel cost from the travel costs of the multiple path planning schemes randomly generated by the upper model through simulated annealing, to obtain a path planning scheme corresponding to the minimum travel cost, and to construct a lower model of the bi-level optimization model.
[0040] The bi-level optimization model optimization module is configured to take the multiple path planning schemes obtained according to the bi-level optimization model as initial populations of a simulated annealing genetic algorithm, to train a Kriging model, to obtain a path distance fitting model used to describe the correlation between the customer assignment relationship and the path distance, and to take the path distance fitting model as a proxy model, to generate offspring by crossing and mutating the multiple path planning schemes as the initial populations, to input the offspring into the proxy model to evaluate the offspring, to obtain the solution with the highest non-dominated level by using non-dominated sorting according to the evaluation results, and to obtain new offspring by using a local search method and a simulated annealing method, to retrain the proxy model by using the new offspring to update the proxy model and to update the parent generation by using an environmental selection strategy, and to stop the simulated annealing genetic algorithm when a termination condition is met, and to take the new offspring as the optimal planning path.
[0041] The embodiment of the application provides a path planning method and system for a multi-warehouse distribution task, and the beneficial effects thereof compared with the prior art are as follows:
[0042] The vehicle distribution task model capable of generating multiple path planning schemes reflects path planning between multiple warehouses and multiple distribution customers, and the method adopted is: taking travel cost reflecting vehicle driving path cost, warehouse inventory sum reflecting inventory cost, and robustness of the vehicle distribution task model as objective functions; taking that each customer is only assigned to one customer, each customer only accepts one distribution service, each vehicle cannot drive from one warehouse to another warehouse, customers assigned to different warehouses cannot receive distribution service from the same vehicle, initial place and ending place of each vehicle distribution route need to be in the same warehouse, and eliminating sub-routes as constraint conditions. Then, multiple path planning schemes are obtained by using the vehicle distribution task model, and the smallest travel cost is selected from the multiple path planning schemes by using simulated annealing method, the path planning scheme corresponding to the smallest travel cost is obtained, and the selection of the distribution path is completed. The multiple path planning schemes obtained by the double-layer optimization model as the initial population are evaluated by using the surrogate model, and new offspring are obtained by using local search method and simulated annealing method according to the evaluation results, the new offspring is the optimal planning path selected from the multiple path planning schemes.
[0043] Among them, the path planning obtained by the vehicle distribution task model only considers the relationship between multiple warehouses and multiple distribution customers, without considering the influence of scene factors outside the warehouse and the customer on the path planning, so that the path planning can adapt to multiple scenes, and the optimal path planning is selected from the path planning applicable to multiple scenes by using the surrogate model, the local search method and the simulated annealing method, and finally the optimal planning path applicable to multiple scenes is obtained. BRIEF DESCRIPTION OF DRAWINGS
[0044] Figure 1 The optimized method flowchart provided for the embodiment of the application;
[0045] Figure 2 The crossover operator example diagram provided for the embodiment of the application;
[0046] Figure 3 The mutation operator example diagram provided for the embodiment of the application. DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the application more obvious and easy to understand, the specific embodiments of the application will be described in detail below with reference to the drawings. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the application. However, the application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the spirit of the application, so the application is not limited to the specific embodiments disclosed below.
[0048] Reference Figure 1The embodiment of the application provides a path planning method for multi-warehouse distribution tasks, comprising the following steps:
[0049] Step one: the path planning method is applied to a vehicle distribution task composed of M warehouses, N task nodes with distribution time limits and K vehicles with capacity limits.
[0050] Step two: taking a travel cost reflecting a vehicle driving path cost, a warehouse inventory sum reflecting an inventory cost and a robustness of the vehicle distribution task model as a target function, taking that each customer is only assigned to one customer, each customer only accepts one distribution service, each vehicle cannot drive from one warehouse to another warehouse, customers assigned to different warehouses cannot receive distribution services from the same vehicle, initial and ending locations of each vehicle distribution route need to be in the same warehouse and eliminating sub-routes as constraint conditions, a vehicle distribution task model capable of generating multiple path planning schemes is constructed, and the vehicle distribution task model is taken as an upper model of a double-layer optimization model.
[0051] Step three: the minimum travel cost is selected from travel costs of multiple path planning schemes randomly generated by the upper model in a simulated annealing manner, a path planning scheme corresponding to the minimum travel cost is obtained, and a lower model of the double-layer optimization model is constructed.
[0052] Step four: multiple path planning schemes obtained according to the double-layer optimization model are taken as initial populations of a simulated annealing genetic algorithm, a Kriging model is trained, a path distance fitting model used for describing a customer assignment relationship and path distance correlation is obtained, and the path distance fitting model is taken as a proxy model; offspring is generated by crossing and mutating the multiple path planning schemes as the initial populations, and the offspring is input into the proxy model to evaluate the offspring; according to an evaluation result, a non-dominated sorting is used to obtain a solution with the highest non-dominated level, and a new offspring is obtained by using a local search method and a simulated annealing method; the proxy model is retrained by using the new offspring to update the proxy model and the parent generation is updated by using an environmental selection strategy; when a termination condition is met, the simulated annealing genetic algorithm is stopped, and the new offspring is taken as an optimal planning path.
[0053] 1, a vehicle distribution task model is established.
[0054] 1.1, a node set composed of M warehouse nodes and N distribution customer nodes is defined:
[0055]
[0056] wherein, represents the mth warehouse node, represents the nth customer node, and an uncertainty demand is defined as dem i ; a path set E = {ei,j |i,j∈V}, e i,j denotes the edge connecting node i and node j, w i,j is the travel cost between node i and node j.
[0057] Define the scenario of demand change as SC = {sc1, sc2,..., sc t ,...,sc T}, sc t denotes the t-th scenario, and T denotes the total number of scenarios.
[0058] 1.2, use formula (1), (2) and (3) to build the objective function of the vehicle path planning model:
[0059]
[0060] The first objective F1 is the travel cost of the solution, which is also the objective of the lower optimization; the second objective F2 is the total of all warehouse inventories, reflecting the inventory cost of the solution; the third objective F3 reflects the robustness of the solution.
[0061] Wherein If the customer is assigned to the warehouse , its Otherwise, If there is a vehicle driving from the warehouse / customer to the warehouse / customer , then Otherwise Wherein denotes the inventory level of the warehouse . In formula (3), SC is the scenario set, is the demand of the customer t under scenario sc , and Γ(true) = 1, Γ(false) = 0.
[0062] 1.3, use formula (4) to formula (11) to build the constraint condition of the vehicle path planning model:
[0063]
[0064] Wherein, Q is the maximum load of the vehicle, u i is the load of the vehicle when serving the customer .
[0065] Equation (4) ensures that each customer is assigned to only one customer; Equation (5) and Equation (6) are used to ensure that all customers are served only once; Equation (7) and Equation (8) prevent vehicles from driving from one depot to another depot; Equation (9) ensures that customers assigned to different depots are not served by the same vehicle; Equation (10) guarantees that all vehicles start and end their routes at the same depot; and the purpose of Equation (11) is to eliminate sub-routes.
[0066] 2. Randomly initialize the initial population of path planning schemes that meet the constraint conditions, perform lower-level optimization, and train the surrogate model.
[0067] 2.1. Randomly generate PopNum path planning schemes that meet the constraint conditions as individuals in the initial population.
[0068] 2.2. Randomly generate a scenario set SC within the interval [dem i -ε*dem i ,dem i +ε*dem i ].
[0069] 2.3. Calculate the lower-level solution f1 of the initial population according to Equation (1) and perform lower-level optimization to obtain the lower-level optimal solution as F1, while obtaining F2 and F3 according to Equations (2) and (3).
[0070] 2.3.1. The lower-level optimization uses simulated annealing, with an initial temperature of 1000 and a stopping temperature of 1. The annealing rate (T) of the initial population for lower-level optimization is 0.999.
[0071] 2.3.2. Randomly select reinsertion, Swap, and 2-Opt to produce offspring each iteration.
[0072] 2.3.3. Compare the offspring and the optimal objective of the population. If it is better, accept the offspring, otherwise accept the bad solution with a certain probability.
[0073] 2.4. Add the initial population to the archive A and train the surrogate model.
[0074] 2.4.1. Extract the feature parameters of the solutions in A and AGG = {agg1, agg2,..., agg m}, where denotes the average distance from the customer to the depot, describes the customer allocation scheme from the customer aggregation perspective, where A represents the area enclosed by the customers, and n represents the number of customers.
[0075] 2.4.2. Use the Kriging model to train the features obtained in 2.4.1 to obtain a path distance fitting model, and use it as the surrogate model.
[0076] 3. Generate offspring from the population by crossover and mutation:
[0077] 3.1. Generate a mating pool of size for the gen-th generation using the two-tournament method.
[0078] 3.2. Select two individuals from the mating pool as parents Parent1 and Parent2, generate a random value pc, if p < pc, go to step 3.3; otherwise go to step 3.4; where pc is the crossover probability, p e [0, 1].
[0079] 3.3. Randomly select a warehouse d e [1, N], select the routes of the d-th warehouse of Parent1 and Parent2 and delete the customer nodes in Parent1 (Parent2) that are duplicated in merge and as a new route R d and replace the route in Parent1 (Parent2) to generate offspring Off1 and Off2.
[0080] As shown in Figure 2 , the routes <b, 0, 6, 4, b> and <b, 3, 9, b> are selected from Parent1, and the routes <b, 0, 6, b> and <b, 8, 3, 9, b> are selected from Parent2; the node 8 in Parent1 that is duplicated in the selected routes of Parent2 is deleted, and the node 4 in Parent2 that is duplicated in the selected routes of Parent1 is deleted; then, the remaining part of Parent1 and the selected part of Parent2 are merged as Offspring1, and the remaining part of Parent2 and the selected part of Parent1 are merged as Offspring2; if there is a missing customer in the offspring, it is assigned to the selected route, for example, the missing customer 8 in Offspring2 is inserted into the route <b, 3, 9, b> to form the route <b, 3, 9, 8, b>.
[0081] 3.4. For each parent solution, randomly select two customer nodes v1 and v2 that do not belong to the same warehouse, exchange the two customers to generate offspring Off.
[0082] As shown in Figure 3 , the customers 7 and 8 are exchanged, so the routes <a, 7, 1, a> and <b, 8, 3, 9, b> become <a, 8, 1, a> and <b, 7, 3, 9, b>.
[0083] 3.5. Check the inventory constraints of the generated offspring, if the total inventory is less than the total demand, adjust the inventory level to the total demand, otherwise reduce the inventory level by 20% of the difference.
[0084] 4. Evaluate the offspring by using the surrogate model, and select some of the offspring F to perform the lower level optimization:
[0085] 4.1. Extract the characteristic parameters of the offspring solution O, and evaluate the offspring by using the surrogate model trained in the last generation.
[0086] 4.2. Sort the offspring solutions according to the predicted values and the accuracy of the prediction, and perform local search on the solutions in the first level and use a self-defined simulated annealing rate to obtain the real target value in the lower level optimization.
[0087] 4.2.1. Sort the offspring solutions in ascending order according to the predicted values, and set the initial T as where K is the rank of the offspring solution, i.e., the more optimal the target value is, the more resources are allocated to the lower level optimization.
[0088] 4.2.2. And find whether there exists a solution in A, if there exists, update T as where Rep is the number of times the solution has been optimized, i.e., the more optimal the solution is, the more resources are allocated to the optimization.
[0089] 4.2.3. Calculate the upper level target value of the offspring solution set O by using formula (2) and formula (3).
[0090] 5. Update the surrogate model:
[0091] 5.1. Select the individuals allocated to the surrogate model s from the offspring solution set F that have been evaluated in the real environment, and add them to A s .
[0092] 5.2. If the number of solutions in A s is less than the maximum number of archived solutions ArchiveN, update s.
[0093] 5.3. Otherwise, select the individuals with the top ArchiveN target values in A s , and select the individual with the optimal target value as the leader.
[0094] 5.4. Sort the offspring solutions F according to the real target values and the prediction errors, and calculate the crowding distance, and select the individuals in the top two levels as the elite solutions Elite.
[0095] 5.5. For each e∈Elite, calculate the Euclidean distance EucDis between e and the leader, if the distance is less than 40, calculate the next individual; otherwise, add the individual with EucDis less than 40 between e and the leader in A e to A s , if the number of individuals in A e is greater than 30, train the surrogate model s e by using A e , and update As Remove these individuals, update s again; if none of the conditions are met, only update s and do not perform agent model division.
[0096] 6. Update the next generation population by environment selection strategy:
[0097] 6.1, Merge the offspring O and the parent P, and perform non-dominated sorting and crowdedness calculation according to the defined three target values, and select the first PopNum individuals as the parent of the next iteration.
[0098] 7. If the termination condition is reached, output the final population; otherwise, return to step 3 for execution:
[0099] 7.1, an entropy-based termination condition is adopted, and the entropy is calculated as follows:
[0100]
[0101] Wherein H represents the diversity of the population.
[0102] 7.2, if the diversity change degree H of a population is less than 0.001 for three generations in succession, it is considered that the algorithm is difficult to find better solutions, at this time the algorithm iteration is stopped; otherwise, jump to step 3 for execution. Wherein H n The algorithm is difficult to find better solutions, at this time the algorithm iteration is stopped; otherwise, jump to step 3 for execution. Wherein H n Is calculated as follows:
[0103]
[0104] Wherein, The theoretical minimum value of H is Hmin, The theoretical maximum value is Hmax.
[0105] The beneficial effects of the present application include the following:
[0106] 1. The present application proposes an agent model tailored for the multi-warehouse vehicle distribution problem to predict the minimum routing cost of the customer allocation scheme. Specifically, in order to solve the discrete decision variables of the multi-warehouse vehicle distribution problem, two groups of continuous features are extracted from the customer allocation scheme as model input. The first group of features reflects the customer aggregation degree of each warehouse, and the second group of features describes the distance between the customer and the warehouse. These two groups of features can comprehensively represent the customer allocation scheme and help the agent model effectively distinguish the pros and cons of the scheme.
[0107] 2、The application proposes a special model management strategy, which adaptively divides the decision space of the customer allocation problem into different subspaces in the evolutionary algorithm search process, and then builds proxy models in different subspaces. Since each proxy model only needs to approximate the relationship between the characteristics of the customer allocation scheme and the minimum travel cost in a very small decision space, the performance bottleneck caused by multiple local optima can be effectively alleviated. The number of local optima in a given subspace is significantly less than the number of optimal individuals in the entire decision space.
[0108] 3、The application proposes a simulated annealing algorithm to search for the optimal route of each depot. In order to solve the problem of inaccurate optimal path leading to the decline of the performance of the proxy model, an adaptive computing resource allocation strategy is introduced into the simulated annealing algorithm, which allocates more computing resources to potential customer allocation schemes; thus providing more accurate evaluation for these allocation schemes, so that the algorithm can find better routes and continuously improve the accuracy of the model.
[0109] The embodiment of the application provides a path planning system for multi-warehouse distribution tasks, which comprises:
[0110] The upper model construction module is configured to take the travel cost reflecting the vehicle travel path cost, the warehouse inventory sum reflecting the inventory cost, and the robustness of the vehicle distribution task model as the objective function; take the assignment of each customer to only one customer, the acceptance of each customer to only one distribution service, the travel of each vehicle from one warehouse to another warehouse, the assignment of customers to different warehouses to the distribution service of the same vehicle, the initial and ending locations of each vehicle distribution route in the same warehouse, and the elimination of sub-routes as constraint conditions, to construct a vehicle distribution task model capable of generating multiple path planning schemes, and take the vehicle distribution task model as the upper model of the bi-level optimization model.
[0111] The lower model construction module is configured to select the minimum travel cost from the travel costs of the multiple path planning schemes randomly generated by the upper model through the simulated annealing method, obtain the path planning scheme corresponding to the minimum travel cost, and construct the lower model of the bi-level optimization model.
[0112] The double-layer optimization model optimization module is configured to take a plurality of path planning schemes obtained according to the double-layer optimization model as initial populations of the simulated annealing genetic algorithm, train the Kriging model, obtain a path distance fitting model for describing the customer allocation relationship and the path distance correlation, and take the path distance fitting model as a surrogate model; the plurality of path planning schemes as the initial populations are subjected to crossover and mutation to generate offspring, and the offspring are input into the surrogate model to evaluate the offspring; according to the evaluation results, the non-dominated sorting is used to obtain solutions with the highest non-dominated level, and a new offspring is obtained through a local search method and a simulated annealing method; the new offspring is used to retrain the surrogate model to update the surrogate model and update the parent generation through an environmental selection strategy; when a termination condition is met, the simulated annealing genetic algorithm is stopped, and the new offspring is taken as an optimal planning path.
[0113] One specific implementation is as follows:
[0114] The present application aims to solve the path planning problem in an uncertain transportation environment, such as demand changes caused by garbage collection, and the case of uncertain demand and departure from multiple distribution sites, and to assist the lower-layer path planning of the double-layer optimization algorithm through the surrogate model, reduce the consumption of computing resources, and continuously improve the accuracy of the model through a special model management strategy, balance the robustness and optimality of the population, and thus obtain the best robust optimal solution in various scenarios. Specifically, the path planning method is applied to a vehicle distribution task composed of M warehouses, N task nodes with distribution time limits, and K vehicles with capacity limits, and is performed according to the following steps:
[0115] Step 1: Establish a vehicle distribution task model.
[0116] Step 2: Randomly initialize a path planning scheme initial population that satisfies the constraint conditions, perform lower-layer optimization, and train the surrogate model.
[0117] Step 3: Crossover and mutation of the population to generate offspring.
[0118] Step 4: Evaluate the offspring using the surrogate model, and select part of the offspring F for lower-layer optimization.
[0119] Step 5: Update the surrogate model.
[0120] Step 6: Update the next generation population through an environmental selection strategy.
[0121] Step 7: If the termination condition is met, output the final population; otherwise, return to step 3.
[0122] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be noted that for ordinary skilled persons in the art, without departing from the concept of the present application, several modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.
Claims
1. A method for path planning of multi-warehouse distribution tasks, characterized in that, The path planning method is applied to a vehicle distribution task composed of M warehouses, N task nodes with distribution time limits, and K vehicles with capacity limits; the path planning method comprises the following steps: A travel cost reflecting a vehicle driving path cost, a warehouse inventory sum reflecting an inventory cost, and a robustness of a vehicle distribution task model are taken as objective functions; each customer is only assigned to one warehouse, each customer only accepts one distribution service, each vehicle cannot drive from one warehouse to another warehouse, customers assigned to different warehouses cannot receive distribution services from the same vehicle, initial and ending locations of each vehicle distribution route need to be in the same warehouse, and sub-routes are eliminated as constraint conditions, so as to construct a vehicle distribution task model capable of generating multiple path planning schemes and take the vehicle distribution task model as an upper model of a bi-level optimization model; A minimum travel cost is selected from travel costs of multiple path planning schemes randomly generated by the upper model through a simulated annealing method, a path planning scheme corresponding to the minimum travel cost is obtained, and a lower model of the bi-level optimization model is constructed; Multiple path planning schemes obtained according to the bi-level optimization model are taken as initial populations of a simulated annealing genetic algorithm, a Kriging model is trained, a path distance fitting model used for describing a customer allocation relationship and a path distance correlation is obtained, and the path distance fitting model is taken as a surrogate model; Offspring is generated by crossing and mutating the multiple path planning schemes as initial populations, and the offspring is input into the surrogate model to evaluate the offspring; according to an evaluation result, a non-dominated sorting is used to obtain a solution with the highest non-dominated level, and a new offspring is obtained through a local search method and a simulated annealing method; the surrogate model is retrained using the new offspring to update the surrogate model, and a parent generation is updated through an environmental selection strategy; when a termination condition is met, the simulated annealing genetic algorithm is stopped, and the new offspring is taken as an optimal planning path; The robustness is: 。 2. The method of claim 1, wherein, The minimum travel cost is selected from travel costs of multiple path planning schemes randomly generated by the upper model through a simulated annealing method, and specific steps include: Multiple path planning schemes meeting the objective functions and the constraint conditions are randomly generated; Solving results of first, second, and third objective functions of the initial populations are obtained; A simulated annealing method is designed, including that an initial temperature is set to 1000 degrees Celsius, a stop temperature is set to 1 degree Celsius, and an annealing rate is set to 0.999 degrees Celsius / second; The solving results of the first, second, and third objective functions are processed using the simulated annealing method to obtain a final solution; In an iteration process of the simulated annealing, a local search heuristic algorithm of reinsertion, Swap exchange, or 2-Opt two exchange optimization is used to generate offspring, and the final solution is updated by selecting suitable values of the objective functions from the offspring and the final solution.
3. The method of claim 1, wherein, The path distance fitting model used for describing the customer allocation relationship and the path distance correlation is obtained, and the path distance fitting model is taken as the surrogate model, and specific steps include: According to a plurality of path planning schemes as an initial population, two characteristic parameters of each scheme are extracted; wherein the two characteristic parameters are the average distance from the customer to the warehouse and the aggregation degree of the customer allocation scheme; According to the two characteristic parameters, a Kriging model is trained to obtain a surrogate model.
4. The method of claim 1, wherein, The plurality of path planning schemes as the initial population are crossed and mutated to generate offspring, and the specific steps include: According to the multiple path planning schemes as initial populations, a mating pool with a size of is generated by using a binary tournament method; wherein the path planning schemes corresponding to the minimum travel cost, the maximum total warehouse inventory, and the maximum robustness in the mating pool; Select two individuals from the mating pool as parents and Generate a crossover probability ; If is less than , then: randomly select a warehouse, select a route for the dth warehouse and delete from the customer nodes that are duplicated in and merge and as a new route and replace the routes in and with and to generate offspring and ; and ; is a random number between 0 and 1. If greater than or equal to then: randomly select two customer nodes in each parent solution that do not belong to the same warehouse and swap the two customers to generate offspring; The total warehouse inventory of the offspring is adjusted, when the total warehouse inventory is less than the actual total demand, the total warehouse inventory is adjusted to the actual total demand; when the total warehouse inventory is greater than the actual total demand, according to a fixed percentage of the difference between the total warehouse inventory and the actual total demand, the total warehouse inventory is adjusted.
5. The method of claim 1, wherein, The specific steps of retraining the surrogate model using the new offspring to update the surrogate model include: selecting individuals from the offspring solution set for assignment to the surrogate model and adding the offspring solution set to the archive for storing a fixed number of solutions in the middle; When saving If the number of solutions is less than the maximum number of archives in the proxy model archive, then the proxy model is retrained to update the proxy model. Otherwise, select the solution corresponding to the maximum number of archives from the archives and select the solution corresponding to the optimal objective function value as the Leader. According to the true target value and the prediction error, non-dominated sorting and congestion degree acquisition are performed, and the results of the first two levels of the selection results are selected as elite solutions; Obtain the Euclidean distance between each elite solution and two feature parameters of the Leader; if the Euclidean distance is less than 40, obtain the next elite solution; otherwise, add the solution to the elite solution archive. Add archive Elite solutions whose Euclidean distance from the elite solution is less than 40; if If the number of solutions is greater than 30, then use Train the agent model and from Remove the solutions used in training and update the surrogate model; if none of the above conditions are met, only update the surrogate model.
6. The method of claim 1, wherein, The specific steps of updating the parent generation by the environmental selection strategy include: The offspring and the parent generation are merged to obtain a plurality of merged path planning schemes; According to the merged path planning scheme, the values of the three objective functions of the upper model are obtained; According to the values of the three objective functions, the solutions are obtained by using non-dominated sorting and congestion degree; The path planning scheme corresponding to the solution meeting the demand is selected as the new parent generation.
7. The method of claim 1, wherein, The specific steps of stopping the simulated annealing genetic algorithm when the termination condition is met include: An entropy-based termination condition method is used to obtain the diversity of the population; According to the diversity change degree of the population, when the diversity change degree is less than 0.001 in the genetic algorithm of the last three generations, the algorithm iteration is stopped, otherwise the operation of crossing and mutating the parent generation is returned to continue iteration.
8. A multi-warehouse delivery task path planning system characterized by, It includes: The upper model construction module is used to take the travel cost reflecting the vehicle driving path cost, the total warehouse inventory reflecting the inventory cost, and the robustness of the vehicle distribution task model as the objective function; Each customer is only assigned to one warehouse, each customer only accepts one distribution service, each vehicle cannot drive from one warehouse to another warehouse, customers assigned to different warehouses cannot receive distribution services from the same vehicle, the initial and ending locations of each vehicle distribution route need to be in the same warehouse, and the sub-route is eliminated as a constraint condition, so as to construct a vehicle distribution task model capable of generating a plurality of path planning schemes and take the vehicle distribution task model as the upper model of the bi-level optimization model; The lower model construction module is used to select the minimum travel cost from the travel costs of the plurality of path planning schemes randomly generated by the upper model by the simulated annealing method, and obtain the path planning scheme corresponding to the minimum travel cost, so as to construct the lower model of the bi-level optimization model. The double-layer optimization model optimization module is configured to take a plurality of path planning schemes obtained according to the double-layer optimization model as initial populations of the simulated annealing genetic algorithm, train the Kriging model, obtain a path distance fitting model for describing a customer allocation relationship and path distance correlation, and take the path distance fitting model as a surrogate model; the plurality of path planning schemes as the initial populations are crossed and mutated to generate offspring, and the offspring is input into the surrogate model to evaluate the offspring; according to an evaluation result, a non-dominated sorting is used to obtain a solution with the highest non-dominated level, and a new offspring is obtained through a local search method and a simulated annealing method; the new offspring is used to retrain the surrogate model to update the surrogate model and update the parent generation through an environmental selection strategy; when a termination condition is met, the simulated annealing genetic algorithm is stopped, and the new offspring is taken as an optimal planning path. The robustness is: 。