Vehicle path problem solving method, system, equipment and medium
By constructing an offline knowledge base and an iterative local search framework, the problems of low initial solution quality and insufficient global exploration in large-scale vehicle routing problems are solved, achieving efficient, low-cost, and stable path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies suffer from drawbacks when solving large-scale vehicle routing problems, such as low quality of initial solutions, insufficient global exploration capabilities, and premature convergence, resulting in high cost and poor stability of the final planning scheme.
By constructing an offline knowledge base, high-quality initial solutions with superior structure are generated, and deep optimization is performed by combining iterative local search framework, including clustering decomposition, graph matching, and migration path schemes, and deep optimization is performed by utilizing a powerful neighborhood operator library.
It significantly shortens route planning time, reduces operating costs, improves the stability and reliability of the solution, enhances the generalization ability of the technology, and ensures the generation of high-quality route planning solutions.
Smart Images

Figure CN121766871A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of transportation or logistics optimization, and specifically relates to a computer implementation method for solving large-scale vehicle routing problems with uncertainties. Background Technology
[0002] This invention belongs to the field of logistics route planning technology, specifically relating to an automated solution method and system for large-scale vehicle routing problems. The vehicle routing problem aims to plan the optimal route for a set of vehicles with capacity constraints to visit multiple customer points, minimizing total operating costs, and is a core technological challenge of modern logistics and distribution systems. Its NP-hard computational complexity places extremely high demands on the efficiency and quality of the solution algorithm.
[0003] Existing technologies primarily employ metaheuristic algorithm frameworks to solve vehicle routing problems. A typical process involves: first, generating an initial path scheme using a constructive heuristic algorithm; then, continuously optimizing the scheme using iterative local search methods and neighborhood operators such as exchange and relocation. To improve performance, current technologies are developing in two directions: designing more complex search operators and introducing knowledge-driven strategies to learn patterns of optimal paths from historical data to guide the search. However, existing technologies still face significant technical bottlenecks when dealing with large-scale problems. First, the initial solutions generated by traditional methods are generally of low quality, and their relatively arbitrary path structures easily lead to subsequent optimization processes getting trapped in low-quality local optima, severely limiting the quality of the final solution. Second, existing algorithms lack global exploration capabilities, tending to converge prematurely in the complex solution space of large-scale problems, and lacking effective mechanisms for large-scale, structural jumps. Finally, existing knowledge-driven strategies are inefficient in utilizing historical solution experience, lacking a mechanism to quickly reuse validated, structured "optimal path modules" in new problems, resulting in slow convergence and weak generalization ability. Summary of the Invention
[0004] The technical problem to be solved by this invention is that existing technologies have defects such as low quality of initial solutions, insufficient global exploration ability, and easy premature convergence when solving large-scale vehicle routing problems, resulting in high cost and poor stability of the final planning scheme.
[0005] To address the aforementioned technical problems, this invention aims to provide a novel method and system for solving vehicle routing problems. This invention generates a high-quality initial solution with superior structure for online solving by constructing and utilizing an offline knowledge base, and performs deep optimization using a powerful iterative local search framework. This results in a lower-cost, more efficient, and more reliable path planning solution when dealing with large-scale problems.
[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution: A method for solving vehicle routing problems is applied to a route planning system in logistics distribution, supply chain management, or on-demand services. The system is deployed on an electronic device, which includes a memory and a processor. The method aims to automatically generate low-cost, high-efficiency route solutions for vehicle routing problems involving a large number of customer nodes. The method is characterized by executing the following steps: Step 1: Receive a large-scale vehicle routing problem instance to be solved. This problem is mathematically modeled as a weighted undirected graph. And combine a series of constraints and optimization objectives; Step 1.1: Define in a graph Above, where: node set Consists of a central warehouse node and Customer Nodes Composition. Each client node Demand with positive integers warehouse node demand The value is 0. (Edge set) Represents the potential connection paths between all node pairs, each edge Associated with a driving cost A by A fleet of identical vehicles can be used to perform delivery tasks, with each vehicle having a maximum load capacity of [missing information]. ; Step 1.2: To describe the path scheme mathematically, binary decision variables are introduced. It is defined as: if and only if the vehicle The path contains from node Drive directly to the node When the arc is directed, =1, otherwise 0; Step 1.3: The optimization objective of this method is to minimize the total driving cost of all vehicles. Its objective function is... Defined as: (1) Step 1.4: Construct the constraints of the vehicle routing model using equations (2)-(3): (2) (3) 4 (5) 6 7 (8) Step 2: Perform the following offline operations to build a diverse offline knowledge base. ; Step 2.1: Randomly generate the geographical locations of client nodes. Internal random generation requires the total number of randomly generated basic customer network samples. One customer network sample, each sample Includes the standard number of client nodes in each basic network. Each client node. Then, for each network sample... A pre-defined high-performance solution algorithm is used to calculate an optimal or near-optimal vehicle path solution. Thus, an initial knowledge set is obtained. ; Step 2.2: Calculate any two networks and The graph edit distance between them is used to quantify the topological differences, denoted as . Graph editing distance aims to find graphs that will... Transform into a graph Minimum Cost Edit Operation Sequence Its objective function is: In equation (9), The cost of a single edit operation is based on the difference in node coordinates in Euclidean space; Step 2.3: Based on the calculated graph edit distances between all network pairs, execute a diversity filtering strategy to select the number of networks ultimately retained in the knowledge base from the initial knowledge set. The network and its solutions form the final offline knowledge base. ; Step 3 addresses the example of the large-scale vehicle routing problem to be solved. Perform the following initialization operations to generate a global initial solution. : Step 3.1: Problem Decomposition. Execute a clustering algorithm based on the polar coordinate angle density of customer nodes relative to warehouse nodes, and group the instances... Customer node set Decomposed into A subset of customers forms a set. Customer subsets smaller than a preset threshold are merged to ensure each subset is large enough for effective graph matching. For customer subsets larger than the preset threshold, downsampling is performed using an angle-centrality-based weighted sampling method. Node weights. According to its angle Distance from the boundary of the angular range of this subset The calculation yields: 11 In equation (11), and These are the lower and upper bounds of the angular range of the subset, respectively. This is a small constant to prevent the weight from being zero; Step 3.2, Graph Matching and Path Migration Each core customer subset In offline knowledge base In this study, by performing graph edit distance calculation based on the A* algorithm, a known network with the most similar topology is searched and determined. Its goal is: 12 In equation (12), for and the network in the knowledge base The graph editing distance between them.
[0007] Then, according to the mapping relationship ,Will Corresponding high-quality path solution Migrate and convert to be suitable One or more local path schemes ; Step 3.3: Integrate and reconstruct all generated local path schemes Integration: First, all local path schemes The paths are connected end-to-end to form a giant path that accesses all core customer nodes. A dynamic programming-based Split algorithm is then executed to divide it into a set of initial paths that satisfy vehicle capacity constraints.
[0008] Then, for the remaining set of nodes For each node in the algorithm, a greedy insertion strategy is used to find a path that increases the total cost of the path. Find the smallest feasible insertion position and insert it, where: 13 In equation (13), These are the remaining nodes to be inserted. Let be an edge in the path, representing To be inserted into the node and between.
[0009] This ultimately results in a high-quality global initial solution covering all client nodes. ; Step 4: Use the global initial solution Starting from this point, an iterative local search framework is executed to deeply optimize the solution until a preset termination condition is met. This step is performed within a main loop and specifically includes: Step 4.1, Perturbation affects the solution of the current iteration Perform destruction and reoperation to generate a new perturbed solution. The operation begins with a randomly selected seed client node and continuously removes clients using a random walk strategy. A set of removed nodes is formed by geographically or path-related customer nodes. Subsequently, the collection The client nodes in the solution are re-inserted into the partially corrupted solution using a pre-defined re-insertion strategy, forming... Among them, the disturbance intensity It is an adaptively adjustable parameter; Step 4.2: Locally search for a new solution after the perturbation. A neighborhood descent strategy using random variables is employed for depth-first search to obtain a high-quality local optimum. The neighborhood descent strategy for random variables is used in a context that includes... In a library of different neighborhood operators, the current solution is searched sequentially in a randomly shuffled order for each iteration until no further improvement can be made to the solution in any neighborhood. Step 4.3: Update the current solution and the optimal solution, and determine whether to accept the solution based on the acceptance criterion of simulated annealing. As the starting solution for the next iteration Specifically, let To solve The cost, Cost difference. Acceptance probability. Defined as: 14 In equation (14), For the current iteration Temperature parameters at that time. The temperature gradually decreases with each iteration, and its update rule is typically geometric cooling. 12 In equation (15), It is a cooling factor close to 1. If a random number... Less than ,but otherwise, = .
[0010] Step 4.4: Optimal Solution Update. During the iteration process, the system continuously maintains a globally optimal solution. In each instance where a local optimum is obtained... Then, compare them, if Less than but Otherwise, I won't update. .
[0011] After the iteration loop meets the termination condition, the final global optimal solution is output as the final result.
[0012] Furthermore, the neighborhood operator library used in the local search in step 4.2 includes at least one of the following operations: Relocation operation: Move one or more consecutive customer nodes in one path to a different location on another path or the same path; Swap operation: Swap one or more consecutive client nodes on two or the same path; 2-opt operation: In the same path, select two non-adjacent edges, disconnect them, and reconnect them in a cross manner to eliminate path crossings; Ejection chain operation: When a relocation operation is not feasible due to constraint violation, a continuous improvement chain is formed by removing one or more customer nodes from the target path to create feasible space for the relocation.
[0013] On the other hand, the present invention also discloses a system for solving the vehicle routing problem based on clustering decomposition and graph matching, comprising: An offline knowledge base generation module is used to pre-build a database containing various customer network topologies and their optimal path schemes; A problem decomposition module is used to decompose the customer nodes of a large-scale vehicle routing problem instance into multiple smaller customer subsets; A graph matching migration module is used to find the most similar known network in terms of topology for each customer subset in the offline knowledge base and migrate its path scheme to generate a local path scheme; A deconstruction module is used to integrate all local path solutions into a global initial solution that satisfies the constraints; An iterative local search optimization module is used to perform deep optimization on the solution by performing alternating perturbations and local searches, starting from the global initial solution, to obtain the final solution.
[0014] On the other hand, the present invention provides an electronic device including a memory and a processor, characterized in that the memory is used to store a program that supports the processor in executing the vehicle routing problem solving method according to claim 1 or 2, and the processor is configured to execute the program stored in the memory.
[0015] In another aspect, the present invention provides a computer-readable storage medium storing a computer program, characterized in that the computer program, when run by a processor, executes the steps of the vehicle routing problem solving method as described in claim 1 or 2.
[0016] The vehicle routing problem-solving method based on clustering decomposition and graph matching of this invention has the advantage of solving the technical problems of long computation time, high planning cost, and unstable results in the existing technology when dealing with large-scale complex logistics networks. Specifically, it solves these problems by providing a vehicle routing planning method and system that enables efficient reuse of planning experience knowledge. 1. Significantly reduces path planning time and improves system response speed. This invention constructs an initial solution by directly transferring known high-quality path structures, effectively skipping the time-consuming initial random exploration phase of traditional algorithms. This allows the optimization process to start from an excellent starting point, thereby reducing the overall solution time by several times or even an order of magnitude, significantly improving the computational efficiency and response speed of the system in dynamic or real-time logistics scenarios.
[0017] 2. Significantly reduces operating costs and improves the economic efficiency of planning schemes. Since the initial solution generated by this invention is close to optimal in terms of topology, subsequent optimization algorithms can be finely adjusted within a more favorable solution space, thus having a higher probability of discovering lower-cost path solutions than traditional methods. This directly translates to shorter driving distances, fewer vehicles used, and lower fuel consumption, bringing direct and considerable economic benefits to logistics companies.
[0018] 3. Improve the stability and reliability of the solution and enhance the generalization ability of the technology. The "migration-reconstruction" mechanism of this invention ensures that the system can stably generate high-quality planning solutions even when facing customer networks with different geographical distributions, effectively avoiding the significant fluctuations in result quality caused by the randomness or specificity of the problem structure of traditional heuristic algorithms. This high reliability and strong generalization ability to different instances are crucial for commercial applications that require stable and predictable operational plans. Attached Figure Description
[0019] Figure 1 Here is a complete flowchart of the solution method proposed in the examples of this invention; Figure 2This is a schematic diagram of the offline graph database establishment process provided in the example of the present invention; Figure 3 This is a schematic diagram of the graph matching process in the online solution process provided in the example of the present invention; Figure 4 This is a schematic diagram of the relocation operation provided in an example of the present invention; Figure 5 This is a schematic diagram of the exchange operation provided in an example of the present invention; Figure 6 This is a schematic diagram of the 2-opt operation provided in an example of the present invention; Figure 7 This is a schematic diagram of the catapult chain operation provided in an example of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, specific embodiments of the invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the examples in this invention without creative effort are within the scope of protection of this invention.
[0021] This embodiment provides a computer-implemented method for solving large-scale vehicle routing problems. (Refer to...) Figure 1 The overall flowchart shown in this embodiment illustrates the specific steps of the method as follows: [Juanmiao 1][p2] Step 1: Receive an instance of a vehicle routing problem to be solved and formally model it as a mathematical programming model containing an objective function and a series of constraints. The model construction process includes the following steps: Step 1.1: The problem is defined in a graph. Above, where: node set Consists of a central warehouse node and Customer Nodes Composition. Each client node Demand with positive integers warehouse node demand The value is 0. (Edge set) Represents the potential connection paths between all node pairs, each edge Associated with a driving cost A by A fleet of identical vehicles can be used to perform delivery tasks, with each vehicle having a maximum load capacity of [missing information]. .
[0022] Step 1.2: To describe the path scheme mathematically, binary decision variables are introduced. It is defined as: if and only if the vehicle The path contains from node Drive directly to the node When the arc is directed, =1, otherwise 0; Step 1.3: The optimization objective of this method is to minimize the total driving cost of all vehicles. Its objective function is... Defined as: (1) Step 1.4: Construct the constraints of the vehicle routing model using equations (2)-(3): (2) (3) 4 (5) 6 7 (8) in Let be any non-empty proper subset of the set of client nodes.
[0023] Step 2, as follows Figure 2 The diagram illustrates the offline construction of a diverse offline knowledge base. The input to this step is a set of preset parameters, and the output is a knowledge base stored in the memory.
[0024] Step 2.1: In the preset geographical area Randomly generate NS customer network samples. Each sample Include Each client node. Then, for each network sample... A pre-defined high-performance solution algorithm is used to calculate an optimal or near-optimal vehicle path solution. Thus, an initial knowledge set is obtained. .
[0025] Step 2.2: Calculate any two networks and The graph edit distance between them is used to quantify the topological differences, denoted as . Graph editing distance aims to find graphs that will... Transform into a graph Minimum Cost Edit Operation Sequence Its objective function is: (9) In equation (9), The cost of a single edit operation is based on the difference in node coordinates in Euclidean space.
[0026] Step 2.3: Based on the calculated graph edit distances between all network pairs, execute a diversity filtering strategy to select from the initial knowledge set. The network and its solutions form the final offline knowledge base. The goal of this strategy is to maximize The minimum graph edit distance between any two networks is: (10) Knowledge base selected through this step Includes A network with significantly different topologies and its high-quality path schemes are then stored in the memory for use in the online solution phase.
[0027] Step 3: Example of the large-scale vehicle routing problem to be solved. Perform the following initialization operations to generate a global initial solution. : Step 3.1: Execute a clustering algorithm based on the polar coordinate angle density of customer nodes relative to warehouse nodes, and cluster the instances. Customer node set Decomposed into A subset of customers forms a set. and a potentially empty set of remaining nodes. This step also includes merging or downsampling customer subsets whose size is smaller than or larger than a preset threshold. Downsampling employs a weighted sampling method based on angle centrality, where the node weights... According to its angle The lower bound of the angular range of this subset and the Upper Realm distance The calculation shows that: 11 In equation (11), This is a small constant to prevent the weight from being zero.
[0028] Step 3.2, as follows Figure 3 As shown, for Each core customer subset In the offline knowledge base In this study, by performing graph edit distance calculation based on the A* algorithm, a known network with the most similar topology is searched and determined. Its goal is: 12 In equation (12), for and the network in the knowledge base The graph editing distance between them.
[0029] Obtain the node mapping relationship corresponding to the optimal match. According to the mapping relationship ,Will Corresponding high-quality path solution Migrate and convert to be suitable One or more local path schemes .
[0030] Step 3.3: Generate all local path schemes Integrate to form a global initial solution. All local path schemes Connecting end to end, they form a giant path that accesses all core customer nodes.
[0031] Then, a dynamic programming-based Split algorithm is executed to divide the giant path into a set of initial paths that satisfy vehicle capacity constraints. The goal of this algorithm is to minimize the total path cost resulting from the split. For the remaining set of nodes... Each node in A greedy insertion strategy is adopted to find a path among the currently formed preliminary paths that increases the total cost of the path. Find the smallest feasible insertion position and insert it. Cost increment. The calculation is as follows: In equation (13), Let be an edge in the path, representing To be inserted into the node and between.
[0032] Step 4: Using the aforementioned global initial solution Starting from this point, an iterative local search framework is executed to deeply optimize the solution until a preset termination condition is met. This step is performed in a main loop and specifically includes: Step 4.1, the solution for the current iteration Perform a destruction and reconstruction operation to generate a new perturbation solution. The operation begins with a randomly selected seed client node and continuously removes clients using a random walk strategy. A set of removed nodes is formed by geographically or path-related customer nodes. Subsequently, the collection The client nodes in the solution are re-inserted into the partially corrupted solution using a pre-defined re-insertion strategy, forming... Among them, the disturbance intensity It is an adaptively adjustable parameter.
[0033] Step 4.2: The new solution after the perturbation A neighborhood descent strategy using random variables is employed for depth-first search to obtain a high-quality local optimum. The RVND strategy uses an operator library containing L different neighborhood operators. In each iteration, the neighborhood search is performed sequentially, with the order randomly shuffled, until no further improvements can be made to the solution from any neighborhood. For example... Figures 4-7 As shown, the operator library may include operations such as relocation, exchange, 2-opt, and catapult chain.
[0034] Specifically, the operator library may include the following typical neighborhood operations, the specific implementation of which is described in detail below. Figures 4 to 7 Explanation: Relocation operation: such as Figure 4 As shown, this operation aims to move one or more consecutive client nodes in one path to a different location in another path or the same path. Figure 4 In the example, an initial path is 0-1-2-3-4-5-6-0. The relocation operation selects customer node 2, removes it from between nodes 1 and 3, and then re-inserts it into a new position between nodes 5 and 6. After this operation, the path is updated to 0-1-3-4-5-2-6-0. This operation is mainly used to adjust the path affiliation or access order of a single customer.
[0035] Swap operations: such as Figure 5 As shown, this operation aims to swap one or more consecutive client nodes on two or the same path. Figure 5 In the example, the initial path is 0-1-2-3-4-5-6-0. The swap operation selects client nodes 2 and 5 and swaps their positions. After this operation, the path is updated to 0-1-5-3-4-2-6-0. This operation is often used to balance the load across different paths or optimize the client mix across paths.
[0036] 2-opt operation: such as Figure 6 As shown, this operation involves selecting two non-adjacent edges along the same path, disconnecting them, and then reconnecting them in a crossing manner to eliminate path intersections, thereby reducing path cost. Figure 6In the example, the initial path is 0-1-2-3-4-5-6-0. The 2-opt operation selects edge (3,4) and the next edge after it. The operation reverses the order of nodes 3 and 4, updating the path to 0-1-2-4-3-5-6-0. This operation is the core operator for resolving path intersections and optimizing the internal structure of a single path.
[0037] Catapult chain operation: such as Figure 7 As shown, this is a more complex compound operation used to handle situations where simple repositioning is not feasible due to constraints. It creates a feasible space for the initial movement through a series of chained ejection actions. Figure 7 The example demonstrates a multi-path scenario: Initial move: Suppose the algorithm moves customer node 2 from the first path to the second path (but this is not feasible because it would overload the second path).
[0038] First ejection: In order to make room for node 2, the ejection chain operation ejects a client node from the second path, such as node 5.
[0039] Chain reaction: The ejected node 5 now needs a new position. The algorithm finds a feasible insertion position for it in the third path, for example, between 8 and 9.
[0040] Chain Formation: This process of moving 2 -> ejecting 5 -> inserting 5 forms an improved chain of length 2. If the total cost increment of all operations is negative, then the entire chain is executed. Figure 7 This illustrates how moving node 2 out of the first path 0-1-2-3-0 causes a chain reaction of changes in paths 0-4-5-6-0 and 0-7-8-9-0, potentially leading to new path combinations such as 0-1-3-0, 0-4-2-5-0, and 0-7-6-8-9-0. This operation achieves complex structural optimization across multiple paths through continuous customer relocation.
[0041] Step 4.3: Determine whether to accept the product based on an acceptance criterion based on simulated annealing. As the starting solution for the next iteration Specifically, let To solve The cost, Cost difference. Acceptance probability. definition 14 In equation (14), For the current iteration Temperature parameters at that time. The temperature gradually decreases with each iteration, and its update rule is typically geometric cooling. 12 In formula (15) It is a cooling factor close to 1. If a random number... Less than ,but otherwise, = .
[0042] Step 4.4: During the iteration process, continuously maintain a globally optimal solution. In each instance where a local optimum is obtained... Then, compare them, if Less than but Otherwise, no update.
[0043] After the iteration loop meets the termination condition, the final global optimal solution is output as the final result.
[0044] In summary, the vehicle routing problem-solving method based on clustering decomposition and graph matching in this invention solves the technical problems of long computation time, high planning cost, and unstable results in existing technologies when dealing with large-scale complex logistics networks. Specifically, this is reflected in: 1. Significantly reduces path planning time and improves system response speed. This invention constructs an initial solution by directly transferring known high-quality path structures, effectively skipping the time-consuming initial random exploration phase of traditional algorithms. This allows the optimization process to start from an excellent starting point, thereby reducing the overall solution time by several times or even an order of magnitude, significantly improving the computational efficiency and response speed of the system in dynamic or real-time logistics scenarios.
[0045] 2. Significantly reduces operating costs and improves the economic efficiency of planning schemes. Since the initial solution generated by this invention is close to optimal in terms of topology, subsequent optimization algorithms can be finely adjusted within a more favorable solution space, thus having a higher probability of discovering lower-cost path solutions than traditional methods. This directly translates to shorter driving distances, fewer vehicles used, and lower fuel consumption, bringing direct and considerable economic benefits to logistics companies.
[0046] 3. Improve the stability and reliability of the solution and enhance the generalization ability of the technology. The "migration-reconstruction" mechanism of this invention ensures that the system can stably generate high-quality planning solutions even when facing customer networks with different geographical distributions, effectively avoiding the significant fluctuations in result quality caused by the randomness or specificity of the problem structure of traditional heuristic algorithms. This high reliability and strong generalization ability to different instances are crucial for commercial applications that require stable and predictable operational plans.
[0047] In another aspect, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method described above.
[0048] In another aspect, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the method described above.
[0049] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute any of the vehicle routing problem solving methods in the above embodiments.
[0050] It is understood that the systems, devices, and storage media provided in the embodiments of the present invention correspond to the methods provided in the embodiments of the present invention, and the explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding parts of the above methods.
[0051] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0052] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0053] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0054] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of solving a vehicle routing problem, characterized by, comprising the following steps, S1, receiving a large-scale vehicle routing problem instance to be solved, modeled as a weighted undirected graph with a set of constraints and optimization objectives S2. Constructing a structured and diversified offline knowledge base The input of this step is a set of pre-set parameters, and the output is a knowledge base stored in the memory. S3. for the large-scale vehicle routing problem instance to be solved performing an initialization operation to generate a global initial solution ; S4, taking the global initial solution as a starting point, performing an iterative local search framework to deeply optimize the solution until a pre-set termination criterion is met.
2. The vehicle routing problem solving method according to claim 1, characterized in that: S1.4.3, ensuring the sum of customer demands served by each path does not exceed the maximum capacity Q of the vehicle using equation (7); S1.1 The problem is defined in a diagram. Above, where: node set Consists of a central warehouse node and Customer Nodes Composition; each client node Demand with positive integers warehouse node demand =0; edge set Represents the potential connection paths between all node pairs, each edge Associated with a driving cost ; a by A fleet of identical vehicles can be used to perform delivery tasks, with each vehicle having a maximum load capacity of [missing information]. ; S1.2, Introduce binary decision variables which is defined as: = 1 if and only if the path of the vehicle contains the directed arc from node directly to node , otherwise. S1.3, the optimization goal is to minimize the total travel cost of all vehicles, whose objective function is defined as: ⑴ S1.4.4, preventing the formation of independent loops that do not pass through the depot in the subset of customer nodes using equation (8); S1.4.1, ensure that each client node is visited by and only by one path using formula (2) - formula (3) once; ⑵ ⑶ S1.4.2, with the use of formulas (4) - (6) it is ensured that the path of each vehicle is continuous and all paths start from the warehouse v0 and end up returning to the warehouse ; ⑷ ⑸ ⑹ After the above problem modeling is completed, the subsequent solving steps are performed based on the mathematical model. ⑺ S2 specifically comprises, ⑻ S3 specifically comprises, 3. The vehicle routing problem solving method according to claim 2, characterized in that: S3.1: problem decomposition S2.1, randomly generating a geographic location for a customer node the total number of base customer network samples that need to be randomly generated a customer network sample each sample contains a standard number of customer nodes that each base network contains customer nodes; Subsequently, for each network sample , an optimal or near-optimal vehicle routing solution is computed using a pre-defined high performance solution algorithm ; thereby obtaining an initial knowledge set ; S2.2 To evaluate the diversity of networks, we compute the diversity of any two networks. and The graph edit distance between them is used to quantify the topological differences, denoted as . ;Graph editing distance aims to find graphs Transform into a graph Minimum Cost Edit Operation Sequence Its objective function is: wherein, is a cost of a single edit operation, the cost being based on a difference in coordinates of the nodes in Euclidean space; S2.
3. Perform a diversity filtering strategy to select the number of networks from the initial knowledge set to be finally retained in the knowledge base, according to the computed graph edit distances between all pairs of networks and their solutions, forming the final offline knowledge base ; the goal of this strategy is to maximize the minimum graph edit distance between any two networks in the final knowledge base, i.e.: ⑽ The knowledge base screened through this step contains a number of topologically distinct networks and their high-quality path solutions, which are subsequently stored in the memory for invocation by the online solving phase.
4. The vehicle routing problem solving method according to claim 3, characterized in that: This step also includes: S3.3 specifically comprises, Perform a clustering algorithm based on the polar coordinate angle density of customer nodes relative to warehouse nodes to group instances. Customer node set Decomposed into A subset of customers forms a set. and a potentially empty set of remaining nodes. ; 6. The vehicle routing problem solving method according to claim 5, wherein: Merging the customer subsets with size less than a preset threshold to ensure each subset has enough size for effective graph matching; for the customer subsets with size greater than the preset threshold, a weighted sampling method based on angle centrality is used for down-sampling; the weight of a node According to its angle The distance to the boundary of the subset angle range It is calculated that the higher the weight of a node, the more likely it is to be retained in the core set for matching, and the remaining nodes are moved into the remaining node set The weight calculation formula is represented as: ⑾ wherein, and are lower and upper bounds of a subset angle range, respectively, is a small constant to prevent weights from being zero; S3.2, FIG. MATCHING AND PATH MIGRATION TARGETS each of the core customer subsets the processor performs the following operations: S3.2.1, in the offline knowledge base a topologically most similar known network is searched and determined by performing a graph edit distance computation based on the A* algorithm whose goal is to: ⑿ wherein is and the graph edit distance between the network in the knowledge base; S3.2.2: Obtain the node mapping relationship corresponding to the optimal matching ; S3.2.3: according to the mapping relationship , the corresponding high-quality path solution is migrated and converted into one or more local path schemes suitable for ; and ; S3.3: Combine all local path solutions generated by S3.2 to form a global initial solution Integrate to form a global initial solution : By the above steps, a high-quality global initial solution covering all customer nodes is finally formed .
5. The vehicle routing problem solving method according to claim 4, characterized in that: Through this step, it is ensured that the best solution found in the entire iterative optimization process is recorded; after the iteration loop meets the termination condition, the global optimal solution finally obtained is output as the final result. S3.3.1: All local path schemes The first and last ends are connected to form a giant path that accesses all core customer nodes; then, a dynamic programming-based Split algorithm is executed to divide the giant path into a set of preliminary paths that meet vehicle capacity constraints. The goal of this algorithm is to minimize the total path cost generated after the division. S3.3.2: For the remaining set of nodes For each node in the algorithm, a greedy insertion strategy is used to find a node in the existing preliminary path that increases the total cost of the path. Find the smallest feasible insertion position and insert it; ⒀ wherein, is the remaining node to be inserted, is an edge in the path, representing will be inserted between nodes and . The neighborhood operator library used in the local search in step 4.2 includes at least one of the following operations: S4.1, perturbation to the solution of the current iteration , performing a destroy-and-rebuild operation to generate a perturbed new solution ; the operation starts from a randomly selected seed client node, and successively removes client nodes that are geographically or path-wise related, forming a set of removed nodes ; Subsequently, the client nodes in the set are reinserted into the partially destroyed solution with a preset reinsertion strategy, forming ; wherein the disturbance intensity is an adaptively adjusted parameter; S4.2, local search on the perturbed new solution , a deep search is performed using a random variable neighborhood descent strategy to obtain a high quality local optimal solution ; the random variable neighborhood descent strategy randomly selects a neighborhood operator from a pool of different neighborhood operators in each iteration until all neighborhood operators have been tried and none of them can further improve the solution ; S4.3, update the current solution and the optimal solution, determine whether to accept according to the acceptance criterion based on simulated annealing as the starting solution for the next iteration ; Specifically, let To solve The cost, Cost difference; probability of acceptance Defined as: ⒁ wherein, is the temperature parameter at the current iteration is the temperature parameter at the current iteration will gradually decrease as the iterations proceed, with an update rule that is typically geometric cooling: ⒂ wherein is a cooling factor close to 1 ; if a random number is less than then else = ; S4.4, optimal solution update, in the iteration process, the system continues to maintain a global optimal solution ; after each time to get a local optimal solution , comparison, if less than , then , otherwise do not update ; repositioning operation: moving one or more consecutive customer nodes in a path to a different position in another path or the same path; 7. The vehicle routing problem solving method according to claim 6, characterized in that: exchange operation: exchanging one or more consecutive customer nodes on two paths or the same path; 2-opt operation: in the same path, select two non-adjacent edges to disconnect and reconnect in a cross manner to eliminate path intersections; ejection chain operation: when a repositioning operation is not feasible due to violation of constraints, create a feasible space for the repositioning by removing one or more customer nodes from the target path to form a continuous improvement chain. comprising, an offline knowledge base generation module for pre-constructing a database containing a variety of customer network topologies and their optimal path solutions; 8. A vehicle routing problem solving system based on cluster decomposition and graph matching, characterized by: a problem decomposition module for decomposing the customer nodes of a large-scale vehicle routing problem instance into multiple smaller-sized customer subsets; a graph matching migration module for finding the most similar known network topology in the offline knowledge base for each customer subset and migrating its path solution to generate a local path solution; a solution reconstruction module for integrating all local path solutions into a global initial solution that satisfies the constraints; an iterative local search optimization module for starting from the global initial solution, performing alternating iterations of perturbation and local search to deeply optimize the solution to obtain the final solution. The computer program, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7. The computer program, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
9. A computer readable storage medium storing a computer program, characterized in that, 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor.
Citation Information
Cited By
A vehicle route optimization method for waste collection
CN122133896A