A delivery route planning method

By optimizing the VRP model using a hybrid variable neighborhood search algorithm, and combining it with ant colony optimization and greedy algorithms, the problem of matching multiple vehicle depots with customers was solved, achieving efficient and accurate delivery route planning and overcoming the limitations of traditional algorithms.

CN117933860BActive Publication Date: 2026-11-27ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310697919.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-13
Publication Date
2026-11-27
Estimated Expiration
2043-06-13

AI Technical Summary

Technical Problem

Existing VRP models have blind spots when dealing with the problem of matching multiple vehicle depots with customers and the problem of customers being repeatedly visited. Furthermore, traditional algorithms such as ant colony algorithms have long iteration times and are prone to getting trapped in local optima in complex problems, resulting in inaccurate delivery route planning and long planning times.

Method used

A hybrid variable neighborhood search algorithm is adopted, which combines ant colony optimization, saving algorithm, greedy algorithm and two-element optimization algorithm. By establishing a correspondence matrix between customer demand nodes and cargo types, and between parking lots and cargo types, a VRP mixed integer model is constructed. Pheromones concentration and visibility are used to guide path planning, and multiple optimizations are performed to obtain the optimal path.

Benefits of technology

It improves the accuracy and efficiency of delivery routes, reduces computation time, avoids getting trapped in local optima, shortens iteration time, and ensures the accuracy and time efficiency of route planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117933860B_ABST
    Figure CN117933860B_ABST
Patent Text Reader

Abstract

The application provides a distribution path planning method, and belongs to the field of logistics path planning, and comprises the following steps. A corresponding relationship matrix of customer demand nodes and goods categories is established according to all goods categories and goods categories required by customer demand nodes; a corresponding relationship matrix of yards and goods categories is established according to goods categories kept by each yard and all goods categories; a VRP mixed integer model of supply-demand matching relationship between yards and customers is established according to the corresponding relationship matrix of customer demand nodes and goods categories and the corresponding relationship matrix of yards and goods categories; and the VRP mixed integer model is solved through a hybrid variable neighborhood search algorithm to obtain an optimal path. The VRP mixed integer model and the variable neighborhood search algorithm can solve the VRP problem of repeated service of customers, and a more accurate distribution path is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of logistics route planning, and specifically relates to a delivery route planning method. Background Technology

[0002] The Vehicle Routing Problem (VRP) is a key problem for optimizing logistics and distribution. However, with the rapid development of technology and commerce, various logistics and distribution models have emerged. VRP models based on traditional distribution models are no longer suitable for modeling and solving the complex logistics and distribution models of today. Currently, there is no effective modeling and solution method for distribution models where customers can be served repeatedly by vehicles.

[0003] Traditional VRP (Vehicle Resource Planning) models present an idealized problem, primarily focusing on customer demand being met by a central warehouse, with predetermined customer demand quantities and origins, and no shortages of different types of goods within the warehouse. However, real-world production environments are more complex. Different types of goods are stored in various depots, and each customer's needs are met by inventory from multiple depots. The specific supply-demand matching relationship between customers and depots, and the corresponding matching quantities, are unknown. During the actual delivery process, customers may require repeated visits by different vehicles to fulfill all their needs. Therefore, traditional VRP has blind spots in handling the "multiple depot and customer matching problem" and the "repeated customer problem."

[0004] VRP (Virtual Resource Planning) is an NP-hard problem, and traditional exact algorithms cannot solve it in a reasonable time. Therefore, using heuristic algorithms to find excellent feasible solutions is an important approach to studying this type of problem. Currently, researchers often use the ant colony algorithm to handle this type of problem. The ant colony algorithm is a biomimetic algorithm that simulates ant colonies foraging. This algorithm performs well in handling medium-sized combinatorial problems, but for complex problems, it suffers from long iteration times and a tendency to get trapped in local optima. For complex delivery route planning problems, it is prone to route matching deviations and long route planning times. Summary of the Invention

[0005] To overcome the problems of inaccurate delivery route planning and long route matching time, this invention provides a delivery route planning method, including the following steps:

[0006] Based on all types of goods and the types of goods required by customer demand nodes, establish a correspondence matrix between customer demand nodes and types of goods.

[0007] Establish a matrix of correspondence between parking lots and cargo types based on the types of goods held in each warehouse and all types of goods.

[0008] A VRP mixed integer model is established based on the correspondence matrix between customer demand nodes and cargo types, and the correspondence matrix between parking lots and cargo types, to establish the supply and demand matching relationship between parking lots and customers.

[0009] The VRP mixed integer model is solved using a hybrid variable neighborhood search algorithm to obtain the optimal delivery route, specifically including the following steps:

[0010] Ant colony algorithm is used to determine the matching scheme between customer demand nodes and parking lot nodes;

[0011] The saving algorithm is used to group the paths of the customer demand node and the parking lot node matching scheme to obtain an initial feasible solution;

[0012] The initial feasible solution is optimized using a greedy algorithm to obtain the optimized path sequence;

[0013] The path sequence was locally optimized using the two-element optimization algorithm 2-opt to obtain an optimized feasible solution.

[0014] The optimized feasible solution is deeply optimized using a variable neighborhood search to obtain the final feasible solution and thus obtain the optimal path planning.

[0015] Preferably, the objective function of the VRP mixed-integer model is:

[0016]

[0017] In the formula, c ij Let be the transportation cost between node i and node j, k be the vehicle number, K be the set of all vehicles, D be the set of all parking lots, V be the set of all customer demand nodes, and x be the value of x. ij k Let be the decision variable for whether vehicle k moves from i to j. If yes, set it to 1; otherwise, set it to 0.

[0018] Preferably, the constraints of the VRP mixed-integer model include:

