Method for picking and delivery route planning based on multi-objective genetic programming

By combining multi-objective genetic programming and K-means clustering, Pareto optimal solution sets are generated offline, which solves the problems of low computational efficiency and insufficient rule generalization ability in real-time logistics scenarios, and achieves stable performance under different order distributions.

CN122390175APending Publication Date: 2026-07-14ANHUI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI UNIV
Filing Date
2026-04-07
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing path planning methods are computationally inefficient in real-time logistics scenarios, and single-objective optimization is prone to rule overfitting, making it impossible to maintain stable performance as order distribution changes across different time slices.

Method used

A multi-objective genetic programming approach is adopted to generate decision rules from historical data through offline learning, construct Pareto optimal solution sets, and use these rules to quickly construct path planning schemes in the online stage. Orders are then grouped using the K-means clustering algorithm.

Benefits of technology

It meets the real-time requirements of instant logistics scenarios, and the generated rules maintain good performance in both training and new scenarios, solving the problems of low computational efficiency and insufficient rule generalization ability in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122390175A_ABST
    Figure CN122390175A_ABST
Patent Text Reader

Abstract

The application discloses a method for taking and delivering goods path planning based on multi-target genetic programming, which comprises the following steps: firstly, the genetic programming method is applied to the taking and delivering goods path planning problem; and a tree structure is used to represent the decision rule, so that the paradigm is changed from "solving specific paths" to "learning decision rules". The traditional method needs to optimize the specific path from the beginning every time a new order is encountered, and the calculation efficiency is low; and the application learns the general decision rule offline, and only needs to perform simple rule calculation in the online stage to quickly build the path, so that the real-time requirement in the instant logistics scene is solved. The two-stage framework combining offline learning and online decision is adopted, the decision rule is learned from the historical data in the offline stage, and the path is quickly built by using the rule in the online stage, so that the problem that the traditional method starts from zero every time optimization and the calculation efficiency is low is solved, and the real-time requirement in the instant logistics scene is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent optimization and path planning technology, specifically a pickup and delivery path planning method based on multi-objective genetic programming. Background Technology

[0002] The pickup and delivery route planning problem involves planning a reasonable visit sequence for each delivery vehicle, given a distribution center, multiple delivery vehicles, and a batch of customer orders, so as to minimize the total travel distance while satisfying various constraints. This problem has wide applications in scenarios such as instant logistics, food delivery, and same-city express delivery. Each order includes a pickup point and a delivery point, and the order constraint of pickup before delivery must be satisfied.

[0003] Traditional path planning methods can be broadly categorized into two types: exact algorithms and metaheuristic algorithms. Exact algorithms, including branch and bound, integer linear programming, and dynamic programming, can find the optimal solution to a problem, but are only suitable for small-scale problems. As the number of orders increases, the computation time grows exponentially, making it impossible to find the optimal solution for large-scale problems within a reasonable timeframe. Metaheuristic algorithms, including genetic algorithms, ant colony optimization, and particle swarm optimization, can obtain approximate optimal solutions within an acceptable timeframe through heuristic search of the solution space. However, these methods require iterative optimization from scratch each time a new set of orders is encountered, failing to utilize the decision-making experience inherent in historical data, resulting in low computational efficiency and difficulty meeting the real-time requirements of instant logistics scenarios.

[0004] In recent years, hyperheuristic methods based on genetic programming have been used to learn scheduling rules. The basic idea is to automatically evolve and generate decision rules through genetic programming, and then directly apply these rules for rapid decision-making when new orders arrive. However, most of these methods employ a single-objective optimization framework, focusing only on the performance of the rules on the training set and neglecting their generalization ability. In practical applications, the distribution of orders in different time slices may differ; for example, weekday orders are concentrated in commercial areas, weekend orders are scattered in residential areas, and holiday orders may exhibit special patterns. Single-objective optimization methods are prone to overfitting, meaning that a rule performs well in the training scenario but its performance drops significantly in unseen test scenarios.

[0005] Therefore, how to improve the generalization ability of rules while ensuring their performance is a technical problem that urgently needs to be solved in this field. Summary of the Invention

[0006] This invention aims to address the shortcomings of the existing technology by proposing a pickup and delivery route planning method based on multi-objective genetic programming. The method aims to learn decision rules with both high performance and strong generalization ability from historical data, and quickly generate high-quality route planning schemes when new orders arrive.

[0007] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0008] Step 1: Define the basic elements of genetic programming and construct the terminal set and function set for decision rules;

[0009] Step 2: Initialize the genetic programming population based on the basic elements described in Step 1. Randomly combine the terminal set and function set to generate NP decision trees, forming the initial rule population. Each decision tree represents a candidate order priority calculation function, and the current generation number is set. =1;

[0010] Step 3: Calculate the multi-objective fitness of each individual based on the current rule population and historical order scenarios, and simulate path construction for each rule in the rule population in multiple historical order scenarios to calculate and obtain the performance target and generalization target of each individual;

[0011] Step 4: Based on the performance and generalization objectives obtained in Step 3, perform non-dominated sorting and crowding distance calculation on the current rule population. Use the fast non-dominated sorting algorithm to divide the current rule population into multiple Pareto fronts and calculate the crowding distance of individuals within the same front.

[0012] Step 5: Based on the sorting results in Step 4, multi-objective evolutionary operations are used to generate the next generation of regular populations. The next generation of regular populations is generated through tournament selection, subtree crossover, and subtree mutation.

[0013] Step Six: +1 is assigned to ,judge Has the maximum number of iterations been reached? If yes, proceed to step seven; otherwise, return to step three and continue iterative evolution based on the newly generated rule population.

[0014] Step 7: Based on the termination condition in Step 6, output the Pareto optimal solution set. Extract all individuals belonging to the first frontier from the last generation of rule population to form a non-dominant Pareto optimal rule set.

