Path optimization method and device, electronic equipment and computer readable storage medium
By destroying and repairing the current delivery path, combined with annealing temperature and operator weight adjustment, a feasible delivery path is generated, which solves the problem of high path optimization cost in complex operation scenarios and achieves path planning with global optimal solution.
Patent Information
- Application Number
- CN202410465950.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2025-10-24
AI Technical Summary
Existing technologies are unable to comprehensively consider complex operational scenarios, resulting in high path optimization costs, and further strengthening of intelligent algorithm research is needed.
By obtaining the current delivery paths and optimal delivery paths of multiple orders, the current delivery paths are destroyed and repaired to generate feasible delivery paths. The paths are updated according to the acceptance probability, and the annealing temperature and operator weights are adjusted to optimize the paths.
It has achieved the goal of reducing delivery costs in complex scenarios, breaking away from local optimal solutions, obtaining the global optimal path, and improving the scientificity and efficiency of path planning.
Smart Images

Figure CN120832991A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computers and the Internet, and particularly relates to a path optimization method and device, electronic equipment and a computer readable storage medium. BACKGROUND
[0002] This section is intended to provide background information to facilitate a better understanding of embodiments of the present application as set forth in the claim section. The description herein does not constitute admission of prior art.
[0003] Path optimization is one of the key factors to reduce costs. Traditional manual path planning methods often have difficulty in comprehensively considering increasingly complex operation scenarios, and need to rely on intelligent algorithms for path planning. However, there are still certain technical defects in the current algorithm field, which need to be further strengthened in research and development.
[0004] Therefore, the technical problem to be solved by the present application is how to determine a path optimization method that can reduce costs. SUMMARY
[0005] The present application aims to provide a path optimization method and device, electronic equipment and a computer readable storage medium, which can determine a delivery path with lower delivery cost for multiple orders.
[0006] Other characteristics and advantages of the present application will become apparent from the following detailed description, or will be learned by practice of the present application.
[0007] The present application provides a path optimization method, comprising: obtaining a current delivery path and an optimal delivery path of multiple orders; destroying and repairing the current delivery path to obtain a feasible delivery path; determining that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path, and greater than or equal to the delivery cost corresponding to the current delivery path; determining an acceptance probability of the feasible delivery path; determining to accept the feasible delivery path according to the acceptance probability; updating the current delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0008] In some embodiments, the method further comprises: if it is determined that the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, updating the optimal delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path by the feasible delivery path obtained after the current delivery path is destroyed and repaired; if it is determined that the delivery cost corresponding to the feasible delivery path is greater than the delivery cost corresponding to the optimal delivery path and less than the delivery cost corresponding to the current delivery path, updating the current delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path by the feasible delivery path obtained after the current delivery path is destroyed and repaired; if it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path, and it is determined not to accept the feasible delivery path according to the acceptance probability, keeping the current delivery path and the optimal delivery path unchanged, and continuing to update the optimal delivery path or the current delivery path by the feasible delivery path obtained after the current delivery path is destroyed and repaired.
[0009] In some embodiments, the method further comprises: obtaining an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located, wherein one iteration stage corresponds to one annealing temperature, and wherein the iteration is performed multiple times in each iteration stage; wherein determining the acceptance probability of the feasible delivery path comprises: determining the acceptance probability according to the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability; the method further comprises: obtaining an annealing parameter, the annealing parameter being greater than zero and less than 1; determining a first iteration number corresponding to the current iteration stage of the feasible delivery path; determining that the first iteration number is greater than an iteration number threshold, and then determining to enter a next iteration stage; updating the annealing temperature corresponding to the current iteration stage according to the annealing parameter to determine an annealing temperature corresponding to the next iteration stage.
[0010] In some embodiments, determining the acceptance probability according to the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability, comprises: determining a first delivery cost corresponding to the feasible delivery path; determining a second delivery cost corresponding to the current delivery path; determining a delivery cost difference between the first delivery cost and the second delivery cost; determining the acceptance probability according to the delivery cost difference and the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located, the acceptance probability being negatively correlated with the delivery cost difference and positively correlated with the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located.
[0011] In some embodiments, the feasible delivery path includes a first delivery sub-path and a second delivery sub-path; wherein the destroying the current delivery path comprises: determining that there are multiple to-be-delivered orders of the target delivery object according to the multiple orders; determining that there are orders of the target delivery object in the first delivery sub-path and determining that there are orders of the target delivery object in the second delivery sub-path; selecting a first order belonging to the target delivery object from the first delivery sub-path as a first order; selecting a first order belonging to the target delivery object from the second delivery sub-path as a second order; if the delivery address corresponding to the second order is the same as the delivery address corresponding to the first order, deleting the second order in the second delivery sub-path and moving the second order into a to-be-inserted order set; selecting a second order belonging to the target delivery object from the second delivery sub-path as a third order; if the delivery address corresponding to the third order is the same as the delivery address corresponding to the first order, deleting the third order in the second delivery sub-path and moving the third order into the to-be-inserted order set.
[0012] In some embodiments, the feasible delivery path includes a third delivery sub-path, wherein the repairing the current delivery path comprises: obtaining a to-be-inserted order set, the to-be-inserted order set including a fourth order, the fourth order including a delivery address and a pickup time; matching the delivery address of an order in the third delivery sub-path with the delivery address of the fourth order to determine at least one matching order; comparing the pickup time of the at least one matching order with the pickup time of the fourth order to determine a target order in the at least one matching order whose pickup time is closest to the pickup time of the fourth order; and inserting the fourth order before or after the target order according to the pickup times of the fourth order and the target order.
[0013] In some embodiments, the destroying and repairing the feasible delivery path to obtain the feasible delivery path further comprises: obtaining a set of removal operators and a set of insertion operators, wherein each operator in the set of removal operators corresponds to a removal operator weight, and each operator in the set of insertion operators corresponds to an insertion operator weight; selecting a first removal operator in the set of removal operators according to the removal operator weights; selecting a first insertion operator in the set of insertion operators according to the insertion operator weights; and destroying and repairing the feasible delivery path according to the first removal operator and the first insertion operator.
[0014] In some embodiments, wherein each operator in the set of removal operators also corresponds to a removal operator score, the set of removal operators further comprises a second removal operator; wherein the method further comprises: determining that the removal operator weight corresponding to the second removal operator is a second removal operator weight, and the removal operator score corresponding to the second removal operator is a second removal operator score; if the distribution cost corresponding to the feasible distribution path is less than the distribution cost corresponding to the optimal distribution path, then adding a first value to the second removal operator score so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and less than the distribution cost corresponding to the current distribution path, then adding a second value to the second removal operator score so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and greater than or equal to the distribution cost corresponding to the current distribution path and the feasible distribution path is accepted, then adding a third value to the second removal operator score so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and greater than or equal to the distribution cost corresponding to the current distribution path and the feasible distribution path is not accepted, then adding a fourth value to the second removal operator score so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score, the first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
[0015] In some embodiments, updating the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score comprises: determining the second iteration number corresponding to the feasible distribution path in the current iteration stage; determining that the second iteration number is greater than an iteration number threshold, then determining to enter the next iteration stage; determining the usage number corresponding to the first removal operator in the current iteration stage; if the usage number is 0, then reducing the second removal operator weight by an operator coefficient; if the usage number is not 0, then updating the second removal operator weight by the usage number and the second removal operator score, wherein the updated second removal operator weight is negatively correlated with the usage number and positively correlated with the second removal operator score.
[0016] The embodiment of the present application provides a path optimization device, comprising: a current delivery path acquisition module, a feasible delivery path generation module, a cost comparison module, a probability determination module and an acceptance module, and a first updating module.
[0017] The current delivery path acquisition module is used for acquiring current delivery paths and optimal delivery paths of a plurality of orders; the feasible delivery path generation module can be used for destroying and repairing the current delivery paths to obtain feasible delivery paths; the cost comparison module can be used for determining that a delivery cost corresponding to the feasible delivery paths is greater than or equal to a delivery cost corresponding to the optimal delivery paths and greater than or equal to a delivery cost corresponding to the current delivery paths; the probability determination module can be used for determining an acceptance probability of the feasible delivery paths; the acceptance module can be used for determining to accept the feasible delivery paths according to the acceptance probability; and the first updating module can be used for updating the current delivery paths according to the feasible delivery paths, and continuously updating the optimal delivery paths or the current delivery paths through feasible delivery paths obtained by destroying and repairing the current delivery paths.
[0018] The embodiment of the present application provides an electronic device, comprising: a memory and a processor; the memory is used for storing computer program instructions; and the processor invokes the computer program instructions stored in the memory, and is used for implementing the path optimization method in any of the above embodiments.
[0019] The embodiment of the present application provides a computer readable storage medium, which stores computer program instructions, and implements the path optimization method in any of the above embodiments.
[0020] The embodiment of the present application provides a computer program product or a computer program, which comprises computer program instructions stored in a computer readable storage medium. The computer program instructions are read from the computer readable storage medium, and a processor executes the computer program instructions to implement the path optimization method.
[0021] The path optimization method, device, electronic device and computer readable storage medium provided by the embodiment of the present application can destroy and repair the current delivery paths to obtain feasible delivery paths, then have a certain probability to use the feasible delivery paths with a delivery cost greater than the delivery cost of the current delivery paths and the delivery cost of the optimal delivery paths to replace the current delivery paths, so that the finally obtained optimal delivery paths can jump out of a local optimal solution, and then the optimal delivery paths can be a global optimal solution.
[0022] It should be understood that the above general description and the following detailed description are only exemplary and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS
[0023] The accompanying drawings, which are incorporated herein and constitute part of this specification, illustrate embodiments consistent with the application and, together with the description, further serve to explain the principles of the application. It is apparent that the drawing in the following description is only some embodiments of the application, and other drawings can be obtained according to these drawings without creative labor for those skilled in the art.
[0024] Figure 1 The scene diagram of the path optimization method or the path optimization device which can be applied to the embodiments of the application is shown.
[0025] Figure 2 The flow chart of the path optimization method according to an exemplary embodiment is shown.
[0026] Figure 3 The flow chart of the path optimization method according to an exemplary embodiment is shown.
[0027] Figure 4 The flow chart of the acceptance probability determination method according to an exemplary embodiment is shown.
[0028] Figure 5 The flow chart of the acceptance probability determination method according to an exemplary embodiment is shown.
[0029] Figure 6 The flow chart of the path destruction method according to an exemplary embodiment is shown.
[0030] Figure 7 The flow chart of the path repair method according to an exemplary embodiment is shown.
[0031] Figure 8 The removal operator weight calculation method according to an exemplary embodiment is shown.
[0032] Figure 9 The removal operator weight update method according to an exemplary embodiment is shown.
[0033] Figure 10 The flow chart of the mixed distribution method according to an exemplary embodiment is shown.
[0034] Figure 11 The vehicle and order quantity diagram according to an exemplary embodiment is shown.
[0035] Figure 12 The same user order diagram according to an exemplary embodiment is shown.
[0036] Figure 13is a schematic diagram of an order insertion post-path according to an example embodiment.
[0037] Figure 14 is a block diagram of a path optimization apparatus according to an example embodiment.
[0038] Figure 15 A structural schematic of an electronic device suitable for implementing embodiments of the present application is shown. DETAILED DESCRIPTION
[0039] Example embodiments now will be described more fully hereinafter with reference to the accompanying drawings. Example embodiments can be implemented in any
[0040] Those skilled in the art will appreciate that embodiments of the present application can be a system, a device, a method or a computer program product at the same time. Therefore, embodiments of the present application can take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, microcode, etc.) or an embodiment combining software and hardware aspects that can all generally be referred to herein as a "circuit", "module" or "system".
[0041] The features, structures, or characteristics described in this specification can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. However, one skilled in the relevant art will recognize that the
[0042] In embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other relevant parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that contains the functions of the module or unit.
[0043] The accompanying drawings are only intended to schematically illustrate the present application, the same reference signs in the drawings denote the same or similar parts, and thus repeated description thereof will be omitted. Some block diagrams shown in the drawings do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0044] The flowcharts shown in the drawings are only exemplary illustrations, and do not necessarily include all contents and steps, nor are they necessarily executed in the described order. For example, some steps can be further decomposed, and some steps can be combined or partially combined, so that the actual execution order can be changed according to actual conditions.
[0045] In the description of the present application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this document only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, "one or more" means one or more, and "multiple" means two or more. "First", "second", and the like do not limit the quantity and execution order, and "first", "second", and the like do not necessarily mean different; the terms "include", "contain" and "have" are used to mean open inclusion and mean that in addition to the listed elements / components / etc. There can be other elements / components / etc.
[0046] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below in conjunction with the drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.
[0047] It should be noted that in the technical solutions of the present application, the collection, collection, updating, analysis, processing, use, transmission, storage, etc. of user personal information involved in the technical solutions comply with relevant laws and regulations, are used for legal purposes, and do not violate public order and good customs. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain user personal information security and network security.
[0048] Figure 1 A scenario schematic diagram of a path optimization method or path optimization device that can be applied to the embodiments of the present application is shown.
[0049] Reference is made to Figure 1 which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application.
[0050] As shown in Figure 1 System architecture 100 can include terminal devices 101, 102, 103, network 104, and server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 can include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0051] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Among them, terminal devices 101, 102, 103 can be various electronic devices with display screens and support web browsing, including but not limited to smartphones, tablets, laptop computers, desktop computers, wearable devices, virtual reality devices, smart homes, etc.
[0052] Server 105 can be a server that provides various services, such as a background management server that provides support for devices operated by users using terminal devices 101, 102, 103. The background management server can analyze and process received request data, etc., and feed back the processing results to the terminal device.
[0053] The server can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms, etc. The present application does not limit this.
[0054] Server 105 may, for example, obtain a current delivery path and an optimal delivery path for a plurality of orders; server 105 may, for example, destroy and repair the current delivery path to obtain a feasible delivery path; server 105 may, for example, determine that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path, and greater than or equal to the delivery cost corresponding to the current delivery path; server 105 may, for example, determine the acceptance probability of the feasible delivery path; server 105 may, for example, determine to accept the feasible delivery path according to the acceptance probability; server 105 may, for example, update the current delivery path according to the feasible delivery path, and continue to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0055] It should be understood that Figure 1The number of terminal devices, networks and servers in the system architecture is only illustrative. The server 105 can be a server of one entity, or can be composed of multiple servers. According to actual needs, the server 105 can have any number of terminal devices, networks and servers.
[0056] Under the above system architecture, the embodiment of the present application provides a path optimization method, which can be executed by any electronic device with computing processing capability.
[0057] Figure 2 FIG. 1 is a flowchart of a path optimization method according to an exemplary embodiment. The method provided by the embodiment of the present application can be executed by any electronic device with computing processing capability, for example, the method can be executed by the server or the terminal device in the above embodiment, or can be executed by the server and the terminal device together. In the following embodiments, the server is taken as an example for illustration, but the present application is not limited thereto. Figure 1
[0058] With reference to Figure 2 the path optimization method provided by the embodiment of the present application can include the following steps.
[0059] Step S202: obtaining current delivery paths and optimal delivery paths of multiple orders.
[0060] In some embodiments, the Receding Horizon Control (RHC) mechanism can be used to process dynamic problems. The basic idea is to divide the orders into several time periods according to the time of generation, and each time period is regarded as a processing period (i.e., an order allocation period). At the end of each stage, the orders generated but not yet allocated (i.e., the multiple orders in step S202) are processed, and the orders are allocated to the vehicles or delivery personnel available at this time and the paths are planned. When the time enters the next stage, the orders are locked and the new orders in the last time period are allocated. In this way, the dynamically generated orders are converted into orders to be allocated at the end of each time period, and the information of the orders is known, so that the technical solutions provided by the present application can be used for solving.
[0061] In some embodiments, the multiple orders mentioned above can refer to orders to be allocated within an order allocation period.
[0062] In some embodiments, the orders can be allocated to robots or to delivery personnel or to both robots and delivery personnel for delivery processing, which is not limited by the present application.
[0063] In some embodiments, the current delivery path can include one, two or multiple sub-paths, each of which can refer to a delivery path corresponding to a robot or a delivery path corresponding to a courier.
[0064] In some embodiments, the optimal delivery path can refer to an optimal delivery path determined in a previous iteration. The current delivery path can be an intermediate variable, which can be a currently accepted delivery path. However, whether a path is accepted or not can be determined according to the acceptance probability provided by the present embodiment, which can be referred to in the following implementation steps.
[0065] In some embodiments, in the initial stage, a feasible delivery path can be initialized, and then the current delivery path and the optimal delivery path can be equal to the initialized feasible delivery path, which is not limited by the present application.
[0066] In step S204, the current delivery path is destroyed and repaired to obtain a feasible delivery path.
[0067] In some embodiments, the current delivery path can be destroyed and repaired to obtain a new feasible delivery path.
[0068] In some embodiments, destroying and repairing the current delivery path can refer to removing orders in some sub-paths of the current delivery path and inserting the removed orders into some sub-paths; or can refer to removing part of the orders in some sub-paths of the current delivery path, and then inserting the orders (repairing) into other positions of the orders, which is not limited by the present application.
[0069] In some embodiments, after generating a feasible delivery path, a charging station access position can be determined according to the power constraint condition. For example, the power constraint condition is that when the power of a robot is less than a power threshold (such as 20%), the robot or unmanned vehicle needs to access a charging station for charging. Specifically, when it is determined by calculation that the power of a robot or unmanned vehicle will be less than the power threshold after completing the delivery of target orders in its corresponding delivery path, a charging station closest to the position of the target order (for example, the charging station closest to the position of the target order is accessed in the feasible delivery path) is accessed after the position of the target order in the feasible path, thereby forming a new feasible delivery path.
[0070] In some embodiments, the destruction operation can refer to an order removal operation, an order position moving operation, etc.; and the repair operation can refer to an order insertion operation, etc., which is not limited by the present application.
[0071] In some embodiments, the current delivery path can be destroyed and repaired by the following method.
[0072] Specifically, a set of removal operators and a set of insertion operators can be obtained, where each operator in the set of removal operators corresponds to a removal operator weight, and each operator in the set of insertion operators corresponds to an insertion operator weight.
[0073] In some embodiments, a first removal operator can be selected from the set of removal operators according to the removal operator weights, a first insertion operator can be selected from the set of insertion operators according to the insertion operator weights, and then the feasible delivery path can be damaged and repaired according to the first removal operator and the first insertion operator.
[0074] In some embodiments, the removal operator described above can randomly remove a delivery sub-path in the feasible delivery path, can remove an order with the longest delivery time in a delivery sub-path of the feasible delivery path, can remove an order with the highest delivery cost in a delivery sub-path of the feasible delivery path, and the like, which are not limited in the present application.
[0075] In some embodiments, the insertion operator described above can randomly insert an order into a delivery sub-path in the feasible delivery path, or can insert an order into the feasible delivery path according to the lowest cost, which are not limited in the present application.
[0076] In step S206, it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path.
[0077] In some embodiments, the delivery cost described above can include a robot energy consumption cost, a delivery fee of a delivery staff, and an overtime penalty cost (because some orders may be overtime if delivery is performed according to the feasible delivery path), and the like.
[0078] In step S208, an acceptance probability of the feasible delivery path is determined.
[0079] In some embodiments, the acceptance probability described above can be randomly generated, or can be generated according to other manners, which are not limited in the present application.
[0080] In summary, through the acceptance probability, the feasible delivery path with the delivery cost greater than the current delivery path and the optimal delivery path can be accepted to a certain extent, and the acceptance probability will not be too high. In some embodiments, 3-5 of the 10 feasible delivery paths with the delivery cost greater than the current delivery path and the optimal delivery path can be accepted, and the acceptance probability can gradually decrease with the increase of the number of iterations.
[0081] In step S210, the feasible delivery path is determined to be accepted according to the acceptance probability.
[0082] In some embodiments, it is determined whether the acceptance probability is greater than a probability threshold, and if the acceptance probability is greater than the probability threshold, the feasible delivery path is accepted; and if the acceptance probability is less than the probability threshold, the feasible delivery path is rejected.
[0083] In some other embodiments, a random number can be randomly generated, and if the acceptance probability is greater than the random number, the feasible delivery path is accepted; and if the acceptance probability is less than the random number, the feasible delivery path is rejected.
[0084] In summary, the embodiments can have a certain probability of accepting a feasible delivery path with a delivery cost greater than or equal to the delivery cost of the optimal delivery path and greater than or equal to the delivery cost of the current delivery path by certain methods.
[0085] In step S212, the current delivery path is updated according to the feasible delivery path, and the optimal delivery path or the current delivery path is continuously updated by the feasible delivery path obtained by destroying and repairing the current delivery path.
[0086] In some embodiments, if the feasible delivery path is accepted, the current delivery path is equal to the feasible delivery path.
[0087] In some embodiments, after updating the current delivery path, it can be determined whether the path iteration calculation is ended. If the path iteration calculation is not ended, the embodiments are continuously executed according to the updated current delivery path and the optimal delivery path until the iteration condition is reached (for example, the iteration number of the target is reached or the delivery cost of the optimal delivery path is lower than a certain threshold).
[0088] The above embodiments can solve the delivery path optimization problem of complex situations such as multiple vehicle types, multiple start and end points, and mid-way battery replacement, on the one hand; on the other hand, have a fast running speed, meet the requirements of algorithm performance in the timely delivery mode, and provide high-quality delivery scheduling scheme for the express delivery platform, avoid human interference by experience planning scheme, and improve the scientificity of planning.
[0089] Figure 3 is a flowchart of a path optimization method according to an exemplary embodiment.
[0090] Reference Figure 3 The above path optimization method can include the following steps.
[0091] In step S302, the current delivery path and the optimal delivery path of a plurality of orders are obtained.
[0092] In step S304, the current delivery path is destroyed and repaired to obtain a feasible delivery path.
[0093] Step S306, it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path.
[0094] Step S308, the acceptance probability of the feasible delivery path is determined.
[0095] Step S310, the feasible delivery path is accepted according to the acceptance probability.
[0096] Step S312, the current delivery path is updated according to the feasible delivery path, and the optimal delivery path or the current delivery path is continuously updated through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0097] Step S314, if it is determined that the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, the optimal delivery path is updated according to the feasible delivery path, and the optimal delivery path or the current delivery path is continuously updated through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0098] In some embodiments, if it is determined that the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, the optimal delivery path is equal to the feasible delivery path.
[0099] In some embodiments, after updating the optimal delivery path, it can be judged whether the path iteration calculation is ended. If the path iteration calculation is not ended, the embodiment is continuously executed according to the updated optimal delivery path and the feasible delivery path until the iteration condition is reached (for example, the iteration number of the target is reached or the delivery cost of the optimal delivery path is lower than a certain threshold) and the like.
[0100] Step S316, if it is determined that the delivery cost corresponding to the feasible delivery path is greater than the delivery cost corresponding to the optimal delivery path and less than the delivery cost corresponding to the current delivery path, the current delivery path is updated according to the feasible delivery path, and the optimal delivery path or the current delivery path is continuously updated through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0101] In some embodiments, if it is determined that the delivery cost corresponding to the feasible delivery path is greater than the delivery cost corresponding to the optimal delivery path and less than the delivery cost corresponding to the current delivery path, the current delivery path is equal to the feasible delivery path.
[0102] In some embodiments, after updating the current delivery path, it can be determined whether the path iteration calculation is ended. If the path iteration calculation is not ended, the embodiment continues to be executed according to the updated current delivery path and the optimal delivery path until the iteration condition is reached (for example, the iteration number of the target is reached or the delivery cost of the optimal delivery path is lower than a certain threshold) and the like.
[0103] In step S318, if it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path, and it is determined not to accept the feasible delivery path according to the acceptance probability, the current delivery path and the optimal delivery path remain unchanged, and the optimal delivery path or the current delivery path is continued to be updated through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0104] Through the above embodiment, on the one hand, the feasible delivery path can be generated by destroying and repairing the current delivery path, so as to generate the optimal delivery path with the lowest delivery cost; on the other hand, the above embodiment has a certain probability to accept the feasible delivery path with the delivery cost higher than the optimal delivery path and the current delivery path, so as to jump out of the local optimal solution and obtain the global optimal solution.
[0105] Figure 4 FIG. 4 is a flowchart of a method for determining an acceptance probability according to an example embodiment.
[0106] Reference Figure 4 The method for determining the acceptance probability can include the following steps.
[0107] In step S402, an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located is obtained, wherein one iteration stage corresponds to one annealing temperature, and the iteration is performed multiple times in each iteration stage. An annealing parameter is obtained, and the annealing parameter is greater than zero and less than 1.
[0108] In some embodiments, the annealing temperature can be a parameter set in advance.
[0109] In some embodiments, the path optimization process can be divided into multiple iteration stages, and the iteration can be performed multiple times in each iteration stage. Each iteration stage can correspond to an annealing temperature.
[0110] Generally, as the iteration stage increases, the annealing temperature gradually decreases. For example, the annealing temperature of the previous stage is lower than the annealing temperature of the next stage.
[0111] In step S404, the current delivery path and the optimal delivery path of multiple orders are obtained.
[0112] Step S406, the current delivery path is destroyed and repaired to obtain a feasible delivery path.
[0113] Step S408, it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path.
[0114] Step S410, the acceptance probability is determined according to the annealing temperature corresponding to the current iteration stage where the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability.
[0115] In some embodiments, the acceptance probability can be set according to the annealing temperature, and generally, the acceptance probability can be positively correlated with the annealing temperature corresponding to the current iteration stage, for example, the acceptance probability can be set according to e (1 / T) The acceptance probability is determined; and for another example, the acceptance probability can also be determined according to formula (1).
[0116]
[0117] Wherein, p is the acceptance probability, f(x new ) represents the total cost of the feasible delivery path x cur , f(x cur ) represents the total cost of the current delivery path x d , and T can be the annealing temperature.
[0118] Step S412, the acceptance probability is determined according to the acceptance probability.
[0119] Step S414, the current delivery path is updated according to the feasible delivery path, and the optimal delivery path or the current delivery path is continuously updated through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0120] Step S416, the first iteration number corresponding to the current iteration stage of the feasible delivery path is determined.
[0121] Step S418, it is determined that the first iteration number is greater than the iteration number threshold, and then it is determined to enter the next iteration stage.
[0122] In some embodiments, if the iteration number in the current iteration stage has been greater than the iteration threshold, it is determined to enter the next iteration stage.
[0123] Step S420, the annealing temperature corresponding to the current iteration stage is updated according to the annealing parameter to determine the annealing temperature corresponding to the next iteration stage.
[0124] In some embodiments, the annealing temperature can be reduced by an annealing parameter to determine the annealing temperature corresponding to the next iteration stage. For example, the annealing temperature of the next iteration stage can be determined by T = At. Wherein A can be a positive number greater than 0 and less than 1.
[0125] Through the above method, by continuously reducing the annealing temperature, the possibility of accepting the feasible delivery path with a delivery cost greater than the optimal delivery path and the current delivery path is gradually reduced, so that the solution corresponding to the optimal delivery path is gradually stabilized.
[0126] Figure 5 is a flowchart of a method for determining an acceptance probability according to an exemplary embodiment.
[0127] Reference Figure 5 The above method for determining an acceptance probability can include the following steps.
[0128] Step S502, determine the first delivery cost corresponding to the feasible delivery path.
[0129] Step S504, determine the second delivery cost corresponding to the current delivery path.
[0130] Step S506, determine the delivery cost difference between the first delivery cost and the second delivery cost.
[0131] Step S508, determine the acceptance probability according to the delivery cost difference and the annealing temperature corresponding to the current iteration stage where the feasible delivery path is located. The acceptance probability is negatively related to the delivery cost difference and positively related to the annealing temperature corresponding to the current iteration stage where the feasible delivery path is located.
[0132] The above method for determining an acceptance probability corresponding to the embodiment can refer to formula (1)
[0133] Figure 6 is a flowchart of a path destruction method according to an exemplary embodiment.
[0134] In some embodiments, the feasible delivery path includes a first delivery sub-path and a second delivery sub-path.
[0135] Reference Figure 6 The above path destruction method can include the following steps.
[0136] Step S602, determine that the target delivery object has multiple to-be-delivered orders according to multiple orders.
[0137] In some embodiments, by comparing the above multiple orders, it can be found that there are multiple to-be-delivered orders belonging to the target object in the above multiple orders.
[0138] Step S604, it is determined that the first delivery sub-path exists the order of the target delivery object, and it is determined that the second delivery sub-path exists the order of the target delivery object.
[0139] In some embodiments, it can be determined whether the first delivery sub-path exists the delivery order of the target object, and it is determined whether the second delivery sub-path exists the delivery order of the target delivery object.
[0140] Step S606, the first order belonging to the target delivery object is selected from the first delivery sub-path as the first order.
[0141] In some embodiments, if the first delivery path and the second delivery path exist the delivery order of the target object, the first order belonging to the target delivery object is selected from the first delivery sub-path as the first order.
[0142] Step S608, the first order belonging to the target delivery object is selected from the second delivery sub-path as the second order.
[0143] In some embodiments, the first order belonging to the target delivery object can be selected from the second delivery sub-path as the second order.
[0144] Step S610, if the delivery address corresponding to the second order is the same as the delivery address corresponding to the first order, the second order in the second delivery sub-path is deleted, and the second order is moved into the to-be-inserted order set.
[0145] Step S612, the second order belonging to the target delivery object is selected from the second delivery sub-path as the third order.
[0146] Step S614, if the delivery address corresponding to the third order is the same as the delivery address corresponding to the first order, the third order in the second delivery sub-path is deleted, and the third order is moved into the to-be-inserted order set.
[0147] Figure 7 A flowchart of a path repair method according to an exemplary embodiment is shown.
[0148] In some embodiments, when part of the delivery order is removed in the sub-path in the feasible delivery path, the removed delivery order needs to be inserted into other delivery paths of the feasible delivery path, which can be the delivery order removed.
[0149] Specifically, the above-mentioned path repair method can include the following steps.
[0150] In some embodiments, the feasible delivery path includes a third delivery sub-path, which can be the second delivery sub-path or the first delivery sub-path, and the application does not limit the third delivery sub-path.
[0151] In step S702, a to-be-inserted order set is obtained, and the to-be-inserted order set includes a fourth order, and the fourth order includes a delivery address and a pickup time.
[0152] In step S704, the delivery address of the order in the third delivery sub-path is matched with the delivery address of the fourth order to determine at least one matched order.
[0153] In step S706, the pickup time of the at least one matched order is compared with the pickup time of the fourth order to determine a target order in the at least one matched order, and the pickup time of the target order is closest to the pickup time of the fourth order.
[0154] In step S708, the fourth order is inserted before or after the target order according to the pickup times of the fourth order and the target order.
[0155] Figure 8 A removal operator weight calculation method is shown according to an exemplary embodiment.
[0156] In some embodiments, each operator in the removal operator set also corresponds to a removal operator score, and the removal operator set also includes a second removal operator. The following will take the second removal operator as an example to explain how to update the removal operator weight of the removal operator.
[0157] In step S802, it is determined that the removal operator weight corresponding to the second removal operator is a second removal operator weight, and the removal operator score corresponding to the second removal operator is a second removal operator score.
[0158] In step S804, if the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, the second removal operator score is added by a first value, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score.
[0159] In step S806, if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and less than the delivery cost corresponding to the current delivery path, the second removal operator score is added by a second value, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score.
[0160] Step S808, if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path, and the feasible delivery path is accepted, then the second removal operator score is added by a third value, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score.
[0161] Step S810, if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path, and the feasible delivery path is not accepted, then the second removal operator score is added by a fourth value, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score, the first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
[0162] Through the above method, the removal operator with good performance can have more opportunities to be used in the next iteration, and the removal operator with poor performance can have fewer opportunities to be used in the next iteration.
[0163] In some embodiments, the destroying and repairing of the current delivery path to obtain the feasible delivery path can further include: obtaining a removal operator set and an insertion operator set, wherein each operator in the removal operator set corresponds to a removal operator weight, and each operator in the insertion operator set corresponds to an insertion operator weight; selecting a first removal operator in the removal operator set according to the removal operator weight; selecting a first insertion operator in the insertion operator set according to the insertion operator weight; and destroying and repairing the feasible delivery path according to the first removal operator and the first insertion operator.
[0164] Figure 9 is a removal operator weight updating method according to an exemplary embodiment.
[0165] Reference Figure 9 The above removal operator updating method can include the following steps.
[0166] Step S902, determining a second iteration number corresponding to the feasible delivery path in the current iteration stage.
[0167] In some embodiments, the iteration number corresponding to the feasible delivery path in the current iteration stage can be determined, and the iteration number is taken as the second iteration number.
[0168] Step S904, determining that the second iteration number is greater than an iteration number threshold, and then determining to enter the next iteration stage.
[0169] In some embodiments, when it is determined that the number of falls exceeds the threshold of iteration times in the current iteration stage, it can be determined to enter the next iteration stage.
[0170] In step S906, the number of uses of the first removal operator corresponding to the current iteration stage is determined.
[0171] In some embodiments, when it is determined to enter the next iteration stage, the number of uses of the first removal operator in the current iteration stage can be calculated.
[0172] In step S908, if the number of uses is 0, the weight of the second removal operator is reduced by the operator coefficient.
[0173] In some embodiments, the above-mentioned operator coefficient can be a positive number greater than zero and less than 1.
[0174] In step S910, if the number of uses is not 0, the weight of the second removal operator is updated by the number of uses and the score of the second removal operator, wherein the updated weight of the second removal operator is negatively correlated with the number of uses and positively correlated with the score of the second removal operator.
[0175] Specifically, the weight of the removal operator can be updated by formula (2).
[0176]
[0177] wherein, is the weight of the removal operator in the current iteration stage s, π d is the score accumulated by the operator during the current iteration stage s, u d is the number of uses of the operator in the current iteration stage, and ρ is a coefficient with a value of [0, 1].
[0178] It can be understood that the weight of the insertion operator corresponding to the insertion operator can also be updated according to the above-mentioned embodiments, which will not be described herein.
[0179] In the following, the above-mentioned embodiments will be specifically explained in combination with specific application scenarios.
[0180] The mixed distribution mode refers to a logistics operation mode in which multiple distribution modes (such as express delivery, logistics, self-pickup, etc.) are simultaneously used for goods distribution in the same area. For example, the end distribution link of Jingdong Logistics provides two delivery methods of express delivery and unmanned vehicle to meet the different selection preferences of users for the distribution mode, and finally selects one method to complete the end distribution work.
[0181] The example embodiments of the present application will be described in detail in combination with the accompanying drawings.
[0182] In hybrid delivery models, route optimization is a key factor in improving delivery efficiency and reducing costs. Traditional manual planning methods often struggle to comprehensively account for increasingly complex operational scenarios, necessitating the reliance on intelligent algorithms for route planning. However, current algorithms still face technical deficiencies, necessitating further research and development.
[0183] To achieve efficient route planning under hybrid delivery models, it's necessary to consider multiple factors, including cargo attributes, delivery distance, traffic conditions, delivery methods, and user requirements, and to utilize advanced technologies such as artificial intelligence, big data analysis, and optimization algorithms. This can maximize delivery efficiency, reduce delivery costs, and enhance user experience.
[0184] The hybrid delivery route optimization studied in this application is essentially still a vehicle routing problem. There are three problems in the application scenario and optimization algorithm: First, currently unmanned vehicles are deployed by manually determining the delivery address offline. Customers are unaware of the unmanned vehicle delivery, and the unmanned vehicle delivery time is inconsistent with the time when the customer can pick up the package, which will lead to a low delivery success rate and the need for multiple deliveries, affecting the customer experience; second, the delivery model is relatively fragmented, and the mixed delivery scenario of couriers and unmanned vehicles is not comprehensively considered, making it difficult to meet the different preferences of users; finally, in order to obtain a good delivery experience, the algorithm design and the algorithm calculation speed cannot be ignored. The complexity of the problem in the routing calculation process and the size of the search neighborhood will involve a lot of calculations in practical applications. In the application of path optimization technology, the algorithm effect and running speed are one of the important factors affecting the user experience.
[0185] The embodiment of the present application proposes a hybrid delivery mode, that is, the terminal delivery link supports users to choose whether to deliver by courier or by unmanned vehicle. When unmanned vehicle delivery is selected, the user can select the desired delivery time. The hybrid delivery mode is as follows: Figure 10 shown.
[0186] like Figure 10 As shown, when the order is delivered, the user can choose whether to have it delivered by a courier or an unmanned vehicle.
[0187] In some embodiments, users can choose the delivery time regardless of whether the delivery is by courier or unmanned vehicle.
[0188] In some embodiments, the embodiments provided in this application can be used to perform path optimization for multiple express deliveries delivered by unmanned vehicles, and the embodiments provided in this application can also be used to perform path optimization for multiple express deliveries delivered by couriers. This application does not impose any restrictions on this.
[0189] In practical applications, dynamic problems can be handled by using a rolling horizon mechanism. The basic idea is to divide the orders by the time of generation into several time periods, and each time period is regarded as a processing period. At the end of each stage, the orders that have been generated but not yet assigned are processed, and these orders are assigned to the vehicles available at this time and the path is re-planned. When the time enters the next stage, the locked orders are continued to be completed and the new orders of the last time period are assigned. In this way, the dynamically generated orders are converted into orders to be assigned at the end of each time period through the rolling time period, and the information of the orders is known at this time, so that the path optimization algorithm provided in the application can be used for solving. A real take-out scene of 4 hours from 10 am to 2 pm in a day is simulated, and in this scene, the orders are updated every 5 minutes. The number of completed orders, the number of in-transit orders, the number of waiting assignment orders, the number of delivery delay orders, and the number of couriers and unmanned vehicles used in each stage are recorded, and a curve graph is drawn as shown in FIG. 8. Figure 11
[0190] Among them, the number of unmanned vehicles is always more than the number of couriers, which shows that the algorithm tends to assign orders to unmanned vehicles, because the capacity of unmanned vehicles is larger and the cost is lower than that of couriers. And the average running time of the algorithm is 200 seconds, which has a faster calculation speed. It is proved that the algorithm can reasonably assign vehicles and plan delivery routes while considering the order quantity, from the perspective of minimizing the total cost of the express platform.
[0191] The path optimization method provided in the application can include the following stages: generation of initial solution, destruction and repair of current solution, evaluation and acceptance of new feasible solution, weight and score update of neighborhood operator, etc., as follows.
[0192] Step 1: initialize basic parameters including: initial temperature of simulated annealing, initial weight of operator, score, etc.
[0193] Step 2: generate an initial solution, let the current solution = optimal solution = initial solution.
[0194] Step 3: judge whether the algorithm stopping condition is reached, if yes, output the optimal solution, otherwise go to Step 4.
[0195] Step 4: use roulette method to select a removal operator and an insertion operator to destroy and repair the current solution to obtain a new feasible solution.
[0196] Step 5: accept the new feasible solution with a certain probability through the strategy of simulated annealing, if it can be accepted, let the current solution = new feasible solution, go to Step 7, otherwise go to Step 4.
[0197] Step 6: Add the new feasible solution to the pool of feasible solutions, determine whether the new feasible solution is a new optimal solution, if it is the optimal solution, let the optimal solution = new feasible solution, update the weight and score of the operator, go to Step 3.
[0198] Step 7: When an iteration stage ends, update the simulated annealing temperature at a certain cooling rate.
[0199] Table 1
[0200]
[0201]
[0202] The process of updating the parameters in the iteration will be explained below in conjunction with specific examples.
[0203] 1) Weight update
[0204] In the algorithm shown in Table 1, multiple removal and insertion operators are used, and the probability of using each operator depends on its performance in the previous iteration. In order to calculate the selection probability of the operator, an adaptive weight (weight) ω and a cumulative score (score) π are set for each operator. The better the operator performs, the higher the cumulative score will be, and the higher the weight will be, and the higher the probability of being used in the next iteration.
[0205] Initially, the weight and cumulative score of each operator are both 0. In an iteration, after an operator is used, different scores are given according to the type of the new solution obtained (as shown in Table 4), and the scores are accumulated. The entire iteration process of the algorithm is divided into several segments, each segment consisting of a certain number of iterations (N times). At the end of segment s, the weight of operator d is updated, which can be referred to formula (2).
[0206] As can be seen from formula (2), the higher the weight of the operator, the higher the probability of being used in s+1 stage. The probability of each operator being used in s+1 stage is wherein may represent the historical iteration stages that have been iterated, and l is a positive number greater than 0.
[0207] Table 2 Operator bonus
[0208]
[0209] In some embodiments, to avoid falling into local convergence, the algorithm shown in Table 1 adopts a new acceptance criterion, in which in addition to accepting the improved new feasible solution, the algorithm also accepts the worse new feasible solution with a certain probability, which depends on the difference of objective values of the neighborhood solution and the current solution and the cooling temperature, as shown in equation (3):
[0210]
[0211] In the equation, p represents the acceptance probability, f(x new ) represents the total cost of the new feasible solution, and f(x cur ) represents the total cost of the current solution. T (T > 0) is the cooling temperature of the current operation. If the value of the new feasible solution is less than that of the current solution, the new feasible solution is certainly accepted, otherwise the acceptance probability depends on the above formula.
[0212] In the initial stage of the algorithm, the initial value T0 of the temperature T is set, and with each iteration of the algorithm, T is updated in the form of T = cT, where c is the simulated annealing parameter, c ∈ [0, 1]. This means that the value of T gradually decreases with iteration, and the acceptance probability of inferior solutions is constantly reduced, thereby ensuring the convergence of the algorithm. The setting of T0 is shown in equation (4).
[0213] T0 = -(τ / lnθ)f(x0) (4)
[0214] Where τ represents that the new feasible solution is worse than the initial solution x0 by τ, and θ is the acceptance probability of the new feasible solution.
[0215] In some embodiments, the stopping condition of the algorithm shown in Table 1 uses the following two stopping strategies together, as long as one of them is met, the algorithm stops running.
[0216] Stopping strategy one: the algorithm runs for t hours.
[0217] Stopping strategy two: no new optimal solution appears for more than N consecutive iterations, i.e., the algorithm converges.
[0218] The removal operator and the insertion operator in the above embodiments will be illustrated as follows
[0219] (1) Removal operator for the same user order of different vehicle distribution
[0220] In actual distribution process, there are multiple orders of the same user arriving at approximately the same time, and this scenario is as shown in Figure 11As shown. Among the two vehicles, user No. 3 has both order C and order D, that is, there are same-user orders of different vehicle distribution. In this embodiment, orders in the two paths can be randomly selected for judgment, and the same-user orders in the two randomly selected paths will be removed from one of the paths into the removed order set, so that the orders in the removed order set will be inserted into other paths in the subsequent.
[0221] The main operation process of the removal operator is shown in Table 3.
[0222] In some embodiments, it can be determined in advance which specific users have multiple orders, which can be referred to as user A.
[0223] Table 3
[0224]
[0225]
[0226] (2) Same-user insertion operator
[0227] In the actual distribution process, for users with multiple orders, fewer pickup times will bring better distribution experience, so the same-user insertion operator is designed. As shown, order C is inserted into the path containing its corresponding user No. 2, which meets the requirement that the same-user order is distributed by the same vehicle as much as possible. And the pickup time at user No. 2 is not repeated. The specific steps can be as follows. Figure 13
[0228] Step 1: Traverse each order j in the path S and record its user coordinate p jr and pickup time t jr , and sort the pickup time in a monotonic non-decreasing order.
[0229] Step 2: Select an order i from the to-be-inserted order set B and record its user coordinate p ir and pickup time t ir .
[0230] Step 3: Select the path with Distance(P jr , P ir ) = 0, and select the appropriate insertion position based on the closest pickup time. Insert order r before and after the same-user node in the original path, and the vehicle leaves at time t . If this insertion process violates the power constraint, the battery swap station will also be inserted before the order.
[0231] Step 4: Find the order i from the to-be-inserted order set B and delete it.
[0232] Step 5: repeat Step 1-Step 4 until all the orders to be inserted are inserted into the path.
[0233] The specific implementation steps of the above steps can be implemented by the operators in Table 4.
[0234] Table 4
[0235]
[0236] The above embodiment proposes a mixed delivery mode of courier and unmanned vehicle, the user can specify the vehicle type (courier, unmanned vehicle, or both), and supports selecting the unmanned vehicle delivery time.
[0237] In addition, the above embodiment also designs the same user order removal operator and the same user order insertion operator according to the characteristics of the mixed delivery problem, and proves the performance of these operators and the effectiveness of the algorithm through experiments.
[0238] It should be particularly pointed out that each step in each embodiment of the above path optimization method can be crossed, replaced, added, deleted. Therefore, these reasonable permutations and combinations of the path optimization method should also belong to the protection scope of the present application, and the protection scope of the present application should not be limited to the above-mentioned embodiments.
[0239] Based on the same inventive concept, the embodiment of the present application also provides a path optimization device, as described in the following embodiment. Since the principle of solving the problem of the device embodiment is similar to the above-mentioned method embodiment, the implementation of the device embodiment can be referred to the implementation of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0240] Figure 14 is a block diagram of a path optimization device according to an exemplary embodiment. Referring to Figure 14 The path optimization device 1400 provided by the embodiment of the present application can include: a current delivery path acquisition module 1401, a feasible delivery path generation module 1402, a cost comparison module 1403, a probability determination module 1404, an acceptance module 1405 and a first update module 1406.
[0241] The current delivery path acquisition module 1401 can be configured to acquire the current delivery path and the optimal delivery path of a plurality of orders. The feasible delivery path generation module 1402 can be configured to damage and repair the current delivery path to obtain a feasible delivery path. The cost comparison module 1403 can be configured to determine that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path. The probability determination module 1404 can be configured to determine the acceptance probability of the feasible delivery path. The acceptance module 1405 can be configured to determine to accept the feasible delivery path according to the acceptance probability. The first update module 1406 can be configured to update the current delivery path according to the feasible delivery path, and continue to update the optimal delivery path or the current delivery path by the feasible delivery path obtained by damaging and repairing the current delivery path.
[0242] It should be noted that the current delivery path acquisition module 1401, the feasible delivery path generation module 1402, the cost comparison module 1403, the probability determination module 1404, the acceptance module 1405, and the first update module 1406 correspond to S202-S212 in the method embodiment, and the above modules have the same examples and application scenarios as the corresponding steps, but are not limited to the content applied in the above method embodiment. It should be noted that the above modules as part of the device can be executed in a computer system such as a group of computer executable instructions.
[0243] In some embodiments, the path optimization device 1400 can further include a second update module, a third update module, and a fourth update module.
[0244] The second updating module can be configured to update the optimal delivery path according to the feasible delivery path if it is determined that the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, and continue to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0245] In some embodiments, the path optimization apparatus 1400 can further include an annealing temperature obtaining module.
[0246] The annealing temperature obtaining module can be configured to obtain an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located, wherein one iteration stage corresponds to one annealing temperature, and wherein the iteration is performed multiple times in each iteration stage.
[0247] The probability determining module 1404 can include an acceptance probability determining submodule.
[0248] The acceptance probability determining submodule can be configured to determine the acceptance probability according to an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability.
[0249] In some embodiments, the path optimization apparatus 1400 can further include an annealing parameter obtaining submodule, a first iteration number determining submodule, a threshold value comparing submodule, and an annealing temperature updating submodule.
[0250] The annealing parameter acquisition submodule can be configured to acquire an annealing parameter, which is greater than zero and less than 1. The first iteration number determination submodule can be configured to determine a first iteration number corresponding to the feasible delivery path in a current iteration stage. The threshold comparison submodule can be configured to determine that the first iteration number is greater than an iteration number threshold, and then determine to enter a next iteration stage. The annealing temperature updating submodule can be configured to update an annealing temperature corresponding to the current iteration stage according to the annealing parameter, to determine an annealing temperature corresponding to the next iteration stage.
[0251] In some embodiments, the acceptance probability determination submodule can include a first delivery cost determination unit, a second delivery cost determination unit, a delivery cost difference determination unit, and an acceptance probability determination unit.
[0252] The first delivery cost determination unit can be configured to determine a first delivery cost corresponding to the feasible delivery path. The second delivery cost determination unit can be configured to determine a second delivery cost corresponding to the current delivery path. The delivery cost difference determination unit can be configured to determine a delivery cost difference between the first delivery cost and the second delivery cost. The acceptance probability determination unit can be configured to determine the acceptance probability according to the delivery cost difference and an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located. The acceptance probability is negatively correlated with the delivery cost difference and positively correlated with the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located.
[0253] In some embodiments, the feasible delivery path includes a first delivery sub-path and a second delivery sub-path. The feasible delivery path generation module 1402 can include a plurality of to-be-delivered order determination submodules, a sub-path order determination submodule, a first order determination submodule, a second order determination submodule, a second order deletion submodule, a third order determination submodule, and a third order deletion submodule.
[0254] Among them, the multiple to-be-delivered order determination submodule can be used to determine that there are multiple to-be-delivered orders for the target delivery object based on the multiple orders; the sub-path order determination submodule can be used to determine that there are orders for the target delivery object in the first delivery sub-path, and determine that there are orders for the target delivery object in the second delivery sub-path; the first order determination submodule can be used to select the first order belonging to the target delivery object from the first delivery sub-path as the first order; the second order determination submodule can be used to select the first order belonging to the target delivery object from the second delivery sub-path as the second order; the second order deletion submodule can be used to delete the second order in the second delivery sub-path and move the second order into the to-be-inserted order set if the delivery address corresponding to the second order is the same as the delivery address corresponding to the first order; the third order determination submodule can be used to select the second order belonging to the target delivery object from the second delivery sub-path as the third order; the third order deletion submodule can be used to delete the third order in the second delivery sub-path and move the third order into the to-be-inserted order set if the delivery address corresponding to the third order is the same as the delivery address corresponding to the first order.
[0255] In some embodiments, the feasible delivery path includes a third delivery sub-path, wherein the feasible delivery path generation module 1402 may include: an order acquisition sub-module to be inserted, an address matching sub-module, a time matching sub-module and an insertion sub-module.
[0256] Among them, the to-be-inserted order acquisition submodule can be used to obtain a set of orders to be inserted, the set of orders to be inserted includes a fourth order, and the fourth order includes a delivery address and a pickup time; the address matching submodule can be used to match the delivery address of the order in the third delivery subpath with the delivery address of the fourth order to determine at least one matching order; the time matching submodule can be used to compare the pickup time of the at least one matching order with the pickup time of the fourth order to determine the target order whose pickup time is closest to the pickup time of the fourth order in the at least one matching order; the insertion submodule can be used to insert the fourth order before and after the target order according to the pickup time of the fourth order and the target order.
[0257] In some embodiments, the feasible delivery path generation module 1402 may further include: an operator set acquisition submodule, a first removal operator determination submodule, a first insertion operator determination submodule, and a destruction and repair submodule.
[0258] The operator set obtaining submodule can be configured to obtain a removal operator set and an insertion operator set, where each operator in the removal operator set corresponds to a removal operator weight, and each operator in the insertion operator set corresponds to an insertion operator weight; the first removal operator determining submodule can be configured to select a first removal operator from the removal operator set according to the removal operator weights; the first insertion operator determining submodule can be configured to select a first insertion operator from the insertion operator set according to the insertion operator weights; and the destruction and repair submodule can be configured to destroy and repair the feasible delivery path according to the first removal operator and the first insertion operator.
[0259] In some embodiments, each operator in the removal operator set also corresponds to a removal operator score, and the removal operator set further includes a second removal operator; the path optimization device 1400 can further include a second removal operator weight determining module, a first value superposition module, a second value superposition module, a third value superposition module, and a fourth value superposition module.
[0260] The second removal operator weight determination module can be configured to determine that the removal operator weight corresponding to the second removal operator is a second removal operator weight, and the removal operator score corresponding to the second removal operator is a second removal operator score. The first value adding module can be configured to add a first value to the second removal operator score if the distribution cost corresponding to the feasible distribution path is less than the distribution cost corresponding to the optimal distribution path, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score. The second value adding module can be configured to add a second value to the second removal operator score if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and less than the distribution cost corresponding to the current distribution path, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score. The third value adding module can be configured to add a third value to the second removal operator score if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and greater than or equal to the distribution cost corresponding to the current distribution path and the feasible distribution path is accepted, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score. The fourth value adding module can be configured to add a fourth value to the second removal operator score if the distribution cost corresponding to the feasible distribution path is greater than or equal to the distribution cost corresponding to the optimal distribution path and greater than or equal to the distribution cost corresponding to the current distribution path and the feasible distribution path is not accepted, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score. The first value is greater than the second value, the second value is greater than the third value, and the third value is greater than the fourth value.
[0261] In some embodiments, the second removal operator weight determination module or the first value adding module or the second value adding module or the third value adding module or the fourth value adding module can include an iteration number determination submodule, an entering next iteration stage submodule, a usage number determination submodule, a second removal operator weight first updating submodule, and a second removal operator weight second updating submodule.
[0262] The iteration number determination submodule can be configured to determine a second iteration number corresponding to the feasible delivery path in a current iteration stage; the next iteration stage entering submodule can be configured to determine that the second iteration number is greater than an iteration number threshold, and then determine to enter a next iteration stage; the use number determination submodule can be configured to determine a use number corresponding to the first removal operator in the current iteration stage; the second removal operator weight first updating submodule can be configured to, if the use number is 0, update the second removal operator weight by an operator coefficient; and the second removal operator weight second updating submodule can be configured to, if the use number is not 0, update the second removal operator weight by the use number and the second removal operator score, wherein the updated second removal operator weight is negatively correlated with the use number and positively correlated with the second removal operator score.
[0263] Since the functions of the apparatus 1400 have been described in detail in the corresponding method embodiments, the present application will not be described here again.
[0264] The modules and / or submodules and / or units described in the embodiments of the present application can be implemented in the form of software or in the form of hardware. The described modules and / or submodules and / or units can also be arranged in a processor. In some cases, the names of these modules and / or submodules and / or units do not constitute a limitation on the modules and / or submodules and / or units themselves.
[0265] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module or a part of a program segment containing one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders from those shown in the drawings. For example, two blocks that are shown in succession can actually be executed substantially in parallel, and sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams or flowcharts, and combinations of blocks in the block diagrams or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer program instructions.
[0266] In addition, the above-described drawings are only schematic representations of the processes included in the method according to the exemplary embodiments of the present application, and are not intended to be limiting. It will be readily appreciated that the processes shown in the above-described drawings do not indicate or limit the chronological order of the processes. In addition, it will also be readily appreciated that the processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0267] Figure 15 A structural diagram of an electronic device suitable for implementing embodiments of the present application is shown. It should be noted that Figure 15 The electronic device 1500 shown is merely an example and should not impose any limitation on the functions and usage range of embodiments of the present application.
[0268] As Figure 15 shown, the electronic device 1500 includes a central processing unit (CPU) 1501, which can perform various appropriate actions and processes according to programs stored in a read only memory (ROM) 1502 or programs loaded from a storage section 1508 into a random access memory (RAM) 1503. In the RAM 1503, various programs and data required for the operation of the electronic device 1500 are also stored. The CPU 1501, the ROM 1502, and the RAM 1503 are connected to each other through a bus 1504. An input / output (I / O) interface 1505 is also connected to the bus 1504.
[0269] The following components are connected to the I / O interface 1505: an input section 1506 including a keyboard, a mouse, etc.; an output section 1507 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1508 including a hard disk, etc.; and a communication section 1509 including a network interface card such as a LAN card, a modem, etc. The communication section 1509 performs communication processing via a network such as the Internet. A drive 1510 is also connected to the I / O interface 1505 as necessary. A removable recording medium 1511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 1510 as necessary, so that a computer program read therefrom is installed in the storage section 1508 as necessary.
[0270] In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing computer program instructions for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by the communication section 1509, and / or installed from the removable recording medium 1511. When the computer program is executed by the central processing unit (CPU) 1501, the above-described functions defined in the system of the present application are executed.
[0271] It should be noted that the computer-readable storage medium shown in the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or component, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, 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. In the present application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or component. In the present application, the computer-readable signal medium can include a data signal carrying computer-readable computer program instructions in a baseband or as part of a carrier wave. Such a propagated data signal can take many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate or transmit programs for use by or in conjunction with an instruction execution system, device or component. The computer program instructions contained on the computer-readable storage medium can be transmitted in any suitable medium, including but not limited to wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0272] As another aspect, the present application also provides a computer-readable storage medium, which can be contained in the device described in the above embodiments; or can exist separately without being assembled into the device. The above computer-readable storage medium carries one or more programs, which, when executed by the device, enable the device to implement functions including: obtaining a current delivery path and an optimal delivery path of a plurality of orders; destroying and repairing the current delivery path to obtain a feasible delivery path; determining that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path; determining an acceptance probability of the feasible delivery path; determining to accept the feasible delivery path according to the acceptance probability; updating the current delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
[0273] According to an aspect of the present application, a computer program product or computer program is provided, which includes computer program instructions stored in a computer readable storage medium. The computer program instructions are read from the computer readable storage medium and executed by a processor to implement the method provided in various optional implementation manners of the above-described embodiments.
[0274] Through the above description of the embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions of the embodiments of the present application can be embodied in the form of a software product. The software product can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and includes a plurality of computer program instructions for causing an electronic device (which can be a server or a terminal device, etc.) to execute the method according to the embodiments of the present application.
[0275] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed here. The present application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the application are indicated by the claims.
[0276] It should be understood that the present application is not limited to the detailed structure, drawing manner or implementation method shown here, but rather the present application is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the appended claims.
Claims
1. A path optimization method characterized by, The method comprises: obtaining a current delivery path and an optimal delivery path of a plurality of orders; destroying and repairing the current delivery path to obtain a feasible delivery path; determining that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path; determining the acceptance probability of the feasible delivery path; determining to accept the feasible delivery path according to the acceptance probability; updating the current delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
2. The method of claim 1, wherein, The method further comprises: if it is determined that the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, updating the optimal delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path; if it is determined that the delivery cost corresponding to the feasible delivery path is greater than the delivery cost corresponding to the optimal delivery path and less than the delivery cost corresponding to the current delivery path, updating the current delivery path according to the feasible delivery path, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path; if it is determined that the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path and greater than or equal to the delivery cost corresponding to the current delivery path, and it is determined not to accept the feasible delivery path according to the acceptance probability, keeping the current delivery path and the optimal delivery path unchanged, and continuing to update the optimal delivery path or the current delivery path through the feasible delivery path obtained by destroying and repairing the current delivery path.
3. The method of claim 1, wherein, The method further comprises: obtaining an annealing temperature corresponding to a current iteration stage in which the feasible delivery path is located, wherein one iteration stage corresponds to one annealing temperature, and wherein the iteration is performed multiple times in each iteration stage; wherein the determination of the acceptance probability of the feasible delivery path comprises: determining the acceptance probability according to the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability; The method further comprises: obtaining an annealing parameter, wherein the annealing parameter is greater than zero and less than 1; determining a first iteration number corresponding to the current iteration stage of the feasible delivery path; determining that the first iteration number is greater than an iteration number threshold, and then determining to enter a next iteration stage; updating the annealing temperature corresponding to the current iteration stage according to the annealing parameter to determine an annealing temperature corresponding to the next iteration stage.
4. The method of claim 1, wherein, determining the acceptance probability according to the annealing temperature corresponding to the current iteration stage in which the feasible delivery path is located, wherein the annealing temperature is positively correlated with the acceptance probability, comprises: determining a first delivery cost corresponding to the feasible delivery path; determining a second delivery cost corresponding to the current delivery path; determining a delivery cost difference between the first delivery cost and the second delivery cost; determining the acceptance probability according to the delivery cost difference and an annealing temperature corresponding to a current iteration stage where the feasible delivery path is located, the acceptance probability being negatively related to the delivery cost difference and positively related to the annealing temperature corresponding to the current iteration stage where the feasible delivery path is located.
5. The method of claim 1, wherein, The feasible delivery path includes a first delivery sub-path and a second delivery sub-path; wherein the destroying the current delivery path comprises: determining that there are multiple to-be-delivered orders of a target delivery object according to the multiple orders; determining that there are orders of the target delivery object in the first delivery sub-path and determining that there are orders of the target delivery object in the second delivery sub-path; selecting a first order belonging to the target delivery object from the first delivery sub-path as a first order; selecting a first order belonging to the target delivery object from the second delivery sub-path as a second order; if a delivery address corresponding to the second order is the same as a delivery address corresponding to the first order, deleting the second order in the second delivery sub-path and moving the second order into a to-be-inserted order set; selecting a second order belonging to the target delivery object from the second delivery sub-path as a third order; if a delivery address corresponding to the third order is the same as a delivery address corresponding to the first order, deleting the third order in the second delivery sub-path and moving the third order into the to-be-inserted order set.
6. The method of claim 1, wherein, The feasible delivery path includes a third delivery sub-path, wherein the repairing the current delivery path comprises: obtaining a to-be-inserted order set, the to-be-inserted order set including a fourth order, the fourth order including a delivery address and a pickup time; matching the delivery address of an order in the third delivery sub-path with the delivery address of the fourth order to determine at least one matched order; comparing the pickup time of the at least one matched order with the pickup time of the fourth order to determine a target order in the at least one matched order whose pickup time is closest to the pickup time of the fourth order; inserting the fourth order before or after the target order according to the pickup times of the fourth order and the target order.
7. The method of claim 1, wherein, The destroying and repairing the current delivery path to obtain the feasible delivery path further comprises: obtaining a removal operator set and an insertion operator set, wherein each operator in the removal operator set corresponds to a removal operator weight, and each operator in the insertion operator set corresponds to an insertion operator weight; selecting a first removal operator in the removal operator set according to the removal operator weights; selecting a first insertion operator in the insertion operator set according to the insertion operator weights; destroying and repairing the feasible delivery path according to the first removal operator and the first insertion operator.
8. The method of claim 7, wherein, wherein each operator in the set of removal operators also corresponds to a removal operator score, and the set of removal operators also includes a second removal operator; wherein the method further comprises: determining that the removal operator weight corresponding to the second removal operator is a second removal operator weight, and the removal operator score corresponding to the second removal operator is a second removal operator score; if the delivery cost corresponding to the feasible delivery path is less than the delivery cost corresponding to the optimal delivery path, then adding a first value to the second removal operator score, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path, and is less than the delivery cost corresponding to the current delivery path, then adding a second value to the second removal operator score, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path, and is greater than or equal to the delivery cost corresponding to the current delivery path, and the feasible delivery path is accepted, then adding a third value to the second removal operator score, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score; if the delivery cost corresponding to the feasible delivery path is greater than or equal to the delivery cost corresponding to the optimal delivery path, and is greater than or equal to the delivery cost corresponding to the current delivery path, and the feasible delivery path is not accepted, then adding a fourth value to the second removal operator score, so as to update the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score, the first value being greater than the second value, the second value being greater than the third value, and the third value being greater than the fourth value.
9. The method of claim 8, wherein, updating the second removal operator weight corresponding to the second removal operator in the next iteration stage according to the updated second removal operator score comprises: determining the second iteration number corresponding to the feasible delivery path in the current iteration stage; determining that the second iteration number is greater than an iteration number threshold, then determining to enter the next iteration stage; determining the usage number corresponding to the first removal operator in the current iteration stage; if the usage number is 0, then reducing the second removal operator weight by an operator coefficient; if the usage number is not 0, then updating the second removal operator weight by the usage number and the second removal operator score, wherein the updated second removal operator weight is negatively correlated with the usage number and positively correlated with the second removal operator score.
10. A path optimization apparatus characterized by comprising: comprises: a current delivery path acquisition module, configured to acquire a current delivery path and an optimal delivery path of a plurality of orders; a feasible delivery path generation module, configured to damage and repair the current delivery path to obtain a feasible delivery path; a cost comparison module configured to determine that a delivery cost corresponding to the feasible delivery path is greater than or equal to a delivery cost corresponding to the optimal delivery path and greater than or equal to a delivery cost corresponding to the current delivery path; a probability determination module configured to determine an acceptance probability of the feasible delivery path; an acceptance module configured to determine to accept the feasible delivery path according to the acceptance probability; a first update module configured to update the current delivery path according to the feasible delivery path, and continue to update the optimal delivery path or the current delivery path through a feasible delivery path obtained by destroying and repairing the current delivery path.
11. An electronic device, comprising: comprising: a memory; and a processor coupled to the memory, the processor being configured to execute computer program instructions stored in the memory to perform the path optimization method according to any one of claims 1-9.
12. A computer-readable storage medium having stored thereon computer program instructions, wherein, The computer program instructions, when executed by the processor, implement the path optimization method according to any one of claims 1-9.