[0019] Constraint 1: Each vehicle's journey must be a loop.

[0020]

[0021] Constraint 2: Each vehicle can be used a maximum of once.

[0022]

[0023] Constraint 3: The types of goods carried by each vehicle shall not exceed the range of goods stored at the location from which it departs.

[0024]

[0025] In the formula, k d C(i) represents the service range of car k; C(i) represents the set of customer demand nodes that car i can serve.

[0026] The regulations stipulate that vehicles will not serve customer demand points outside the service area of ​​their respective depots:

[0027]

[0028]

[0029] Constraint 4: Each customer demand vertex must be served.

[0030]

[0031] Constraint 5: Vehicles may not travel directly from one parking lot to another.

[0032]

[0033] Constraint 6: Eliminate sub-loop constraints:

[0034]

[0035] In the formula, M∈N*, M≥|V|, N* is the set of positive integers, and |V| is the size of the set of customer demand nodes.

[0036] M is a positive integer, and u is a variable. When node i and node j are at opposite ends of an edge, i.e., x ij k When = 1, variable u j k Less than u i k All nodes traversed by a vehicle will be arranged in order, causing the corresponding variable u of each node to gradually increase.

[0037] Constraint 7: Vehicle capacity limit constraint. For any vehicle, the total demand of the customer nodes it serves cannot exceed its own capacity.

[0038]

[0039] In the formula, d i i represents the demand at customer node i; Q represents the vehicle capacity.

[0040] Constraint 8: Traffic flow balance. To avoid edge breakage during vehicle travel, the vehicle's travel must be a complete loop.

[0041] ∑i∈V ∑ j∈V∪D x ij k=∑ i∈V ∑ j∈V∪D x ji k .

[0042] Preferably, the ant colony algorithm is used to determine the matching scheme between customer demand nodes and parking lot nodes, including the following steps:

[0043] Set an initial pheromone concentration of equal value between each customer demand node and each serviceable node in the parking lot;

[0044] Set the variable: pheromone concentration τ ij (0) = C, i ∈ V, j ∈ D;

[0045] Set the variable: Δτ, the increase in pheromone concentration. ij (0) = 0, i ∈ V, j ∈ D;

[0046] τ ij (0) represents the pheromone concentration between customer demand node i and parking lot j at the start of the first iteration; Δτ ij (0) represents the increase in pheromone concentration between customer demand node i and parking lot j at the beginning of the first iteration;

[0047] Set up a list of all customer demand nodes, select a parking lot for each customer demand node one by one, and traverse the entire list of customer demand nodes.

[0048] Take an ant from the ant colony. The ant searches for parking lots for all customer demand nodes and generates a matching scheme between customer demand nodes and parking lot nodes. Each ant uses a roulette wheel method to select a parking lot for the customer demand node. In the roulette wheel process, pheromone concentration and visibility are used as parameters to calculate the transfer probability.

[0049] Calculate the transition probability p between customer demand node i and all corresponding parking lots that can serve that node. ij a ;

[0050] Using the roulette wheel method on all p ij a In the roulette wheel, select parking lot j that matches i, generate a matching scheme between customer demand nodes and parking lot nodes, and each parking lot receives a service list L. d .

[0051] Preferably, the path grouping for matching customer demand nodes and parking lot nodes is performed using a cost-saving algorithm to obtain an initial feasible solution, including the following steps:

[0052] Taking a certain parking lot node as the starting point d, connect each point in the parking lot service list to the starting point to obtain n routes d→j→d, j∈L. d n is the number of customer demand nodes in the service list of the parking lot;

[0053] Calculate the savings s(i,j) for all connectable point pairs (i,j) that do not violate the constraints, i,j∈L d The calculation formula is as follows:

[0054] s(i,j)=c(i,d)+c(j,d)-c(i,j);

[0055] In the formula, the saving value s(i,j) represents the distance saved by replacing the original two edges (i,d) and (j,d) with edge (i,j), c(i,d) represents the distance between point i and point d, c(j,d) represents the distance between point j and point d, and c(i,j) represents the distance between point i and point j.

[0056] Arrange the savings values ​​in descending order;

[0057] Following the obtained order, perform the following operations one by one: If all of the following conditions are met, then connect edge (i, j) to the path;

[0058] Condition 1: Node i and node j are not on the same route;

[0059] Condition 2: Both node i and node j are adjacent to the starting point;

[0060] Condition 3: The total capacity limit of the vehicles cannot be exceeded after adding node j;

[0061] If the insertable edge (i, j) has not been traversed to its end, return to the previous step until all insertable edges have been traversed;

[0062] For each L d By performing the above operations, a complete feasible solution variable R is obtained. a R a This represents a feasible solution obtained under the matching scheme generated by ant a;

[0063] Following the steps described above, all parking lots are grouped into paths, resulting in R consisting of k path lists rk. a .

[0064] Preferably, the initial feasible solution is optimized using a greedy algorithm to obtain an optimized path sequence, including the following steps:

[0065] Step 1: Set an empty route sequence and fill in the parking lot nodes where the route list is located into the empty route sequence;

[0066] Step 2: Select the last node in the path sequence and treat it as node x. Find the non-node y that is closest to node x in the path list, and set y = near(x).

[0067] Step 3: Fill the path sequence with node y immediately following node x, and remove node y from the path list;

[0068] Step 4: If the path list is not empty, return to step 2; if the path list is empty, the greedy search ends, and the optimized path sequence is obtained.

[0069] Step 5: Perform the above operations on the route list of all vehicles to obtain the optimized route plan.

[0070] Preferably, the path sequence is locally optimized using the two-element optimization algorithm 2-opt to obtain an optimized feasible solution, including the following steps:

[0071] Set a variable `count`, which is used for counting.

