Order delivery route planning method, device, computer medium and electronic device
By obtaining node and vehicle status information, using greedy algorithms and destroy reconstruction algorithms to optimize the electric vehicle path, the shortcomings of electric vehicle path planning in the existing technology are solved, and the cost optimization effect is achieved in large-scale scenarios.
Patent Information
- Application Number
- CN201910412862.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2039-05-17
AI Technical Summary
The existing technology lacks solutions for large-scale electric vehicle path planning, especially electric vehicle path planning with energy addition points, and cannot effectively solve the problem of electric vehicle path optimization in practical applications.
By obtaining the actual status information of nodes and delivery vehicles, the greedy algorithm is used to determine the primary path set, and the order delivery point is optimized by destroying the reconstruction algorithm, combining density clustering algorithm and iterative computing strategies, the path set is optimized to reduce delivery costs.
The accuracy and applicability of path planning are improved. The optimized path collection further reduces distribution costs on the basis of ensuring feasibility, and is suitable for large-scale electric vehicle path planning in practical applications.
Smart Images

Figure CN111950950B_ABST
Abstract
Description
Background Art
[0002] The Vehicle Routing Problem (VRP) refers to a certain number of customers, each of whom has different demands for goods. A distribution center provides goods to customers, and a fleet is responsible for delivering the goods and organizing appropriate driving routes. The goal is to meet customer needs and achieve goals such as shortest distance, minimum cost, and least time under certain constraints.
[0003] As people's environmental awareness increases, green travel is an advocated mode of travel. For example, cargo delivery by fuel-consuming vehicles is gradually developing towards cargo delivery by clean vehicles (such as electric vehicles, clean energy vehicles, etc.). Therefore, the following can be explained by taking the VRP in the process of electric vehicles delivering orders (goods, items) to customers as an example, which can also be called the Electric Vehicle Routing Problem (EVRP). Among them, the use of electric vehicles to achieve order delivery requires the use of energy addition to maintain sufficient electric vehicle capacity, thereby ensuring the smooth delivery of orders. Therefore, electric vehicle travel with energy addition points (such as charging piles, etc.) is a novel business scenario. Planning the best possible vehicle travel route to meet this business scenario is of great significance to capacity costs, delivery timeliness, etc.
[0004] However, the existing patents and literature in the existing related technologies lack solutions for the distribution path of large-scale new energy electric vehicles, especially the research on the path planning of electric vehicles with energy addition points (such as charging piles, etc.) is relatively small. At the same time, the existing related technologies do not involve large-scale EVRP problems that appear in actual scenarios and actual project applications. Therefore, a solution to the EVRP problem suitable for practical applications is urgently needed.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the embodiments of the present disclosure is to provide a method for planning an order delivery path, a device for planning an order delivery path, and a computer-readable storage medium and an electronic device for implementing the method for planning an order delivery path, thereby at least providing a solution to the EVRP problem suitable for practical applications.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to a first aspect of an embodiment of the present disclosure, a method for planning an order delivery path is provided, comprising:
[0009] Acquire first actual status information about nodes and second actual status information about delivery vehicles, the nodes including: a delivery center site, an energy addition point, and an order delivery point;
[0010] Determine a preliminary path set according to the first actual state information and the second actual state information;
[0011] The order delivery points in at least one path in the preliminary path set are optimized by destroying and rebuilding the algorithm, so as to plan the preliminary path set to obtain an optimized path set.
[0012] In some embodiments of the present disclosure, based on the aforementioned solution, the delivery vehicle is an electric vehicle, and the energy addition point is a charging station including at least one charging pile.
[0013] In some embodiments of the present disclosure, based on the aforementioned solution, the first actual state information includes: at least one of navigation information between the nodes, distance information, time information required to reach different nodes, and time window constraint information of the nodes;
[0014] The second actual status information includes: at least one of the maximum load capacity, maximum load weight, and cruising range of the delivery vehicle.
[0015] In some embodiments of the present disclosure, based on the above solution, determining a preliminary path set according to the first actual state information and the second actual state information includes:
[0016] Determining first vector information related to the first actual state information, and second vector information related to the second actual state information;
[0017] The first vector information and the second vector information are input into a greedy algorithm, and a preliminary path set is determined according to an output of the greedy algorithm.
[0018] In some embodiments of the present disclosure, based on the above solution, the order delivery points in at least one path in the preliminary path set are optimized by destroying and reconstructing the algorithm to plan the preliminary path set to obtain an optimized path set, including:
[0019] According to a density-based clustering algorithm, a preset number of destruction points are determined from the order delivery points in the preliminary path set, and the destruction points are removed from the preliminary path set by a removal operation to obtain an intermediate path set;
[0020] The destruction point is inserted into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set.
[0021] In some embodiments of the present disclosure, based on the above solution, inserting the destruction point into the intermediate path set based on a preset strategy includes:
[0022] Based on the iterative calculation strategy, the destruction point is inserted into the intermediate path set according to the comparison result of the distribution cost change of the path set before and after the i-th insertion operation; wherein i is a positive number greater than or equal to 1 and less than or equal to the preset number of iterations.
[0023] In some embodiments of the present disclosure, based on the above solution, according to the comparison result of the distribution cost change of the path set before and after the i-th insertion operation, the destruction point is inserted into the intermediate path set, including:
[0024] For the set of preliminary selected routes, calculating the delivery cost as a standard value;
[0025] Inserting the destruction point into the intermediate path set for the i-th time to obtain the path set to be evaluated after the i-th insertion operation;
[0026] For the set of paths to be evaluated after the i-th insertion operation, calculating the delivery cost as an alternative value;
[0027] In response to the candidate value being greater than the standard value, then:
[0028] Recording the set of paths to be evaluated after the i-th insertion operation;
[0029] The standard value is updated using the alternative value, and the destruction point is inserted into the intermediate path set for the i+1th time until the number of iterations reaches the preset number of iterations, and the recorded path set to be evaluated is returned as the optimized path set.
[0030] In some embodiments of the present disclosure, based on the above solution, the above order delivery path planning method further includes:
[0031] In response to the candidate value being less than or equal to the standard value, the destruction point is inserted into the intermediate path set for the (i+1)th time.
[0032] In some embodiments of the present disclosure, based on the above solution, inserting the destruction point into the intermediate path set based on a preset strategy includes:
[0033] For any destruction point to be inserted, an insertion score is performed according to the following formula, and each destruction point is inserted into the intermediate path set according to the insertion score;
[0034]
[0035] Among them, f(x|x p ,w 0 ,w 1 ) represents the intermediate path set score,
[0036] x represents the destruction point to be inserted, x p Indicates the priority of the destruction point x to be inserted,
[0037] w 0 、w 1 They represent the optimal delivery cost value and the suboptimal delivery cost value of the path before inserting the destruction point x, respectively, and satisfy w 0 <w 1 ,
[0038] y、 is the empirical value, where y is 11.
[0039] s(x,w 0 ) is the destruction point x and the current optimal distribution cost value w 0 The cost calculation subfunction is the same as w 0 The corresponding path starting position, path ending station position, time window distance, and time window parameters are related.
[0040] According to a second aspect of an embodiment of the present disclosure, there is provided a device for planning an order delivery path, comprising:
[0041] A status information acquisition module, used to acquire first actual status information about a node and second actual status information about a delivery vehicle, wherein the node includes: a delivery center site, an energy adding point, and an order delivery point;
[0042] a preliminary path set determining module, configured to determine a preliminary path set according to the first actual state information and the second actual state information;
[0043] The path optimization module is used to optimize the order delivery points in at least one path in the preliminary path set by destroying and rebuilding the algorithm, so as to plan the preliminary path set to obtain an optimized path set.
[0044] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for planning an order delivery path as described in the first aspect of the above embodiment is implemented.
[0045] According to the fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the order delivery path planning method as described in the first aspect of the above embodiment.
[0046] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0047] In the technical solutions provided by some embodiments of the present disclosure, on the one hand, a preliminary path set is determined based on the actual status information about nodes (including: distribution center sites, energy addition points, order delivery points) and the actual status information about distribution vehicles. The path set determined by the actual information is conducive to improving the accuracy and applicability of the path planning results, thereby providing a high-quality path planning solution for practical applications. On the other hand, after the preliminary path set is determined, the order delivery points in the preliminary path set are optimized by destroying and reconstructing the algorithm to achieve the effect of optimizing the path set. The optimized path set can further reduce the distribution cost on the basis of ensuring the feasibility of the path.
[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0050] Figure 1 A schematic diagram schematically shows a method for planning an order delivery route in the prior art;
[0051] Figure 2 A diagram schematically shows a usage scenario of EVRP according to an embodiment of the present disclosure;
[0052] Figure 3 A schematic diagram schematically shows a flow chart of a method for determining a set of preliminary selected paths according to an embodiment of the present disclosure;
[0053] Figure 4 A schematic diagram schematically illustrates a flow chart of a path optimization method according to an embodiment of the present disclosure;
[0054] Figure 5A schematic diagram schematically shows the cluster distribution of order delivery points according to an embodiment of the present disclosure;
[0055] Figure 6 A schematic diagram schematically shows a flow chart of a method for determining a set of preliminary selected paths according to an embodiment of the present disclosure;
[0056] Figure 7 The structure diagram of the device for planning an order delivery path according to an embodiment of the present disclosure is schematically shown;
[0057] Figure 8 A computer-readable storage medium is schematically shown for implementing the above-mentioned order delivery path planning method; and,
[0058] Fig. 9 An example block diagram of an electronic device for implementing the above-mentioned order delivery path planning method is schematically shown. DETAILED DESCRIPTION
[0059] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete and will fully convey the concept of the example embodiments to those skilled in the art.
[0060] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0061] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0062] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0063] Figure 1The flowchart of the method for planning an order delivery path according to an embodiment of the present disclosure is schematically shown, which can at least provide a solution to the EVRP problem suitable for practical application.
[0064] Among them, the execution subject of the order delivery path planning method provided in this embodiment can be a device with computing and processing functions, such as a server.
[0065] refer to Figure 1 The order delivery path planning method provided in this embodiment includes:
[0066] Step S101, obtaining first actual status information about nodes and second actual status information about delivery vehicles, the nodes including: a delivery center site, an energy adding point, and an order delivery point;
[0067] Step S102, determining a preliminary path set according to the first actual state information and the second actual state information; and,
[0068] Step S103, optimizing and processing the order delivery points in at least one path in the preliminary path set by a destruction and reconstruction algorithm, so as to plan the preliminary path set to obtain an optimized path set.
[0069] exist Figure 1 In the technical solution provided by the illustrated embodiment, on the one hand, a preliminary path set is determined based on the actual status information about the nodes (including: distribution center sites, energy addition points, order delivery points) and the actual status information about the delivery vehicles. The path set determined by the actual information is conducive to improving the accuracy and applicability of the path planning results, thereby providing a high-quality path planning solution for practical applications. On the other hand, after the preliminary path set is determined, the order delivery points in the preliminary path set are optimized by destroying and reconstructing the algorithm to achieve the effect of optimizing the path set. The optimized path set can further reduce the distribution cost on the basis of ensuring the feasibility of the path.
[0070] The following Figure 1 The specific implementation of each step in the illustrated embodiment is described in detail.
[0071] In an exemplary embodiment, the delivery vehicle is an electric vehicle, and the energy adding point is a charging station including at least one charging pile. In the process of using electric vehicles to deliver orders, the electric vehicles are charged in time through the charging station piles to maintain sufficient electric vehicle capacity, thereby ensuring accurate delivery of the orders.
[0072] For example, Figure 2 The following schematically shows a usage scenario of EVRP according to an embodiment of the present disclosure. Figure 2, including at least one distribution center site 20, the distribution vehicle loads the goods (orders) from the distribution center site 20, and further delivers the orders to various order delivery points (order delivery point 21, order delivery point 22, ..., order delivery point 28). During the delivery of the order by the electric vehicle, it can be charged through the energy adding point 21', the energy adding point 22' or the energy adding point 23' to ensure that the order is successfully delivered to the corresponding order delivery point, and after the electric vehicle completes the delivery of the order to the corresponding order delivery point, there is still power to return to the distribution center site 20.
[0073] It should be noted that the distribution center site in the EVRP scenario is not limited to one, and the delivery vehicle starts from a distribution center site to deliver orders and can return to any distribution center site. In the embodiment of the present disclosure, a distribution center site 20 is used as an example for explanation, that is, the delivery vehicle starts from the distribution center site 20 to deliver orders and can return to the distribution center site 20.
[0074] In an exemplary embodiment, the first actual state information about the node and the second actual state information about the delivery vehicle are obtained in step S101, so as to be used in determining the preliminary path set in step S102. The first actual state information includes, but is not limited to: navigation information between the nodes (e.g., navigation path from the distribution center site 20 to the order delivery point 21 according to the actual road conditions, or navigation path from the order delivery point 21 back to the distribution center site 20, etc.), distance information between the nodes (e.g., actual path distance from the distribution center site 20 to the order delivery point 21 according to the actual road conditions, etc.), time information required to reach different nodes, time window constraint information of different nodes (e.g., the time window for the order delivery point 22 is 9:30-11:30, if the delivery vehicle arrives at 9:00, the delivery vehicle needs to wait in advance of the earliest time of the time window, thereby increasing the delivery cost), etc. Exemplarily, the first actual state information can be obtained by crawling the road condition information of the actual physical road network to obtain the first actual state information. By implementing EVRP path planning through actual road condition information, the planned path can have practical significance, thereby improving applicability and further enhancing user experience.
[0075] In an exemplary embodiment, the second actual status information includes, but is not limited to: the maximum load capacity, maximum load weight, and cruising range of the delivery vehicle.
[0076] In an exemplary embodiment, in step S102 , a preliminary path set is determined according to the first actual state information and the second actual state information. Figure 3The flowchart of the method for determining the preliminary selected path set according to the embodiment of the present disclosure is schematically shown, which can be used in a specific implementation of step S102. Figure 3 , the method comprising:
[0077] Step S301, determining first vector information related to the first actual state information, and second vector information related to the second actual state information; and,
[0078] Step S302: input the first vector information and the second vector information into a greedy algorithm, and determine a preliminary path set according to an output of the greedy algorithm.
[0079] In an exemplary embodiment, the first actual state information / the second actual state information is related to the constraints that the planned path must satisfy. In this embodiment, the first actual state information is converted into related first vector information, and the second actual state information is converted into related second vector information. Thus, the vector information is used as input data of the greedy algorithm. The initial set of primary selected paths is determined according to the output of the greedy algorithm. According to the first actual state information / the second actual state information, the output of the greedy algorithm satisfies the following constraints:
[0080] Fulfillment time window constraint: if the vehicle arrives at the earliest time of the time window in advance, the vehicle must wait, thus increasing the delivery cost due to waiting;
[0081] Maximum load capacity constraints of vehicles;
[0082] Maximum load limit of the vehicle;
[0083] The mileage constraint of electric vehicles ensures that the battery level of the vehicle is greater than 0 before it reaches the charging station, otherwise it is considered an infeasible solution.
[0084] For example, refer to Figure 2 , about one of the delivery paths that meets the preset constraints: delivery center site 20 – path 201 – order delivery point 24 – path 202 – energy addition point 22' – path 203 – order delivery point 27 – path 203 – delivery center site 20. In this process, if the delivery vehicle does not pass through energy addition point 22' after successfully delivering the order to point 24, but directly goes to the next order delivery point 27 through path 205, the delivery may fail because the cruising range cannot meet the requirements of reaching the next order delivery point 27. Therefore, the delivery path corresponding to order delivery point 24 – path 205 – order delivery point 27 can be considered as an infeasible solution.
[0085] In an exemplary embodiment, after the first vector information and the second vector information are input into the greedy algorithm, a preliminary path set can be determined according to the output of the greedy algorithm, wherein each path in the initial path set meets the above constraint conditions.
[0086] exist Figure 3 In the technical solution provided by the illustrated embodiment, the initial path set is determined based on a greedy algorithm. Specifically, the above-mentioned actual state information can be used to construct constraint conditions as the input of the greedy algorithm, so that the output of the greedy algorithm can determine the above-mentioned initial path set. The technical solution provided in this embodiment is based on the actual physical road condition information crawling point and the node-related distance data, navigation data, time data, etc. (first actual state information), as well as the performance of the delivery vehicle itself (second actual state information), and has good applicability in large EVRP scenarios with more than 1,500 nodes.
[0087] The set of preliminary selected paths obtained in step S102 can be used as a set of initial solutions to optimize the paths based on the initial solutions (ie, step S103), so as to further save the distribution cost while satisfying the constraints.
[0088] Continue to view Figure 1 In step S103, the order delivery points in at least one path in the preliminary path set are optimized by destroying and reconstructing the algorithm to plan the preliminary path set to obtain an optimized path set.
[0089] The Ruin and Recreate algorithm refers to an iterative algorithm that determines a better solution from the initial solution. Specifically, the better solution is searched from the initial solution through iterative operations, wherein the iterative process generally includes: selecting a set of destroyed nodes, i.e., the destruction points, through the Ruin strategy, and then inserting the destruction points into the path again through the Recreate strategy to make the result better (specifically, lower distribution costs in this technical solution).
[0090] In this technical solution, the above-mentioned Ruin and Recreate algorithm is used, specifically including: based on the initial solution (preliminary path set), a better solution is found through the Ruin strategy and the Recreate strategy, that is, an iterative search for the path set with the lowest delivery cost, that is, the optimization of the preliminary path is realized to obtain the optimized path set. When the delivery vehicle uses the optimized path set to deliver orders, it can not only meet the preset constraints, but also minimize the delivery cost.
[0091] In an exemplary embodiment, Figure 4The schematic diagram of the flow chart of the path optimization method according to the embodiment of the present disclosure is schematically shown, which can be used for a specific implementation of step S103. Specifically, based on the initial solution (preliminary path set), a better solution is found through the Ruin and Recreate strategy, and the optimal solution is iteratively searched to find a better planning path that meets the optimization conditions. The iterative process includes: selecting a destroyed node set (destruction point) through the Ruin strategy, and then inserting the destruction point into the path again through the Recreate strategy.
[0092] Specific reference Figure 4 , the method comprising:
[0093] Step S401, determining a preset number of destruction points from the order delivery points in the preliminary path set according to a density-based clustering algorithm;
[0094] Step S402, removing the destruction point from the preliminary path set by a removal operation to obtain an intermediate path set; and
[0095] Step S403: inserting the destruction point into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set.
[0096] In an exemplary embodiment, the destruction points are part of the order delivery points in the preliminary path set. Since the distribution positions of these order delivery points in the current path result in the current delivery cost not being optimal, it is necessary to determine the destruction points (part of the order delivery points) in the preliminary path set, and then update the distribution positions of these destruction points in the path set. After that, they are inserted again into the updated distribution positions. Thus, the optimization of the preliminary path set is achieved to reduce the delivery cost.
[0097] The above-mentioned clustering algorithm may be used to determine the above-mentioned destruction point in the initial path set.
[0098] In an exemplary embodiment, in step S401, a density-based spatial clustering method with noise (DBSCAN) is used to determine a preset number of destruction points from the order delivery points in the preliminary path set. DBSCAN can be applied to both convex sample sets and non-convex sample sets, so that it can better adapt to the distribution state of actual order delivery points and select destruction points therefrom.
[0099] Compared with areas with lower density of order delivery points, the probability of higher power demand of delivery vehicles is higher in areas with higher density of order delivery points. Therefore, a preset number of order delivery points are selected as destruction points in areas with higher density of order delivery points to increase the probability that electric vehicles can obtain effective charging piles for energy replenishment during the delivery process.
[0100] For example, Figure 5 The following schematically shows the cluster distribution diagram of order delivery points according to an embodiment of the present disclosure. Figure 5 , perform DBSCAN clustering on the order delivery points according to the preset algorithm hyperparameters: cluster density radius, minimum number of samples in the cluster (e.g., 2), refer to Figure 5 Cluster 51 (including order delivery point 25 and order delivery point 23), cluster 52 (including order delivery point 22 and order delivery point 23), and cluster 53 (including order delivery point 26 and order delivery point 28) are formed.
[0101] in Figure 5 The order delivery point 23 in the upper right corner belongs to both cluster 51 and cluster 52, so order delivery point 22, order delivery point 23, and order delivery point 25 can be classified as samples of the same cluster. When selecting the destruction point according to the preset number of destruction points, assuming that two nodes to be destroyed are selected from the cluster in the upper right corner, order delivery point 25 and order delivery point 23 can be selected, and order delivery point 22 and order delivery point 23 can also be selected, etc.
[0102] In an exemplary embodiment, when selecting a solution (destruction point) that needs to be specified for destruction through DBSCAN clustering, if an energy addition point is selected, a new order delivery point needs to be selected. If the first iteration selection fails, a second selection is required until the preset number of destruction nodes is selected. If the preset number of iterations is reached and the preset number of destruction points is not met, the preset number of destruction points is automatically reduced by 1. It can be seen that in step S401, the Ruin strategy takes into account the particularity of the energy addition point and does not use it as a destruction point. In addition, density clustering and dynamic adjustment of the number of destruction points are used to meet the requirements of the algorithm's rapid calculation response in practical applications to obtain solutions with excellent quality, and the algorithm has good robustness.
[0103] In an exemplary embodiment, continue to refer to Figure 4 After the destruction point is determined, the destruction point is removed from the preliminary path set by a removal operation in step S402 to obtain an intermediate path set. Further, in step S403, the destruction point is inserted into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set.
[0104] Exemplarily, the above-mentioned preset strategy can be an iterative calculation strategy, which inserts the destruction point into the intermediate path set based on the comparison result of the distribution cost change of the path set before and after the i-th insertion operation; wherein i is a positive number greater than or equal to 1 and less than or equal to the preset number of iterations M.
[0105] In an exemplary embodiment, Figure 6 The schematic diagram of the process of determining the preliminary path set according to the embodiment of the present disclosure is schematically shown, which can be used in step S403. The above-mentioned preset strategy can be a specific implementation of the iterative calculation strategy. Figure 6 The method includes steps S601 to S606.
[0106] In step S601, for the set of initially selected routes, a delivery cost is calculated as a standard value.
[0107] In an exemplary embodiment, for the initial solution output by the greedy algorithm, the delivery cost X based on the initial path set is calculated. 0 , this delivery cost can be X 0 Recorded as standard value X 0 It is used to compare the delivery costs of the path set (i.e. the path set to be evaluated) formed after the destruction point is inserted into the intermediate path set.
[0108] In step S602, the destruction point is inserted into the intermediate path set for the i-th time to obtain a path set to be evaluated after the i-th insertion operation.
[0109] In an exemplary embodiment, after inserting the destruction point selected in the above step into the intermediate path set, whether the above preset constraints are violated. For example, if the maximum vehicle mileage constraint, the maximum load capacity constraint, or the time window constraint of the line where the node is located is violated, it is determined that the insertion operation video has failed. Exemplarily, for the same destruction point, if the number of consecutive failures of the insertion operation is greater than the preset value N, and the insertion position that meets the preset constraints is still not found, it is considered that no feasible solution has been found in this iteration. Among them, the setting of the N value mainly considers factors such as the difficulty coefficient, the number of path points, and the number of paths. This embodiment adopts a dynamic adjustment of the search times hyperparameter N value to accelerate the search for a better solution.
[0110] In an exemplary embodiment, if it is determined that the above preset constraints are met after inserting the destruction points selected in the above step into the intermediate path set, the path set to be evaluated after the i-th insertion operation is obtained.
[0111] In step S603, for the set of paths to be evaluated after the i-th insertion operation, the delivery cost is calculated as the candidate value X i .
[0112] In an exemplary embodiment, for the set of paths to be evaluated after the i-th insertion operation, the delivery cost X is calculated. 0 , and can be used as an alternative value, compared with the standard value X in step S601 0 Compare the sizes.
[0113] Exemplarily, in response to the alternative value X i Less than the standard value X 0 , then execute steps S605-S607.
[0114] In step S605, the set of paths to be evaluated after the i-th insertion operation is recorded.
[0115] In step S606, the candidate value X is used i Update the standard value X 0 , until the number of iterations reaches the preset number of iterations M, the recorded set of paths to be evaluated is returned as the optimized path set.
[0116] In step S607, i is assigned to i+1, and steps S602 to S604 are executed cyclically. That is, the execution step inserts the destruction point into the intermediate path set for the i+1th time, and further determines the relationship between the delivery cost inserted into the intermediate path set for the i+1th time and the updated standard value.
[0117] Exemplarily, in response to the alternative value X i Not less than the standard value X 0 , then directly execute step S607.
[0118] exist Figure 6 In the technical solution provided by the illustrated embodiment, a better solution is found through the Ruin and Recreate strategy based on the initial solution (preliminary path set), that is, the path set with the lowest delivery cost is iteratively searched, that is, the optimization of the preliminary path is realized to obtain the optimized path set. When the delivery vehicle uses the optimized path set to deliver orders, it can not only meet the above-mentioned preset constraints, but also reduce the delivery cost as much as possible. This is conducive to improving the user experience.
[0119] In an exemplary embodiment, when the destruction point is inserted into the intermediate path set based on a preset strategy, a gradient descent method is used to evaluate the currently inserted destruction point.
[0120] Exemplarily, for any destruction point to be inserted, the insertion score is calculated according to the following formula:
[0121]
[0122] Among them, f(x|xp ,w 0 ,w 1 ) represents the intermediate path set score,
[0123] x represents the destruction point to be inserted, x p Indicates the priority of the destruction point x to be inserted,
[0124] w 0 、w 1 They represent the optimal delivery cost value and the suboptimal delivery cost value of the path before inserting the destruction point x, respectively, and satisfy w 0 <w 1 ,
[0125] y、 is the empirical value, where y is 11.
[0126] s(x,w 0 ) is the destruction point x and the current optimal distribution cost value w 0 The cost calculation subfunction is the same as w 0 The corresponding path starting position, path ending station position, time window distance, and time window parameters are related.
[0127] Furthermore, the final insertion position is determined according to the insertion scores of the currently inserted destruction point at different positions, that is, the best insertion position of each destruction point is determined according to the above insertion scores, and finally each destruction point is inserted into the intermediate path set to obtain the above path set to be evaluated.
[0128] exist Figure 6 In the technical solution provided by the illustrated embodiment, the algorithm designed in this patent solves a large-scale EVRP problem with a practical application scenario. The scenario involves at least 1,200 customer points, with collection and delivery, and the distance and time do not satisfy the triangular property. Further, the problem can be abstracted as a large-scale VRP problem with charging piles, time window constraints, load capacity constraints, load constraints, maximum driving distance constraints, collection and delivery constraints, vehicle number constraints, and more than 1,200 nodes. This solution constructs the initial solution based on greed, and then based on the Ruin-Recreate idea, selects the destruction points according to DBSCAN clustering, and then uses the Radiate strategy to insert the destruction points. This technical solution can meet the requirements of the algorithm for fast calculation response in practical applications to obtain excellent quality solutions, and at the same time can meet the requirements of the algorithm having good robustness.
[0129] The following introduces an embodiment of the device of the present disclosure, which can be used to execute the above-mentioned order delivery path planning method of the present disclosure.
[0130] Figure 7The structure diagram of the order delivery path planning device according to the embodiment of the present disclosure is schematically shown. Figure 7 The above-mentioned order delivery path planning device 700 includes: a state information acquisition module 701, a preliminary path set determination module 702, and a path optimization module 703.
[0131] The status information acquisition module 701 is used to acquire first actual status information about nodes and second actual status information about delivery vehicles, wherein the nodes include: a delivery center site, an energy adding point, and an order delivery point;
[0132] A preliminary path set determining module 702, configured to determine a preliminary path set according to the first actual state information and the second actual state information;
[0133] The path optimization module 703 is used to optimize the order delivery points in at least one path in the preliminary path set by destroying and rebuilding the algorithm, so as to plan the preliminary path set to obtain an optimized path set.
[0134] In an exemplary embodiment, based on the aforementioned solution, the delivery vehicle is an electric vehicle, and the energy addition point is a charging station including at least one charging pile.
[0135] In an exemplary embodiment, based on the aforementioned solution, the first actual state information includes, but is not limited to: navigation information between the nodes, distance information, time information required to reach different nodes, and time window constraint information of the nodes;
[0136] The second actual status information includes but is not limited to: the maximum load capacity, maximum load weight, and cruising range of the delivery vehicle.
[0137] In an exemplary embodiment, based on the above solution, the preliminary path set determination module 702 is specifically configured to:
[0138] determining first vector information related to the first actual state information, and second vector information related to the second actual state information; and,
[0139] The first vector information and the second vector information are input into a greedy algorithm, and a preliminary path set is determined according to an output of the greedy algorithm.
[0140] In an exemplary embodiment, based on the above solution, the path optimization module 703 includes: a destruction point determination unit, a removal unit and an insertion unit.
[0141] The destruction point determination unit is used to determine a preset number of destruction points from the order delivery points in the preliminary path set according to a density-based clustering algorithm;
[0142] A removing unit, used to remove the destruction point from the preliminary path set through a removing operation to obtain an intermediate path set;
[0143] An inserting unit is used to insert the destruction point into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set.
[0144] In an exemplary embodiment, based on the above solution, the insertion unit is specifically used for:
[0145] Based on the iterative calculation strategy, the destruction point is inserted into the intermediate path set according to the comparison result of the distribution cost change of the path set before and after the i-th insertion operation; wherein i is a positive number greater than or equal to 1 and less than or equal to the preset number of iterations.
[0146] In an exemplary embodiment, based on the above-mentioned solution, the insertion unit includes: a first calculation subunit, an insertion subunit, a second calculation subunit, and a first response subunit.
[0147] The first calculation subunit is used to calculate the delivery cost as a standard value for the set of preliminary selected routes;
[0148] An inserting subunit, used for inserting the destruction point into the intermediate path set for the i-th time, to obtain the path set to be evaluated after the i-th insertion operation;
[0149] A first calculation subunit, configured to calculate a delivery cost as a candidate value for the set of paths to be evaluated after the i-th insertion operation;
[0150] The first response subunit is configured to respond to the candidate value being greater than the standard value by:
[0151] Recording the set of paths to be evaluated after the i-th insertion operation; and,
[0152] The standard value is updated using the alternative value, and the destruction point is inserted into the intermediate path set for the i+1th time until the number of iterations reaches the preset number of iterations, and the recorded path set to be evaluated is returned as the optimized path set.
[0153] In an exemplary embodiment, based on the aforementioned scheme, the above-mentioned order delivery path planning device 700 includes: a second response subunit, used to insert the destruction point into the intermediate path set for the i+1th time in response to the alternative value being less than or equal to the standard value.
[0154] In an exemplary embodiment, based on the above solution, the insertion subunit is further used for:
[0155] For any destruction point to be inserted, an insertion score is performed according to the following formula, and each destruction point is inserted into the intermediate path set according to the insertion score;
[0156]
[0157] Among them, f(x|x p ,w 0 ,w 1 ) represents the intermediate path set score,
[0158] x represents the destruction point to be inserted, x p Indicates the priority of the destruction point x to be inserted,
[0159] w 0 、w 1 They represent the optimal delivery cost value and the suboptimal delivery cost value of the path before inserting the destruction point x, respectively, and satisfy w 0 <w 1 ,
[0160] y、 is the empirical value, where y is 11.
[0161] s(x,w 0 ) is the destruction point x and the current optimal distribution cost value w 0 The cost calculation subfunction is the same as w 0 The corresponding path starting position, path ending station position, time window distance, and time window parameters are related.
[0162] Since the various functional modules of the order delivery path planning device in the example embodiment of the present disclosure correspond to the steps of the example embodiment of the order delivery path planning method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the above-mentioned indexed embodiment of the present disclosure.
[0163] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0164] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the order delivery path planning method according to the implementation methods of the present disclosure.
[0165] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0166] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0167] refer to Figure 8 As shown, a program product 800 for implementing the above method according to an embodiment of the present disclosure is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0168] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0169] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0170] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0171] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0172] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0173] Refer to the following Fig. 9 The electronic device 900 according to this embodiment of the present disclosure is described. Fig. 9The electronic device 900 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0174] like Fig. 9 As shown, the electronic device 900 is in the form of a general computing device. The components of the electronic device 900 may include but are not limited to: at least one processing unit 910, at least one storage unit 920, and a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910).
[0175] The storage unit stores a program code, which can be executed by the processing unit 910, so that the processing unit 910 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 910 can perform the following steps: Figure 1 As shown in: Step S101, obtaining first actual status information about nodes and second actual status information about delivery vehicles, the nodes including: distribution center sites, energy addition points, order delivery points; Step S102, determining a preliminary path set based on the first actual status information and the second actual status information; Step S103, optimizing the order delivery points in at least one path in the preliminary path set by destroying and rebuilding the algorithm, so as to plan the preliminary path set to obtain an optimized path set.
[0176] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202 , and may further include a read-only storage unit (ROM) 9203 .
[0177] The storage unit 920 may also include a program / utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0178] Bus 930 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0179] The electronic device 900 may also communicate with one or more external devices 1000 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 950. Furthermore, the electronic device 900 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 960. As shown, the network adapter 960 communicates with other modules of the electronic device 900 via a bus 930. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0180] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0181] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0182] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for planning an order delivery route, characterized in that: include: Acquire first actual status information about nodes and second actual status information about delivery vehicles based on road condition information of an actual physical road network, wherein the nodes include: a delivery center site, an energy adding point, and an order delivery point; Determine a preliminary path set according to the first actual state information and the second actual state information; The order delivery points in at least one path in the preliminary path set are optimized by a destruction and reconstruction algorithm to plan the preliminary path set to obtain an optimized path set, including: determining a preset number of destruction points from the order delivery points in the preliminary path set according to a density-based clustering algorithm, and removing the destruction points from the preliminary path set by a removal operation to obtain an intermediate path set; inserting the destruction points into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set, wherein for any destruction point to be inserted, the destruction point insertion score is calculated, and each destruction point is inserted into the intermediate path set according to the insertion score; When the destruction point is inserted into the intermediate path set, the gradient descent method is used to evaluate the currently inserted destruction point.
2. The method for planning an order delivery route according to claim 1, characterized in that: The delivery vehicle is an electric vehicle, and the energy addition point is a charging station including at least one charging pile.
3. The method for planning an order delivery route according to claim 1, characterized in that: The first actual state information includes: at least one of navigation information between the nodes, distance information, time information required to reach different nodes, and time window constraint information of the nodes; The second actual status information includes: at least one of the maximum load capacity, maximum load weight, and cruising range of the delivery vehicle.
4. The method for planning an order delivery route according to claim 1, characterized in that: Determining a preliminary path set according to the first actual state information and the second actual state information includes: Determining first vector information related to the first actual state information, and second vector information related to the second actual state information; The first vector information and the second vector information are input into a greedy algorithm, and a preliminary path set is determined according to an output of the greedy algorithm.
5. The method for planning an order delivery route according to claim 1, characterized in that: Inserting the destruction point into the intermediate path set based on a preset strategy includes: Based on the iterative calculation strategy, the destruction point is inserted into the intermediate path set according to the comparison result of the distribution cost change of the path set before and after the i-th insertion operation; wherein i is a positive number greater than or equal to 1 and less than or equal to the preset number of iterations.
6. The method for planning an order delivery route according to claim 5, characterized in that: Inserting the destruction point into the intermediate path set according to a comparison result of the distribution cost change of the path set before and after the i-th insertion operation includes: For the set of preliminary selected routes, calculating the delivery cost as a standard value; Inserting the destruction point into the intermediate path set for the i-th time to obtain the path set to be evaluated after the i-th insertion operation; For the set of paths to be evaluated after the i-th insertion operation, calculating the delivery cost as an alternative value; In response to the candidate value being smaller than the standard value, then: Recording the set of paths to be evaluated after the i-th insertion operation; The standard value is updated using the alternative value, and the destruction point is inserted into the intermediate path set for the i+1th time until the number of iterations reaches the preset number of iterations, and the recorded path set to be evaluated is returned as the optimized path set.
7. The method for planning an order delivery route according to claim 6, characterized in that: The method further comprises: In response to the candidate value being greater than or equal to the standard value, the destruction point is inserted into the intermediate path set for the (i+1)th time.
8. The method for planning an order delivery route according to claim 1, characterized in that: The insertion score is calculated according to the following formula, Among them, f(x|x p ,w0,w1) represents the intermediate path set score, x represents the destruction point to be inserted, x p Indicates the priority of the destruction point x to be inserted, w0 and w1 represent the optimal distribution cost value and the suboptimal distribution cost value of the path before inserting the destruction point x, respectively, and satisfy w0 <w " , y、 is the empirical value, where y is 11. s(x,w0) is a cost calculation subfunction of the destruction point x and the current optimal delivery cost value w0, and is related to the path starting position, path ending station position, time window distance, and time window parameters corresponding to w0.
9. A device for planning an order delivery route, characterized in that: include: A status information acquisition module, used to acquire first actual status information about nodes and second actual status information about delivery vehicles based on road condition information of an actual physical road network, wherein the nodes include: a delivery center site, an energy adding point, and an order delivery point; a preliminary path set determining module, configured to determine a preliminary path set according to the first actual state information and the second actual state information; A path optimization module, used for optimizing the order delivery points in at least one path in the preliminary path set by a destruction and reconstruction algorithm, so as to plan the preliminary path set to obtain an optimized path set, including: determining a preset number of destruction points among the order delivery points in the preliminary path set according to a density-based clustering algorithm, and removing the destruction points from the preliminary path set by a removal operation to obtain an intermediate path set; inserting the destruction points into the intermediate path set based on a preset strategy to complete the planning of the preliminary path set to obtain an optimized path set; wherein, for any destruction point to be inserted, calculating the destruction point insertion score, and inserting each destruction point into the intermediate path set according to the insertion score; When the destruction point is inserted into the intermediate path set, the gradient descent method is used to evaluate the currently inserted destruction point.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the order delivery path planning method as described in any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the order delivery path planning method as described in any one of claims 1 to 8.