[0015] Step 8: Based on the Pareto optimal rule set output in Step 7, perform online real-time route planning. Select a decision rule from the Pareto optimal rule set according to actual needs, cluster and group real-time orders, and then construct a specific pickup and delivery route planning scheme.

[0016] Furthermore, the terminal set includes current state features and candidate order features; the function set includes arithmetic operations and conditional operations; the current state features include current location coordinates, current time, current vehicle load, and number of served orders; the candidate order features include pickup and delivery point distance, pickup and delivery detour cost, pickup and delivery urgency, time window parameters, order demand, order progress, and path attribution marker; wherein pickup urgency, delivery urgency, insertion detour cost, and pickup and delivery point distance are all calculated using preset quantification formulas; wherein the order progress is assigned a value based on the pickup and delivery completion status, specifically: if pickup is not completed, the order progress is 0; if pickup is completed but delivery is not completed, the order progress is 0.5; if both pickup and delivery are completed, the order progress is 1; the arithmetic operations and conditional operations include: addition, subtraction, multiplication, protected division, taking the maximum value, taking the minimum value, and conditional functions.

[0017] Furthermore, the multi-objective fitness calculation in step three specifically involves: initializing individual indices; iterating through all scenarios in the historical scenario set for each individual in the population; initializing the path construction state, which includes the current path, current time, current load, order completion flag, and set of incomplete orders; when the set of incomplete orders is not empty, filtering candidate orders, extracting order feature vectors, calculating the priority of candidate orders using the priority calculation function corresponding to the individual, selecting the order with the highest priority to determine the node to be visited, performing feasibility checks on the order, capacity, and time window for inserting the node into the end of the path; if the checks pass, performing the insertion operation and updating the relevant state; if the checks fail, selecting the next highest priority order; if all candidate orders are infeasible, closing the current path and resetting the state; calculating and accumulating the total path distance for each scenario to obtain the total distance of the individual across all scenarios, and then calculating the average path distance; sorting the path distances of all individuals in each scenario to obtain the individual's ranking in each scenario and calculating the average ranking; using the reciprocal of the average path distance as the performance objective and the reciprocal of the average ranking as the generalization objective; the larger the values ​​of the two objectives, the better the individual's fitness.

[0018] Furthermore, step four employs fast non-dominated sorting, specifically as follows: For each individual in the regular population, initialize its dominated count to zero and its dominated set to empty; for any two individuals, if the first individual's two objective values ​​are both no worse than the second individual's and at least one objective value is better than the second individual's, then the first individual is said to dominate the second individual, the second individual is added to the first individual's dominated set, and the second individual's dominated count is incremented by one; all individuals with a dominated count of zero are assigned to the first frontier; for each individual in the first frontier, iterate through each individual in its dominated set, decrementing the dominated count of these individuals by one, and if the dominated count of an individual becomes zero, then that individual is assigned to the next frontier; repeat the previous step until all individuals in the regular population are assigned to the corresponding frontier.

[0019] Furthermore, the crowding distance calculation in step four specifically includes: for each front surface, initializing the crowding distance of each individual to 0; for each objective function, sorting the individuals within the front surface according to the objective value; setting the crowding distance of boundary individuals to infinity; and for intermediate individuals, their crowding distance is the sum of the normalized distances of adjacent individuals on each objective.

[0020] Furthermore, step five specifically includes: 5.1 Selecting parent individuals from the current rule population using a tournament selection method; 5.2 Performing a crossover operation on the selected parent individuals to generate a set of offspring rules; 5.3 Performing a mutation operation on the individuals in the offspring rule set to generate a mutated set of offspring rules; 5.4 Merging the parent rule population and the offspring rule population; 5.5 Recalculating the two target values ​​for the individuals in the merged rule population; 5.6 Performing non-dominated sorting and crowding distance calculation on the merged rule population; 5.7 Selecting the next generation of rule population from the merged rule population.

[0021] Furthermore, the tournament selection method in step 5.1 is performed as follows: 5.1.1 Define a mating pool and initialize it to empty; 5.1.2 Repeat the following steps until the size of the mating pool reaches a certain threshold. 5.1.2.1 Randomly select from the current population Individual; 5.1.2.2, from 5.1.3. Select the individual with the smallest front edge number from the individuals. If the front edge numbers are the same, select the individual with the largest crowding distance and store it in the mating pool.

[0022] Furthermore, the online real-time path planning in step eight specifically involves: inputting the real-time order set for the current time slice; using the K-means clustering algorithm, based on the order pickup point coordinates, dividing spatially adjacent orders into several order groups; selecting suitable decision rules from the Pareto optimal solution set, with selection strategies including selecting the best performance, the best generalization ability, a dual-objective weighted balance, or interactive selection; initializing the path set for all vehicles; for each order group, initializing the path construction state, which includes the current path, current time, current load, order completion flag, and the set of incomplete orders; when incomplete orders... When the order set is not empty, candidate orders are filtered, order feature vectors are extracted, and the priority of candidate orders is calculated using the selected rules. The order with the highest priority is selected to determine the node to be visited. Feasibility checks are performed on the order, capacity, and time window. If the check passes, the insertion operation is performed and the relevant status is updated. If the check fails, the next highest priority order is selected. If all candidate orders are infeasible, the current path is closed and the status is reset. After the path of each order group is constructed, it is added to the vehicle path set. After all order groups are processed, the driving routes, node access order, and estimated arrival time of all vehicles are output to form a complete path planning scheme.

[0023] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0024] 1. This invention is the first to apply genetic programming to the problem of pickup and delivery route planning. By representing decision rules through a tree structure, it achieves a paradigm shift from "solving specific paths" to "learning decision rules." Traditional methods require optimizing specific paths from scratch for each new order, resulting in low computational efficiency. In contrast, this invention learns general decision rules offline, and only requires simple rule calculations during the online phase to quickly construct paths, thus solving the real-time requirements of instant logistics scenarios.