[0072] Set the variable max_count to be the maximum loop value;

[0073] Set the variable opt_r k This variable stores the optimal path sequence for vehicle k;

[0074] Set the variable opt_v k This variable stores the total length of the optimal path sequence for the current vehicle;

[0075] Set the variable cur_b k This variable stores the total length of the current vehicle's path sequence;

[0076] Set the variable cur_r k This variable stores the current vehicle's path sequence;

[0077] Set a scalar len, which determines the distance between two elements when performing a 2-opt operation;

[0078] Set a variable `cut_r` to store the currently cut segment;

[0079] Set a variable rev_r to store the reversed, cut-off segment;

[0080] Step 1: Set the maximum loop value max_count, and set count = 0;

[0081] Step 2: Set the path sequence of vehicle k as opt_r k ;

[0082] Step 3: If count ≤ max_count, randomly select a sequence with a step size of len from the path sequence and store it in cut_r; otherwise, output opt_r. k ;

[0083] Step 4: Flip cut_r to get rev_r;

[0084] Step 5: Replace opt_r with rev_r k Get cur_r at the cut_r position k ;

[0085] Step 6: Calculate cur_r k distance cur_v k If cur_v k <opt_v k Then opt_r k =cur_r k Set count to 0 and return to step 3; otherwise, set count += 1 and return to step 3.

[0086] Step 7: Perform the above operations on the path sequences of all vehicles to obtain a further optimized feasible solution R. a .

[0087] Preferably, a variable neighborhood search is used to perform deep optimization on the optimized feasible solution to obtain the final feasible solution, thereby obtaining the optimal path planning, including the following steps:

[0088] Constructing a greedy, disruptive, and reorganizing neighborhood;

[0089] The construction of regrettable destruction and reorganization of the neighborhood;

[0090] The depth optimization of the optimized feasible solution is achieved by using greedy destruction and regret destruction of the reorganization neighborhood, and includes the following steps:

[0091] Step 1: Set the loop termination condition;

[0092] Step 2: Search the neighborhood for greedy destruction and reconstruction;

[0093] Step 3: When a better solution is found, repeat step 2;

[0094] Step 4: If no better solution can be found, continue with Step 5;

[0095] Step 5: Search for the regret-damaged reorganized neighborhood;

[0096] Step 6: When a better solution is found, repeat step 5;

[0097] Step 7: If no better solution can be found, continue with step 2;

[0098] Step 8: When the loop termination condition is reached, stop the neighborhood operation and obtain the optimal route plan for this iteration.

[0099] Preferably, constructing a greedy destructive reorganization neighborhood includes the following steps:

[0100] Step 1: Destructive action. According to the greedy principle, remove the customer demand node that maximizes the change in total path cost, resulting in an incomplete path.

[0101] Step 2: Reorganization action. Based on the greedy principle, select an insertion position that minimizes the change in total path cost and insert the removed customer demand node into the incomplete path.

[0102] Preferably, constructing a regret-damaged reorganization neighborhood includes the following steps:

[0103] Step 1: Destructive action. According to the greedy principle, remove the customer demand node that maximizes the change in total path cost, resulting in an incomplete path.

[0104] Step 2: Reorganize the operation by selecting an insertion position that maximizes the regret value; insert the removed customer demand node into the incomplete path.

[0105] The delivery route planning method provided by this invention has the following beneficial effects:

[0106] This invention proposes a mutation method using ant colony pheromones to guide the initial solution mutation, thereby improving solution quality. This method can modify the solution structure within a small range while preserving its desirable characteristics, helping the algorithm escape local optima and resulting in more accurate planned delivery routes. By allocating customers to different vehicle routes through a cost-saving algorithm, the distance differences between customers within each vehicle route are reduced, increasing the objective function value of the initial solution and thus reducing the time required for delivery route planning. A greedy search algorithm can determine the optimal matching relationship between customers and vehicle depots, thus matching the optimal delivery route. A variable neighborhood search algorithm is used for local optimization, employing different neighborhood structures for alternating searches, balancing concentration and dispersion, and shortening the algorithm's iteration time. Therefore, because the initial solution generated by this invention is of high quality, it avoids traversing poor-quality solutions during local searches, thereby accelerating the algorithm's convergence speed and reducing computational iteration time, thus saving time while ensuring the accuracy of route planning. Attached Figure Description

[0107] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0108] Figure 1 This is a flowchart of a variable neighborhood search algorithm in a complex delivery environment according to an embodiment of the present invention. Detailed Implementation

[0109] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.

[0110] Example

[0111] This invention provides a delivery route planning method, specifically as follows: Figure 1 As shown, a delivery route planning method is characterized by the following steps:

[0112] Step 1: Based on all the types of goods and the types of goods required by the customer demand nodes, establish a correspondence matrix between customer demand nodes and types of goods. The meaning of each parameter in the matrix is ​​shown in Table 1.

[0113] Table 1. Meaning of Customer-Goods Association Matrix Parameters

[0114]

[0115] Define a customer-goods type association matrix P, representing the correspondence between customers and goods types. Let...

[0116]

[0117] for When p ig When = 1, it means that customer i has a demand for goods g.

[0118] Step 2: Based on the types of goods held in each warehouse and all types of goods, establish a correspondence matrix between the warehouse and the types of goods. The meaning of each parameter in the matrix is ​​shown in Table 2.

[0119] Table 2. Meaning of parameters in the parking lot-cargo association matrix.

[0120]

[0121] Define a parking lot-goods association matrix S, representing the correspondence between parking lots and goods types. The meanings of the parameters in the matrix are shown in Table 2. Let...

[0122]

[0123] for When s jg When =1, it means that yard j has goods g.

[0124] If a customer has n types of goods requirements, then the customer is discretized into n "customer requirement nodes" with independent numbers but located at the same position as the customer.

