A path planning method based on ensemble learning for vehicle delivery tasks

Through the integrated learning method, local search operators and their combination methods are adaptively selected, and parallel searches are solved, and the efficiency and robustness of path planning in vehicle distribution tasks are quickly found.

CN115936280BActive Publication Date: 2025-09-02ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211593599.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2025-09-02
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

In the prior art, in vehicle delivery task path planning, local search operators are time-consuming and labor-intensive and focus on the current task, making it difficult to find a path planning scheme with low driving distance in other tasks, and the metaheuristic algorithm converges slowly, so it is impossible to find the optimal solution within a reasonable time.

Method used

Using an integrated learning method, local search operators and their arrangement and combination methods are adaptively selected, and local search operators contribute vectors and synergistic matrix, probability selection operators and combination methods are used to search in parallel, and low driving distance paths are quickly found using computer resources.

Benefits of technology

It realizes the rapid finding of low-cost path planning schemes in the current task, and maintains efficiency in other tasks, broadens the search space, and improves robustness and timeliness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936280B_ABST
    Figure CN115936280B_ABST
Patent Text Reader

Abstract

The present invention discloses a path planning method for vehicle delivery tasks based on ensemble learning. The method is applied to a vehicle delivery task consisting of a single warehouse, K trucks, and N delivery task nodes, and includes the following steps: 1. Establishing a vehicle delivery task model; 2. Initializing global variables; 3. Obtaining a set of local search operators applicable to the current task; 4. Obtaining a variety of local search operator permutations and combinations applicable to the current task; 5. Generating a variety of temporary path planning schemes using the various local search operator permutations and combinations; 6. Updating the current path planning scheme and the optimal path planning scheme; 7. Outputting the optimal path planning scheme if a termination condition is met; otherwise, returning to step 3. The present invention can adaptively select local search operators and their permutations and combinations applicable to the current task, and accordingly find a path planning scheme with a low driving distance, thereby improving delivery efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of vehicle path optimization, and in particular to a path planning method based on ensemble learning suitable for vehicle delivery tasks. Background Art

[0002] Logistics distribution and transportation is an important link in the logistics system. Choosing a reasonable distribution route can reduce transportation distance and time, reduce fuel consumption, and has extremely high economic and environmental significance.

[0003] Path planning methods for vehicle delivery tasks can be primarily categorized into two types: exact algorithms and meta-heuristic algorithms. Exact algorithms include branch-and-bound, integer linear programming, and dynamic programming. These exact methods are only suitable for smaller-scale vehicle delivery tasks because applying exact algorithms to large-scale tasks is extremely time-consuming and cannot find the optimal solution within a reasonable timeframe. Meta-heuristic algorithms include ant colony algorithms, particle swarm algorithms, genetic algorithms, and local search. The ant colony algorithm, inspired by the natural behavior of ants searching for food, uses a positive feedback mechanism to continuously search the target space, gradually approaching the optimal solution. However, the ant colony algorithm has a slow convergence rate, requiring a long search time to reach the optimal solution, and is prone to getting stuck in local optima when pheromones are scarce in the population. The particle swarm algorithm, inspired by the study of the feeding behavior of bird and fish flocks, leverages the information sharing capabilities of individuals within the swarm to achieve the optimal solution. However, the particle swarm algorithm is prone to premature convergence and getting stuck in local optima. A genetic algorithm is a search heuristic algorithm that mimics the process of natural selection. It utilizes natural evolutionary techniques such as inheritance, mutation, selection, and crossover to generate path planning solutions for the task being optimized. While genetic algorithms offer excellent global optimization capabilities, they also suffer from drawbacks such as low search efficiency and slow convergence. Local search, a general metaheuristic algorithm for solving combinatorial optimization problems, boasts fast and effective convergence, and has therefore been widely used in path planning for vehicle delivery tasks.

[0004] However, when using local search to plan paths for vehicle delivery tasks, designers often need to manually select local search operators and their permutations and combinations that are suitable for the current task based on the characteristics of the current vehicle delivery task. This is not only time-consuming and labor-intensive, but the selected local search operators and their permutations and combinations are too focused on the current vehicle delivery task. When applied to other vehicle delivery tasks, it is often impossible to find path planning solutions with low driving distances. Summary of the Invention

[0005] In order to address the shortcomings of the above-mentioned existing technologies, the present invention proposes a vehicle delivery task path planning method based on ensemble learning, so that according to a given vehicle delivery task, it can adaptively select local search operators and their permutations and combinations suitable for the current task, and make full use of the computer's computing resources to find a vehicle path planning solution with a low driving distance, thereby reducing transportation distance and transportation time and lowering fuel consumption.