[0025] 2. This invention adopts a two-stage framework that combines offline learning and online decision-making. In the offline stage, decision-making rules are learned from historical data, and in the online stage, the rules are used to quickly construct paths. This solves the problem that traditional methods start from scratch for each optimization and have low computational efficiency, thus meeting the real-time requirements of instant logistics scenarios.

[0026] 3. This invention introduces multi-objective optimization, which simultaneously optimizes the performance objective and generalization objective of the path planning scheme, overcoming the shortcomings of traditional single-objective optimization that is prone to overfitting. The generated rules can perform well in the training scenario and maintain stable performance in new scenarios. Attached Figure Description

[0027] Figure 1 This is a flowchart of the overall algorithm of the present invention. Detailed Implementation

[0028] In this embodiment, the pickup and delivery route planning method based on multi-objective genetic programming aims to solve the real-time decision-making requirements of pickup and delivery route planning in the context of instant logistics. It learns decision rules with both high performance and strong generalization ability from historical data in the offline stage, and quickly constructs a route planning scheme using the learned rules in the online stage.

[0029] The method of the present invention is applied to a distribution center, In a delivery route planning environment consisting of delivery vehicles and a batch of customer orders, each order includes one pickup point and one delivery point, and the order constraint of visiting the pickup point first and then the delivery point must be satisfied; let the... Pick-up points and the delivery points The distance between them is denoted as The maximum load capacity of the vehicle is ;

[0030] The historical order scenario is defined in this invention as: the set of historical order scenarios is ,in Indicates the first One scenario, ; This indicates the total number of scenes; each scene Includes a batch of orders Each order Includes pickup point Delivery point Pickup time window Delivery time window and demand ;

[0031] The algorithm flow is as follows Figure 1 As shown, the path planning method of this invention is divided into two stages: an offline training stage and an online decision-making stage. In the offline training stage, historical order data is used to define a terminal set and a function set, initialize NP decision trees in a GP (genetic programming) population, and use a multi-objective genetic programming algorithm to evolve priority calculation rules to obtain a Pareto optimal solution set. In the online decision-making stage, new orders are grouped using K-means clustering, and a rule is selected from the Pareto optimal solution set to construct a specific path for each order group.

[0032] The specific methods and steps are as follows: Figure 1 As shown, it includes:

[0033] Step 1: Define the basic elements of genetic programming, and construct the terminal set and function set for decision rules; specifically:

[0034] Step 1.1: Define the terminal set The terminal set includes features describing the current state and features describing candidate orders.

[0035] The features describing the current state include: current position coordinates. Current moment Current vehicle load and the number of orders served .

[0036] The characteristics describing the candidate order include: the distance between the order pickup point and the current location. Distance between the order delivery point and the current location Pickup time window start time Pickup time window end time Delivery time window start time Delivery time window end time Order demand Urgency of picking up goods Delivery urgency Is the pickup point already on the route? Is the delivery point already on the route? Order progress Detour costs for inserting pickup points Detour costs for inserting delivery points Distance between pickup point and delivery point .

[0037] Among them, the urgency of picking up goods Calculate according to formula (1):

[0038]

[0039] Delivery urgency Calculate according to formula (2):

[0040]

[0041] Detour cost of inserting a pickup point Calculate according to formula (3):

[0042]

[0043] Detour costs for inserting delivery points Calculate according to formula (4):

[0044]

[0045] Distance between pickup point and delivery point Calculate according to formula (5):

[0046]

[0047] Order progress The value is: if the pickup is not completed, If pickup has been completed but delivery has not, If both pickup and delivery have been completed, .

[0048] The function set includes: addition (+), subtraction (-), multiplication (*), and protected division. 1. Find the maximum value (max), 2. Find the minimum value (min), 3. Use the if-else conditional function; 4. Protected division. Defined as: if Return 1 if it is not returned, otherwise return 1. .

[0049] Step 2: Initialize the genetic programming population based on the basic elements described in Step 1, randomly combine the terminal set and function set to generate NP decision trees to form the initial rule population, where each decision tree represents a candidate order priority calculation function, and set the current evolutionary generation gen=1;

[0050] Even if the population has Each individual represents a decision tree, i.e., a priority calculation function. Internal nodes of the decision tree are selected from the function set, and leaf nodes are selected from the terminal set. Initialize the current generation. .

[0051] Step 3: Calculate the multi-objective fitness of each individual rule based on the current rule population and historical order scenarios. Simulate path construction for each rule in multiple historical order scenarios, and calculate and obtain the performance and generalization objectives for each individual rule. Specifically:

[0052] Step 3.1: Initialize individual serial numbers .

[0053] Step 3.2, take the first... individual Initialize the individual's total distance score across all scenarios. Initialize the individual's ranking across all scenarios and .

[0054] Step 3.3, For the collection of historical scenes Each scene in , Perform the following operations to build the path and record the results:

[0055] Step 3.3.1: Initialize route construction status: Current route = [distribution center]; Current time t = distribution center opening time; Current load For the scenario Each order Initialize the pickup completion flag Delivery completed Initialize the set of incomplete orders. .

[0056] Step 3.3.2, when If not empty, repeat the following:

[0057] Step 3.3.2.1: Identify the candidate order set .

[0058] Step 3.3.2.2, for Each order Extract its feature vector The feature vector includes all the features describing candidate orders defined in step 1.1.