[0125] Table 3: Parameter Meanings for Discrete Operations on Clients

[0126]

[0127] for j∈D, g∈G, when p ig =s jg When = 1, there exists a "customer demand node" i. g i g Customer i(i) represents the customer who needs goods of type g. g (This is a binary variable, located in the same position as i but with a different index). This represents the set of all "customer demand nodes".

[0128] Step S4: For each depot, if the type of goods required by a customer demand node is one that the depot can provide, then the customer demand node is included in the service scope of the depot.

[0129] Table 4: Meaning of Relevant Parameters for Determining the Service Area of ​​Parking Lots

[0130]

[0131] for When parking lot d can provide "customer demand nodes" i g When goods g are present, it indicates that parking lot d can serve "customer demand node" i. g .

[0132] Step S5: For each customer demand node, if a parking lot can provide the type of goods required by that customer demand node, then this parking lot is included in the matching set that can serve that customer demand node.

[0133] Table 5 defines the meaning of relevant parameters for determining the customer's parking lot.

[0134]

[0135] for When parking lot d can provide "customer demand nodes" i gWhen the goods are g, it means that customer i can be served by parking lot d.

[0136] Step 3: Based on the correspondence matrix between customer demand nodes and goods types and the correspondence matrix between parking lots and goods types, establish a VRP mixed integer model for the supply and demand matching relationship between parking lots and customers. The meaning of its parameters is shown in Table 6.

[0137] Table 6. Meaning of parameters in the mixed-integer model

[0138] variable name Explanation <![CDATA[c ij ]]> Transportation cost between node i and node j k Vehicle number <![CDATA[x ij k ]]> The decision variable for whether vehicle k changes from i to j <![CDATA[k d ]]> K car service area C(d) The set of customer demand nodes that parking lot d can serve R(i) A collection of parking lots that can serve i customers K The set of all vehicles D The collection of all parking lots V The set of all customer demand nodes |V| Number of customer demand nodes <![CDATA[u i k ]]> Used to mark the order of node i in the path of car k. M A large positive integer with no specific physical meaning. <![CDATA[d i ]]> The demand for goods at the i-customer demand node Q Maximum capacity of vehicles

[0139] The objective function of the VRP mixed-integer model is:

[0140]

[0141] In the formula, c ij Let be the transportation cost between node i and node j, k be the vehicle number, K be the set of all vehicles, D be the set of all parking lots, V be the set of all customer demand nodes, and x be the value of x. ij k Let be the decision variable for whether vehicle k moves from i to j. If yes, set it to 1; otherwise, set it to 0.

[0142] The constraints of the VRP mixed-integer model include:

[0143] Constraint 1: Each vehicle's journey must be a loop.

[0144]

[0145] Constraint 2: Each vehicle can be used a maximum of once.

[0146]

[0147] Constraint 3: The types of goods carried by each vehicle shall not exceed the range of goods stored at the location from which it departs.

[0148]

[0149] In the formula, k d C(i) represents the service range of car k; C(i) represents the set of customer demand nodes that car i can serve.

[0150] The regulations stipulate that vehicles will not serve customer demand points outside the service area of ​​their respective depots:

[0151]

[0152]

[0153] Constraint 4: Each customer demand vertex must be served.

[0154]

[0155] Constraint 5: Vehicles may not travel directly from one parking lot to another.

[0156]

[0157] Constraint 6: Eliminate sub-loop constraints:

[0158]

[0159] In the formula, M∈N*, M≥|V|, N* is the set of positive integers, |V| is the size of the customer demand node set, M is a positive integer, and u is a variable. The variable u has no specific physical meaning, only the meaning of labeling size. When node i and node j are at opposite ends of an edge, i.e., x ij k When = 1, variable u j k Less than u i k A vehicle traversing all nodes will sequentially increase the corresponding variable u of each node. Since a sub-cycle occurs when a customer demand node already in the cycle reappears, and the u of an already occurring node is always smaller than the u of a subsequent node, the occurrence of a sub-cycle will inevitably violate the constraint condition u. i k -u j k -M+M*x ij k ≤0, therefore this constraint can prevent the occurrence of subloops.

[0160] Constraint 7: Vehicle capacity limit constraint. For any vehicle, the total demand of the customer demand nodes it serves cannot exceed its own capacity.

[0161]

[0162] In the formula, d i i represents the demand at customer node i; Q represents the vehicle capacity.

[0163] Constraint 8: Traffic flow balance. To avoid the breakage of the vehicle's path during its journey, the vehicle's journey must be a complete loop.

[0164]

[0165] Step 4: Design a variable neighborhood search algorithm to solve the VRP mixed integer model to obtain the optimal path.

[0166] Table 7. Symbol Definitions

[0167]

[0168]

[0169] The steps of the hybrid variable neighborhood search algorithm are as follows:

[0170] Step 5: Since the structure of the initial solution determines the optimal neighborhood solution found by the hybrid variable neighborhood search algorithm, the algorithm may get stuck in a local optimum when initial solutions are similar or mutually neighboring in multiple iterations. To avoid this problem and improve the quality of the obtained solution, this invention uses the idea of ​​ant colony optimization. An equal concentration of initial pheromone is set between each customer demand node and each serviceable parking lot to resolve the matching relationship between customer demand nodes and parking lots, and to initialize the matching probability between each customer demand node and each parking lot.

[0171] Set the variable: pheromone concentration τ ij (0) = C, i ∈ V, j ∈ D.

[0172] Set the variable: Δτ, the increase in pheromone concentration. ij (0) = 0, i ∈ V, j ∈ D

[0173] τ ij (0) represents the pheromone concentration between customer demand node i and parking lot j at the start of the first iteration; Δτ ij (0) represents the increase in pheromone concentration between customer demand node i and parking lot j at the beginning of the first iteration.