[0006] In order to achieve the above-mentioned object, the present invention adopts the following technical solutions:

[0007] The present invention provides a path planning method for vehicle delivery tasks based on ensemble learning. The method is applied to a vehicle delivery task consisting of a single warehouse, K trucks, and N delivery task nodes, and is performed according to the following steps:

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

[0009] Step 1.1, define a node set V consisting of a warehouse node v0 and N delivery task nodes = {v i ,i=0,1,2,...,N},v i Represents the i-th node; define the path set E = {e ij |i,j=0,1,2,...,N},e ij Represents the i-th node v i To the jth node v j Path;

[0010] Step 1.2: Use formula (1) to construct the objective function f of the vehicle path planning model:

[0011]

[0012] In formula (1), c ij Represents the i-th node v i To the jth node v j The distance, x ij Indicates whether the path planning solution includes the path from the i-th node v i To the jth node v j The path; if x ij =1, it means included, if x ij =0, it means not included; the goal is to find a set of routes for the vehicle so that the total travel distance is minimized while satisfying the constraints;

[0013] Step 1.3: Use equations (2) to (8) to construct the constraints of the vehicle path planning model:

[0014]

[0015]

[0016]

[0017]

[0018] u i -u j +Qx ij ≤Qd j ,i,j=1,2,…,N,i≠j (6)

[0019] d i ≤u i ≤Q (7)

[0020] x ij ∈{0, 1}, 0≤i, j≤N (8)

[0021] In formula (2) to formula (8), u i Indicates visiting the i-th delivery task node v i The load of the vehicle, u j Indicates visiting the jth delivery task node v j The load of the vehicle, Q represents the upper limit of the total demand of the delivery task nodes served by a truck, d i Represents the i-th delivery task node v i Demand;

[0022] Step 2: Initialization of global variables;

[0023] Step 2.1: The time when the path planning starts is recorded as time start , the upper limit of running time is time max ;

[0024] Step 2.2: Record the initial temperature of the simulated annealing method Where k represents the coefficient of initial temperature, and k∈[0,1];

[0025] Step 2.3: Let the current path planning scheme be s, initialize s using the saving algorithm, and calculate the travel distance of s as f using formula (1) s ;

[0026] Step 2.4: Let the optimal path planning solution be s * , and let s * ←s; the driving distance of the optimal path planning solution is make ← represents the assignment symbol;

[0027] Step 2.5: Note that the local search operator set OP = {op1, op2, ..., op m ,...,op M}, where M represents the number of local search operators, and M ≥ 2, op m represents the mth local search operator, and m∈[1,M];

[0028] Step 2.6: Let the contribution vector of the local search operator be CV = [1, 1, ..., 1] 1×M ;

[0029] Step 2.7: Let the coordination matrix of the local search operator be CM, and we have:

[0030]

[0031] Step 2.8: Set the maximum number of threads in the thread pool to T, where T is the number of physical cores in the CPU of the current computer.

[0032] Step 3: Get a set of local search operators suitable for the current task:

[0033] Step 3.1: Generate the temporary contribution vector CV′ using formula (10):

[0034]

[0035] In formula (10), CV m Represents the contribution of the contribution vector CV in the mth dimension;

[0036] Step 3.2: Generate an M-dimensional random vector randVector, where the value of each dimension in randVector is between 0 and 1.

[0037] Step 3.3: Generate an M-dimensional mask vector maskVector using formula (11):

[0038]

[0039] In formula (11), maskVector m 、randVector m , CV′ m Represent the values ​​of maskVector, randVector, and CV′ in the mth dimension respectively;

[0040] Step 3.4, remember the function g as m to maskVector m Mapping, that is, g(m)=maskVector m , m∈[1,M]; let g -1is the inverse function of g, let the local search operator set be the index vector idxVector = g -1 (1), that is, the set of all dimensions whose value is 1 in maskVector; the length L of the index vector idxVector is obtained using formula (12):

[0041]

[0042] Step 4: Obtain a variety of local search operator permutations and combinations suitable for the current task:

[0043] Step 4.1: Let the set of permutations and combinations of local search operators be opSets, and opSets is initialized to an empty set with a capacity of T, i.e., opSets can store at most T permutations and combinations;

[0044] Step 4.2: Generate an M×M-dimensional temporary coordination matrix CM′ using formula (13):

[0045]

[0046] In formula (13), CM′ ij CM ij Represent the values ​​of CM′ and CM at the i-th row and j-th column respectively;

[0047] Step 4.3: Generate a temporary operator permutation and combination method tmpOpSet = {};

[0048] Step 4.4: Randomly generate a positive integer int1, where int1∈idxVector; append int1 to the end of tmpOpSet and set the value of the int1 column in CM′ to zero;