[0059] Step 3.3.2.3, using the first individual Calculate the priority score for each candidate order. (Current status, The current state includes the current state features defined in step 1.1.

[0060] Step 3.3.2.4: Select the order with the highest priority score. .

[0061] Step 3.3.2.5: Determine the next node to be visited: If The next node is the pickup point. ;like and The next node is the delivery point. .

[0062] Step 3.3.2.6: Check the feasibility of inserting the node at the end of the current path: Sequence constraint, if the node is a delivery point, then its pickup point must have been completed, i.e. Capacity constraints: If the node is a pickup point, the load after insertion will be... If the node is a delivery point, then insert the load. Time window constraint: if the node is a pickup point, then the arrival time... If the node is a delivery point, then the arrival time is... .

[0063] Step 3.3.2.7: If the feasibility check passes, perform the insertion operation: add the node to the current path. End; Update current position to node coordinates; Update current time (Node time window start time, t + travel time); Update current load; if the node is a pickup point, then... If the node is a delivery point, then Update the order status; if the node is a pickup point, then... If the node is a delivery point, then If the order Once pickup and delivery are completed, then remove it from... Removed from the middle.

[0064] Step 3.3.2.8: If the feasibility check fails, then... Temporarily mark it as currently infeasible, return to step 3.3.2.4 and select the next highest priority order to continue trying.

[0065] Step 3.3.2.9: If all candidate orders are not feasible, close the current path, i.e. add it to the distribution center, and store the path in the path set; then reset the current path to [distribution center], reset the current time to the distribution center opening time, reset the current load to 0, and reset all temporary markers.

[0066] Step 3.3.3, Calculation Scenario Total path distance , which is the sum of the distances between all adjacent nodes in the path set, calculated according to equation (6):

[0067]

[0068] Step 3.3.4: Accumulate the total distance .

[0069] Step 3.3.5, Record the first... Individuals in the scene The path distance constructed above .

[0070] Step 3.4, calculate the first... Average path distance of individuals .

[0071] Step 3.5, for each scenario Sort the path distances constructed by all individuals in this scene to obtain the first... Individuals in the scene Rankings The smaller the distance, the higher the ranking, with ranking 1 being the best.

[0072] Step 3.6, Calculate the first... Average ranking of individuals Calculate according to formula (7);

[0073]

[0074] Step 3.7, Define the first Two optimization objectives for each individual:

[0075] Performance goals This reflects the performance of the rule; a higher value is better.

[0076] generalization target This reflects the generalization ability of the rule; the larger the value, the better.

[0077] Step 3.8, Assign to ,judge If the condition is met, then the two target values ​​for all individuals are obtained; otherwise, return to step 3.2 and execute sequentially.

[0078] Step 4: Based on the performance and generalization objectives obtained in Step 3, perform non-dominated sorting and crowding distance calculation on the current rule population. Use the fast non-dominated sorting algorithm to divide the current rule population into multiple Pareto fronts and calculate the crowding distance between individuals within the same front. Specifically:

[0079] Step 4.1: Based on the two target values ​​of each individual, the population is divided into multiple Pareto fronts using the fast non-dominated sorting algorithm. , ,..., ,in This represents the optimal frontier. The fast non-dominated sorting algorithm proceeds as follows: For each individual in the population... Initialize the dominated count and the dominant set Empty; for any two individuals and ,like Both target values ​​are not inferior to And at least one objective is superior to Then it is called Dominate ,Will join in and will Add 1; add all Individuals are classified into the first frontier. ;for Each individual in traverse its dominated set Each individual in ,Will Subtract 1, if If it becomes 0, then... Assign them to the next frontier; repeat the above process until all individuals have been assigned to the corresponding frontier. Specifically:

[0080] Step 4.1.1: For each individual in the population Initialize the dominated count and the dominant set Empty; Step 4.1.2, for any two individuals and ,like Both target values ​​are not inferior to And at least one objective is superior to Then it is called Dominate ,Will join in and will Add 1; Step 4.1.3, put all Individuals are classified into the first frontier. Step 4.1.4, for Each individual in traverse its dominated set Each individual in ,Will Subtract 1, if If it becomes 0, then... Assign to the next frontier; Step 4.1.5, repeat step 4.1.4, until all individuals are assigned to the corresponding frontier.

[0081] Step 4.2: For each individual on the frontier, calculate the crowding distance. A larger crowding distance indicates a more dispersed distribution of the individual in the target space. The crowding distance is calculated as follows: For each frontier, initialize the crowding distance of each individual to 0; for each objective function, sort the individuals within the frontier according to the objective value; set the crowding distance of boundary individuals to infinity; for intermediate individuals, their crowding distance is the sum of the normalized distances of their adjacent individuals on each objective. Specifically:

[0082] Step 4.2.1: For each frontier surface, initialize the crowding distance of each individual to 0; Step 4.2.2: For each objective function, sort the individuals within the frontier surface according to the objective value; Step 4.2.3: Set the crowding distance of boundary individuals to infinity; Step 4.2.4: For intermediate individuals, their crowding distance is the sum of the normalized distances of their adjacent individuals on each objective.

[0083] Step 5: Based on the sorting results of Step 4, multi-objective evolutionary operations are used to generate the next generation of regular populations. This is achieved through tournament selection, subtree crossover, and subtree mutation. Specifically:

[0084] Step 5.1: Select parent individuals from the current population using a tournament selection method to generate a mating pool. The selection criteria are as follows: prioritize individuals with smaller frontal surface numbers; if individuals are within the same frontal surface, select those with larger crowding distances. The tournament selection method proceeds as follows: define the mating pool. Initialize to empty; repeat the following steps until... Size reached Randomly select from the current population Individual; from Among the individuals, select the one with the smallest frontier number. If the frontier numbers are the same, select the one with the largest crowding distance and store it. Output mating pool .

[0085] Step 5.2, for The individuals in the set are crossover operations to generate a child set. The crossover operation is performed as follows: Initialize the child set. Empty; repeat the following steps until... Size reached :from Two parent individuals are randomly selected from the middle. and Generate random numbers ,like If yes, then perform the crossover operation; otherwise, and Copy directly In; among them, Crossover probability; Crossover operation: from Randomly select a subtree ,from Randomly select a subtree ,use replace In Generate offspring ,use replace In Generate offspring ,Will and deposit Output the set of offspring. .

[0086] Step 5.3, for Mutation operations are performed on individuals to generate a set of mutated offspring. The mutation operation is performed as follows: Initialize the mutated offspring set. Empty; for Each individual in Perform the following operations: Generate random numbers ,like If yes, then perform the mutation operation; otherwise, Copy directly In; among them, Mutation probability; Mutation operation: from Randomly select a subtree Replace with a randomly generated new subtree Generate mutated individuals ,Will deposit Output the set of offspring after mutation. .

[0087] Step 5.4: Merge the parent population with the offspring population to obtain a population of size [size missing]. The merged population.

[0088] Step 5.5: Recalculate the two target values ​​for individuals in the merged population.

[0089] Step 5.6: Perform non-dominated sorting and crowding distance calculation on the merged population.

[0090] Step 5.7: Select from the merged population Individuals are selected as the next generation population using the following strategy: individuals are selected sequentially according to their front edge number (from smallest to largest); within the same front edge, individuals are selected in descending order of crowding distance, until the population size reaches a certain threshold. .

[0091] Step 6: Assign gen+1 to gen, and check if gen has reached the maximum number of iterations G. If yes, proceed to step 7; otherwise, return to step 3 and continue iterative evolution based on the newly generated rule population.

[0092] Step 7: Based on the termination condition in Step 6, output the Pareto optimal solution set. Extract all individuals belonging to the first frontier from the last generation of rule population to form a non-dominant Pareto optimal rule set.

[0093] That is, from the last generation of the population, all individuals belonging to the first frontier are extracted to form the Pareto optimal solution set. ,in This represents the number of Pareto optimal solutions. These solutions are independent of each other in terms of performance and generalization objectives, representing optimal decision rules under different trade-offs.

[0094] Step 8: Based on the Pareto optimal rule set output in Step 7, perform online real-time route planning. Select a decision rule from the Pareto optimal rule set according to actual needs, cluster the real-time orders, and then construct a specific pickup and delivery route planning scheme. Specifically:

[0095] Step 8.1: Input the real-time order set for the current time slice. .

[0096] Step 8.2: Based on the geographical location of the order pickup point, use... Clustering algorithms will Divided into several order groups During clustering, the coordinates of the order pickup point are used as features to group spatially adjacent orders into the same group, which are then served by the same vehicle, thus avoiding vehicles traveling across regions.

[0097] Step 8.3: From the Pareto optimal solution set Choose a decision rule The choice of strategy depends on the actual needs: if the goal is to achieve the highest performance, choose the rule that maximizes objective one (performance objective), i.e., the rule with the lowest average path distance; if the goal is to maximize generalization ability, choose the rule that maximizes objective two (generalization objective), i.e. The minimum rule can be chosen; if a balance is desired, the rule with the largest weighted sum of objective one and objective two can be selected, with the weights set according to actual needs; the Pareto front can also be visualized and selected interactively by the user according to their preferences.

[0098] Step 8.4: Initialize the path set for all vehicles. Empty.

[0099] Step 8.5: For each order group Perform the following operations to build the path:

[0100] Step 8.5.1: Initialize route construction status: Current route = [distribution center]; Current time t = distribution center opening time; Current load ;for Each order Initialize the pickup completion flag Delivery completed Initialize the set of incomplete orders. .

[0101] Step 8.5.2, when If not empty, repeat the following:

[0102] Step 8.5.2.1: Identify the candidate order set .

[0103] Step 8.5.2.2, for Each order Extract its feature vector .

[0104] Step 8.5.2.3: Utilize the selected decision rule Calculate the priority score for each candidate order. (Current status, ).

[0105] Step 8.5.2.4: Select the order with the highest priority score. .

[0106] Step 8.5.2.5: Determine the next node to be visited: If The next node is the pickup point. ;like and The next node is the delivery point. .

[0107] Step 8.5.2.6: Check the feasibility of inserting the node at the end of the current path. The feasibility check includes sequence constraints, capacity constraints, and time window constraints.

[0108] Step 8.5.2.7: If the feasibility check passes, perform the insert operation, updating the current path, current time, current load, and order status. If the order has been completed, proceed from... Removed from the middle.

[0109] Step 8.5.2.8: If the feasibility check fails, then... Temporarily mark it as currently infeasible, return to step 8.5.2.4 and select the next highest priority order to continue trying.

[0110] Step 8.5.2.9: If all candidate orders are not feasible, close the current path by adding it to the distribution center and storing it in the path set. Then reset the current path to [Distribution Center], reset the current time to the distribution center's opening time, reset the current load to 0, and reset all temporary markers.

[0111] Step 8.5.3: The current path after construction is complete. join in .

[0112] Step 8.6: Output the pickup and delivery route planning scheme for all vehicles. The plan specifies the driving route for each vehicle, the order of visits to each node, and the estimated arrival time.

[0113] Implementation Case:

[0114] I. Implementation Process

[0115] Implementation conditions settings

[0116] Table 1

[0117] Population parameters Population size NP 6 The six individuals in the corresponding table Maximum number of iterations G 50 Evolution Termination Conditions Crossover probability pc 0.8 crossover operation probability Mutation probability pm 0.1 Probability of mutation operation Scene parameters Number of historical scenes (m) 5 5 historical order scenarios Number of orders per scenario: n 20 Each scenario contains 20 orders. Vehicle parameters Maximum vehicle load capacity Q 100 Capacity constraints Distribution center opening hours 8:00 Path construction start time

[0118] II. Implementation Process

[0119] Step 1: Define the basic elements of genetic programming

[0120] The terminal set contains 20 features, and the function set contains 6 operations, consistent with the original text.

[0121] Step 2: Initialize the genetic programming population

[0122] Six decision trees are randomly generated to form the initial rule population:

[0123] Table 2

[0124] Individual A if(urgency>0.7)then1 / detour_pickupelsedist_pickup*demand Individual B dist_pickup+0.5*delivery_urgency Individual C max(pickup_urgency,1 / dist_delivery) Individual D min(detour_pickup,demand*0.3) Individual E pickup_urgency*delivery_urgency Individual F 0.2 (constant rule)

[0125] Set the current generation number gen=1.

[0126] Step 3: Calculate the multi-objective fitness of each individual.

[0127] For each individual, simulated path construction was performed in 10 historical order scenarios, and the path distances (unit: km) for each scenario were obtained as follows:

[0128] Table 3

[0129] individual Scene 1 Scene 2 Scene 3 Scene 4 Scene 5 Total distance Average distance f1 (normalized) A 240 255 250 245 260 1250 250.0 4.00 B 245 250 248 252 258 1253 250.6 3.99 C 235 240 238 242 245 1200 240.0 4.17 D 242 248 246 250 255 1241 248.2 4.03 E 250 260 255 258 262 1285 257.0 3.89 F 280 285 282 288 290 1425 285.0 3.51

[0130] f1 = (1 / average distance) × 1000, for easy display.

[0131] Sort each individual by distance from scene to scene in ascending order (1 being optimal), and obtain the correct ranking of each individual in each scene:

[0132] Table 4

[0133] A 2 4 4 2 4 3.2 0.3125 B 4 3 3 4 3 3.4 0.2941 C 1 1 1 1 1 1.0 1.0000 D 3 2 2 3 2 2.4 0.4167 E 5 5 5 5 5 5.0 0.2000 F 6 6 6 6 6 6.0 0.1667

[0134] Note: F2 = 1 / average rank.

[0135] Ultimately, each individual has two target values ​​(f1 and f2, used for non-dominated sorting):

[0136] Table 5

[0137] individual Target 1 F1 Target 2 f2 A 4.00 0.3125 B 3.99 0.2941 C 4.17 1.0000 D 4.04 0.4167 E 3.89 0.2000 F 3.51 0.1667

[0138] Step 4: Non-dominated sorting and crowding distance calculation

[0139] 4.1 Non-dominated sorting (based on f1 and f2)

[0140] Individual C: f1=4.17, f2=1.0000, both are better than all other individuals, belonging to the first frontier F1.

[0141] Individual D: Except for C, it is superior to the other individuals and belongs to the second frontier F2.

[0142] Individual A: Comparing A and B, A dominates B. A is not dominated by D, therefore A belongs to the third frontier surface F3.

[0143] Individual B: Dominated by A and not by D (D dominates both A and B), belonging to the fourth frontier surface F4.

[0144] Individual E: Dominated by D, and compared with B: B dominates E, therefore E belongs to the fifth frontier surface F5.

[0145] Individual F: Dominated by all individuals, belonging to the sixth frontier surface F6.

[0146] result:

[0147] F1={C}, F2={D}, F3={A}, F4={E}, F5={E}, F6={F}.

[0148] 4.2 Crowding Distance

[0149] Each frontal surface contains only one individual, and the crowding degree is set to infinity.

[0150] Step 5: Multi-objective evolutionary operation

[0151] Tournament selection (τ=2), subtree crossover (Pc=0.8), and subtree mutation (P) were employed. m =0.1) Generate the next generation population, merge the parent and offspring generations, perform non-dominated sorting and crowding selection, and retain a population of size NP=6.