[0174] Step 6: Set up a list of all customer demand nodes, select parking lots for each customer demand node one by one, and traverse the entire list of customer demand nodes.

[0175] Step 7: Use the ant colony algorithm to solve the matching relationship between customer demand nodes and parking lot nodes. In each iteration, the ant colony algorithm will generate a "customer demand node and parking lot node matching scheme" with an equal number of ants:

[0176] Take one ant from the ant colony. This ant will search for parking lots for all customer demand nodes and generate a "customer demand node and parking lot node matching scheme". Each ant uses a roulette wheel method to select a parking lot for the customer demand node. During the roulette wheel process, pheromone concentration and visibility are used as parameters to calculate the transition probability.

[0177] Set variable p ij a This variable represents the probability that ant a will choose parking lot j for customer demand node i.

[0178] Set variable η ij This variable represents the visibility between customer demand node i and parking lot j. As a reference quantity when determining the probability, this invention uses the Euclidean distance between customer demand node i and parking lot j as the visibility parameter.

[0179] Set a variable α: α represents the importance of pheromones and can be used to adjust the degree of participation of pheromones in probability calculation.

[0180] Set the variable β: β represents the importance of visibility and can be used to adjust the degree to which visibility is involved in the probability calculation.

[0181] variable p ij a From the formula Calculated.

[0182] Calculate the transition probability p between customer demand node i and all corresponding parking lots that can serve that node. ij a Then, use the roulette wheel method on all p ij a In the roulette wheel, select the parking lot j that matches i, and generate the "customer demand node and parking lot node matching scheme".

[0183] Step 8: Use the cost-saving algorithm to group the paths of the "customer demand node and parking lot node matching scheme" to obtain a "feasible solution R". a ", which is the initial solution.

[0184] After an ant selects the corresponding parking lot for all customer demand nodes, that is, after the first round of matching customer demand nodes with parking lots is completed, each parking lot obtains the service list L. d .

[0185] L d This represents the list of customer demand nodes that parking lot d should serve. In order to include parking lot d's L... d In order to obtain a highly efficient transportation solution, the customer demand nodes in the system are allocated to specific vehicles. This invention uses a "saving algorithm" for allocation, and the allocation process is as follows:

[0186] Step 1: Taking the parking lot node as the starting point d, connect each point in the parking lot's service list to the starting point to obtain n routes (assuming there are n customer demand nodes in the parking lot's service list) d→j→d (j∈L). d ).

[0187] Step 2: For all connectable point pairs (i, j) that do not violate the constraints, calculate their savings value s(i, j)(i, j ∈ L). d)

[0188] s(i,j)=c(d,i)+c(j,d)-c(i,j)

[0189] In the formula, the saving value s(i,j) represents the distance that can be saved by replacing the original two edges (i,d) and (j,d) with edge (i,j), c(i,d) represents the distance between point i and point d, c(j,d) represents the distance between point j and point d, and c(i,j) represents the distance between point i and point j.

[0190] Step 3: Arrange the savings values ​​in descending order.

[0191] Step 4: Perform the operations one by one according to the order obtained in Step 3: If all the following conditions are met, then connect edge (i, j) to the path.

[0192] Condition (1) Node i and node j are not on the same route;

[0193] Condition (2) Both node i and node j are adjacent to the starting point;

[0194] Condition (3) The total capacity limit of the vehicle does not exceed the limit after adding node j.

[0195] Step 5: If the insertable edge (i, j) has not been traversed, return to step 4 until all insertable edges have been traversed.

[0196] For each L d After performing the above operations, a complete "feasible solution variable R" can be obtained. a "R" a This represents a feasible solution obtained under the matching scheme generated by ant a.

[0197] Step 9: Use a greedy algorithm to improve the initial solution to a feasible solution R. a Local optimization is performed because after grouping the paths for all parking lots, the algorithm can obtain a list r of k paths. k The composition of R a To optimize R a In this stage, each path r will be processed separately. k Perform greedy search optimization.

[0198] Given a list of paths, starting from the current parking lot, select the node in the path list closest to the parking lot and add it to the path sequence. Define a function (near(i)) to find the node closest to node i. For example, j = near(i) represents the node j (j ≠ i) found in the current path list that is closest to node i. The greedy search process is as follows:

[0199] Step 1: Set an empty path sequence and fill in the parking lot nodes where the path list is located into the empty path sequence;

[0200] Step 2: Select the last node in the path sequence and treat it as node i. Find the non-i node j (j = near(i)) that is closest to node i in the path list.

[0201] Step 3: Fill the path sequence with node j immediately following node i, and remove node j from the path list.

[0202] Step 4: If the path list is not empty, return to step 2; if the path list is empty, the greedy search ends, and the optimized path sequence is obtained.

[0203] Performing the above operations on the route list of all vehicles yields the optimized trip plan.

[0204] Step 10: To avoid getting trapped in local optima due to greedy search, this step uses the two-element optimization algorithm 2-opt for local optimization, that is, in R... a The path sequence r of each vehicle k A 2-opt operation is performed to further improve the path sequence. The specific operation is as follows:

[0205] Set a variable `count`, which is used for counting.

[0206] Set the variable max_count to be the maximum loop value;

[0207] Set the variable opt_r k This variable stores the optimal path sequence for vehicle k;

[0208] Set the variable opt_v k This variable stores the total length of the optimal path sequence for the current vehicle;

[0209] Set the variable cur_v k This variable stores the total length of the current vehicle's path sequence;

[0210] Set the variable cur_r k This variable stores the current vehicle's path sequence;

[0211] Set a scalar len, which determines the distance between two elements when performing a 2-opt operation;