[0049] Step 4.5: Take the row vector of the int1th row of CM′, select a dimension from the row vector using the roulette wheel method, and record the index of the selected dimension as int2;

[0050] Step 4.6: Append int2 to the end of tmpOpSet and set the value of the int2 column in CM′ to zero.

[0051] Step 4.7, let int1←int2;

[0052] Step 4.8: If the values ​​on the int1th row in CM′ are not all zero, return to step 4.5; otherwise, execute step 4.9;

[0053] Step 4.9. Add tmpOpSet to opSets.

[0054] Step 4.10: If opSets is not full, return to step 4.2; otherwise, go to step 5.

[0055] Step 5: Generate a variety of temporary path planning solutions by using a variety of local search operator combinations:

[0056] Step 5.1: Use the perturbation operator δ to perturb the current path planning solution s to obtain the perturbed path planning solution s′;

[0057] Step 5.2: Arrange the T operators in the form of opSets = {opSet1, opSet2, ..., opSet t ,...,opSet T} are sequentially assigned to T threads in the thread pool threads = {thread1, thread2, ..., thread t ,...,thread T}, where the tth local search operator permutation and combination method opSet t Assigned to thread t t ,and Indicates opSet t The lth operator in , and t∈[1,T],

[0058] Step 5.3, T threads search s′ in parallel according to the operator permutations and combinations assigned to them, and generate T temporary contribution vectors T temporary coordination matrices T temporary path planning solutions in, represents the t-th temporary contribution vector, represents the t-th temporary coordination matrix, represents the t-th temporary path planning scheme;

[0059] Step 5.4: When all threads have finished, proceed to step 6;

[0060] Step 6: Update the current path planning scheme and the optimal path planning scheme;

[0061] Step 6.1, update CV using formula (14):

[0062]

[0063] Step 6.2: Update CM using formula (15):

[0064]

[0065] Step 6.3: Update the current path planning scheme:

[0066] Step 6.3.1. Use the greedy strategy shown in formula (16) to select an elite temporary path planning solution s from T temporary path planning solutions. elite :

[0067]

[0068] 6.3.2. Calculate the current temperature E using formula (17):

[0069]

[0070] In formula (17), ε is the base of the temperature decay function of the simulated annealing method, and ε∈(0, 0.01]; time now For the current moment;

[0071] 6.3.3. Calculate the acceptance s at the current temperature E using formula (18) elite The probability p is:

[0072]

[0073] In formula (18), Indicates s elite driving distance;

[0074] 6.3.4. Generate a random number randNum, and randNum∈[0,1]. If randNum<p, update the current path planning scheme, that is, let s←s elite , Otherwise, s and f s remain unchanged;

[0075] Step 6.4: Update the optimal path planning solution s * :

[0076] like Then order Otherwise, s * and remain unchanged;

[0077] Step 7: If time now -time start >time max , then output s * ; Otherwise, return to step 3.

[0078] The path planning method based on ensemble learning for vehicle delivery tasks described in the present invention is also characterized in that it is generated in the following manner:

[0079] Step 5.3.1, let

[0080] Step 5.3.2, let l←1;

[0081] Step 5.3.3, apply Local search operator right Perform local search and obtain the temporary path planning solution s″ after the search;

[0082] Step 5.3.4: If the travel distance f of s″ s″ Less than Driving distance Then proceed to step 5.3.5; otherwise, go directly to step 5.3.6;

[0083] Step 5.3.5: If l≥2, then let And return to step 5.3.2; otherwise, let No update is done and return to step 5.3.2; where, express Middle The value of the dimension, express Middle Rank The value on the column;

[0084] Step 5.3.6, l←l+1; if l≤L, return to step 5.3.3; otherwise, end the tth thread thread t .

[0085] The electronic device of the present invention includes a memory and a processor, and is characterized in that the memory is used to store a program that supports the processor to execute the vehicle path planning method, and the processor is configured to execute the program stored in the memory.

[0086] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the vehicle path planning method when the computer program is executed by a processor.

[0087] Compared with the prior art, the present invention has the following beneficial effects:

[0088] 1. The present invention applies an integration method for local search operators to adaptively select efficient local search operators and local search operator permutations and combinations that are suitable for the current vehicle distribution task. Specifically, the present invention uses a local search operator contribution vector to track and record the performance of different local search operators under the current vehicle distribution task, and applies the roulette method to probabilistically select which local search operators to apply in the search process to obtain a set of local search operators. At the same time, a local search operator coordination matrix is ​​used to track and record whether the local search operator pair has good performance when two local search operators are executed one after another under the current vehicle path problem; and the roulette method is applied to probabilistically select the permutations and combinations between the local search operators after selecting the local search operator set through the local search operator contribution matrix. In this way, local search operators and their permutations and combinations that perform well under the current vehicle distribution task can be adaptively selected, which is conducive to finding a lower-cost path planning solution, and when applied to other vehicle distribution tasks, it can still find a low-cost path planning solution with high robustness.