[0152] Step Six: Iterative Evolution

[0153] Repeat steps three through five until gen=50. Throughout the evolutionary process, C remains on the first frontier. Because C dominates all other individuals and no new individuals are generated that are not mutually dominant with C, the first frontier will eventually still contain only C.

[0154] Step 7: Output the Pareto optimal solution set

[0155] Extract all individuals belonging to the first frontier from the last generation of the rule population to form the Pareto optimal rule set:

[0156] ParetoSet={C}

[0157] That is, rule C is optimal in both performance and generalization ability, and is the only optimal decision rule.

[0158] Normalized display:

[0159] Rule C: f1=4.17, f2=100.0.

[0160] Step 8: Online Real-Time Route Planning

[0161] 8.1 Input the real-time order set

[0162] Assume there are O real-time orders in the current time slice. new ={o1, o2, ..., o 12}

[0163] 8.2K-means clustering grouping

[0164] K-means clustering is performed based on the order pickup point coordinates to group spatially adjacent orders into the same group. Setting k=3, we get:

[0165] G1: Orders 1-5 (East Zone)

[0166] G2: Orders 6-10 (West Zone)

[0167] G3: Orders 11-15 (Southern Region)

[0168] 8.3 Selection Decision Rules

[0169] Choose rule C (the unique best) from the Pareto optimal solution set. This rule has the smallest average path distance and the strongest generalization ability in historical scenarios (f2=100.00).