[0212] Set a variable `cut_r` to store the currently cut segment;

[0213] Set a variable rev_r to store the reversed, cut-off segment;

[0214] Step 1: Set the maximum loop value max_count, and set count = 0;

[0215] Step 2: Set the path sequence of vehicle k as opt_r k ;

[0216] Step 3: If count ≤ max_count, randomly select a sequence with a step size of len from the path sequence and store it in cut_r; otherwise, output opt_r. k ;

[0217] Step 4: Flip cut_r to get rev_r;

[0218] Step 5: Replace opt_r with rev_r k Get cur_r at the cut_r position k ;

[0219] Step 6: Calculate cur_r k distance cur_v k If cur_v k <opt_v k Then opt_r k =cur_r k Set count to 0 and return to step 3; otherwise, set count += 1 and return to step 3.

[0220] Perform the above operations on the path sequences of all vehicles to obtain a further optimized feasible solution R. a .

[0221] Step 11: To increase the search depth for feasible solutions, set the set of points to be optimized E and the sequence of paths to be optimized B for variable neighborhood search. The steps are as follows:

[0222] Step 1: Establish an empty set of vertices E to be optimized. a E a This represents the set of vertices to be optimized under matching scheme a;

[0223] Step 2: Based on the triangle inequality, select the customer demand nodes that have the greatest impact on the path length in each vehicle path, and put them into the set of nodes to be optimized in descending order of their impact on the quality of the solution.

[0224] Because the vehicle's path sequence lies on the Eulerian plane, the path sequence cycle satisfies the triangle inequality (the sum of any two sides of a triangle in the Eulerian plane is always greater than the third side).

[0225] If there are three consecutive nodes u→v→w in the path sequence, the function can be set as e(v)=c(u,v)+c(v,w)-c(u,w).

[0226] By calculating the e-function values ​​of all nodes in the path sequence and sorting them from largest to smallest, the node with the largest e-function value in each path sequence is added to the set of points to be optimized, E. a middle;

[0227] Step 3: Delete the elements in E from all path sequences to obtain the path to be optimized, B. a B a This represents the path to be optimized under matching scheme a.

[0228] Step 12: Perform deep optimization using "variable neighborhood search" for path B to be optimized. a and the set of points to be optimized E a Perform a variable neighborhood search to obtain the final feasible solution R. a The specific steps include:

[0229] Constructing Neighborhood 1 using the "greedy destruction and reorganization of neighborhood" method includes the following steps:

[0230] Step 1: Destructive action. According to the greedy principle, remove the customer demand node that maximizes the change in total path cost, resulting in an incomplete path.

[0231] Step 2: Reorganization action. Based on the greedy principle, select an insertion position that minimizes the change in total path cost and insert the removed customer demand node into the incomplete path.

[0232] The specific steps are as follows: Based on the set of points E to be optimized a Insert all path sequences to be optimized into the nodes in B. a For each possible position in E, the objective function increment is calculated, and the customer demand node that minimizes the objective function increment is selected sequentially along with the insertion position until all demand nodes in E are re-inserted. The specific steps are as follows:

[0233] Define set E a I For E a The set of all possible insertion positions for elements in the set;

[0234] Define f(B) a (i, e) represents inserting node e into the path sequence B to be optimized. a The objective function after position i;

[0235] Step 1: Find the customer demand node that minimizes the increment of the objective function and its optimal insertion position:

[0236]

[0237] Step 2: Insert the customer demand node that minimizes the increment of the objective function into the optimal insertion position, and update set E. a Set B a Set E a I ;

[0238] Step 3: If set E a If the set is not empty, return to step 1; otherwise, end the search for neighborhood 1 and begin the search for neighborhood 2.

[0239] Constructing Neighborhood 2 "Regretful Destruction and Reorganization of Neighborhood" includes the following steps:

[0240] Step 1: Destructive action. According to the greedy principle, move the object that maximizes the change in total path cost.

[0241] The user's request node is removed, resulting in an incomplete path;

[0242] Step 2: Reorganize the operation by selecting an insertion position that maximizes the regret value; insert the removed customer demand node into the incomplete path.

[0243] The specific steps are as follows: Calculate the set of points E to be optimized. a Insert all path sequences to be optimized into the nodes in B. a The sum of the differences between the objective function values ​​of the n suboptimal positions and the objective function values ​​of the optimal position is used to select the customer demand node with the largest sum of differences and its optimal position.

[0244] Define f(B) a (1, e) represents the objective function value after inserting node e into the optimal position of the path sequence B to be optimized;

[0245] Step 1: Find the customer demand node with the greatest difference between the suboptimal and optimal solutions and its optimal insertion position:

[0246]

[0247] setp2: Insert the customer demand node with the largest difference between the suboptimal and optimal solutions into the optimal insertion position, and update set E, set B, and set E'. I ;

[0248] Step 3: If set E is not empty, return to step 4; otherwise, end the search for neighborhood 2.

[0249] The depth optimization of the optimized feasible solution is achieved by using greedy destruction and regret destruction of the reorganization neighborhood, and includes the following steps:

[0250] Step 1: Set the loop termination condition;

[0251] Step 2: Search the neighborhood for greedy destruction and reconstruction;

[0252] Step 3: When a better solution is found, repeat step 2;

[0253] Step 4: If no better solution can be found, continue with Step 5;

[0254] Step 5: Search for the regret-damaged reorganized neighborhood;

[0255] Step 6: When a better solution is found, repeat step 5;

[0256] Step 7: If no better solution can be found, continue with step 2;

[0257] Step 8: When the loop termination condition is reached, stop the neighborhood operation, obtain the optimal route planning for this iteration, optimize the solution from multiple levels, and obtain the final optimized solution of this matching scheme.