[0089] 2. The present invention applies an integrated method for local search operator permutations and combinations, which can make full use of the differences in the search directions of different local search operator permutations and combinations, broaden the search space, and find a lower-cost path planning solution with a higher probability. Specifically, the present invention uses a joint selection method. After applying multiple different local search operator permutations and combinations to search for multiple different problem path planning solutions, it first greedily selects the path planning solution with the shortest driving distance among the multiple problem path planning solutions, and then applies the simulated annealing method to probabilistically accept the current path planning solution as the starting point for the next search. Therefore, the starting point of each new search is the result of selecting the best from multiple temporary path planning solutions after the previous search. Taking into account the differences in search directions and search capabilities of different local search operator permutations and combinations, the trajectories and results of each search are also different, so the search space is significantly broadened, which is conducive to finding a lower-cost path planning solution.

[0090] 3. The present invention applies a parallelization method that can effectively utilize computer resources and obtain a path planning solution with a low driving distance without consuming too much time. Specifically, after obtaining the permutations and combinations of multiple local search operators, the permutations and combinations of the local search operators are assigned to the threads in the thread pool, and each thread independently determines its own search direction according to its own permutation and combination of local search operators to search for path planning solutions. Because the threads are relatively independent of each other, compared to single-threaded search, while searching for a solution with a lower driving distance, the computer running time does not increase significantly. Therefore, when a new vehicle delivery task comes, the method of the present invention can quickly provide a low-cost path planning solution with high timeliness. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0092] Figure 2 This is an example diagram of generating an operator set based on CV in the present invention;

[0093] Figure 3 This is an example diagram of the permutation and combination method of generating operators based on CM in the present invention. DETAILED DESCRIPTION

[0094] In this embodiment, a path planning method based on ensemble learning suitable for vehicle delivery tasks is designed to solve vehicle delivery tasks with capacity constraints. First, the present invention applies an integration method for local search operators to adaptively select efficient local search operators and local search operator permutations and combinations that are suitable for the current vehicle delivery task, which is conducive to finding a lower-cost path planning solution, and when applied to other vehicle delivery tasks, it can still find a low-cost path planning solution, with high robustness; secondly, the present invention applies an integration method for local search operator permutations and combinations, which can make full use of the different search directions of different local search operator permutations and combinations, broaden the search space, and find a lower-cost path planning solution with a higher probability; finally, the present invention applies a parallelization method, which can effectively utilize computer resources. When a new vehicle delivery task comes, it can quickly provide a low-cost path planning solution with high timeliness. Specifically, if Figure 1 As shown, the path planning method is carried out in the following steps:

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

[0096] Step 1.1, define a node set V consisting of a warehouse node v0 and N delivery task nodes = {v i ,i=0,1,2,...,N},vi Represents the i-th node; define the path set E = {e ij |i,j=0,1,2,...,N},e ij Represents the i-th node v i To the jth node v j Path;

[0097] Step 1.2: Use formula (1) to construct the objective function f of the vehicle path planning model:

[0098]

[0099] In formula (1), c ij Represents the i-th node v i To the jth node v j The distance, x ij Indicates whether the path planning solution includes the path from the i-th node v i To the jth node v j The path; if x ij =1, it means included, if x ij =0, it means not included; the goal is to find a set of routes for the vehicle so that the total travel distance is minimized while satisfying the constraints;

[0100] Step 1.3: Use equations (2) to (8) to construct the constraints of the vehicle path planning model:

[0101]

[0102]

[0103]

[0104]

[0105] u i -u j +Qx ij ≤Qd j ,i,j=1,2,…,N,i≠j (6)

[0106] d i ≤u i ≤Q (7)

[0107] x ij ∈{0, 1}, 0≤i, j≤N (8)

[0108] In formula (2) to formula (8), u i Indicates visiting the i-th delivery task node v i The load of the vehicle, u jIndicates visiting the jth delivery task node v j The load of the vehicle, Q represents the upper limit of the total demand of the delivery task nodes served by a truck, d i Represents the i-th delivery task node v i Demand;

[0109] Formula (2) and (3) ensure that there is only one edge entering and only one edge leaving each delivery task node vertex in the route;

[0110] Formula (4) and (5) ensure that the number of vehicles used for service does not exceed the total number of vehicles, and each vehicle returns to the warehouse after completing the service;

