End-to-end delivery route optimization method for large customers
By optimizing last-mile delivery routes through dynamic algorithms, the real-time and uncertain issues of large-scale customer orders have been resolved, improving delivery efficiency and customer satisfaction while reducing delivery costs.
Patent Information
- Application Number
- CN202311792691.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-25
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-12-25
AI Technical Summary
Existing technologies are insufficient to effectively address the issues of high delivery costs and low efficiency in last-mile delivery to large-scale customers, especially given the real-time and uncertain nature of orders and the resulting unreasonable delivery route planning, which leads to decreased customer satisfaction.
A dynamic algorithm is adopted, combining greedy algorithm, W&I algorithm and genetic algorithm to optimize the last-mile delivery route. The optimal vehicle delivery route is generated by segmented decision-making through rolling time domain algorithm, taking into account turning restrictions and real-time orders to reduce the total delivery time.
It improved delivery efficiency, reduced delivery costs, enhanced customer satisfaction, and scientifically scheduled last-mile delivery vehicle routes for large-scale real-time orders.
Smart Images

Figure CN117933862B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle route optimization technology and relates to a method for optimizing last-mile delivery routes for large-scale customers. Background Technology
[0002] With the rapid development of the logistics industry, the number of users of food delivery, errand running, and same-city delivery services is increasing. Especially with the increasing maturity of Internet technology, people are more inclined to shop and order food online.
[0003] In the face of unforeseen circumstances, many offline businesses have come to a standstill, prompting various industries to actively embrace online channels. Structural changes on both the supply and demand sides, along with the formation of new habits, have made online ordering and offline delivery the new normal. At the same time, with the continued advancement of urbanization, new consumption concepts and models, including last-mile instant consumption, will become increasingly widespread.
[0004] Of all the stages of last-mile delivery, last-mile delivery is the stage where services are directly delivered to consumers. Firstly, last-mile delivery involves a wide variety of items, small batches, and high frequency, with orders becoming increasingly fragmented, leading to a continuous increase in the frequency of last-mile delivery in cities. Secondly, due to the dispersed customer locations and uncertain cargo information in large-scale last-mile delivery, last-mile delivery consistently suffers from high delivery costs and low efficiency. Furthermore, last-mile delivery is generally handled by the merchant's delivery personnel based on subjective judgment, resulting in unreasonable route planning. In addition, the aforementioned problems in delivery lead to decreased customer satisfaction with delivery services, indirectly affecting customers' willingness to purchase from merchants. Therefore, optimizing last-mile delivery routes for large-scale customers is a problem that needs to be solved.
[0005] In the field of vehicle routing optimization, research on the Vehicle Routing Problem (VRP) mainly focuses on problem modeling and solution algorithms, such as Capacitated VRP (CVRP), VRP with Time Windows (VRPTW), Heterogeneous VRP (HVRP), Multi-Depot VRP (MDVRP), Time-Dependent VRP (TDVRP), Green VRP (GVRP), and Dynamic VRP (DVRP). Except for Dynamic VRP, which addresses real-time demand information, the demand information for other VRP problems is known in advance, and heuristic algorithms are used for route planning. This can lead to limitations in real-world last-mile delivery scenarios. In reality, large-scale customer last-mile delivery information is generated in real-time at different times, necessitating dynamic algorithms for research. In actual last-mile delivery services, delivery personnel need to repeatedly pick up and deliver goods on urban roads to meet real-time order demands. This problem, which requires vehicles to pick up and deliver goods under conditions of a large increase in real-time orders, and aims to minimize the total time to complete all orders, is described as a last-mile delivery route optimization problem. Most existing solutions do not take into account the real-time and uncertain nature of end-customer demands. Summary of the Invention
[0006] In view of this, the purpose of this invention is to provide a last-mile delivery route optimization method for large-scale customers. In response to the real-world problem of large-scale customer order delivery, where last-mile delivery vehicles need to return to the delivery origin to pick up goods, a dynamic algorithm is designed for large-scale customer orders to obtain the optimal vehicle delivery route, thereby solving the last-mile delivery route optimization problem for large-scale customers.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A method for optimizing last-mile delivery routes for large-scale customers includes the following steps:
[0009] S1: In response to the real-time nature of customer orders and the actual delivery scenario where delivery vehicles need to return to the delivery origin to pick up goods, construct a real-time pickup and delivery route optimization problem for a large number of customers;
[0010] S2: Construct a real-time order path optimization model for end customers with the goal of minimizing total order delivery time, and set constraints on the objective function of the optimization model;
[0011] S3: For real-time orders added by customers during the delivery process, a rolling time-domain algorithm for last-mile real-time orders is adopted. A greedy algorithm and a W&I (Wait and Ignore) algorithm are designed for delivery vehicles to allocate real-time new orders. An initial solution is generated based on a set of real-time order sequence positions formed by the dynamic algorithm. Then, the optimal delivery route for the delivery vehicle is obtained by using a genetic algorithm (GA).
[0012] Furthermore, in step S1, a real-time pickup and delivery route optimization problem for large-scale customers is constructed, specifically including the following steps:
[0013] S11: Given a network graph G;
[0014] S12: Assume all order points R that need to be delivered are... i =(t i ,l i The orders are randomly distributed on this network graph G, and the resulting order sequence is denoted as... n represents the number of orders that occurred, R i =(t i ,l i ) indicates order R i In t i Distance from delivery origin at any time i Released at the point, because real-world roads have turning restrictions, the network graph G consists of different nodes k. i Interconnected, For order R i The subsequent reversible node, i.e., order R i When moving between nodes in the current direction, the next steerable node at the current position and direction, k i Indicates order R i Only at the distance from the delivery origin Turn and make a U-turn at the location;
[0015] S13: Assume that after each order is generated, the delivery vehicle must pick up the goods from the delivery origin before it can deliver the generated order; at time zero, the delivery vehicle is at the delivery origin and will then depart at a unit speed to deliver the generated orders. All orders in the order sequence must be delivered. After all orders are delivered, the delivery vehicle is required to return to the delivery origin.
[0016] All vehicles travel at a uniform speed; regardless of order preparation time, the demand is considered fulfilled when the delivery vehicle passes the demand point.
[0017] Furthermore, in step S2, the overall objective function of the constructed end-customer real-time order path optimization model is:
[0018]
[0019] Equation (1) is the objective function, which represents the average completion time of each order. It is used to establish an instant delivery model that considers the average time to complete all orders and the delivery network with turning restrictions when order demand occurs in real time.
[0020] In equation (1), O = {o1, o2, ..., o} i} represents the sequence of orders; N = {n0, n1, n2, ..., n i} represents the set of all nodes, where i = 0 represents the distribution center, and i = 1, 2, ..., n represent the next reversible node for the order point requiring service. This represents the order information, where r i Indicates the order release time, d i This represents the coordinates of order i. Indicates the exact moment when demand is released;
[0021] The constraints set for the objective function of the optimization model are as follows:
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038] In the above constraints: k represents the k-th delivery person, k∈K, and K represents the number of delivery people; x ijk Indicates whether order j is delivered by the k-th delivery person on the i-th route; 1 indicates yes, 0 indicates no. ij This represents the load from the completion of the previous service node to the next order j; Q represents the delivery capacity limit of the delivery person, with each customer's demand being 1; s i This represents the load from the previous completed node to the next order j; Indicates the time of arrival at the pickup point; This represents the time to arrive at the client node; M represents a sufficiently large positive number. Indicates order o i Actual delivery time; t i Indicates order o i The actual pickup time; I represents the set of orders i; t∈T represents the current time t, which is discretized, and T represents the set of current times; l ij Represents the distance from node i to j
[0039] Equation (2) means that each order in all paths must be served and served only once;
[0040] Equation (3) indicates that each order must be served once throughout the entire discrete time period;
[0041] Equation (4) represents the delivery capacity limit for a delivery person at any given time;
[0042] Equation (5) indicates that among all delivery routes, the delivery person can only choose one delivery route;
[0043] Equation (6) indicates that an order will only appear on the route if it is assigned to a delivery person;
[0044] Equations (7) and (8) indicate that the delivery person may wait at the starting point during the delivery process, so the pickup time and delivery time of each order are not less than the earliest time when the delivery person travels to the pickup point and the customer node;
[0045] Equation (9) indicates that when the k-th path is selected, y ik The value of is 1 throughout the service time period of order j;
[0046] Equations (10) and (11) indicate that the pickup time for each order must be earlier than its delivery time and later than its release time;
[0047] Equation (12) indicates that the actual delivery time of an order cannot be earlier than its release time;
[0048] Equation (13) indicates that the current time must be within the order period. i The condition is met after the goods are picked up and before they are delivered to the customer. The variable will then take the value 1;
[0049] Equation (14) indicates that in an asymmetric network structure, the distances between nodes i and j may not be equal;
[0050] Equations (15) and (16) indicate that the next node of an order must be n. i ;
[0051] Equation (17) represents the decision variable constraints; the decision variables are as follows: This indicates whether the j-th delivery person visited the i-th order on the k-th path. If so, then... Conversely, it is 0; x it This indicates whether the delivery person is serving an order at time t. i If so, x it =1, otherwise 0.
[0052] Furthermore, in step S3, the rolling time domain algorithm specifically divides the problem into multiple time periods, with each time period considering only a portion of the decisions rather than solving all decisions at once; the decision results of each time period serve as the initial values for the next time period, and the decision results are continuously updated through iteration to finally obtain the global optimal solution. Then, a genetic algorithm is used to obtain the optimal path after the customer order allocation in each time period, and then the delivery is carried out by the transport vehicle.
[0053] Furthermore, in step S3, the greedy algorithm requires the delivery person to determine whether to return to the delivery starting point immediately after serving the next customer's order when a new customer order arrives. Based on the relationship between the time of return to the delivery starting point and the new path formed by the currently undelivered orders, the delivery person determines whether to wait at the delivery starting point before setting off again. The delivery steps are as follows:
[0054] S311: If no new orders are generated when the delivery driver is at the delivery origin, the driver will continue to wait at the origin, and the demand orders will accumulate until time t, at which point the order sequence will be updated. When the current order begins to appear, step S313 is used to calculate an optimal path τ to deliver all orders that have appeared but not yet been delivered, and then the delivery origin is returned. The length of path τ is denoted as |τ|. If at the current time... The delivery driver immediately sets off to deliver the currently occurring order sequence. If a new order appears during the delivery route, the driver immediately determines, according to step S312, whether to immediately return to the delivery origin along the shortest path to pick up the order and wait. If... The delivery person will wait at the delivery point until the current time. If the orders are equal, the delivery person will depart again. If a new order appears during the delivery process, the delivery person should immediately determine whether to return to the delivery origin along the shortest path to pick up the goods and wait, according to step S312.
[0055] S312: Assume t i At time x, a new order R appears. i =(t i (x), where the successor node of x is k. x At this point, the delivery person is calculating all orders that have appeared but not yet been delivered according to step S313, and returning to the optimal path τ from the delivery origin to make deliveries. Let the length of path τ be |τ|. The delivery person's current position is y, and the subsequent order point of y is k. y ;τ' represents the delivery person at k y After returning to the delivery origin, immediately recalculate the optimal path τ' for all orders that have appeared but have not yet been delivered according to step S313 and return to the delivery origin. Deliver all orders that have appeared but have not yet been delivered. The length of path τ' is denoted as |τ'|.
[0056] (1) If d(o,k) y )+d(k y ,o)+|τ'|-|τ|≤d(o,k x )+d(k x After the delivery person reaches the successor node of the current location, they immediately return to the delivery origin to pick up the goods and proceed to step S311; if a new order is released during the delivery person's return to the delivery origin, the order is ignored; where d(o,k) y d(k) represents the path of the delivery person from the starting point to node i, where d(k) represents the path of the delivery person from the starting point to node i. y ,o) represents the path from node i back to the starting point;
[0057] (2) If d(o,k) y )+d(k y ,o)+|τ'|-|τ|>d(o,k x )+d(k x The delivery person ignored R. i Continue delivering along route τ, and after delivering all orders for this time, return to the delivery origin and proceed to step S311;
[0058] S313: Generate an initial solution based on a set of real-time order sequence locations obtained by the greedy algorithm. Use the genetic algorithm (GA) to find the optimal pick-up and delivery route for this initial solution. The deliveryman then starts delivering the orders that need to be delivered based on the route.
[0059] Furthermore, in step S3, the W&I algorithm (Wait and Ignore) makes action decisions based on the relationship between the distance between the delivery vehicle at a certain moment when it is located at the delivery starting point and the subsequent node of the order. The specific judgment method of the W&I strategy is as follows:
[0060] S321: When a delivery vehicle is at the delivery origin, if no orders are generated, it will continue to wait at the delivery origin; at time t, the order sequence... It started to appear. The longest delivery distance for an order that has already been placed is R. max (t,l max ), R max (t,l max The successor node k of ) max The distance between the delivery origin o and the delivery point o is l kmax If t≥2l kmax The delivery vehicles immediately set off to deliver the existing order sequence. And ignore all new orders that occur during delivery; if t < 2l kmax The delivery vehicle will wait at the delivery point until the current time and 2l kmax The delivery will only begin when all orders are equal, and once it begins, all orders placed during the delivery process will be ignored.
[0061] S322: Delivery vehicle departs to deliver the order sequence consisting of all currently occurring orders. At that time, an optimal route will be calculated according to step S324 to proceed with the delivery; when the delivery vehicle has completed its deliveries... If no new demand arises and no new demand is released during the delivery process, the delivery vehicle will immediately return to the delivery origin at the next turning intersection and wait until a new order appears.
[0062] S323: If there are no orders in the order pool, the delivery vehicle waits at the delivery starting point;
[0063] S324: An initial solution is generated based on a set of real-time order sequence locations formed by the W&I algorithm. The optimal pick-up and delivery route of the initial solution is obtained using the Genetic Algorithm (GA). The deliveryman starts delivering the orders that need to be delivered according to the route.
[0064] The beneficial effects of this invention are as follows: This invention can improve and enhance the efficiency of last-mile delivery vehicles. Under the premise of ensuring that delivery personnel comply with traffic rules, it improves delivery efficiency through order consolidation and vehicle route optimization. Its algorithm will provide theoretical support for the scientific scheduling of large-scale real-time orders and optimize the route of last-mile delivery vehicles, thereby reducing the overall delivery cost of last-mile delivery vehicles.
[0065] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0066] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0067] Figure 1 This is a flowchart of the last-mile delivery route optimization method for large-scale customers according to the present invention;
[0068] Figure 2 This is a flowchart of the greedy algorithm of the present invention.
[0069] Figure 3 This is a flowchart of the W&I algorithm of the present invention. Detailed Implementation
[0070] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0071] Please see Figures 1-3 This invention provides a method for optimizing last-mile delivery routes for large-scale customers. Addressing situations with numerous customer orders and the real-time and uncertain nature of order information, delivery personnel should select appropriate routes for pickup and delivery services to minimize the total time spent delivering all orders and returning to the delivery origin. The method specifically includes the following steps:
[0072] S1: In response to the real-time nature of customer orders and the actual delivery scenario where delivery vehicles need to return to the delivery origin to pick up goods, construct a real-time pickup and delivery route optimization problem for a large number of customers.
[0073] The problem is described in detail below:
[0074] (1) Given a network graph G.
[0075] (2) Assume that all order points that need to be delivered are R i =(t i ,li The orders are randomly distributed on this network graph G, and the resulting order sequence is denoted as... n represents the number of orders that occurred, R i =(t i ,l i ) indicates order R i In t i Distance from delivery origin at any time i Released at the point, because real-world roads have turning restrictions, the network graph G consists of different nodes k. i Interconnected, For order R i The subsequent reversible node, i.e., order R i When moving between nodes in the current direction, the next steerable node at the current position and direction, k i Indicates order R i Only at the distance from the delivery origin Turn and make a U-turn at this location.
[0076] (3) Assume that after each order is generated, the delivery vehicle must pick up the goods from the delivery starting point in order to deliver the generated order; at time zero, the delivery vehicle is at the delivery starting point and will then depart at a unit speed to deliver the generated order. All orders in the order sequence must be delivered, and after all orders are delivered, the delivery vehicle is required to return to the delivery starting point.
[0077] (4) All vehicles travel at a uniform speed v.
[0078] (5) Regardless of order creation time, a demand is considered fulfilled when the delivery vehicle passes the demand point. After each new demand is released, the vehicle must return to the delivery origin to pick up the goods before it can fulfill the new order. All orders must be fulfilled.
[0079] (6) The goal is to minimize the total delivery time for all orders.
[0080] S2: Construct a real-time order path optimization model for end customers with the goal of minimizing total order delivery time, and set constraints on the objective function of the optimization model.
[0081] The overall objective function of the constructed end-customer real-time order path optimization model is:
[0082]
[0083] Equation (1) is the objective function, which represents the average completion time of each order. It is used to establish an instant delivery model that considers the average time to complete all orders and the delivery network with turning restrictions when order demand occurs in real time.
[0084] In equation (1), O = {o1, o2, ..., o} i} represents the sequence of orders; N = {n0, n1, n2, ..., n i} represents the set of all nodes, where i = 0 represents the distribution center, and i = 1, 2, ..., n represent the next reversible node for the order point requiring service. This represents the order information, where r i Indicates the order release time, d i This represents the coordinates of order i. Indicates the exact moment when demand is released;
[0085] The constraints set for the objective function of the optimization model are as follows:
[0086]
[0087]
[0088]
[0089]
[0090]
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099]
[0100]
[0101]
[0102] In the above constraints: k represents the k-th delivery person, k∈K, and K represents the number of delivery people; x ijk Indicates whether order j is delivered by the k-th delivery person on the i-th route; 1 indicates yes, 0 indicates no. ijThis represents the load from the completion of the previous service node to the next order j; Q represents the delivery capacity limit of the delivery person, with each customer's demand being 1; s i This represents the time spent on service order i; Indicates the time of arrival at the pickup point; This represents the time to arrive at the client node; M represents a sufficiently large positive number. Indicates order o i Actual delivery time; t i Indicates order o i The actual pickup time; I represents the set of orders i; t∈T represents the current time t, which is discretized, and T represents the set of current times; l ij This represents the distance from node i to node j.
[0103] Equation (2) means that each order in all paths must be served and served only once;
[0104] Equation (3) indicates that each order must be served once throughout the entire discrete time period;
[0105] Equation (4) represents the delivery capacity limit for a delivery person at any given time;
[0106] Equation (5) indicates that among all delivery routes, the delivery person can only choose one delivery route;
[0107] Equation (6) indicates that an order will only appear on the route if it is assigned to a delivery person;
[0108] Equations (7) and (8) indicate that the delivery person may wait at the starting point during the delivery process, so the pickup time and delivery time of each order are not less than the earliest time when the delivery person travels to the pickup point and the customer node;
[0109] Equation (9) indicates that when the k-th path is selected, y ik The value of is 1 throughout the service time period of order j;
[0110] Equations (10) and (11) indicate that the pickup time for each order must be earlier than its delivery time and later than its release time;
[0111] Equation (12) indicates that the actual delivery time of an order cannot be earlier than its release time;
[0112] Equation (13) indicates that the current time must be within the order O i The condition is met after the goods are picked up and before they are delivered to the customer. The variable will then take the value 1;
[0113] Equation (14) indicates that in an asymmetric network structure, the distances between nodes i and j may not be equal;
[0114] Equations (15) and (16) indicate that the next node of an order must be n. i ;
[0115] Equation (17) represents the decision variable constraints; the decision variables are as follows: This indicates whether the j-th delivery person visited the i-th order on the k-th path. If so, then... Conversely, it is 0; x it This indicates whether the delivery person is serving an order at time t. i If so, x it =1, otherwise 0.
[0116] S3: For new real-time orders added by customers during the delivery process, a rolling time-domain algorithm for last-mile real-time orders is adopted. A greedy algorithm and a W&I (Wait and Ignore) algorithm are designed for delivery vehicles to allocate new orders in real time. An initial solution is generated based on a set of real-time order sequence positions formed by the dynamic algorithm. Then, the optimal delivery route for the delivery vehicle is obtained by using a genetic algorithm (GA).
[0117] Specifically, the rolling time domain algorithm divides the problem into multiple time periods, with each time period considering only a portion of the decisions rather than solving all decisions at once. The decision results of each time period serve as the initial values for the next time period. The decision results are continuously updated through iteration until the global optimal solution is obtained. Then, a genetic algorithm is used to find the optimal path after the customer orders are allocated in each time period, and the delivery is then carried out by the transport vehicles.
[0118] The greedy algorithm requires the delivery driver to determine whether to return to the delivery origin immediately after serving the next customer's order when a new order arrives. It also considers the relationship between the return time and the new path formed by currently undelivered orders to determine whether to wait at the delivery origin before setting off again. The delivery steps are as follows:
[0119] S311: If no new orders are generated when the delivery driver is at the delivery origin, the driver will continue to wait at the origin, and the demand orders will accumulate until time t, at which point the order sequence will be updated. When the current order begins to appear, step S313 is used to calculate an optimal path τ to deliver all orders that have appeared but not yet been delivered, and then the delivery origin is returned. The length of path τ is denoted as |τ|. If at the current time... The delivery driver immediately sets off to deliver the currently occurring order sequence. If a new order appears during the delivery route, the driver immediately determines, according to step S312, whether to immediately return to the delivery origin along the shortest path to pick up the order and wait. If... The delivery person will wait at the delivery point until the current time. If the orders are equal, the delivery person will depart again. If a new order appears during the delivery process, the delivery person should immediately determine whether to return to the delivery origin along the shortest path to pick up the goods and wait, according to step S312.
[0120] S312: Assume t i At time x, a new order R appears. i =(t i (x), where the successor node of x is k. x At this point, the delivery person is calculating all orders that have appeared but not yet been delivered according to step S313, and returning to the optimal path τ from the delivery origin to make deliveries. Let the length of path τ be |τ|. The delivery person's current position is y, and the subsequent order point of y is k. y ;τ' represents the delivery person at k y After returning to the delivery origin, immediately recalculate the optimal path τ' for all orders that have appeared but have not yet been delivered according to step S313 and return to the delivery origin. Deliver all orders that have appeared but have not yet been delivered. The length of path τ' is denoted as |τ'|.
[0121] (1) If d(o,k) y )+d(k y ,o)+|τ'|-|τ|≤d(o,k x )+d(k x After the delivery person reaches the successor node of the current location, they immediately return to the delivery origin to pick up the goods and proceed to step S311; if a new order is released during the delivery person's return to the delivery origin, the order is ignored; where d(o,k) y d(k) represents the path of the delivery person from the starting point to node i, where d(k) represents the path of the delivery person from the starting point to node i. y ,o) represents the path from node i back to the starting point.
[0122] (2) If d(o,k) y )+d(k y ,o)+|τ'|-|τ|>d(o,k x )+d(k x The delivery person ignored R. i Continue delivering along route τ, and after delivering all orders for this time, return to the delivery origin and proceed to step S311;
[0123] S313: Generate an initial solution based on a set of real-time order sequence locations obtained by the greedy algorithm. Use the genetic algorithm (GA) to find the optimal pick-up and delivery route for this initial solution. The deliveryman then starts delivering the orders that need to be delivered based on the route.
[0124] The W&I algorithm makes action decisions based on the relationship between the distance between the delivery vehicle at a certain moment when it is located at the delivery starting point and the subsequent node of the order. The specific judgment method of the W&I strategy is as follows:
[0125] S321: When a delivery vehicle is at the delivery origin, if no orders are generated, it will continue to wait at the delivery origin; at time t, the order sequence... It started to appear. The longest delivery distance for an order that has already been placed is R. max (t,l max ), R max (t,l max The successor node k of ) max The distance between the delivery origin o and the delivery point o is l kmax If t≥2l kmax The delivery vehicles immediately set off to deliver the existing order sequence. And ignore all new orders that occur during delivery; if t < 2l kmax The delivery vehicle will wait at the delivery point until the current time and 2l kmax The delivery will only begin when all orders are equal, and once it begins, all orders placed during the delivery process will be ignored.
[0126] S322: Delivery vehicle departs to deliver the order sequence consisting of all currently occurring orders. At that time, an optimal route will be calculated according to step S324 to proceed with the delivery; when the delivery vehicle has completed its deliveries... If no new demand arises and no new demand is released during the delivery process, the delivery vehicle will immediately return to the delivery origin at the next turning intersection and wait until a new order appears.
[0127] S323: If there are no orders in the order pool, the delivery vehicle waits at the delivery starting point;
[0128] S324: An initial solution is generated based on a set of real-time order sequence locations formed by the W&I algorithm. The optimal pick-up and delivery route of the initial solution is obtained using the Genetic Algorithm (GA). The deliveryman starts delivering the orders that need to be delivered according to the route.
[0129] Finally, it should be noted that 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A method for optimizing last-mile delivery routes for large-scale customers, characterized in that, The method specifically includes the following steps: S1: In response to the real-time nature of customer orders and the actual delivery scenario where delivery vehicles need to return to the delivery origin to pick up goods, construct a real-time pickup and delivery route optimization problem for a large number of customers; S2: Construct a real-time order path optimization model for end customers with the goal of minimizing total order delivery time, and set constraints on the objective function of the optimization model; S3: For real-time orders added by customers during the delivery process, a rolling time-domain algorithm for last-mile real-time orders is adopted. A greedy algorithm and a W&I algorithm are designed for delivery vehicles to allocate real-time new orders. An initial solution is generated based on a set of real-time order sequence positions formed by the dynamic algorithm. Then, a genetic algorithm is used to solve for the optimal delivery route of the delivery vehicle. Among them, the W&I algorithm is an algorithm that ignores order service when waiting. The rolling time domain algorithm specifically divides the problem into multiple time periods, with each time period considering only a portion of the decisions rather than solving all decisions at once. The decision results of each time period serve as the initial values for the next time period. The decision results are continuously updated through iteration until the global optimal solution is obtained. Then, a genetic algorithm is used to find the optimal path after the customer orders are allocated in each time period, and the delivery is then carried out by the transport vehicles. The greedy algorithm involves the delivery driver determining whether to return to the delivery origin immediately after serving the next customer's order when a new order arrives. It also considers the relationship between the return time and the new path formed by currently undelivered orders to determine whether to wait at the delivery origin before setting off again. The delivery steps are as follows: S311: If no new orders are received while the delivery driver is at the delivery origin, the driver will continue to wait at the origin, and the demand for orders will accumulate until the specified time. At that time, order sequence When the path begins to appear, an optimal path is calculated using step S313. Deliver all orders that have appeared but not yet been delivered, return to the delivery origin, and record the route. The length is If at the current moment The delivery driver immediately sets off to deliver the currently occurring order sequence. If a new order appears during the delivery route, the driver immediately determines, according to step S312, whether to immediately return to the delivery origin along the shortest path to pick up the order and wait. If... The delivery person will wait at the delivery point until the current time. If the orders are equal, the delivery person will depart again. If a new order appears during the delivery process, the delivery person should immediately determine whether to return to the delivery origin along the shortest path to pick up the goods and wait, according to step S312. S312: Assumption At that moment, A new order has appeared. , The successor node is At this point, the delivery person is calculating all orders that have appeared but not yet been delivered according to step S313, and returning to the optimal route from the delivery origin. Conduct delivery and record the route. The length is The delivery person's current location is , The subsequent order point is ; For delivery personnel After returning to the delivery origin, immediately recalculate the optimal path for all currently generated but undelivered orders according to step S313 and return to the delivery origin. Record the route for all orders that have been generated but not yet delivered. The length is ; (1) If After the delivery driver reaches the next node at the current location, they immediately return to the delivery origin to pick up the goods, proceeding to step S311; if a new order is released during the delivery driver's return journey, that order is ignored; where, This indicates the distance the delivery person travels from the origin to the destination. i The path, Indicates from node i The path back to the starting point; (2) If The deliveryman ignored Continue following the path Delivery is completed, and after all orders in this delivery are delivered, the delivery origin is returned to the delivery point, proceeding to step S311; S313: Generate an initial solution based on a set of real-time order sequence locations obtained by the greedy algorithm, and use a genetic algorithm to find the optimal pick-up and delivery route for this initial solution. The deliveryman then starts delivering the orders that need to be delivered based on the route. The W&I algorithm makes action decisions based on the relationship between the distance between the delivery vehicle at a certain moment when it is located at the delivery starting point and the subsequent node of the order. The specific judgment method of the W&I strategy is as follows: S321: If no orders are received when the delivery vehicle is at the delivery origin, it will continue to wait at the delivery origin; Order sequence It started to appear. The longest delivery distance for orders already received is [number]. , successor node and delivery origin The distance between them is ;if The delivery vehicles immediately set off to deliver the existing order sequence. And ignore all new orders that occur during delivery; if The delivery vehicle will wait at the delivery point until the current time. The delivery will only begin when all orders are equal, and once it begins, all orders placed during the delivery process will be ignored. S322: Delivery vehicle departs to deliver the order sequence consisting of all currently occurring orders. At that time, an optimal route will be calculated according to step S324 to proceed with the delivery; when the delivery vehicle has completed its deliveries... If no new demand arises and no new demand is released during the delivery process, the delivery vehicle will immediately return to the delivery origin at the next turning intersection and wait until a new order appears. S323: If there are no orders in the order pool, the delivery vehicle waits at the delivery starting point; S324: An initial solution is generated based on a set of real-time order sequence locations formed by the W&I algorithm. The optimal pick-up and delivery route of the initial solution is obtained using a genetic algorithm. The deliveryman then starts delivering the orders that need to be delivered based on the route.
2. The last-mile delivery route optimization method according to claim 1, characterized in that, Step S1 involves constructing a real-time pickup and delivery route optimization problem for a large number of customers, specifically including the following steps: S11: Given a network graph G; S12: Assume all order points that need delivery Randomly distributed across the network graph G, the resulting order sequence is denoted as... , This indicates the number of orders that have occurred. Indicates order exist Distance from delivery origin Released at the point, because real-world roads have turning restrictions, the network graph G consists of different nodes. Interconnected, For orders The subsequent reversible node, i.e., the order. When moving between nodes in the current direction, the next steerable node at the current position and direction. Indicates order Only at the distance from the delivery origin Turn and make a U-turn at the location; S13: Assume that after each order is generated, the delivery vehicle must pick up the goods from the delivery origin before it can deliver the generated order; at time zero, the delivery vehicle is at the delivery origin and will then depart at a unit speed to deliver the generated orders. All orders in the order sequence must be delivered. After all orders are delivered, the delivery vehicle is required to return to the delivery origin. All vehicles travel at a uniform speed; regardless of order preparation time, the demand is considered fulfilled when the delivery vehicle passes the demand point.
3. The last-mile delivery route optimization method according to claim 2, characterized in that, In step S2, the overall objective function of the constructed end-customer real-time order path optimization model is: (1) Equation (1) is the objective function, which represents the average completion time of each order. It is an instant delivery model that considers the average time to complete all orders and the delivery network with turning restrictions when order demand occurs in real time. In equation (1), This represents a sequence of orders; Denotes the set of all nodes, where Indicates distribution center, This indicates the next redirectable node for the order point requiring the service. Information indicating the order, including Indicates the order release time. Indicates order coordinates Indicates the exact moment when demand is released; The constraints set for the objective function of the optimization model are as follows: (2) (3) (4) (5) (6) (7) (8) (9) (10) (11) (12) (13) (14) (15) (16) (17) Among the above constraints: k Indicates the first k One deliveryman, , K Indicates the number of delivery personnel; Indicates whether the delivery was made by the k-th delivery person in the k-th delivery phase. i Delivery orders via specific routes j If it is 1, then it is 0; Indicates the time from the last completed service node to i Next order j Load capacity; This indicates the delivery capacity limit for the delivery person; the demand for each customer is 1. Indicates service order i The time spent; Indicates the time of arrival at the pickup point; Indicates the time of arrival at the customer node; M Represents a sufficiently large positive number; Indicates order The actual delivery time; Indicates order The actual pickup time; I Indicates order i A set; Indicates the current time Discretize it. A set representing the current time; Represents a node i arrive j The distance; Equation (2) means that each order in all paths must be served and served only once; Equation (3) indicates that each order must be served once throughout the entire discrete time period; Equation (4) represents the delivery capacity limit for a delivery person at any given time; Equation (5) indicates that among all delivery routes, the delivery person can only choose one delivery route; Equation (6) indicates that an order will only appear on the route if it is assigned to a delivery person; Equations (7) and (8) indicate that the delivery person may wait at the starting point during the delivery process, so the pickup time and delivery time of each order are not less than the earliest time when the delivery person travels to the pickup point and the customer node; Equation (9) indicates that when the first When a path is selected, The value in the order During the service period, take 1; Equations (10) and (11) indicate that the pickup time of each order must be earlier than its delivery time and later than its release time; Equation (12) indicates that the actual delivery time of an order cannot be earlier than its release time; Equation (13) indicates that the current time must be within the order period. The condition is met after the goods are picked up and before they are delivered to the customer. Only then will the variable take the value of 1; Equation (14) represents that in an asymmetric network structure, node i, j The distances between them may not be equal; Equations (15) and (16) indicate that the next node of an order must be ; Equation (17) represents the decision variable constraints; The decision variables are as follows: Indicates the first Did the deliveryman in the [number]th [day / month]...? The path visited the first One order, if so, then Conversely, it is 0; Indicates that the delivery person is Is the order being served at any given time? ,if, Conversely, it is 0.
Citation Information
Patent Citations
Vehicle path optimization method for dynamically changing customer demands in express delivery
CN110674968A
Tail end distribution path planning method for new customer two-stage entry
CN115689431A