[0258] Step 13: Evaluate the solution: Let S be the total length of the solution obtained by the matching scheme of the a-th ant, i.e., the matching scheme of the a-th ant. a The quality of the current solution

[0259] Step 14: Update pheromones: Calculate the pheromone left by the ant in this matching scheme between each customer demand node and the parking lot, and remove the ant (that is, the matching and subsequent problem optimization are completed).

[0260] Step 15: Repeat the selection of parking lots: A searches are required in one round of swarm search. The search should be repeated A times until A ants have traversed the entire list of customer demand nodes, where A is the number of ants in the ant colony.

[0261] Step 16: Calculate pheromones: Calculate the pheromone increment Δτ between each customer demand node and each parking lot. ij and pheromone content τ ij (t+n). This is used to update the probabilistic state between each customer demand node and all parking lots that can serve that node.

[0262] By definition, Q is a constant;

[0263] Defined as ρ, a volatility constant that guides the evaporation rate of pheromones, where 0 ≤ ρ ≤ 1;

[0264] The formula for calculating the pheromone content between customer demand nodes and parking lots is defined as follows:

[0265] τ ij (t+n)=(1-ρ)*τ ij (t)+Δτ ij

[0266] The formula for calculating the pheromone increment between customer demand nodes and parking lots is defined as follows:

[0267]

[0268] Defined as follows: If ant a selects parking lot j for node i in the current scheme selection, the pheromone increment between customer demand node i and parking lot j is:

[0269] Δτ ij a =Q*Ω a

[0270] Defined as follows: If ant a does not select parking lot j for node i in the current scheme selection, the pheromone increment between customer demand node i and parking lot j is:

[0271] Δτ ij a =0

[0272] Step 17: Update the matching scheme: Record the matching scheme obtained in this iteration, and update the current optimal matching scheme and path planning.

[0273] Step 18: Determine whether to continue iteration: Determine whether the predetermined number of iterations has been reached, or whether a stall has occurred. If yes, the algorithm ends, outputting the current optimal matching scheme and path planning; otherwise, go to step 17 to continue the next round of iteration.

[0274] The above-described embodiments are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any simple changes or equivalent substitutions of the technical solutions that can be obviously obtained by those skilled in the art within the scope of the technology disclosed in the present invention shall fall within the scope of protection of the present invention.

Claims

1. A delivery route planning method, characterized in that, Includes the following steps: Based on all types of goods and the types of goods required by customer demand nodes, establish a correspondence matrix between customer demand nodes and types of goods. Establish a matrix of correspondence between parking lots and cargo types based on the types of goods held in each warehouse and all types of goods. A VRP mixed integer model is established based on the correspondence matrix between customer demand nodes and cargo types, and the correspondence matrix between parking lots and cargo types, to establish the supply and demand matching relationship between parking lots and customers. The VRP mixed integer model is solved using a hybrid variable neighborhood search algorithm to obtain the optimal delivery route, specifically including the following steps: Ant colony algorithm is used to determine the matching scheme between customer demand nodes and parking lot nodes; The saving algorithm is used to group the paths of the customer demand node and the parking lot node matching scheme to obtain an initial feasible solution; The initial feasible solution is optimized using a greedy algorithm to obtain the optimized path sequence; The path sequence was locally optimized using the two-element optimization algorithm 2-opt to obtain an optimized feasible solution. The optimized feasible solution is deeply optimized using a variable neighborhood search to obtain the final feasible solution and thus obtain the optimal path planning. The objective function of the VRP mixed-integer model is: In the formula, c ij For nodes i With nodes j Transportation costs between them k For vehicle number, K The set consisting of all vehicles D The set consisting of all parking lots. V It is a set consisting of all customer demand nodes. For vehicles k Whether from i arrive j The decision variable is set to 1 if it is true, and 0 otherwise.

2. The delivery route planning method according to claim 1, characterized in that, The constraints of the VRP mixed-integer model include: Constraint 1: Each vehicle's journey must be a loop. Constraint 2: Each vehicle can be used a maximum of once. Constraint 3: The types of goods carried by each vehicle shall not exceed the range of goods stored at the location from which it departs. In the formula, k d represent k The vehicle's service area; C ( i )represent i The set of customer demand nodes that the parking lot can serve combine; The regulations stipulate that vehicles will not serve customer demand points outside the service area of ​​their respective depots: Constraint 4: Each customer demand vertex must be served. Constraint 5: Vehicles may not travel directly from one parking lot to another. Constraint 6: Eliminate sub-loop constraints: In the formula, M N *, M ≥| V |, N * represents the set of positive integers, | V |The size of the set of nodes required by the customer. M It is a positive integer. u As a variable, when the node i With nodes j When at both ends of an edge, i.e. = When 1, the variable Less than All nodes traversed by a vehicle will be ordered so that the corresponding variables of the nodes are changed. u Gradually increase; Constraint 7: Vehicle capacity limit constraint. For any vehicle, the total demand of the customer nodes it serves cannot exceed its own capacity. In the formula, d i for i The demand at each customer demand node; Q For the vehicle's capacity; Constraint 8: Traffic flow balance. To prevent breakage of the vehicle's edge during its journey and ensure vehicle stability... The journey of the vehicle is a complete circle: 。 3. The delivery route planning method according to claim 1, characterized in that, The ant colony algorithm is used to determine the matching scheme between customer demand nodes and parking lot nodes, including the following steps: Set an initial pheromone concentration of equal value between each customer demand node and each serviceable node in the parking lot; Set the variable: pheromone concentration ; Set the variable: Increase in pheromone concentration ; This represents the beginning of the first iteration. i Customer demand nodes and parking lots j The pheromone concentration between them; This represents the beginning of the first iteration. i Customer demand nodes and parking lots j The pheromone concentration increases between them; Set up a list of all customer demand nodes, select a parking lot for each customer demand node one by one, and traverse the entire list of customer demand nodes. Take an ant from the ant colony. The ant searches for parking lots for all customer demand nodes and generates a matching scheme between customer demand nodes and parking lot nodes. Each ant uses a roulette wheel method to select a parking lot for the customer demand node. In the roulette wheel process, pheromone concentration and visibility are used as parameters to calculate the transfer probability. Calculate customer demand nodes i The transition probability between the corresponding parking lots that can serve this node. ; Using roulette wheel in all In the roulette wheel, select the one that matches... Matching parking lot This generates a matching scheme between customer demand nodes and parking lot nodes, and each parking lot receives a list of services to be provided. .