[0111] Formula (6) ensures that each delivery task node is served and only served once;

[0112] Formula (7) is the vehicle load that meets the needs of the service delivery task node.

[0113] Step 2: Initialization of global variables;

[0114] Step 2.1: The time when the path planning starts is recorded as time start , the upper limit of running time is time max ;

[0115] Step 2.2: Record the initial temperature of the simulated annealing method Where k represents the coefficient of initial temperature, and k∈[0,1];

[0116] Step 2.3: Let the current path planning scheme be s, initialize s using the saving algorithm, and calculate the travel distance of s as f using formula (1) s ; At this time, s = {route1, route2, ..., route r ,...,route R}, r∈[1, R], indicating that s is composed of R paths; the path length set y={y1, y2, ..., y r ,...,y R}, where y r Indicates route r The number of delivery task nodes other than warehouse nodes; for the rth path Indicates that the vehicle starts from warehouse node v0 and visits in Finally, the warehouse node v0 is returned. For example, for a specific vehicle routing problem with 5 delivery task nodes, s can be {{0, 1, 3, 0}, {0, 2, 4, 0}, {0, 5, 0}}, indicating that the current routing plan contains 3 paths {0, 1, 3, 0}, {0, 2, 4, 0}, {0, 5, 0}, where the first vehicle visits v0, v1, v3, v0 in sequence; the second vehicle visits v0, v3, v4, v0 in sequence; and the third vehicle visits v0, v5, v0 in sequence. s The sum of the travel distances of all paths in the current path planning scheme;

[0117] Step 2.4: Let the optimal path planning solution be s * , and let s * ←s; the driving distance of the optimal path planning solution is make ← represents the assignment symbol;

[0118] Step 2.5: Note that the local search operator set OP = {op1, op2, ..., op m ,...,op M}, where M represents the number of local search operators, and M ≥ 2, op m Represents the mth local search operator, and m∈[1,M]; local search operators include intra-path local search operators and inter-path local search operators. Intra-path local search operators include the swap operator (select a path and swap the positions of two delivery task nodes in the path), and inter-path local search operators include the relocate operator (select two paths, remove a delivery task node in one path, and then reinsert it to a certain position in the other path). Figure 2 As shown, op1 can be a swap operator, op2 can be a relocate operator, and so on;

[0119] Step 2.6: Let the contribution vector of the local search operator be CV = [1, 1, ..., 1] 1×M ;

[0120] Step 2.7: Let the coordination matrix of the local search operator be CM, and we have:

[0121]

[0122] Step 2.8: Set the maximum number of threads in the thread pool to T, where T is the number of physical cores in the CPU of the current computer.

[0123] Step 3: Get a set of local search operators suitable for the current task:

[0124] Step 3.1: Generate the temporary contribution vector CV′ using formula (10):

[0125]

[0126] In formula (10), CV m Represents the contribution of the contribution vector CV in the mth dimension; Figure 2 As shown, at this time CV = [1, 2, 3, 1, 5], CV′ = [0.2, 0.4, 0.6, 0.2, 1.0];

[0127] Step 3.2: Generate an M-dimensional random vector randVector, and the value of each dimension in randVector is between 0 and 1; Figure 2 As shown, at this time randVector=[0.32, 0.27, 0.28, 0.38, 0.89];

[0128] Step 3.3: Generate an M-dimensional mask vector maskVector using formula (11):

[0129]

[0130] In formula (11), maskVector m 、randVector m , CV′ m Represent the values ​​of maskVector, randVector, and CV′ in the mth dimension respectively; Figure 2 As shown, at this time maskVector = [0, 1, 1, 0, 1];

[0131] Step 3.4, remember the function g as m to maskVector m Mapping, that is, g(m)=maskVector m , m∈[1,M]; let g -1 is the inverse function of g, let the local search operator set be the index vector idxVector = g -1 (1), that is, the set of all dimensions whose value is 1 in maskVector; the length L of the index vector idxVector is obtained using formula (12):

[0132]

[0133] like Figure 2 As shown, at this time, idxVector = [2, 3, 5], L = 3; indicating that three local search operators op2, op3, and op5 are selected in this search;

[0134] Step 4: Obtain a variety of local search operator permutations and combinations suitable for the current task:

[0135] Step 4.1: Let the set of permutations and combinations of local search operators be opSets, and opSets is initialized to an empty set with a capacity of T, i.e., opSets can store at most T permutations and combinations;

[0136] Step 4.2: Generate an M×M-dimensional temporary coordination matrix CM′ using formula (13):

[0137]

[0138] In formula (13), CM′ ij CM ij Represent the values ​​of CM′ and CM at the i-th row and j-th column respectively;