[0170] 8.4 Initialize the path set

[0171] Routes=∅

[0172] 8.5 Build paths for each group

[0173] Taking G1 as an example, path construction is performed using rule C:

[0174] Initialization: Current path = [distribution center], current time t = 8:00, current load = 0, all orders are incomplete.

[0175] Circular decision-making:

[0176] Identify candidate orders (pickup incomplete or delivery incomplete).

[0177] Extract the feature vector of each order and calculate the priority score using rule C.

[0178] Choose the order with the highest score.

[0179] Determine the next access point (pickup point or delivery point).

[0180] Check feasibility (sequence, capacity, time window).

[0181] If feasible, insert a node and update the path, time, load, and order status; if the order is completed, remove it from the pending set.

[0182] If that doesn't work, then try the second-best order.

[0183] If all candidate orders are not feasible, close the current path (join the distribution center), reset the status, and open a new path.

[0184] Repeat until all orders are completed.

[0185] The same process is performed on G2 and G3, with each group served independently by one vehicle.

[0186] 8.6 Output Path Planning Scheme

[0187] The final route of the three vehicles is obtained, for example:

[0188] Vehicle 1 (East Zone): Distribution Center → p1 → d1 → p2 → d2 →… → Distribution Center.

[0189] Vehicle 2 (West Zone): Distribution Center → p6 → d6 → p7 → d7 →… → Distribution Center.

