A method and system for vehicle delivery route planning
By optimizing vehicle delivery routes using an improved large-scale neighborhood search algorithm and the Metropolis criterion, the challenge of vehicle route planning under large-scale customer nodes is solved, achieving more efficient delivery route planning and resource utilization.
Patent Information
- Application Number
- CN202210154596.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-02-21
AI Technical Summary
Existing technologies struggle to effectively plan optimal vehicle delivery routes at large customer nodes, making it difficult for human experience to yield reasonable delivery solutions and resulting in resource waste.
An improved large-scale neighborhood search algorithm, combined with the Metropolis criterion, is adopted. By establishing an objective function with the goal of minimizing the total delivery vehicle mileage, the roulette wheel method is used to select removal and insertion operators to optimize vehicle delivery routes and formulate reasonable delivery route schemes.
It improves delivery efficiency, reduces the workload of manually developing plans, lowers the total delivery mileage of vehicles, and provides better delivery route planning.
Smart Images

Figure CN114707693B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of goods delivery, and in particular to a method and system for large-scale vehicle delivery route planning based on an improved adaptive large-scale neighborhood search algorithm. Background Technology
[0002] Vehicle routing research has been a hot topic in the past decade and has become a development trend in logistics and distribution. It is closely related to resource distribution and route planning in real life, mainly addressing the problem of how to rationally plan and determine the optimal vehicle routes when multiple delivery vehicles with capacity limitations serve multiple customer nodes. As the scale of the delivery problem increases, i.e., the number of delivery customer nodes increases, the formulation of delivery plans becomes more complex. Existing plans generally rely on human experience; however, relying solely on human experience is insufficient to obtain optimal vehicle routing plans, resulting in wasted manpower and time.
[0003] Therefore, there is an urgent need in this field for a vehicle optimal delivery route planning scheme that can be used for a large number of customers. Summary of the Invention
[0004] The purpose of this invention is to provide a vehicle delivery route planning method and system. It selects the maximum load capacity of the vehicle as a delivery constraint, uses the vehicle routing problem with capacity constraints as the vehicle delivery model, takes the shortest delivery mileage of each vehicle in the delivery plan as the objective, and introduces an improved large-scale neighborhood search algorithm to select the optimal delivery route, thereby formulating a reasonable delivery route plan and reducing the workload of manually formulating the plan.
[0005] To achieve the above objectives, the present invention provides the following solution:
[0006] A vehicle delivery route planning method, the method comprising:
[0007] Obtain distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load information;
[0008] Based on the distribution center node location information, customer information, and maximum vehicle load information, an objective function is established with the goal of minimizing the total delivery vehicle mileage; the constraint condition of the objective function is that each customer is served by one and only one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle load.
[0009] Determine an initial coding sequence; the initial coding sequence is a coded representation of an initial delivery path, and the initial coding sequence includes each customer node on the initial delivery path and the delivery order of each customer node;
[0010] Calculate the target value of the initial encoded sequence according to the objective function;
[0011] Calculate the initial temperature of the Metropolis criterion based on the target value of the initial encoded sequence, and begin the optimal delivery route iteration;
[0012] The optimal delivery route iteration specifically includes:
[0013] Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. The current solution in the first iteration is the initial encoded sequence.
[0014] If the objective value of a local solution is less than the objective value of the current solution, then the local solution is adopted as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value.
[0015] Based on the usage count and preset score of each insertion and removal operator, update the corresponding operator weights at a preset interval of iterations.
[0016] The iteration stops when the target value of the local solution is not less than the current solution's iteration count reaches a preset number, and the optimal vehicle coding sequence is output.
[0017] In some embodiments, the objective function aimed at minimizing the total delivery vehicle mileage is: Where F represents the objective function; m is the maximum number of vehicles available for delivery; n is the number of customers; d ij x represents the distance between any two nodes i and j; ijk The program is a 0-1 program, which indicates whether vehicle k passes through nodes i and j. 0 means that vehicle k does not pass through nodes i and j, and 1 means that vehicle k passes through nodes i and j.
[0018] In some embodiments, determining the initial encoded sequence specifically includes:
[0019] A polar coordinate system is established with the distribution center node location as the pole and the rays containing the distribution center node and the customer node closest to the distribution center node as the polar axes. The position coordinates of the distribution center node and the customer node are then converted into polar coordinates.
[0020] Sort the client nodes according to their polar angle size;
[0021] Under the premise of satisfying the constraints, each customer node is inserted into the solution in sequence according to the objective function; the solution includes several delivery routes; during the insertion process, if a customer node that does not satisfy the constraints is encountered, and the customer node that does not satisfy the constraints is not the last customer node, then the customer node that does not satisfy the constraints is skipped.
[0022] Search for whether there is an uninserted customer node j. If so, calculate the insertion cost c between every two customer nodes in each delivery path for that customer node j. ij And insert it between the two customer nodes corresponding to the lowest cost; where c ij =d i,j +d j,i+1 -d i,i+1 In the formula, d i,j d represents the distance between client node i and client node j. j,i+1 d represents the distance between client node j and client node i+1. i,i+1 This represents the distance between client node i and client node i+1;
[0023] Traverse all uninserted client nodes until all client nodes are inserted into the solution to obtain the initial encoding sequence.
[0024] In some embodiments, calculating the initial temperature of the Metropolis criterion based on the target value in the initial encoded sequence specifically includes:
[0025] The initial temperature T0 of the Metropolis criterion is calculated based on the target value in the initial encoded sequence. The initial temperature T0 represents the temperature at which a suboptimal solution with a probability of acceptance of η is to be accepted that is β% worse than the current target value f(x).
[0026] In some embodiments,
[0027] The random customer node removal specifically includes: if there is an infeasible sub-path solution in the current solution, then randomly remove customer nodes in the infeasible sub-path until the sum of customer demand does not exceed the maximum load capacity of the vehicle; if the number of customer nodes removed does not exceed the removal limit, then randomly select customer nodes to remove until the number of customer nodes removed reaches the removal limit; an infeasible sub-path solution is a sub-path whose sum of customer demand is greater than the maximum load capacity of the vehicle; the removal limit is generated by a random function.
[0028] The removal of random subpaths specifically includes: if there is an infeasible subpath solution in the current solution, then remove the infeasible subpath; if the number of customer nodes to be removed does not exceed the removal limit, then select a random subpath to remove until the number of customer nodes to be removed reaches the removal limit.
[0029] The removal of similar customer nodes specifically includes: randomly selecting a customer node i in the current solution, calculating the similarity between the customer node i and other customer nodes j, and removing the customer node with the highest similarity in turn until the number of customer nodes to be removed reaches the removal limit;
[0030] The ring region similarity removal specifically includes: calculating the similarity based on three spatial relationships between the ring regions where each sub-path in the current solution is located;
[0031] The similarity between the two sub-paths is:
[0032]
[0033] Where σ1>σ2>σ3, s i and s j This indicates that there are two sub-paths r in the current solution. i and r j The corresponding ring region then has a single sub-path r i The similarity coefficient is:
[0034]
[0035] exist Select the sub-path r with the highest similarity coefficient. m镠x The sub-path r with the non-maximum similarity coefficient is selected by using a roulette wheel method. d Then remove r m镠x and r d All customer nodes, Let l represent the set of similarity coefficients for all sub-paths, and l represent the total number of sub-paths in the current solution.
[0036] The cost-greedy insertion specifically includes: inserting each removed customer node into a sub-path of the current solution, and selecting the sub-path with the lowest insertion cost and satisfying the load limit for each insertion;
[0037] The regret value insertion specifically includes: inserting each removed customer node into a sub-path of the current solution, selecting the sub-path with the largest regret value for each insertion; the regret value is: Δc = c m2 -c m1 , where c m1 c represents the minimum insertion cost. m2 This represents the cost of the second smallest insertion.
[0038] In some embodiments, the update formula for the operator weights is:
[0039]
[0040] Where τ represents the interval of τ iterations, y represents the y-th iteration interval, and q represents the q-th operator. This represents the number of times operator q is used within τ iterations, and the corresponding preset score is... Within the y-th iteration interval, the operator weight corresponding to the q-th operator is Within the (y+1)th iteration interval, the operator weight corresponding to the qth operator is μ∈[0,1] is a factor that controls the influence of the operator. The smaller the value, the greater the influence of the weight of the y-th iteration interval on the weight update of the (y+1)-th iteration interval. If μ=0, the weight depends entirely on the weight of the previous iteration interval. If μ=1, only the score within the iteration interval is considered. If 0<μ<1, both the score within the iteration interval and the previous weight value are considered.
[0041] In some embodiments, prior to determining the initial encoded sequence, the method further includes:
[0042] Chromosome encoding is performed on the distribution center nodes and each of the customer nodes.
[0043] In some embodiments, the temperature value is updated using the formula: T′=T*α
[0044] Where T′ represents the updated temperature, T represents the current temperature before the update, α∈(0,1) is the cooling rate, and the value of α is a preset constant parameter.
[0045] In some embodiments, the step of accepting a local solution probabilistically based on the Metropolis criterion and the temperature value of the current iteration specifically includes:
[0046] According to the Metropolis criterion, and considering the temperature value of this iteration, the local solution is accepted with a probability of [percentage missing]. Among them, P Δ The value of P is a random number r between [0,1]. Δ If ≥r, then the inferior solution is accepted as the current solution for the next iteration, where T represents the current temperature, f(x) represents the objective value of the current solution x, and f(x′) represents the objective value of the local solution x′.
[0047] The present invention also provides a vehicle delivery route planning system, the system comprising:
[0048] The information acquisition module is used to acquire distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load information;
[0049] The objective function determination module is used to establish an objective function with the goal of minimizing the total delivery vehicle mileage, based on the distribution center node location information, customer information, and vehicle maximum load information. The constraint condition of the objective function is that each customer is served by one and only one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle's load capacity.
[0050] An initial solution construction module is used to determine an initial encoding sequence; the initial encoding sequence is an encoded representation of the initial delivery path, and the initial encoding sequence includes each customer node on the initial delivery path and the delivery order of each customer node;
[0051] An initial solution target value calculation module is used to calculate the target value of the initial encoded sequence according to the target function;
[0052] The optimal delivery route iteration module is used to calculate the initial temperature of the Metropolis criterion based on the target value of the initial encoded sequence and start the optimal delivery route iteration.
[0053] The optimal delivery route iteration specifically includes:
[0054] Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. The current solution in the first iteration is the initial encoded sequence.
[0055] If the objective value of a local solution is less than the objective value of the current solution, then the local solution is adopted as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value.
[0056] Based on the usage count and preset score of each insertion and removal operator, update the corresponding operator weights at a preset interval of iterations.
[0057] The iteration stops when the target value of the local solution is not less than the current solution's iteration count reaches a preset number, and the optimal vehicle coding sequence is output.
[0058] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0059] This invention provides a vehicle delivery route planning method and system. First, it acquires delivery center node location information, customer information, and vehicle information, and establishes an objective function based on this, aiming to minimize the total delivery vehicle mileage. Then, it obtains an initial solution using a scanning algorithm, determines the target value of the initial encoding sequence using the objective function, and selects the optimal vehicle delivery route using an improved large-scale neighborhood search algorithm combined with the Metropolis criterion. This invention utilizes an improved large-scale neighborhood search algorithm to filter out the optimal vehicle delivery route, thereby formulating a more reasonable delivery route plan, improving delivery efficiency, and significantly reducing the total vehicle delivery mileage, while also reducing the workload of manual route planning. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, 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.
[0061] Figure 1 This is a flowchart of a vehicle delivery route planning method provided in Embodiment 1 of the present invention.
[0062] Figure 2 This is a schematic diagram of the distribution center and the locations of each node provided in Embodiment 1 of the present invention.
[0063] Figure 3 This is a schematic diagram of the spatial relationship between the two sub-paths corresponding to the annular regions provided in Embodiment 1 of the present invention.
[0064] Figure 4 This is a schematic diagram illustrating the process of four vehicles completing all delivery tasks and the customer nodes that each vehicle needs to serve, as provided in Embodiment 1 of the present invention.
[0065] Figure 5 This is a block diagram of the vehicle delivery route planning system provided in Embodiment 2 of the present invention. Detailed Implementation
[0066] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0067] The purpose of this invention is to provide a vehicle delivery route planning method and system. It selects the maximum vehicle load capacity as a delivery constraint, uses a vehicle routing problem with capacity constraints as the vehicle delivery model, aims to minimize the delivery mileage of each vehicle in the delivery plan, and introduces an improved large-scale neighborhood search algorithm to select the optimal delivery route, thereby formulating a reasonable delivery route plan and reducing the workload of manual plan formulation. First, basic information for determining the vehicle route is obtained; this basic information includes the geographical locations of the delivery center node and each customer node, the number of customers, the customer's cargo demand, and the maximum load capacity of the vehicle. Then, an objective function is established with the goal of minimizing the vehicle delivery route mileage. Next, an initial solution to the model is determined using a scanning algorithm. Finally, using the objective function as the target value, the improved large-scale neighborhood search algorithm is used to determine the optimal vehicle delivery route.
[0068] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0069] Example 1:
[0070] like Figure 1 As shown, this embodiment provides a vehicle delivery route planning method, the method including:
[0071] S1. Obtain distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load capacity. The locations of the distribution center and each customer node are as follows: Figure 2 As shown.
[0072] S2. Based on the distribution center node location information, customer information, and vehicle maximum load information, establish an objective function with the goal of minimizing the total delivery vehicle mileage; the constraint condition of the objective function is that each customer is served by one and only one vehicle and the total customer demand served by each vehicle does not exceed the vehicle's load capacity.
[0073] The objective function that aims to minimize the total delivery vehicle mileage is: Where F represents the objective function; m is the maximum number of vehicles available for delivery; n is the number of customers; d ij x represents the distance between any two nodes i and j; ijk The program is a 0-1 program, which indicates whether vehicle k passes through nodes i and j. 1 means that vehicle k passes through nodes i and j, and 0 means that vehicle k does not pass through nodes i and j. 0 means that nodes i and j are not connected, that is, vehicle k does not take the path between nodes i and j, and therefore does not pass through the two endpoints of the road segment, i.e., nodes i and j.
[0074] Considering that the allocation of deliveries between vehicles and customers, as well as the load capacity of the delivery vehicles themselves, both affect the choice of delivery routes, certain constraints need to be set on the objective function to obtain a better delivery route. Specifically, the constraints of the objective function are that each customer is served by exactly one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle's load capacity.
[0075] Then, chromosome encoding is performed on the distribution center node and each customer node. In order to facilitate the distinction between the distribution center and the customer node, 0 is used to represent the distribution center, that is, the departure point of the delivery vehicle, and natural numbers are used to represent each customer node.
[0076] S3. Determine the initial coding sequence; the initial coding sequence is the coded representation of the initial delivery path, and includes each customer node on the initial delivery path and the delivery order of each customer node. The delivery order is the sub-path and sequence of delivery. For example, the initial coding sequence contains the distribution center (represented by 0 here) and ordered customer points (represented by natural numbers such as 1, 2, 3, etc.). For example, for a vehicle routing problem with one distribution center and 6 delivery points, an initial coding sequence can be represented as {0, 3, 4, 2, 0, 5, 1, 6, 0}, where the {} represents the coding of a solution, indicating that the vehicle starts from the distribution center (0), passes through customer points 3, 4, 2 in sequence, and returns to the distribution center, then starts from the distribution center (0) again, passes through customer points 5, 1, 6 in sequence, and returns to the distribution center. For the distribution center 0 and customer points 1, 2, 3, 4, 5, 6, after step S3, {0, 3, 4, 2, 0, 5, 1, 6, 0} can be formed.
[0077] The steps for determining the initial coding sequence specifically include:
[0078] S31. Establish a polar coordinate system with the distribution center node location as the pole and the ray containing the distribution center node and the customer node closest to the distribution center node as the polar axis, and convert the position coordinates of the distribution center node and the customer node into polar coordinates.
[0079] S32. Sort the client nodes according to their polar angles. The sorting rule is either from smallest to largest or from largest to smallest.
[0080] S33. Under the premise of satisfying the constraints, insert each customer node into the solution sequentially according to the objective function; the solution includes several delivery paths. That is, after solving the delivery of a customer node, the customer node and its path are added to the solution.
[0081] During the insertion process, if a customer node that does not meet the constraints is encountered, and the customer node that does not meet the constraints is not the last customer node, then the customer node that does not meet the constraints is skipped.
[0082] S34. Search for whether there is an uninserted customer node j. If so, calculate the insertion cost c between every two customer nodes in each delivery path for inserting customer node j. ij And insert it between the two customer nodes corresponding to the lowest cost; where c ij =d i,j +d j,i+1 -d i,i+1 In the formula, d i,j d represents the distance between client node i and client node j. j,i+1 d represents the distance between client node j and client node i+1. i,i+1 This represents the distance between client node i and client node i+1.
[0083] For example, in the case of {0, 3, 4, 2, 0, 5, 1, 6, 0}, the initial solution is only {0}. Then, the insertion cost of points 1, 2, 3, 4, 5, and 6 is considered. Based on the comparison of insertion costs, it is determined which point to place after 0. For example, 3 is inserted, resulting in {0, 3}. This process continues until {0, 3, 4, 2,} is reached. When inserting 5, it is found that the sum of customer demand for points 3, 4, 2, and 5 exceeds the load, so 5 cannot be inserted. Therefore, 0 is inserted first, resulting in {0, 3, 4, 2, 0}. Then, 5 is inserted, forming {0, 3, 4, 2, 0, 5}, until all points are inserted, forming {0, 3, 4, 2, 0, 5, 1, 6, 0}.
[0084] S35. Traverse all uninserted client nodes until all client nodes are inserted into the solution to obtain the initial encoding sequence.
[0085] S4. Calculate the target value of the initial encoded sequence according to the objective function.
[0086] The target value refers to the total vehicle path length. Taking the solution {0, 3, 4, 2, 0, 5, 1, 6, 0} as an example, its target value f(x) = d. 03 +d 34 +d 42 +d 20 +d 05 +d 51 +d 16 +d 60 , where d ij Let be the distance between point i and point j. The objective value here can also be understood as the fitness of a chromosome in a genetic algorithm, which is essentially used to evaluate the quality of a solution.
[0087] S5. Calculate the initial temperature of the Metropolis criterion based on the target value of the initial coding sequence, and start the optimal delivery route iteration. After the iteration is completed, output the optimal vehicle coding sequence.
[0088] The formula for calculating the initial temperature T0 according to the Metropolis criterion is: The initial temperature T0 represents the temperature at which a suboptimal solution with a probability of acceptance of η is to be accepted that is β% worse than the current target value f(x). Here, η and β are generally arbitrarily defined and have no fixed range. In this embodiment, η = 50 and β = 20.
[0089] The optimal delivery route iteration specifically includes:
[0090] A1. Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. In the first iteration, the current solution is the initial encoding sequence. Initially: the weight of each operator (the four removal operators and two insertion operators in this embodiment) is 1 at the beginning of the algorithm; this weight is initially predetermined.
[0091] Step S3 has constructed an initial solution to the vehicle routing problem. This initial solution can actually serve as the final answer to the problem, but its quality is generally poor. Therefore, subsequent steps mainly focus on optimizing the initial solution. This optimization process belongs to the core of the Adaptive Large-Scale Neighborhood Search (ALNS) algorithm. The ALNS algorithm itself does not include a description of the method for generating the initial solution; therefore, other methods are needed to construct the initial solution. Here, a scanning algorithm is chosen, but other methods such as the saving algorithm or the nearest neighbor insertion algorithm can also be used. The optimization idea of the ALNS algorithm can be understood as continuously disrupting and recombining the solution, during which the solution will transform towards a better direction.
[0092] Just as the simulated annealing algorithm calculates the current temperature in each iteration, removal and insertion are inherent operations and core characteristics of the ALNS algorithm. The optimization process of the ALNS algorithm can be simply described as follows: complete solution (like the initial solution, containing complete path information) → execute the removal operator (removing some points or sub-paths from the complete solution; the resulting solution can be called a non-complete solution) → execute the insertion operator (re-inserting the removed points into the non-complete solution according to the process described by the removal operator, forming a complete solution again) → complete solution. This forms a closed loop, continuously iterating and optimizing. Each removal and insertion operator constitutes one iteration, and each iteration selects only one type of removal and insertion operator.
[0093] The selection of the removal operator (choosing one from multiple removal operators) and the selection of the insertion operator (choosing one from multiple insertion operators) both use roulette wheel selection, and the two selections do not interfere with each other.
[0094] Roulette wheel selection is a common and general method in algorithms, often used in chromosome selection in genetic algorithms. The selection of operators here is similar.
[0095] Taking the selection of one removal operator from h removal operators as an example, let the weights of the h removal operators be w1, w2, ..., w h Then the probability of the individual corresponding to the u-th operator is... Among them, w u P before the equal sign in this formula u Correspondence refers to the weight of the u-th operator (here, the u-th operator is used as an example to illustrate how individual probabilities are calculated), w g With the formula Corresponding, referring to w g g from 1 to h w g The sum, where g has a scope limited to the summation symbol and refers to the summation range symbol, and h is the total number of operators removed in this paragraph. The cumulative probability of the operators is... Among them, P g For individual probabilities, Let Pg be the cumulative probability; both the individual probability and the cumulative probability are original values from the general method of roulette. Similar to g in the previous problem, Pg is in the formula... In this expression, P represents the individual probability, and g is its subscript, indicating the sequence symbol in the summation symbol. That is, Pg is the individual probability of the g-th operator (obtained from the previous individual probability formula), and its theoretical meaning is the probability that the g-th operator is selected among all operators (from the 1st to the h-th operator). This represents the sum of the individual probabilities of the first n operators, such as... Let r represent the sum of probabilities of operator 1 and operator 2. Generate a random number r∈[0,1]. Starting from n=1, compare r with r in turn. When it first appeared When the time is right, the selection process ends, and the u-th operator is the selected operator.
[0096] The removal operator is executed first, followed by the insertion operator. The removal operator removes some client points from the current solution until the number of client points removed reaches a predetermined removal limit, thus obtaining a non-complete solution. The insertion operator then re-inserts the removed client points into the non-complete solution according to the rules described by the insertion operator, thus obtaining a new local solution, in order to find a better solution.
[0097] The random customer node removal specifically includes: if an infeasible sub-path solution exists in the current solution, randomly removing customer nodes from the infeasible sub-path until the sum of customer demand does not exceed the vehicle's maximum load capacity; if the number of removed customer nodes does not exceed the removal limit, randomly selecting customer nodes for removal until the number of removed customer nodes reaches the removal limit; an infeasible sub-path solution is defined as a sub-path whose sum of customer demand exceeds the vehicle's maximum load capacity; the removal limit is generated by a random function. The removal limit is generally a random number between 20% and 30% of the number of customer nodes. This random number is typically generated by a random function in the program.
[0098] The removal of random subpaths specifically includes: if there is an infeasible subpath solution in the current solution, then remove the infeasible subpath; if the number of customer nodes to be removed does not exceed the removal limit, then select a random subpath to remove until the number of customer nodes to be removed reaches the removal limit.
[0099] The removal of similar customer nodes specifically includes: randomly selecting a customer node i from the current solution (if there are infeasible subpath solutions in the current solution, the node is selected from the infeasible subpath solutions first), calculating the similarity between customer node i and other customer nodes j, and removing the customer nodes with the highest similarity in sequence until the number of customer nodes to be removed reaches the removal limit. The distance d between two customer nodes i and j is... ij As the basis for removing similarity points, d ij The smaller the value, the higher the similarity between customer points i and j.
[0100] The ring region similarity removal specifically includes: considering the spatial relationships between sub-paths in the current solution, and calculating their similarity based on three spatial relationships between the ring regions where each sub-path is located. These three spatial relationships are overlap, intersection, and disjointness, as shown below. Figure 3The diagram shows the spatial relationship between the two sub-paths and their corresponding annular regions s1 and S2. Each annular region is the smallest annular region centered on the distribution center that can cover the entire sub-path. The shaded area represents the overlapping portion of the annular regions corresponding to the two sub-paths.
[0101] based on Figure 3 Calculate the similarity of the three spatial relationships in the data;
[0102] The similarity between the two sub-paths is:
[0103]
[0104] Where σ1>σ2>σ3 (its value is a fixed constant during algorithm execution, a predetermined value. The selection of its value only needs to follow this inequality; it mainly represents a relationship and has no fixed range standard. In this embodiment, σ1=20, σ2=5, σ3=1), s i and s j This indicates that there are two sub-paths r in the current solution. i and r j The corresponding ring region then has a single sub-path r i The similarity coefficient is:
[0105]
[0106] Use an elite strategy to remove subpaths. Select the sub-path r with the highest similarity coefficient. m镠x The sub-path r with the non-maximum similarity coefficient is selected by using a roulette wheel method. d Then remove r m镠x and r d All customer nodes, Let l represent the set of similarity coefficients for all sub-paths, and l represent the total number of sub-paths in the current solution.
[0107] The cost-greedy insertion specifically involves inserting each removed customer node into the optimal position within the subpath of the current solution. After inserting the customer node i to be inserted into customer node j in the subpath, its insertion cost c... ij =d i,j +d j,i+1 -d i,i+1 Each insertion selects the subpath with the lowest insertion cost that also meets the load limit. If there are still uninserted points after the above steps, insertion is performed only considering the insertion cost until no points remain.
[0108] The regret value insertion specifically includes: inserting each removed customer node into a sub-path of the current solution, selecting the sub-path with the largest regret value for each insertion; the regret value is: Δc = c m2 -cm1 , where c m1 c represents the minimum insertion cost. m2 This represents the second-lowest insertion cost. Its significance lies in the fact that the larger the regret value Δc, the greater the increase in insertion cost if the client node cannot be inserted at the optimal position and is instead inserted at the second-lowest position.
[0109] A2. If the objective value of a local solution is less than the objective value of the current solution, then the local solution is taken as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value.
[0110] The probability of accepting a local solution is Among them, P Δ The value of P is a random number r between [0,1]. Δ If the value is greater than or equal to r, then the inferior solution is accepted as the current solution for the next iteration. T represents the current temperature, f(x) represents the target value of the current solution x, and f(x′) represents the target value of the local solution x′. The random number r is generated by the program's random function.
[0111] The formula for updating the temperature value is: T′=T*α
[0112] Where T′ represents the updated temperature, T represents the current temperature before the update, α∈(0,1) is the cooling rate, and the value of α is a preset constant parameter, which is generally close to 1 (such as 0.95, 0.99, 0.999, etc., and can be set to 0.99 here). The closer it is to 1, the slower the temperature drops.
[0113] A3. Based on the usage frequency and preset score of each insertion and removal operator, update the corresponding operator weights at a preset iteration interval. The preset iteration count is generally arbitrary and not strictly required; in this embodiment, it is set to 20, meaning that every 20 iterations, the weights of each operator are adjusted based on their performance in these 20 iterations. The adjusted weights are used as the basis for selecting operators in the next 20 iterations.
[0114] The formula for updating operator weights is:
[0115]
[0116] Where τ represents the interval of τ iterations, y represents the y-th iteration interval, and q represents the q-th operator. This represents the number of times operator q is used within τ iterations, and the corresponding preset score is... Within the y-th iteration interval, the operator weight corresponding to the q-th operator is Within the (y+1)th iteration interval, the operator weight corresponding to the qth operator is μ∈[0,1] is a factor that controls the influence of the operator. The smaller the value, the greater the influence of the weight of the y-th iteration interval on the weight update of the (y+1)-th iteration interval. If μ=0, the weight depends entirely on the weight of the previous iteration interval. If μ=1, only the score within the iteration interval is considered. If 0<μ<1, both the score within the iteration interval and the previous weight value are considered. The value of μ is preset by the user.
[0117] The pre-defined scoring rules for the operator are as follows: if a new global optimum is found, the operator score increases by θ1; if the new solution is only better than the current solution but worse than the global optimum, the operator score increases by θ2; if the new solution is worse than the current solution but is accepted by the Metropolis criterion as the initial solution for the next iteration, the operator score increases by θ3; if the new solution is worse than the current solution and is not accepted by the Metropolis criterion, the operator score increases by θ4. Generally, θ1>θ2>θ3>θ4, and these are pre-defined and have no fixed standard. In this embodiment, θ1=5, θ2=3, θ3=1.5, and θ4=1.8.
[0118] A4. Stop iterating when the objective value of the local solution is not less than the current solution's iteration count reaches the preset number, and output the optimal vehicle encoding sequence. Decoding the optimal vehicle encoding sequence yields the optimal vehicle delivery route.
[0119] The preset number of iterations can be set to 2000, or adjusted according to requirements for solutions without improvement. Furthermore, decoding the recorded optimal solution yields the number of vehicles needed to complete all delivery tasks and the customers served by each vehicle. For example... Figure 4 As shown, Figure 4 The document describes the process of four vehicles completing all delivery tasks and the customer nodes that each vehicle needs to serve.
[0120] This embodiment provides a vehicle delivery route planning method, including: acquiring basic information about the vehicle route; the basic information includes the geographical locations of the delivery center node and each customer node, the number of customers, the customer's cargo demand, and the maximum load capacity of the vehicle; establishing an objective function based on a delivery model; obtaining an initial solution to the model using a scanning algorithm; and selecting the optimal vehicle delivery route using an improved large-scale neighborhood search algorithm with the objective function as the target value. The improved large-scale neighborhood search algorithm can filter out the optimal delivery route for vehicles, thereby formulating a more reasonable delivery route plan, improving delivery efficiency, and significantly reducing the total delivery mileage. The improved large-scale neighborhood search algorithm in this embodiment considers the geographical location correlation of a single delivery in the delivery plan, improves the algorithm's local search capability, and has better applicability for the formulation of large-scale vehicle delivery plans. It can provide solutions for general vehicle delivery route problems with capacity constraints and provide a reference for management decision-making.
[0121] Example 2:
[0122] like Figure 5 As shown, this embodiment provides a vehicle delivery route planning system, the system comprising:
[0123] The information acquisition module M1 is used to acquire distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load information;
[0124] The objective function determination module M2 is used to establish an objective function with the goal of minimizing the total delivery vehicle mileage, based on the distribution center node location information, customer information, and vehicle maximum load information. The constraint condition of the objective function is that each customer is served by one and only one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle's load capacity.
[0125] The initial solution construction module M3 is used to determine the initial encoding sequence; the initial encoding sequence is the encoded representation of the initial delivery path, and the initial encoding sequence includes each customer node on the initial delivery path and the delivery order of each customer node;
[0126] The initial solution target value calculation module M4 is used to calculate the target value of the initial encoded sequence according to the target function;
[0127] The optimal delivery route iteration module M5 is used to calculate the initial temperature of the Metropolis criterion based on the target value of the initial encoded sequence and start the optimal delivery route iteration.
[0128] The optimal delivery route iteration specifically includes:
[0129] Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. In the first iteration, the current solution is the initial encoded sequence.
[0130] If the objective value of a local solution is less than the objective value of the current solution, then the local solution is adopted as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value.
[0131] Based on the usage count and preset score of each insertion and removal operator, update the corresponding operator weights at a preset interval of iterations.
[0132] The iteration stops when the target value of the local solution is not less than the current solution's iteration count reaches a preset number, and the optimal vehicle coding sequence is output.
[0133] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0134] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A vehicle delivery route planning method, characterized in that, The method includes: Obtain distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load information; Based on the distribution center node location information, customer information, and maximum vehicle load information, an objective function is established with the goal of minimizing the total delivery vehicle mileage; the constraint condition of the objective function is that each customer is served by one and only one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle load. Determine an initial coding sequence; the initial coding sequence is a coded representation of an initial delivery path, and the initial coding sequence includes each customer node on the initial delivery path and the delivery order of each customer node; Calculate the target value of the initial encoded sequence according to the objective function; Calculate the initial temperature of the Metropolis criterion based on the target value of the initial encoded sequence, and begin the optimal delivery route iteration; The optimal delivery route iteration specifically includes: Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. The current solution in the first iteration is the initial encoded sequence. If the objective value of a local solution is less than the objective value of the current solution, then the local solution is adopted as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value. Based on the usage count and preset score of each insertion and removal operator, update the corresponding operator weights at a preset interval of iterations. The iteration stops when the objective value of a local solution is not less than the current solution's iteration count reaches a preset number, and the optimal vehicle coding sequence is output. The ring region similarity removal specifically includes: calculating the similarity based on three spatial relationships between the ring regions where each sub-path in the current solution is located; The similarity between the two sub-paths is: Where σ1>σ2>σ3, s i and s j This indicates that there are two sub-paths r in the current solution. i and r j The corresponding ring region then has a single sub-path r i The similarity coefficient is: exist Select the sub-path r with the highest similarity coefficient. max The sub-path r with the non-maximum similarity coefficient is selected by using a roulette wheel method. d Then remove r max and r d All customer nodes, Let l represent the set of similarity coefficients for all sub-paths, and l represent the total number of sub-paths in the current solution. The determination of the initial encoding sequence specifically includes: A polar coordinate system is established with the distribution center node location as the pole and the rays containing the distribution center node and the customer node closest to the distribution center node as the polar axes. The position coordinates of the distribution center node and the customer node are then converted into polar coordinates. Sort the client nodes according to their polar angle size; Under the premise of satisfying the constraints, each customer node is inserted into the solution in sequence according to the objective function; the solution includes several delivery routes; during the insertion process, if a customer node that does not satisfy the constraints is encountered, and the customer node that does not satisfy the constraints is not the last customer node, then the customer node that does not satisfy the constraints is skipped. Search for whether there is an uninserted customer node j. If so, calculate the insertion cost c between every two customer nodes in each delivery path for that customer node j. ij And insert it between the two customer nodes corresponding to the lowest cost; where c ij =d i,j +d j,i+1 -d i,i+1 In the formula, d i,j d represents the distance between client node i and client node j. j,i+1 d represents the distance between client node j and client node i+1. i,i+1 This represents the distance between client node i and client node i+1; Traverse all uninserted client nodes until all client nodes are inserted into the solution to obtain the initial encoding sequence.
2. The vehicle delivery route planning method according to claim 1, characterized in that, The objective function that aims to minimize the total delivery vehicle mileage is: Where F represents the objective function; m is the maximum number of vehicles available for delivery; n is the number of customers; d ij x represents the distance between any two nodes i and j; ijk The program is a 0-1 program, which indicates whether vehicle k passes through nodes i and j. 0 means that vehicle k does not pass through nodes i and j, and 1 means that vehicle k passes through nodes i and j.
3. The vehicle delivery route planning method according to claim 1, characterized in that, The step of calculating the initial temperature of the Metropolis criterion based on the target value in the initial encoded sequence specifically includes: The initial temperature T0 of the Metropolis criterion is calculated based on the target value in the initial encoded sequence. The initial temperature T0 represents the temperature at which a suboptimal solution with a probability of acceptance of η is to be accepted that is β% worse than the current target value f(x).
4. The vehicle delivery route planning method according to claim 1, characterized in that, The random customer node removal specifically includes: if there is an infeasible sub-path solution in the current solution, then randomly remove customer nodes in the infeasible sub-path until the sum of customer demand does not exceed the maximum load capacity of the vehicle; if the number of customer nodes removed does not exceed the removal limit, then randomly select customer nodes to remove until the number of customer nodes removed reaches the removal limit; an infeasible sub-path solution is a sub-path whose sum of customer demand is greater than the maximum load capacity of the vehicle; the removal limit is generated by a random function. The removal of random subpaths specifically includes: if there is an infeasible subpath solution in the current solution, then remove the infeasible subpath; if the number of customer nodes to be removed does not exceed the removal limit, then select a random subpath to remove until the number of customer nodes to be removed reaches the removal limit. The removal of similar customer nodes specifically includes: randomly selecting a customer node i in the current solution, calculating the similarity between the customer node i and other customer nodes j, and removing the customer node with the highest similarity in turn until the number of customer nodes to be removed reaches the removal limit; The cost-greedy insertion specifically includes: inserting each removed customer node into a sub-path of the current solution, and selecting the sub-path with the lowest insertion cost and satisfying the load limit for each insertion; The regret value insertion specifically includes: inserting each removed customer node into a sub-path of the current solution, selecting the sub-path with the largest regret value for each insertion; the regret value is: Δc = c m2 -c m1 , where c m1 c represents the minimum insertion cost. m2 This represents the cost of the second smallest insertion.
5. The vehicle delivery route planning method according to claim 1, characterized in that, The update formula for the operator weights is: Where τ represents the interval of τ iterations, y represents the y-th iteration interval, and q represents the q-th operator. This represents the number of times operator q is used within τ iterations, and the corresponding preset score is... Within the y-th iteration interval, the operator weight corresponding to the q-th operator is Within the (y+1)th iteration interval, the operator weight corresponding to the qth operator is μ∈[0,1] is a factor that controls the influence of the operator. The smaller the value, the greater the influence of the weight of the y-th iteration interval on the weight update of the (y+1)-th iteration interval. If μ=0, the weight depends entirely on the weight of the previous iteration interval. If μ=1, only the score within the iteration interval is considered. If 0<μ<1, both the score within the iteration interval and the previous weight value are considered.
6. The vehicle delivery route planning method according to claim 1, characterized in that, Before determining the initial encoded sequence, the method further includes: Chromosome encoding is performed on the distribution center node and each of the customer nodes.
7. The vehicle delivery route planning method according to claim 1, characterized in that, The formula for updating the temperature value is: T' = T * α Where T' represents the updated temperature, T represents the current temperature before the update, α∈(0,1) is the cooling rate, and the value of α is a preset constant parameter.
8. The vehicle delivery route planning method according to claim 1, characterized in that, The process of accepting a local solution probabilistically, based on the Metropolis criterion and the temperature value of this iteration, specifically includes: According to the Metropolis criterion, and considering the temperature value of this iteration, the local solution is accepted with a probability of [percentage missing]. Among them, P Δ The value of P is a random number r between [0,1]. Δ If ≥r, then the inferior solution is accepted as the current solution for the next iteration, where T represents the current temperature, f(x) represents the objective value of the current solution x, and f(x') represents the objective value of the local solution x'.
9. A vehicle delivery route planning system, characterized in that, The system includes: The information acquisition module is used to acquire distribution center node location information, customer information, and vehicle information; the customer information includes: number of customers, cargo demand of each customer, and location of each customer node; the vehicle information includes: number of vehicles and maximum vehicle load information; The objective function determination module is used to establish an objective function with the goal of minimizing the total delivery vehicle mileage, based on the distribution center node location information, customer information, and vehicle maximum load information. The constraint condition of the objective function is that each customer is served by one and only one vehicle, and the total customer demand served by each vehicle does not exceed the vehicle's load capacity. An initial solution construction module is used to determine an initial encoding sequence; the initial encoding sequence is an encoded representation of the initial delivery path, and the initial encoding sequence includes each customer node on the initial delivery path and the delivery order of each customer node; The determination of the initial encoding sequence specifically includes: A polar coordinate system is established with the distribution center node location as the pole and the rays containing the distribution center node and the customer node closest to the distribution center node as the polar axes. The position coordinates of the distribution center node and the customer node are then converted into polar coordinates. Sort the client nodes according to their polar angle size; Under the premise of satisfying the constraints, each customer node is inserted into the solution in sequence according to the objective function; the solution includes several delivery routes; during the insertion process, if a customer node that does not satisfy the constraints is encountered, and the customer node that does not satisfy the constraints is not the last customer node, then the customer node that does not satisfy the constraints is skipped. Search for whether there is an uninserted customer node j. If so, calculate the insertion cost c between every two customer nodes in each delivery path for that customer node j. ij And insert it between the two customer nodes corresponding to the lowest cost; where c ij =d i,j +d j,i+1 -d i,i+1 In the formula, d i,j d represents the distance between client node i and client node j. j,i+1 d represents the distance between client node j and client node i+1. i,i+1 This represents the distance between client node i and client node i+1; Iterate through all uninserted client nodes until all client nodes are inserted into the solution to obtain the initial encoding sequence; An initial solution target value calculation module is used to calculate the target value of the initial encoded sequence according to the target function; The optimal delivery route iteration module is used to calculate the initial temperature of the Metropolis criterion based on the target value of the initial encoded sequence and start the optimal delivery route iteration. The optimal delivery route iteration specifically includes: Based on the weights of each removal operator and each insertion operator, a removal operator and an insertion operator are selected using a roulette wheel method. Then, based on the selected removal and insertion operators, operator removal and insertion operations are performed on the current solution to obtain a local solution. The removal operators include: random customer node removal, random sub-path removal, similar customer node removal, and ring region similarity removal. The insertion operators include: cost-greedy insertion and regret value insertion. The current solution in the first iteration is the initial encoded sequence. If the objective value of a local solution is less than the objective value of the current solution, then the local solution is adopted as the current solution; if the objective value of a local solution is greater than the objective value of the current solution, then according to the Metropolis criterion and in conjunction with the temperature value of this iteration, the local solution is accepted with probability, and the temperature value is updated; the temperature value in the first iteration is the initial temperature value. Based on the usage count and preset score of each insertion and removal operator, update the corresponding operator weights at a preset interval of iterations. The iteration stops when the target value of the local solution is not less than the current solution's iteration count reaches a preset number, and the optimal vehicle coding sequence is output. The ring region similarity removal specifically includes: calculating the similarity based on three spatial relationships between the ring regions where each sub-path in the current solution is located; The similarity between the two sub-paths is: Where σ1>σ2>σ3, s i and s j This indicates that there are two sub-paths r in the current solution. i and r j The corresponding ring region then has a single sub-path r i The similarity coefficient is: exist Select the sub-path r with the highest similarity coefficient. max The sub-path r with the non-maximum similarity coefficient is selected by using a roulette wheel method. d Then remove r max and r d All customer nodes, Let l represent the set of similarity coefficients for all sub-paths, and l represent the total number of sub-paths in the current solution.
Citation Information
Patent Citations
Logistics distribution optimization method based on improved genetic algorithm
CN111178582A
Autonomous vehicle distribution path planning method based on self-adaptive large neighborhood search algorithm
CN111798067A