[0139] Step 4.3: Generate a temporary operator permutation and combination method tmpOpSet = {};

[0140] Step 4.4: Randomly generate a positive integer int1, where int1∈idxVector; append int1 to the end of tmpOpSet and set the value of the int1 column in CM′ to zero;

[0141] Step 4.5: Take the row vector of the int1th row of CM′, select a dimension from the row vector using the roulette wheel method, and record the index of the selected dimension as int2;

[0142] Step 4.6: Append int2 to the end of tmpOpSet and set the value of the int2 column in CM′ to zero.

[0143] Step 4.7, let int1←int2;

[0144] Step 4.8: If the values ​​on the int1th row in CM′ are not all zero, return to step 4.5; otherwise, execute step 4.9;

[0145] Step 4.9. Add tmpOpSet to opSets.

[0146] Step 4.10: If opSets is not full, return to step 4.2; otherwise, go to step 5.

[0147] A detailed tmpOpSet generation process is as follows Figure 3As shown, first select operator 2, add 2 to tmpOpSet, and set the second column of CM′ to zero. At this time, tmpOpSet = {2}; then select the row vector of the second row [0, 0, 1, 0, 9], select the value 9 by roulette, add its index 5 to tmpOpSet, and set the fifth column of CM′ to zero. At this time, tmpOpSet = {2, 5}; then take the row vector of the fifth row [0, 0, 8, 0, 0], select the value 8 by roulette, add its index 3 to tmpOpSet, and set the third column of CM′ to zero. At this time, tmpOpSet = {2, 5, 3}; then select the row vector of the third row [0, 0, 0, 0, 0], all of which are 0, and the generation process ends; tmpOpSet = {2, 5, 3} means that the execution order of the three local search operators is op2, op5, and op3;

[0148] Step 5: Generate a variety of temporary path planning solutions by using a variety of local search operator combinations:

[0149] Step 5.1. Use the perturbation operator δ to perturb the current path plan s to obtain the perturbed path plan s′. The purpose of the perturbation is to change the starting point of the search. That is, the total driving cost of s′ may not be lower than the total driving cost of s. For example, if s is {{0, 1, 3, 0}, {0, 2, 4, 0}, {0, 5, 0}}, then the perturbed s′ may be {{0, 1, 2, 0}, {0, 3, 4, 0}, {0, 5, 0}}.

[0150] Step 5.2: Arrange the T operators in the form of opSets = {opSet1, opSet2, ..., opSet t ,...,opSet T} are sequentially assigned to T threads in the thread pool threads = {thread1, thread2, ..., thread t ,...,thread T}, where the tth local search operator permutation and combination method opSet t Assigned to thread t t ,and Indicates opSet t The lth operator in , and t∈[1,T],

[0151] Step 5.3, T threads search s′ in parallel according to the operator permutations and combinations assigned to them, and generate T temporary contribution vectors T temporary coordination matrices T temporary path planning solutions in, represents the t-th temporary contribution vector, represents the t-th temporary coordination matrix, Represents the t-th temporary path planning scheme; and is generated as follows

[0152] Step 5.3.1, let

[0153] Step 5.3.2, let l←1;

[0154] Step 5.3.3, apply Local search operator right Perform local search and obtain the temporary path planning solution s″ after the search;

[0155] Step 5.3.4: If the travel distance f of s″ s″ Less than Driving distance Then proceed to step 5.3.5; otherwise, go directly to step 5.3.6;

[0156] Step 5.3.5: If l≥2, then let And return to step 5.3.2; otherwise, let No update is done and return to step 5.3.2; where, express Middle The value of the dimension, express Middle Rank The value on the column;

[0157] Step 5.3.6, l←l+1; if l≤L, return to step 5.3.3; otherwise, end the tth thread thread t ;

[0158] Step 5.4: When all threads have finished, proceed to step 6;

[0159] Step 6: Update the current path planning scheme and the optimal path planning scheme;

[0160] Step 6.1, update CV using formula (14):

[0161]

[0162] Step 6.2: Update CM using formula (15):

[0163]

[0164] Step 6.3: Update the current path planning scheme:

[0165] Step 6.3.1. Use the greedy strategy shown in formula (16) to select an elite temporary path planning solution s from T temporary path planning solutions. elite :

[0166]

[0167] 6.3.2. Calculate the current temperature E using formula (17):

[0168]

[0169] In formula (17), ε is the base of the temperature decay function of the simulated annealing method, and ε∈(0, 0.01]; time now For the current moment;

[0170] 6.3.3. Calculate the acceptance s at the current temperature E using formula (18) elite The probability p is:

[0171]

[0172] In formula (18), Indicates s elite driving distance;