[0190] Vehicle 3 (South Area): Distribution Center → p11 → d11 → p12 → d12 →…→ Distribution Center.

[0191] Each path specifies the node access order, estimated arrival time, and satisfies time window, capacity, and sequence constraints.

[0192] Therefore, the present invention can achieve the following effects:

[0193] This invention is the first to apply genetic programming to the problem of pickup and delivery route planning. By representing decision rules through a tree structure, it achieves a fundamental shift in the route planning paradigm. Traditional methods require iterative optimization from scratch for each new order, resulting in low computational efficiency. This invention employs a two-stage framework combining offline learning and online decision-making. The offline stage learns general decision rules from historical data, while the online stage only requires simple rule calculations to quickly construct the route, thus solving the real-time requirements of instant logistics scenarios.

[0194] This invention introduces multi-objective optimization during the offline training phase, simultaneously optimizing both the performance objective (the reciprocal of the average path distance) and the generalization objective (the reciprocal of the average rank) of the path planning scheme. These two objectives conflict and require a trade-off through multi-objective optimization. By using fast non-dominated sorting and crowding distance calculation, the population is divided into multiple Pareto fronts, ultimately outputting a Pareto optimal solution set containing multiple non-dominated decision rules. This effectively overcomes the overfitting problem of traditional single-objective optimization, and the generated rules perform well in both training scenarios and maintain stable performance in new scenarios.

[0195] This invention generates a Pareto optimal solution set through multi-objective genetic programming, containing multiple decision rules with different focuses on performance and generalization ability. During the online phase, the rule can be flexibly selected according to actual needs: the rule maximizing objective one is chosen when pursuing ultimate performance; the rule maximizing objective two is chosen when pursuing generalization ability; and the rule maximizing the weighted sum of both objectives is chosen when seeking balance. This diverse rule base design enables this method to adapt to the complex and ever-changing operational needs in real-time logistics scenarios, exhibiting stronger practicality and adaptability.

[0196] This invention systematically designs a terminal set and a function set for genetic programming. The terminal set contains 20 features, including current state features and candidate order features, comprehensively describing key information in a dynamic decision-making environment. The function set includes six operations: addition, subtraction, multiplication, protected division, maximum value extraction, minimum value extraction, and conditional functions, providing rich combinations for constructing complex decision logic. This systematic element design ensures that the evolutionarily generated decision rules have strong representational capabilities and can accurately capture complex decision patterns in pickup and delivery route planning problems.

[0197] This invention employs a complete path construction and feasibility check mechanism in both the offline training and online decision-making phases. Strict sequence constraints, capacity constraints, and time window constraints are checked before inserting each candidate order. When the highest priority order becomes infeasible, the next highest priority order is selected. When all candidate orders become infeasible, the current path is closed and a new path is opened. This mechanism ensures that the generated path planning scheme strictly meets all constraints in actual operation, regardless of whether it is offline training or online decision-making, and has practical application value.

[0198] In the online phase, this invention employs the K-means clustering algorithm, using the order pickup point coordinates as features to divide spatially adjacent orders into several order groups, with each group served independently by a single vehicle. This design avoids vehicles traveling across regions, reducing empty mileage and lowering operating costs. Furthermore, it decomposes the large-scale path planning problem into multiple sub-problems for parallel processing, further improving online decision-making efficiency. Simultaneously, clustering and grouping enable multi-vehicle collaborative planning.

[0199] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this document.

[0200] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0201] In the embodiments provided herein, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual couplings or direct couplings or communication connections shown or discussed may be indirect couplings or communication connections through some interfaces, apparatuses, or units, or they may be electrical, mechanical, or other forms of connection.

[0202] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments described herein, depending on actual needs.

[0203] Furthermore, the functional units in the various embodiments of this document can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0204] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this paper, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this paper. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0205] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0206] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A pickup and delivery route planning method based on multi-objective genetic programming, characterized in that, This includes the following steps performed sequentially: Step 1: Define the basic elements of genetic programming and construct the terminal set and function set for decision rules; Step 2: Initialize the genetic programming population based on the basic elements described in Step 1. Randomly combine the terminal set and function set to generate NP decision trees, forming the initial rule population. Each decision tree represents a candidate order priority calculation function, and the current generation number is set. =1; Step 3: Calculate the multi-objective fitness of each individual based on the current rule population and historical order scenarios, and simulate path construction for each rule in the rule population in multiple historical order scenarios to calculate and obtain the performance target and generalization target of each individual; Step 4: Based on the performance and generalization objectives obtained in Step 3, perform non-dominated sorting and crowding distance calculation on the current rule population. Use the fast non-dominated sorting algorithm to divide the current rule population into multiple Pareto fronts and calculate the crowding distance of individuals within the same front. Step 5: Based on the sorting results in Step 4, multi-objective evolutionary operations are used to generate the next generation of regular populations. The next generation of regular populations is generated through tournament selection, subtree crossover, and subtree mutation. Step Six: +1 is assigned to ,judge Has the maximum number of iterations been reached? If yes, proceed to step seven; otherwise, return to step three and continue iterative evolution based on the newly generated rule population. Step 7: Based on the termination condition in Step 6, output the Pareto optimal solution set. Extract all individuals belonging to the first frontier from the last generation of rule population to form a non-dominant Pareto optimal rule set. Step 8: Based on the Pareto optimal rule set output in Step 7, perform online real-time route planning. Select a decision rule from the Pareto optimal rule set according to actual needs, cluster and group real-time orders, and then construct a specific pickup and delivery route planning scheme.