4. The delivery route planning method according to claim 3, characterized in that, The cost-saving algorithm is used to group paths for matching customer demand nodes and parking lot nodes to obtain an initial feasible solution, including the following steps: Starting from a certain parking lot node... d Connect each point in the parking lot service list to the starting point to obtain... The line d → → d , , The number of customer demand nodes in the service list of the parking lot; Calculate all connectable point pairs that do not violate the constraints. Savings value , The calculation formula is as follows: In the formula, the savings value Represents the use of edges ( ) replace the original two sides ( )and( The distance saved after that, represent Point and Distance between points represent Point and Distance between points represent Point and Distance between points; Arrange the savings values ​​in descending order; Following the obtained order, perform the following operations one by one: If all of the following conditions are met, then... Access path; Condition 1: Nodes and The nodes are not on the same route; Condition 2: Nodes and All nodes are adjacent to the starting point; Condition 3: Add The number of nodes should not exceed the total capacity limit for vehicles; if edges can be inserted. If the iteration hasn't ended, return to the previous step until all insertable edges have been traversed; for each By performing the above operations, a complete feasible solution variable is obtained. , Representative in ants Feasible solutions obtained under the generated matching scheme; Following the steps above, all parking lots are grouped by path to obtain the following... List of paths Composition R a .

5. The delivery route planning method according to claim 4, characterized in that, The initial feasible solution is optimized using a greedy algorithm to obtain the optimized path sequence, including the following steps: Step 1: Set an empty path sequence and fill in the empty routes with the parking lot nodes where the path list is located. In the sequence; Step 2: Select the last node in the path sequence, and treat it as... x Nodes, find the path list from x The nearest non-node x node y , ; Step 3: Move the nodes y Immediately afterwards x The nodes are filled into the path sequence, and the nodes are filled into the path sequence. y Node from path list Remove; Step 4: If the path list is not empty, return to Step 2; if the path list is empty, the greedy search ends. The optimized path sequence is obtained; Step 5: Perform the above operations on the route list of all vehicles to obtain the optimized trip plan.

6. The delivery route planning method according to claim 5, characterized in that, The path sequence is locally optimized using the two-element optimization algorithm 2-opt to obtain an optimized feasible solution, including the following steps: Set variables This variable is used for counting; Set variables This variable is the maximum loop value; Set the variable This variable stores Optimal route sequence for vehicles; Setting variables This variable stores the total length of the optimal path sequence for the current vehicle; Set variables This variable stores the total length of the current vehicle's path sequence; Set variables This variable stores the current vehicle's path sequence; set a scalar. This scalar determines the distance between two elements when performing a 2-opt operation; Set variables This variable stores the currently cut segment; Setting the variable This variable stores the reversed, cut-off fragment; Step 1: Set the maximum loop value , place Step 2: Settings The vehicle's path sequence is Step 3: If Then, randomly select a path sequence with a step interval of 1 / 2. A section Sequence, stored Otherwise output Step 4: Place After flipping, you get Step 5: Place replace middle Location obtained Step 6: Calculation distance ,if ,but juxtaposition Return to step 3, otherwise set Return to step 3; Step 7: Perform the above operations on the path sequences of all vehicles to obtain a feasible solution for further optimization. .

7. The delivery route planning method according to claim 6, characterized in that, The optimized feasible solution is deeply optimized using a variable neighborhood search to obtain the final feasible solution and thus the optimal path planning. This includes the following steps: Constructing a greedy, disruptive, and reorganizing neighborhood; The construction of regrettable destruction and reorganization of the neighborhood; The depth optimization of the optimized feasible solution is achieved by using greedy destruction and regret destruction of the reorganization neighborhood, and includes the following steps: Step 1: Set the loop termination condition; Step 2: Search the neighborhood for greedy destruction and reconstruction; Step 3: When a better solution is found, repeat step 2; Step 4: If no better solution can be found, continue with Step 5; Step 5: Search for the regret-damaged reorganized neighborhood; Step 6: When a better solution is found, repeat step 5; Step 7: If no better solution can be found, continue with step 2; Step 8: When the loop termination condition is reached, stop the neighborhood operation and obtain the optimal route plan for this iteration.

8. The delivery route planning method according to claim 7, characterized in that, Constructing a greedy, destructive, and reorganization neighborhood includes the following steps: Step 1: Destructive action. According to the greedy principle, remove the customer demand node that maximizes the change in total path cost, resulting in an incomplete path. Step 2: Reorganization action. Based on the greedy principle, select an insertion position that minimizes the change in total path cost and insert the removed customer demand node into the incomplete path.

9. The delivery route planning method according to claim 7, characterized in that, Constructing a regret-damaged reorganization neighborhood involves the following steps: Step 1: Destructive action. According to the greedy principle, move the object that maximizes the change in total path cost. The user's request node is removed, resulting in an incomplete path; Step 2: Reorganize the operation, and reselect an insertion position that maximizes the regret value based on the regret value; The removed customer request node is inserted into the incomplete path.