Vehicle-machine collaborative delivery route optimization method and system based on sub-heuristic algorithm
Through an adaptive operator selection mechanism based on genetic algorithm and simulated annealing mechanism, the problem of long path solving time in vehicle-machine collaborative pick-and-delivery mode is solved, and the optimal path is quickly obtained, which improves the pick-and-delivery efficiency and reduces logistics costs.
Patent Information
- Application Number
- CN202210243404.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2025-08-29
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The lack of sub-heuristic algorithms for vehicle-machine collaborative pick-up and delivery mode in the prior art, resulting in a longer time to solve the optimal path.
A framework based on genetic algorithm is adopted, and a simulated annealing mechanism and an adaptive operator selection mechanism are integrated. The solution is destroyed and reborn by cross operators and mutant operators to the initial path scheme of vehicle-machine collaboration, and the global optimal solution is iteratively selected.
A near-optimal vehicle-machine coordinated path solution is achieved quickly, which improves the efficiency of vehicle-machine coordinated pick-up and delivery, and reduces the cost of terminal distribution and reverse logistics.
Smart Images

Figure CN114611794B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of route optimization, and in particular to a vehicle-machine collaborative pickup and delivery route optimization method and system based on a sub-heuristic algorithm. Background Art
[0002] As drone technology continues to mature, several logistics and technology companies have completed preliminary experiments using drones for last-mile delivery. However, due to limitations in payload and flight range, drones can only deliver specific goods to customers within a certain range. Therefore, using drones alone for delivery still has significant limitations in terms of battery life and payload. Combining vehicles with drones for delivery can effectively address these issues.
[0003] Current approaches to vehicle-machine collaborative logistics typically focus on optimizing delivery routes with the goal of minimizing delivery time or the shortest delivery route. This means that existing methods rarely consider reverse logistics. When faced with similar problems, existing methods typically employ heuristic rule-based algorithms, which, however, can be time-consuming. As can be seen from the above description, existing technologies lack sub-heuristic algorithms tailored to vehicle-machine collaborative pickup and delivery scenarios, resulting in a long time to find the optimal route. Summary of the Invention
[0004] (1) Technical problems solved
[0005] In response to the shortcomings of the existing technology, the present invention provides a method and system for optimizing the path of vehicle-machine collaborative pickup and delivery based on a sub-heuristic algorithm, which solves the technical problem that the existing technology lacks a sub-heuristic algorithm for the vehicle-machine collaborative pickup and delivery mode, resulting in a long time to solve the optimal path.
[0006] (2) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] In a first aspect, the present invention provides a method for optimizing vehicle-machine collaborative pickup and delivery routes based on a sub-heuristic algorithm, comprising:
[0009] S1. Obtaining data on collaborative delivery tasks involving multiple drones and vehicles, and developing a collaborative vehicle-machine delivery model with the goal of minimizing the transport distances of all vehicles and drones during both delivery and pickup.
[0010] S2. For the vehicle-machine collaborative pickup and delivery model, a genetic algorithm is used as a framework, incorporating a simulated annealing mechanism. An adaptive operator selection mechanism is used to select operators to destroy and regenerate the initial vehicle-machine collaborative routing solution. The global optimal solution is selected through continuous iteration and output as the optimal vehicle-machine collaborative routing solution.
[0011] in,
[0012] The operators include: a crossover operator and a mutation operator;
[0013] The adaptive operator selection mechanism includes:
[0014] At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value;
[0015] A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator;
[0016] If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is not as good as the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing the operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c.
[0017] Preferably, the vehicle-machine collaborative pickup and delivery model includes an objective function and constraints.
[0018] Preferably, the S2 specifically includes:
[0019] S201, initial population number P_num, maximum number of evolutions I_num, initial temperature S_tem, cooling coefficient T_tem; generate P_num solutions through the initial solution heuristic rule to form the initial population Pop_List; design the optimal individual in the current Pop_List as the global optimal solution, and initialize the number of evolutions i = 0;
[0020] S202: Determine whether the current evolution number i is less than or equal to the maximum evolution number I_num. If so, proceed to the next step. If not, terminate the evolution and output the global optimal solution, that is, the optimal vehicle-machine collaborative path plan.
[0021] S203: Calculate the fitness value of each individual using the inverse of the individual objective function as the fitness value;
[0022] S204: Initialize the weights of the crossover operator and the mutation operator to 1; use the roulette wheel selection strategy to select the population Select_Pop participating in this round of evolution from Pop_List;
[0023] S205: In Select_Pop, the individuals to participate in this round are selected as parent 1 and parent 2. A crossover operator or mutation operator is selected through the adaptive operator selection mechanism to perform a crossover operation or a mutation operation on parent 1 and parent 2 to obtain a new offspring individual as the neighborhood solution. The number of evolutions is i = i + 1.
[0024] S206: Check whether the obtained neighborhood solution is a feasible solution based on the constraint conditions to adjust the solution of the combined path. If it is not a feasible solution, return to S205; if it is a feasible solution, proceed to the next step and update the current temperature coefficient;
[0025] S207: Determine whether the fitness value of the neighborhood solution is greater than or equal to the global optimal solution. If so, proceed to the next step; if not, proceed to S209;
[0026] S208: Update the global optimal solution and replace the neighborhood solution with the global optimal solution;
[0027] S209: Determine whether the neighborhood solution is greater than or equal to the current optimal solution. If so, proceed to S211; if not, proceed to S210;
[0028] S210: Use the Metroplis rule to accept the inferior solution. The probability expression of acceptance is: Where Δf = cost(New_In) - cost(Select_Pop[j]), T refers to the current annealing temperature, and whether the inferior solution is selected according to this rule;
[0029] S211: Update the next generation population and adjust the operator weights according to the adaptive rules, and return to S202.
[0030] Preferably, before executing step S201, the method further includes:
[0031] Encode the solution. The encoding process is as follows:
[0032] Describe the solution as an n-dimensional car-machine combination chromosome, where n is an odd number greater than 1. The chromosome of the dimension represents the order in which vehicles visit anchor points. Each gene position represents an anchor node. The gene positions above the anchor node represent delivery point nodes, and the gene positions below the anchor node represent pickup point nodes. The upper and lower combinations corresponding to each anchor node are a trip.
[0033] Preferably, the crossover operator includes:
[0034] A pair of vehicle-machine cooperative paths is randomly selected, and node exchange operations are performed between these different vehicle-machine cooperative paths to obtain the neighborhood solution.
[0035] Preferably, the mutation operator includes:
[0036] Mutation operators include: out-of-path mutation operators and in-path mutation operators;
[0037] The off-path mutation operator includes: randomly selecting a vehicle-machine collaborative path, then selecting an anchor point within the path and mutating it into an anchor point that was not selected when generating the initial solution, forming a new vehicle-machine collaborative path;
[0038] The intra-path mutation operator includes: screening out vehicle-machine collaborative paths with drone flights for single pickup or single delivery loops, randomly selecting one of the vehicle-machine collaborative paths, and combining the single pickup and single delivery drone flights. If there is no drone flight at a vehicle-accessed anchor point after the mutation, the anchor point is deleted and the vehicle directly accesses the next anchor point.
[0039] Preferably, the vehicle-machine collaborative delivery model includes an objective function, such as formula (1):
[0040] in:
[0041] represents the distance traveled by vehicle k from i to j;
[0042] represents the distance traveled by UAV k′ from i to j;
[0043]
[0044]
[0045] V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes;
[0046] V0 represents the warehouse node;
[0047] K t represents the vehicle set;
[0048] K d represents the set of drones;
[0049] The vehicle-machine collaborative delivery model includes constraints, such as formulas (2) to (14):
[0050]
[0051]
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063] in:
[0064] V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes;
[0065] V0 represents the warehouse node;
[0066] K t represents the vehicle set;
[0067] K d represents the set of drones;
[0068] C represents the customer node set, C = (1.2.3...n), C = C d ∪C p , C d =(1.2.3...n) represents the set of delivery customer nodes, C p =(1.2.3...n) represents the set of customer nodes for picking up goods;
[0069] Ca represents the volume of vehicle k;
[0070] Ba represents the endurance of UAV k′;
[0071] D i represents the demand of node i;
[0072] represents the load of vehicle k after leaving point i;
[0073] represents the battery usage of drone k′ after passing point i;
[0074] T i k represents the arrival time of vehicle k at node i;
[0075] represents the arrival time of UAV k′ at node i;
[0076] Indicates that vehicle k passes through an arc<i,j> driving time;
[0077] Indicates the UAV k-warp arc<i,j> driving time;
[0078] Formula (2) represents the flow balance constraint of vehicles entering and leaving the warehouse. Any vehicle leaving the warehouse must return to the warehouse.
[0079] Formula (3) means ensuring the flow balance of any vehicle at any node;
[0080] Formula (4) indicates that any customer point is visited by a certain drone only once, and the drone visits the customer uniquely;
[0081] Formula (5) means that for drone k′ visiting customer j, all arcs arriving at point j are added together, and all arcs leaving point j are added together, and they are made equal to ensure the flow balance of drones at the customer point.
[0082] Formula (6) represents the flow balance of drone take-off and landing points. This constraint is an originality constraint, which uses the order of accessing nodes to constrain the number of drone sorties to avoid conflicts.
[0083] Formula (7) is an originality constraint. Since the number of drone cargo units is limited, the order of accessing nodes is used to constrain any flight and does not allow the situation where the first pick-up and the last delivery are not allowed.
[0084] Formula (8) and Formula (9) are originality constraints. Due to the limited number of drone cargo units, based on the existing flight constraints, any flight is allowed to have at most one delivery and one pickup, that is, any flight is allowed to have the situation of delivery first and pickup later or single pickup and single delivery;
[0085] Formula (10) and Formula (11) indicate that the demand of each customer is within the range of the drone’s cargo capacity;
[0086] Formula (12) represents the constraints of the vehicle's real-time load, and the large M constraint ensures the feasibility of the formula;
[0087] Formula (13) shows that the UAV flight endurance constraint is completed based on the existing flight constraint;
[0088] Formula (14) indicates that when a UAV carried by any vehicle returns to this point, the vehicle must arrive there before that point.
[0089] In a second aspect, the present invention provides a vehicle-machine collaborative pickup and delivery route optimization device based on a sub-heuristic algorithm, comprising:
[0090] The data and model acquisition module is used to obtain data on delivery tasks involving multiple drones and vehicles, and to develop a vehicle-machine collaborative delivery model that minimizes the transport distances of all vehicles and drones during both delivery and pickup.
[0091] The path acquisition module, designed for the vehicle-machine collaborative delivery model, uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. It uses an adaptive operator selection mechanism to select operators to destroy and regenerate the initial vehicle-machine collaborative path solution, continuously iteratively selecting the global optimal solution and outputting it as the optimal vehicle-machine collaborative path solution.
[0092] in,
[0093] The operators include: a crossover operator and a mutation operator;
[0094] The adaptive operator selection mechanism includes:
[0095] At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value;
[0096] A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator;
[0097] If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is not as good as the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing the operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c.
[0098] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program for optimizing the path of vehicle-machine collaborative pickup and delivery based on a sub-heuristic algorithm, wherein the computer program enables a computer to execute the method for optimizing the path of vehicle-machine collaborative pickup and delivery based on a sub-heuristic algorithm as described above.
[0099] In a fourth aspect, the present invention provides an electronic device, comprising:
[0100] one or more processors;
[0101] Memory; and
[0102] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the vehicle-machine collaborative pickup and delivery path optimization method based on the sub-heuristic algorithm as described above.
[0103] (3) Beneficial effects
[0104] The present invention provides a method and system for optimizing vehicle-machine collaborative pickup and delivery routes based on a sub-heuristic algorithm. Compared with existing technologies, it has the following advantages:
[0105] This method uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. Through an adaptive operator selection mechanism, operators are selected to destroy and regenerate the initial vehicle-machine collaborative routing solution, continuously iterating to select the global optimal solution. This method can quickly achieve a near-optimal solution for vehicle-machine collaborative routing, thereby improving the efficiency of vehicle-machine collaborative pickup and delivery, and reducing terminal delivery and reverse logistics costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0106] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0107] Figure 1 This is a block diagram of a vehicle-machine collaborative pickup and delivery route optimization method based on a sub-heuristic algorithm according to an embodiment of the present invention;
[0108] Figure 2 The encoding and decoding process of the embodiment of the present invention;
[0109] Figure 3 Schematic diagram of a crossover operator according to an embodiment of the present invention;
[0110] Figure 4 Schematic diagram of a mutation operator according to an embodiment of the present invention. DETAILED DESCRIPTION
[0111] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0112] The embodiments of the present application provide a method and system for optimizing the path of vehicle-machine collaborative pickup and delivery based on a sub-heuristic algorithm, thereby solving the technical problem of the lack of a hybrid sub-heuristic algorithm for the vehicle-machine collaborative pickup and delivery mode in the prior art, and improving the path solution speed for the vehicle-machine collaborative pickup and delivery mode.
[0113] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:
[0114] With the continuous maturity of drone technology, collaborative vehicle-drone pickup and delivery has become a new mode of transportation in the fields of end-to-end delivery and reverse logistics. In the process of vehicle-to-machine collaborative delivery, how to select the optimal anchor point to obtain the optimal delivery route, thereby improving the efficiency of vehicle-to-machine collaborative pickup and delivery, is a worthy research direction. This problem is an NP-hard problem. Using a sub-heuristic algorithm to iteratively optimize the heuristic solution results, a near-optimal solution can be obtained in a relatively short time, which is of great significance for solving the problem of vehicle-to-machine collaborative pickup and delivery path planning. This embodiment of the present invention proposes a vehicle-to-machine collaborative pickup and delivery path optimization method based on a sub-heuristic algorithm. This method mainly optimizes existing initial vehicle-to-machine collaborative path solutions. This method uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. It mainly involves four parts: solution encoding, crossover operator, mutation operator, and adaptive operator selection mechanism. Based on the overall algorithm framework, the selected operator is used to destroy and regenerate the solution, and the global optimal solution is continuously selected iteratively. This method can quickly obtain the optimal vehicle-to-machine collaborative path solution, thereby improving the efficiency of vehicle-to-machine collaborative pickup and delivery and reducing the costs of end-to-end delivery and reverse logistics.
[0115] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.
[0116] The embodiment of the present invention provides a method for optimizing the vehicle-machine collaborative delivery path based on a sub-heuristic algorithm, such as Figure 1 As shown, the method includes the following steps:
[0117] S1. Obtaining data on collaborative delivery tasks involving multiple drones and vehicles, and developing a collaborative vehicle-machine delivery model with the goal of minimizing the transport distances of all vehicles and drones during both delivery and pickup.
[0118] S2. For the vehicle-machine collaborative pickup and delivery model, a genetic algorithm is used as the framework, incorporating a simulated annealing mechanism. An adaptive operator selection mechanism is used to select operators to destroy and regenerate the initial vehicle-machine collaborative routing solution. The global optimal solution is continuously iterated and output as the optimal vehicle-machine collaborative routing solution.
[0119] in,
[0120] The operators include: a crossover operator and a mutation operator;
[0121] The adaptive operator selection mechanism includes:
[0122] At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value;
[0123] A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator;
[0124] If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is not as good as the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing the operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c.
[0125] This embodiment of the present invention utilizes a genetic algorithm as a framework, incorporating a simulated annealing mechanism. Through an adaptive operator selection mechanism, operators are selected to destroy and regenerate the initial vehicle-machine collaborative routing solution, continuously iterating to select the global optimal solution. This method can quickly arrive at a near-optimal solution for vehicle-machine collaborative routing, thereby improving the efficiency of vehicle-machine collaborative pickup and delivery, and reducing terminal delivery and reverse logistics costs.
[0126] The following describes each step in detail:
[0127] In step S1, data on multiple drone-vehicle collaborative delivery tasks is obtained, along with a vehicle-machine collaborative delivery model that minimizes the transport distances of all vehicles and drones during both delivery and pickup. The specific implementation process is as follows:
[0128] Get delivery task data: distribution network data, transportation tool data, demand-related data and decision variables.
[0129] in,
[0130] The distribution network data includes the distribution network directed graph G = <V, E>, V = {0, 1, ..., n + 1} node set, the node set includes: V0 warehouse node; customer node set C = (1.2.3...n), C = C d ∪C p, C d =(1.2.3...n) represents the set of delivery customer nodes, C p =(1.2.3...n) represents the set of customer nodes for picking up goods; the set of anchor nodes V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f represents the set of drone landing nodes; E = {(i, j) | i, j∈V, i≠j} indicates that there is an arc between nodes i and j, that is, the vehicle can travel from node i to node j; the distance that vehicle k travels from i to j is the distance that drone k′ travels from i to j It should be noted that in the embodiment of the present invention, the vehicle carrying the drone starts from the warehouse node V0 and arrives at the designated anchor point V a The drone takes off from this anchor point to pick up and deliver the goods, and then lands back at the anchor point. The vehicle is not responsible for picking up and delivering the goods, but only serves as a mobile base station, shortening the limited flight range of the drone.
[0131] The transportation tool data includes: transportation tool set K = K t ∪K d , K t =(1.2.3...k) represents the vehicle set, K d =(1.2.3...k′) represents the set of drones; the volume Ca of vehicle k and the endurance Ba of drone k′.
[0132] Demand-related data include: demand quantity D of node i i ; The load of vehicle k after leaving point i Battery usage of drone k′ after passing point i Arrival time T of vehicle k at node i i k ; Arrival time of drone k′ at node i Vehicle k arc<i,j> Driving time Drone K Warp Arc<i,j> Driving time Drone launch time SL and drone recovery time SR.
[0133] The decision variables include:
[0134]
[0135] The vehicle-machine collaborative delivery model includes an objective function and constraints. The objective function is as shown in formula (1):
[0136]
[0137] The constraints include formulas (2) to (14):
[0138]
[0139]
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149]
[0150]
[0151] in:
[0152] Formula (2) represents the flow balance constraint of vehicles entering and leaving the warehouse. Any vehicle leaving the warehouse must return to the warehouse.
[0153] Formula (3) means ensuring the flow balance of any vehicle at any node;
[0154] Formula (4) indicates that any customer point is visited by a certain drone only once, and the drone visits the customer uniquely;
[0155] Formula (5) means that for drone k′ visiting customer j, all arcs arriving at point j are added together, and all arcs leaving point j are added together, making them equal to ensure the flow balance of drones at the customer point.
[0156] Formula (6) represents the flow balance of drone take-off and landing points. This constraint is an originality constraint, which uses the order of accessing nodes to constrain the number of drone sorties to avoid conflicts.
[0157] Formula (7) is an originality constraint. Since the number of drone cargo units is limited, the order of accessing nodes is used to constrain any flight and does not allow the situation where the first pick-up and the last delivery are not allowed.
[0158] Formula (8) and Formula (9) are originality constraints. Due to the limited number of drone cargo units, based on the existing flight constraints, any flight is allowed to have at most one delivery and one pickup, that is, any flight is allowed to have the situation of delivery first and pickup later or single pickup and single delivery;
[0159] Formula (10) and Formula (11) indicate that the demand of each customer is within the range of the drone’s cargo capacity;
[0160] Formula (12) represents the constraints of the vehicle's real-time load. The large M constraint guarantees the feasibility of the formula; that is, a large M constraint is constructed so that the inequality still holds even when the vehicle does not pass through route i to j. M is an infinite positive number.
[0161] Formula (13) shows that the UAV flight endurance constraint is completed based on the existing flight constraint;
[0162] Formula (14) indicates that when a UAV carried by any vehicle returns to this point, the vehicle must arrive there before that point.
[0163] In step S2, for the vehicle-machine collaborative pickup and delivery model, a genetic algorithm is used as the framework, and a simulated annealing mechanism is integrated. An adaptive operator selection mechanism is used to select operators to destroy and regenerate the initial vehicle-machine collaborative path solution. The global optimal solution is selected through continuous iteration and output as the optimal vehicle-machine collaborative path solution. The specific implementation process is as follows:
[0164] S201: Initial population size P_num, maximum number of evolutions I_num, initial temperature S_tem, and cooling coefficient T_tem. Generate P_num solutions using the initial solution heuristic rule to form the initial population Pop_List. Designate the optimal individual in the current Pop_List as the global optimal solution GlobalBest and initialize the number of evolutions i = 0.
[0165] It should be noted that before initializing the population, it is also necessary to set encoding and decoding rules for the vehicle-machine collaborative path solution (i.e., solution), such as Figure 2 The details are as follows:
[0166] The encoding rules include: describing the solution as a multi-dimensional chromosome of vehicle-machine combination, that is, a vehicle-machine collaborative path that includes multiple drone routes. The grayscale chromosome represents the order in which the vehicle visits the anchor point, and each gene position represents an anchor node. The gene positions above the anchor node represent the delivery point node, and the gene positions below the anchor node represent the pickup point node. The upper and lower combinations corresponding to each anchor node are a flight. The decoding operation parses the chromosome into vehicle and drone paths. Figure 2 The decoding process is demonstrated with an example.
[0167] The decoding rules include: the first step is to separate the vehicle-machine combined path, and the second step is to identify the intersection anchor points and drone sortie combinations in the vehicle-machine collaborative path. Figure 2 For example, the first step is to separate Truck1 and multiple UAV paths. The second step is to search for intersection anchor points for the combined paths. Taking Truck1 as an example, the first anchor point visited is (6), which is the first intersection point with the UAV. It is the take-off and landing point of the first UAV. It has visited the delivery point (27) and the pickup point (34) in succession. Similarly, the vehicle visits the second anchor point (9), which is the take-off and landing point of the second UAV. It has visited the delivery point (21) and the pickup point (32) in succession.
[0168] S202: Determine whether the current evolution number i is less than or equal to the maximum evolution number I_num. If so, proceed to the next step. If not, terminate the evolution and output the global optimal solution, that is, the optimal vehicle-machine collaborative path plan.
[0169] S203: Calculate the fitness value of each individual using the inverse of the individual objective function as the fitness value.
[0170] S204: Initialize the weights of all operators to 1, where the operators include the crossover operator and the mutation operator; and use the roulette wheel selection strategy to select the population Select_Pop participating in this round of evolution from Pop_List.
[0171] It should be noted that the crossover operator in the embodiment of the present invention includes:
[0172] The crossover operator randomly selects a pair of vehicle-machine cooperative paths and performs node exchange between these different vehicle-machine cooperative paths to obtain the neighborhood solution. Figure 3 As shown in Figure 2, the crossover process of the four crossover operators is demonstrated. Taking the Crossover_1_1 operator as an example, a delivery point (27) and a delivery point (39) are selected from the combined path TD1 and the combined path TD2 for exchange. Similarly, the Crossover_1_2 operator selects a pickup point from each of the different combined paths for exchange. The Crossover_2_1 operator selects an anchor point (7) and a delivery point (4) from each of the combined paths TD1 and TD2, and exchanges all the corresponding turns. The Crossover_2_2 operator selects an anchor point (3) and a delivery point (9) from each of the different combined paths for exchange.
[0173] Mutation operators include:
[0174] The mutation operator is used to mutate nodes in the vehicle-machine collaborative path. Here, the mutation operator is divided into the path-out mutation operator and the path-in mutation operator. Figure 4As shown in the figure, the operation process of these two operators is introduced. The off-path mutation operator is the Mutation1_1 operator in the figure. First, a vehicle-machine collaborative path TD1 is randomly selected. Then, one of the anchor points (13) in the path is selected and mutated into an anchor point (10) that was not selected when generating the initial solution, forming a new vehicle-machine collaborative path. The on-path mutation operator is the Mutation1_2 operator in the figure. First, the vehicle-machine collaborative paths with drone flights for single pickup or single delivery loops are screened out. Then, one of the vehicle-machine collaborative paths TD1 is randomly selected and the drone flights for single pickup (4, 14, 4) and single delivery (2, 51, 2) are combined. If there is no drone flight at the vehicle-accessed anchor point after the mutation, the anchor point (4) is deleted and the vehicle directly accesses the next anchor point.
[0175] S205: In Select_Pop, the individuals to participate in this round are selected as parent 1 and parent 2. The crossover operator or mutation operator is selected through the adaptive operator selection mechanism to perform crossover operation or mutation operation on parent 1 and parent 2 to obtain new offspring individuals as neighborhood solutions. The number of evolutions is i = i + 1.
[0176] In an embodiment of the present invention, an adaptive operator selection mechanism is designed to improve the algorithm's solution speed and solution quality. The mechanism mainly includes three operations: weight initialization, operator selection, and weight update.
[0177] Weight initialization: At the beginning of the optimization algorithm, the weights of all operators are set to the same non-negative integer value. In this embodiment of the present invention, the value is 1.
[0178] Operator selection: A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator.
[0179] Weight Update: The purpose of weight update is to continuously improve the weight of excellent operators. If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight of the operator is increased by a larger value a. If the neighborhood solution obtained after executing a certain operator is worse than the original solution, but the inferior solution is accepted, the weight of the operator is increased by an appropriate value b. If the inferior solution obtained after executing a certain operator is discarded, the weight of the operator is increased by a smaller value c. In this embodiment of the present invention, a = 0.7, b = 0.5, and c = 0.3.
[0180] S206: Check whether the obtained neighborhood solution is a feasible solution through the constraint conditions to adjust the solution of the combined path. If it is not a feasible solution, return to S205; if it is a feasible solution, go to the next step and update the current temperature coefficient.
[0181] S207: Determine whether the fitness value of the neighborhood solution is greater than or equal to the global optimal solution. If so, proceed to the next step; if not, proceed to S209.
[0182] S208: Update the global optimal solution and replace the neighborhood solution with the global optimal solution.
[0183] S209: Determine whether the neighborhood solution is greater than or equal to the current optimal solution. If so, proceed to S211; otherwise, proceed to S210.
[0184] S210: Use the Metroplis rule to accept the inferior solution. The probability expression of acceptance is: Where Δf = cost(New_In) - cost(Select_Pop[j])T refers to the current annealing temperature, and whether the inferior solution is selected to proceed to the next step is determined according to this rule.
[0185] S211: Update the next generation population and adjust the operator weight according to the adaptive rule. If the neighborhood solution is greater than or equal to the current solution, the operator The weight of is increased by 0.7. Otherwise, a probability value r between 0 and 1 is randomly generated. If r ≥ v, New_In is accepted as the operator The weight of r is increased by 0.5. If r < v, the current New_In is discarded, the original solution is retained and the operator The weight is increased by 0.3. Return to S202.
[0186] The embodiment of the present invention further provides a vehicle-machine collaborative pickup and delivery route optimization device based on a sub-heuristic algorithm, comprising:
[0187] The data and model acquisition module is used to obtain data on delivery tasks involving multiple drones and vehicles, and to develop a vehicle-machine collaborative delivery model that minimizes the transport distances of all vehicles and drones during both delivery and pickup.
[0188] The path acquisition module, designed for the vehicle-machine collaborative delivery model, uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. It uses an adaptive operator selection mechanism to select operators to destroy and regenerate the initial vehicle-machine collaborative path solution, continuously iteratively selecting the global optimal solution and outputting it as the optimal vehicle-machine collaborative path solution.
[0189] in,
[0190] The operators include: a crossover operator and a mutation operator;
[0191] The adaptive operator selection mechanism includes:
[0192] At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value;
[0193] A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator;
[0194] If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is not as good as the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing the operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c.
[0195] It can be understood that the vehicle-machine collaborative pickup and delivery path optimization system based on sub-heuristic algorithm provided in the embodiment of the present invention corresponds to the above-mentioned vehicle-machine collaborative pickup and delivery path optimization method based on sub-heuristic algorithm. The explanation, examples, beneficial effects and other parts of its relevant contents can refer to the corresponding contents in the vehicle-machine collaborative pickup and delivery path optimization method based on sub-heuristic algorithm, and will not be repeated here.
[0196] An embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program for optimizing the vehicle-machine collaborative pickup and delivery path based on a sub-heuristic algorithm, wherein the computer program enables the computer to execute the vehicle-machine collaborative pickup and delivery path optimization method based on a sub-heuristic algorithm as described above.
[0197] An embodiment of the present invention further provides an electronic device, including:
[0198] one or more processors;
[0199] Memory; and
[0200] One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the vehicle-machine collaborative pickup and delivery path optimization method based on the sub-heuristic algorithm as described above.
[0201] In summary, compared with the existing technology, the present invention has the following beneficial effects:
[0202] 1. The embodiment of the present invention proposes a method for optimizing the path of vehicle-machine collaborative pickup and delivery based on a sub-heuristic algorithm. The method mainly optimizes the existing vehicle-machine collaborative initial path plan. The method uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. It mainly involves four parts: solution encoding, crossover operator, mutation operator, and adaptive operator selection mechanism. Based on the overall algorithm framework, the selected operator is used to destroy and regenerate the solution, and the global optimal solution is selected through continuous iteration. This method can quickly obtain the optimal vehicle-machine collaborative path plan, thereby improving the efficiency of vehicle-machine collaborative pickup and delivery, and reducing the cost of terminal distribution and reverse logistics.
[0203] 2. The embodiment of the present invention considers using a vehicle-machine collaborative method to pick up and deliver goods. When planning the logistics distribution route, it also considers recycling the goods or their packaging to reduce reverse logistics costs and reduce the cost of picking up and delivering goods.
[0204] 3. The vehicle-machine collaborative pickup and delivery model proposed in the embodiment of the present invention can describe the problem of multiple drone takeoffs during the vehicle-machine collaborative delivery process, and takes into account the endurance constraints of each drone and the load capacity of each vehicle. It is more in line with the actual operation process of vehicle-machine collaboration, and facilitates the subsequent derivation of vehicle paths and drone paths that conform to the actual operation process based on the model, thereby reducing the cost of pickup and delivery.
[0205] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0206] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A vehicle-machine collaborative delivery route optimization method based on a sub-heuristic algorithm, characterized in that: include: S1. Obtaining data on collaborative delivery tasks involving multiple drones and vehicles, and developing a collaborative vehicle-machine delivery model with the goal of minimizing the transport distances of all vehicles and drones during both delivery and pickup. S2. For the vehicle-machine collaborative pickup and delivery model, a genetic algorithm is used as a framework, incorporating a simulated annealing mechanism. An adaptive operator selection mechanism is used to select operators to destroy and regenerate the initial vehicle-machine collaborative routing solution. The global optimal solution is selected through continuous iteration and output as the optimal vehicle-machine collaborative routing solution. in, The operators include: a crossover operator and a mutation operator; The adaptive operator selection mechanism includes: At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value; A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator; If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is worse than the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing a certain operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c; The vehicle-machine collaborative delivery model includes an objective function and constraints. The objective function is as shown in formula (1): in: represents the distance traveled by vehicle k from i to j; represents the distance traveled by UAV k′ from i to j; V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes; V0 represents the warehouse node; K t represents the vehicle set; K d represents the set of drones; The constraints are as follows: in: V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes; V0 represents the warehouse node; K t represents the vehicle set; K d represents the set of drones; C represents the customer node set, C = (1.2.3...n), C = C d ∪C p , C d =(1.2.3...n) represents the set of delivery customer nodes, C p =(1.2.3...n) represents the set of customer nodes for picking up goods; Ca represents the volume of vehicle k; Ba represents the endurance of UAV k′; D i represents the demand of node i; represents the load of vehicle k after leaving point i; represents the battery usage of drone k′ after passing point i; T i k represents the arrival time of vehicle k at node i; represents the arrival time of UAV k′ at node i; Indicates that vehicle k passes through an arc<i,j> driving time; Indicates the UAV k-warp arc<i,j> driving time; Formula (2) represents the flow balance constraint of vehicles entering and leaving the warehouse. Any vehicle leaving the warehouse must return to the warehouse. Formula (3) means ensuring the flow balance of any vehicle at any node; Formula (4) indicates that any customer point is visited by a certain drone only once, and the drone visits the customer uniquely; Formula (5) means that for drone k′ visiting customer j, all arcs arriving at point j are added together, and all arcs leaving point j are added together, and they are made equal to ensure the flow balance of drones at the customer point. Formula (6) represents the flow balance of drone take-off and landing points. Formula (6) is an originality constraint, which uses the order of accessing nodes to constrain the drone sorties to avoid conflicts. Formula (7) is an originality constraint. Since the number of drone cargo units is limited, the order of accessing nodes is used to constrain any flight and does not allow the situation of picking up first and delivering later. Formula (8) and Formula (9) are originality constraints. Due to the limited number of drone cargo units, based on the existing flight constraints, any flight is allowed to have at most one delivery and one pickup, that is, any flight is allowed to have the situation of delivery first and pickup later or single pickup and single delivery; Formula (10) and Formula (11) indicate that the demand of each customer is within the range of the drone’s cargo capacity; Formula (12) represents the constraints of the vehicle's real-time load, and the large M constraint ensures the feasibility of the formula; Formula (13) shows that the UAV flight endurance constraint is completed based on the existing flight constraint; Formula (14) indicates that when a UAV carried by any vehicle returns to this point, the vehicle must arrive there before that point.
2. The vehicle-machine collaborative delivery route optimization method based on a sub-heuristic algorithm as claimed in claim 1 is characterized in that: The S2 specifically includes: S201, initial population number P_num, maximum number of evolutions I_num, initial temperature S_tem, cooling coefficient T_tem; generate P_num solutions through the initial solution heuristic rule to form the initial population Pop_List; design the optimal individual in the current Pop_List as the global optimal solution, and initialize the number of evolutions i = 0; S202: Determine whether the current evolution number i is less than or equal to the maximum evolution number I_num. If so, proceed to the next step. If not, terminate the evolution and output the global optimal solution, that is, the optimal vehicle-machine collaborative path plan. S203: Calculate the fitness value of each individual using the inverse of the individual objective function as the fitness value; S204: Initialize the weights of the crossover operator and the mutation operator to 1; use the roulette wheel selection strategy to select the population Select_Pop participating in this round of evolution from Pop_List; S205: In Select_Pop, the individuals to participate in this round are selected as parent 1 and parent 2. A crossover operator or mutation operator is selected through the adaptive operator selection mechanism to perform a crossover operation or a mutation operation on parent 1 and parent 2 to obtain a new offspring individual as the neighborhood solution. The number of evolutions is i = i + 1. S206: Check whether the obtained neighborhood solution is a feasible solution based on the constraint conditions to adjust the solution of the combined path. If it is not a feasible solution, return to S205; if it is a feasible solution, proceed to the next step and update the current temperature coefficient; S207: Determine whether the fitness value of the neighborhood solution is greater than or equal to the global optimal solution. If so, proceed to the next step; if not, proceed to S209; S208: Update the global optimal solution and replace the neighborhood solution with the global optimal solution; S209: Determine whether the neighborhood solution is greater than or equal to the current optimal solution. If so, proceed to S211; if not, proceed to S210; S210: Use the Metroplis rule to accept the inferior solution. The probability expression of acceptance is: Where Δf = cost(New_In) - cost(Select_Pop[j]), T refers to the current annealing temperature, and whether the inferior solution is selected according to this rule; S211: Update the next generation population and adjust the operator weights according to the adaptive rules, and return to S202.
3. The vehicle-machine collaborative delivery route optimization method based on a sub-heuristic algorithm as claimed in claim 2 is characterized in that: Before executing step S201, the method further includes: Encode the solution. The encoding process is as follows: Describe the solution as an n-dimensional car-machine combination chromosome, where n is an odd number greater than 1. The chromosome of the dimension represents the order in which vehicles visit anchor points. Each gene position represents an anchor node. The gene positions above the anchor node represent delivery point nodes, and the gene positions below the anchor node represent pickup point nodes. The upper and lower combinations corresponding to each anchor node are a trip.
4. The vehicle-machine collaborative delivery route optimization method based on a sub-heuristic algorithm as claimed in claim 3 is characterized in that: The crossover operator includes: A pair of vehicle-machine cooperative paths is randomly selected, and node exchange operations are performed between these different vehicle-machine cooperative paths to obtain the neighborhood solution.
5. The vehicle-machine collaborative delivery route optimization method based on a sub-heuristic algorithm as claimed in claim 3 is characterized in that: The mutation operator includes: Mutation operators include: out-of-path mutation operators and in-path mutation operators; The off-path mutation operator includes: randomly selecting a vehicle-machine collaborative path, then selecting an anchor point within the path and mutating it into an anchor point that was not selected when generating the initial solution, forming a new vehicle-machine collaborative path; The intra-path mutation operator includes: screening out vehicle-machine collaborative paths with drone flights for single pickup or single delivery loops, randomly selecting one of the vehicle-machine collaborative paths, and combining the single pickup and single delivery drone flights. If there is no drone flight at a vehicle-accessed anchor point after the mutation, the anchor point is deleted and the vehicle directly accesses the next anchor point.
6. A vehicle-machine collaborative delivery route optimization device based on a sub-heuristic algorithm, characterized in that: include: The data and model acquisition module is used to obtain data on delivery tasks involving multiple drones and vehicles, and to develop a vehicle-machine collaborative delivery model that minimizes the transport distances of all vehicles and drones during both delivery and pickup. The path acquisition module, designed for the vehicle-machine collaborative delivery model, uses a genetic algorithm as a framework and incorporates a simulated annealing mechanism. It uses an adaptive operator selection mechanism to select operators to destroy and regenerate the initial vehicle-machine collaborative path solution, continuously iteratively selecting the global optimal solution and outputting it as the optimal vehicle-machine collaborative path solution. in, The operators include: a crossover operator and a mutation operator; The adaptive operator selection mechanism includes: At the beginning of the sub-heuristic algorithm, the weights of all operators are set to the same non-negative integer value; A roulette wheel strategy is used to select the operator to be executed based on the weight of each operator; If the neighborhood solution obtained after executing a certain operator is worse than the original solution, the weight value a is increased for the weight of the operator; if the neighborhood solution obtained after executing a certain operator is worse than the original solution, but the inferior solution is accepted, the weight value b is increased for the weight of the operator; if an inferior solution is obtained after executing a certain operator and is discarded, the weight value c is increased for the weight of the operator, where a>b>c; The vehicle-machine collaborative delivery model includes an objective function and constraints. The objective function is as shown in formula (1): in: represents the distance traveled by vehicle k from i to j; represents the distance traveled by UAV k′ from i to j; V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes; V0 represents the warehouse node; K t represents the vehicle set; K d represents the set of drones; The constraints are as follows: in: V a Represents the anchor node set, V a =(1,2,3...a), V a =V s ∪V f , V s Represents the set of drone launch nodes, V f Represents the set of drone landing nodes; V0 represents the warehouse node; K t represents the vehicle set; K d represents the set of drones; C represents the customer node set, C = (1.2.3...n), C = C d ∪C p , C d =(1.2.3...n) represents the set of delivery customer nodes, C p =(1.2.3...n) represents the set of customer nodes for picking up goods; Ca represents the volume of vehicle k; Ba represents the endurance of UAV k′; D i represents the demand of node i; represents the load of vehicle k after leaving point i; represents the battery usage of drone k′ after passing point i; T i k represents the arrival time of vehicle k at node i; represents the arrival time of UAV k′ at node i; Indicates that vehicle k passes through an arc<i,j> driving time; Indicates the UAV k-warp arc<i,j> driving time; Formula (2) represents the flow balance constraint of vehicles entering and leaving the warehouse. Any vehicle leaving the warehouse must return to the warehouse. Formula (3) means ensuring the flow balance of any vehicle at any node; Formula (4) indicates that any customer point is visited by a certain drone only once, and the drone visits the customer uniquely; Formula (5) means that for drone k′ visiting customer j, all arcs arriving at point j are added together, and all arcs leaving point j are added together, and they are made equal to ensure the flow balance of drones at the customer point. Formula (6) represents the flow balance of drone take-off and landing points. Formula (6) is an originality constraint, which uses the order of accessing nodes to constrain the drone sorties to avoid conflicts. Formula (7) is an originality constraint. Since the number of drone cargo units is limited, the order of accessing nodes is used to constrain any flight and does not allow the situation of picking up first and delivering later. Formula (8) and Formula (9) are originality constraints. Due to the limited number of drone cargo units, based on the existing flight constraints, any flight is allowed to have at most one delivery and one pickup, that is, any flight is allowed to have the situation of delivery first and pickup later or single pickup and single delivery; Formula (10) and Formula (11) indicate that the demand of each customer is within the range of the drone’s cargo capacity; Formula (12) represents the constraints of the vehicle's real-time load, and the large M constraint ensures the feasibility of the formula; Formula (13) shows that the UAV flight endurance constraint is completed based on the existing flight constraint; Formula (14) indicates that when a UAV carried by any vehicle returns to this point, the vehicle must arrive there before that point.
7. A computer-readable storage medium, characterized in that It stores a computer program for optimizing the vehicle-machine collaborative pickup and delivery path based on a sub-heuristic algorithm, wherein the computer program enables the computer to execute the vehicle-machine collaborative pickup and delivery path optimization method based on a sub-heuristic algorithm as described in any one of claims 1 to 5.
8. An electronic device, characterized in that: include: one or more processors; Memory; as well as One or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the vehicle-machine collaborative pickup and delivery path optimization method based on the sub-heuristic algorithm as described in any one of claims 1 to 5.