2. The pickup and delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, The terminal set includes current status features and candidate order features; The function set includes arithmetic operations and conditional operations; The current status features include current location coordinates, current time, current vehicle load, and number of orders served; The candidate order features include pickup and delivery point spacing, pickup and delivery detour cost, pickup and delivery urgency, time window parameters, order demand, order progress, and path attribution marker; among which, pickup urgency, delivery urgency, insertion detour cost, and pickup and delivery point spacing are all calculated using preset quantitative formulas; The order progress is assigned a value based on the completion status of pickup and delivery. Specifically: if pickup is not completed, the order progress is 0; if pickup is completed but delivery is not completed, the order progress is 0.5; if both pickup and delivery are completed, the order progress is 1. The arithmetic and conditional operations include: addition, subtraction, multiplication, protected division, finding the maximum value, finding the minimum value, and conditional functions.

3. The delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, The multi-objective fitness calculation in step three is specifically as follows: Initialize the individual index, iterate through all the scenes in the historical scene set for each individual in the population, and initialize the path construction state. The path construction state includes the current path, current time, current load, order completion flag, and set of incomplete orders. When the set of incomplete orders is not empty, filter candidate orders, extract order feature vectors, calculate the priority of candidate orders using the priority calculation function corresponding to the individual, select the order with the highest priority to determine the node to be visited, perform feasibility checks on the order, capacity, and time window for inserting the node into the end of the path, if the check passes, perform the insertion operation and update the relevant status, if the check fails, select the next highest priority order, if all candidate orders are infeasible, close the current path and reset the status. Calculate the total path distance for each scene and sum them up to get the total distance of an individual across all scenes, and then calculate the average path distance; Sort the path distances of all individuals in each scene to obtain the individual's ranking in each scene and calculate the average ranking; The reciprocal of the average path distance is used as the performance objective, and the reciprocal of the average rank is used as the generalization objective. The larger the values ​​of the two objectives, the better the individual fitness.

4. The pickup and delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, Step four employs a fast non-dominated sort, specifically as follows: For each individual in the regular population, initialize its dominated count to zero and its dominated set to empty; For any two individuals, if the first individual's two objective values ​​are not inferior to the second individual's and at least one objective value is superior to the second individual's, then the first individual is said to dominate the second individual, the second individual is added to the first individual's dominion set, and the second individual's dominated count is incremented by one. All individuals with a dominated count of zero are assigned to the first frontier. For each individual in the first frontier, iterate through each individual in its dominion set, decrement the dominion count of these individuals by one, and if the dominion count of an individual becomes zero, then move that individual to the next frontier. Repeat the previous step until all individuals in the rule population have been assigned to the corresponding front.

5. The pickup and delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, The congestion distance calculation in step four specifically includes: For each frontier, initialize the crowding distance of each individual to 0; for each objective function, sort the individuals within the frontier according to the objective value; set the crowding distance of boundary individuals to infinity; for intermediate individuals, their crowding distance is the sum of the normalized distances of their neighboring individuals on each objective.

6. The delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, Step five specifically includes: 5.

1. Select parent individuals from the current rule-based population using a tournament selection method; 5.2 Perform crossover operations on the selected parent individuals to generate a set of rules for the offspring; 5.3 Perform mutation operations on the individuals in the offspring rule set to generate the mutated offspring rule set; 5.4 Merge the parent generation rule population with the offspring generation rule population; 5.5 Recalculate the two target values ​​for individuals in the merge rule population; 5.6 Perform non-dominated sorting and crowding distance calculation on the merged population; 5.7 Select the next generation of rule populations from the merged rule populations.

7. The pickup and delivery route planning method based on multi-objective genetic programming according to claim 6, characterized in that, The tournament selection method in step 5.1 is carried out as follows: 5.1.1 Define a mating pool and initialize it to empty; 5.1.2 Repeat the following steps until the mating pool reaches the required size. : 5.1.2.1 Randomly select from the current population Individual; 5.1.2.2, From The individual with the smallest front edge number is selected from the individuals. If the front edge numbers are the same, the individual with the largest crowding distance is selected and stored in the mating pool. 5.1.3 Output mating pool.

8. The delivery route planning method based on multi-objective genetic programming according to claim 1, characterized in that, The online real-time path planning mentioned in step eight specifically includes: Input the real-time order set of the current time slice, and use the K-means clustering algorithm to divide spatially adjacent orders into several order groups based on the order pickup point coordinates; Select appropriate decision rules from the Pareto optimal solution set. The selection strategies include selecting the best performance, the best generalization ability, the weighted balance of two objectives, or interactive selection. Initialize the set of routes for all vehicles. For each order group, initialize the route construction status, which includes the current route, current time, current load, order completion flag, and set of incomplete orders. When the set of incomplete orders is not empty, filter candidate orders, extract order feature vectors, calculate the priority of candidate orders using the selected rules, select the order with the highest priority to determine the node to be visited, and perform feasibility checks on order, capacity, and time window. If the check passes, perform the insertion operation and update the relevant status. If the check fails, select the next highest priority order. If all candidate orders are infeasible, close the current path and reset the status. Once the path for each order group is constructed, it is added to the vehicle path set. After all order groups have been processed, the driving routes, node access order, and estimated arrival times of all vehicles are output, forming a complete path planning scheme.

9. An electronic device, characterized in that, include: Processor, the processor being coupled to memory; The memory is used to store computer programs; The processor is used to invoke a computer program stored in the memory to implement the method described in claims 1-8.

10. A readable storage medium, characterized in that, Includes a program or instructions that, when run on a computer, execute the method of claims 1-9.