[0173] 6.3.4. Generate a random number randNum, and randNum∈[0,1]. If randNum<p, update the current path planning scheme, that is, let s←s elite , Otherwise, s and f s remain unchanged;

[0174] Step 6.4: Update the optimal path planning solution s * :

[0175] like Then let s * ←s elite , Otherwise, s * and remain unchanged;

[0176] Step 7: If time now -time start >time max , then output s *; Otherwise, return to step 3.

[0177] In this embodiment, an electronic device includes a memory and a processor. The memory is used to store a program that supports the processor to execute the above-mentioned vehicle path planning method. The processor is configured to execute the program stored in the memory.

[0178] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned vehicle path planning method are executed.

[0179] To sum up, firstly, the present invention applies an integration method for local search operators, adaptively selects efficient local search operators and local search operator permutations and combinations suitable for the current vehicle delivery task, which is conducive to finding a lower-cost path planning solution, and when applied to other vehicle delivery tasks, it can still find a low-cost path planning solution, with high robustness; secondly, the present invention applies an integration method for local search operator permutations and combinations, which can make full use of the different search directions of different local search operator permutations and combinations, broaden the search space, and is conducive to finding a lower-cost path planning solution; finally, the present invention applies a parallelization method, which can effectively utilize computer resources, and obtain a path planning solution with a low driving distance without consuming too much time. When a new vehicle delivery task arrives, the method can quickly provide a low-cost path planning solution, with high timeliness.

Claims

1. A path planning method based on ensemble learning for vehicle delivery tasks is applied to a vehicle delivery task consisting of a single warehouse, K trucks, and N delivery task nodes. The method follows the following steps: Step 1: Establish a vehicle delivery task model; Step 1.1, define a node set V consisting of a warehouse node v0 and N delivery task nodes = {v i ,i=0,1,2,...,N},v i Represents the i-th node; define the path set E = {e ij |i,j=0,1,2,...,N},e ij Represents the i-th node v i To the jth node v j Path; Step 1.2: Use formula (1) to construct the objective function f of the vehicle path planning model: In formula (1), c ij Represents the i-th node v i To the jth node v j The distance, x ij Indicates whether the path planning solution includes the path from the i-th node v i To the jth node v j The path; if x ij =1, it means included, if x ij =0, it means not included; the goal is to find a set of routes for the vehicle so that the total travel distance is minimized while satisfying the constraints; Step 1.3: Use equations (2) to (8) to construct the constraints of the vehicle path planning model: u i -u j +Qx ij ≤Q-d j ,i,j=1,2,…,N,i≠j (6) d i ≤u i ≤Q (7) x ij ∈{0,1},0≤i,j≤N (8) In formula (2) to formula (8), u i Indicates visiting the i-th delivery task node v i The vehicle load, u j Indicates visiting the jth delivery task node v j The load of the vehicle, Q represents the upper limit of the total demand of the delivery task nodes served by a truck, d i Represents the i-th delivery task node v i demand; Step 2: Initialization of global variables; Step 2.1: The time when the path planning starts is recorded as time start , the upper limit of running time is time max ; Step 2.2: Record the initial temperature of the simulated annealing method in, k represents the coefficient of initial temperature, and k∈[0,1]; Step 2.3: Let the current path planning scheme be s, initialize s using the saving algorithm, and calculate the travel distance of s as f using formula (1) s ; Step 2.4: Let the optimal path planning solution be s * , and let s * ←s; the driving distance of the optimal path planning solution is make ← represents the assignment symbol; Step 2.5: Note that the local search operator set OP = {op1, op2, ..., op m ,...,op M }, where M represents the number of local search operators, and M ≥ 2, op m represents the mth local search operator, and m∈[1,M]; Step 2.6: Let the contribution vector of the local search operator be CV = [1, 1, ..., 1] 1×M ; Step 2.7: Let the coordination matrix of the local search operator be CM, and we have: Step 2.8: Set the maximum number of threads in the thread pool to T, where T is the number of physical cores in the CPU of the current computer. Step 3: Get a set of local search operators suitable for the current task: Step 3.1: Generate the temporary contribution vector CV′ using formula (10): In formula (10), CV m Represents the contribution of the contribution vector CV in the mth dimension; Step 3.2: Generate an M-dimensional random vector randVector, where the value of each dimension in randVector is between 0 and 1. Step 3.3: Generate an M-dimensional mask vector maskVector using formula (11): In formula (11), maskVector m 、randVector m , CV′ m Represent the values ​​of maskVector, randVector, and CV′ in the mth dimension respectively; Step 3.4, remember the function g as m to maskVector m Mapping, that is, g(m)=maskVector m , m∈[1,M]; let g -1 is the inverse function of g, let the local search operator set be the index vector idxVector = g -1 (1), that is, the set of all dimensions whose value is 1 in maskVector; the length L of the index vector idxVector is obtained using formula (12): Step 4: Obtain a variety of local search operator permutations and combinations suitable for the current task: Step 4.1: Let the set of permutations and combinations of local search operators be opSets, and opSets is initialized to an empty set with a capacity of T, i.e., opSets can store at most T permutations and combinations; Step 4.2: Generate an M×M-dimensional temporary coordination matrix CM′ using formula (13): In formula (13), CM′ ij CM ij Represent the values ​​of CM′ and CM at the i-th row and j-th column respectively; Step 4.3: Generate a temporary operator permutation and combination method tmpOpSet = {}; Step 4.4: Randomly generate a positive integer int1, where int1∈idxVector; append int1 to the end of tmpOpSet and set the value of the int1 column in CM′ to zero; Step 4.5: Take the row vector of the int1th row of CM′, select a dimension from the row vector using the roulette wheel method, and record the index of the selected dimension as int2; Step 4.6: Append int2 to the end of tmpOpSet and set the value of the int2 column in CM′ to zero. Step 4.7, let int1←int2; Step 4.8: If the values ​​on the int1th row in CM′ are not all zero, return to step 4.5; otherwise, execute step 4.9; Step 4.

9. Add tmpOpSet to opSets. Step 4.10: If opSets is not full, return to step 4.2; otherwise, go to step 5. Step 5: Generate a variety of temporary path planning solutions by using a variety of local search operator combinations: Step 5.1: Use the perturbation operator δ to perturb the current path planning solution s to obtain the perturbed path planning solution s′; Step 5.2: Arrange the T operators in the form of opSets = {opSet1, opSet2, ..., opSet t ,...,opSet T } are sequentially assigned to T threads in the thread pool threads = {thread1, thread2, ..., thread t ,...,thread T }, where the tth local search operator permutation and combination method opSet t Assigned to thread t t ,and Indicates opSet t The lth operator in , and t∈[1,T], Step 5.3, T threads search s′ in parallel according to the operator permutations and combinations assigned to them, and generate T temporary contribution vectors T temporary coordination matrices T temporary path planning solutions in, represents the t-th temporary contribution vector, represents the t-th temporary coordination matrix, represents the t-th temporary path planning scheme; Step 5.4: When all threads have finished, proceed to step 6; Step 6: Update the current path planning scheme and the optimal path planning scheme; Step 6.1, update CV using formula (14): Step 6.2: Update CM using formula (15): Step 6.3: Update the current path planning scheme: Step 6.3.

1. Use the greedy strategy shown in formula (16) to select an elite temporary path planning solution s from T temporary path planning solutions. elite : 6.3.

2. Calculate the current temperature E using formula (17): In formula (17), ε is the base of the temperature decay function of the simulated annealing method, and ε∈(0, 0.01]; time now For the current moment; 6.3.

3. Calculate the acceptance s at the current temperature E using formula (18) elite The probability p is: In formula (18), Indicates s elite driving distance; 6.3.

4. Generate a random number randNum, and randNum∈[0,1]. If randNum<p, update the current path planning scheme, that is, let s←s elite , Otherwise, s and f s remain unchanged; Step 6.4: Update the optimal path planning solution s * : like Then let s * ←s elite , Otherwise, s * and remain unchanged; Step 7: If time now -time start >time max , then output s * ; Otherwise, return to step 3.

2. The path planning method based on ensemble learning for vehicle delivery tasks according to claim 1, characterized in that: It is generated as follows Step 5.3.1, let Step 5.3.2, let l←1; Step 5.3.3, apply Local search operator right Perform local search and obtain the temporary path planning solution s″ after the search; Step 5.3.4: If the travel distance f of s″ s″ Less than Driving distance Then proceed to step 5.3.5; otherwise, go directly to step 5.3.6; Step 5.3.5: If l≥2, then let And return to step 5.3.2; otherwise, let No update is done and return to step 5.3.2; where, express Middle The value of accuracy, express Middle Rank The value on the column; Step 5.3.6, l←l+1; if l≤L, return to step 5.3.3; otherwise, end the tth thread thread t .

3. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the vehicle path planning method according to claim 1 or 2, and the processor is configured to execute the program stored in the memory.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the vehicle path planning method according to claim 1 or 2 are executed.

Citation Information

Patent Citations

  • Vehicle path planning method with time window based on multi-population evolutionary algorithm

    CN114330870A

  • Logistics vehicle distribution scheduling method, vehicle, electronic equipment and storage medium

    CN114781706A