Vehicle path planning method, device, equipment and storage medium
By defining the operator parameter configuration space and generating multiple initial parameter combinations, and combining parallel local optimization, dynamic selection of elite populations, and co-evolutionary processing, the problem of insufficient parameter configuration in the existing ALNS method for diverse CVRP instances is solved, and efficient and stable path planning is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-14
AI Technical Summary
Existing ALNS methods suffer from several drawbacks when faced with diverse CVRP instances. These include a lack of adaptive parameter configuration and a single-solution iterative search framework that is highly sensitive to initial solutions and parameter configurations, making it difficult to balance generality, stability, and solution quality.
By defining the configuration space of operator parameters, multiple initial parameter combinations are generated, and an initial population containing multiple parameter combinations and multiple initial solutions is constructed. Parallel local optimization, dynamic selection of elite populations, and co-evolution processing are adopted to realize the co-evolution of multiple parameter combinations and multiple initial solutions.
It improves the search efficiency of vehicle path planning, enhances the quality and stability of the solution, and can adapt to diverse CVRP instance scenarios, ensuring that the solution is continuously optimized until the preset iteration stopping condition is met.
Smart Images

Figure CN121594916B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of route planning technology, and in particular to a vehicle route planning method, apparatus, device, and storage medium. Background Technology
[0002] Vehicle-Capacity Planning (CVRP) is a core extension of the classic path planning problem. It introduces vehicle load capacity constraints and is widely applicable to the core requirements of real-world logistics scenarios where vehicle load capacity is limited and multi-customer delivery needs must be met. Due to its large solution space, complex constraints (such as load limits and path continuity), and high computational complexity, CVRP has been proven to be an NP-hard problem. Traditional exact algorithms struggle to output high-quality feasible solutions within an acceptable timeframe when faced with large-scale customer demands or complex constraints, thus failing to meet the real-time decision-making requirements of real-world logistics scenarios.
[0003] To address this technical challenge, heuristic and metaheuristic algorithms have become the mainstream solution approaches. Among them, Large-Scale Neighborhood Search (LNS) utilizes a core mechanism of destruction followed by repair to explore a large range of the solution space while maintaining the feasibility of solutions, demonstrating outstanding robustness. Adaptive Large-Scale Neighborhood Search (ALNS), developed based on LNS, adds an adaptive operator selection mechanism. By dynamically adjusting the selection probabilities of destruction and repair operators, it further improves the solution performance of complex cases and has become a general solution framework in the field of vehicle path planning.
[0004] Existing ALNS methods primarily optimize performance through two mechanisms: the first is an adaptive operator selection mechanism, which dynamically adjusts operator weights based on historical search results, prioritizing high-quality operator combinations; the second is a parameter tuning mechanism, which configures operator parameters and acceptance criterion parameters offline through manual experience, random search, or Bayesian optimization. However, significant shortcomings still exist in practical applications:
[0005] First, fixed parameter configurations are difficult to adapt to CVRP instances with different customer distributions, demand scales, and constraint structures. For example, customer distributions include centralized and decentralized types, demand scales include 100 orders and 1000 orders, and constraint structures involve different vehicle load limits. Due to the lack of instance adaptability in parameter configurations, algorithm performance is prone to deterioration.
[0006] Secondly, focusing only on operator type selection and global parameter configuration fails to address the core issue of which operator parameters should be matched to specific instances. In other words, it ignores the instance-level bias of operator parameters, resulting in a mismatch between parameters and instance structure, which limits search efficiency.
[0007] Furthermore, the single-solution iterative search framework is highly sensitive to the initial solution and parameter configuration, lacks a multi-solution collaborative evolution mechanism, and is difficult to break through local optima in large-scale or complex CVRP instances, thus limiting the quality of solutions.
[0008] The aforementioned shortcomings make it difficult for existing ALNS methods to balance universality, stability, and solution quality in practical logistics route planning. Therefore, existing technologies still need further improvement and enhancement. Summary of the Invention
[0009] In order to overcome the shortcomings of the prior art, the present invention aims to provide a vehicle path planning method that can be adapted to a variety of CVRP instance scenarios and has the advantages of high search efficiency, excellent solution quality and strong stability.
[0010] The first aspect of this invention provides a vehicle path planning method, comprising: defining a configuration space for operator parameters; generating multiple initial parameter combinations based on the configuration space to obtain an initial parameter set; obtaining vehicle path planning requirements; generating multiple initial path solutions based on the vehicle path planning requirements to obtain an initial solution set; constructing multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population; performing parallel local optimization on each search individual in the initial population to obtain an optimized population; performing a dynamic screening operation on the optimized population to obtain an elite population; performing co-evolution processing on the elite population to obtain an evolved population; determining whether a preset iteration stopping condition is met based on the evolved population; if not, replacing the initial population with the evolved population and returning to perform parallel local optimization on each search individual in the initial population to obtain the optimized population.
[0011] Optionally, in a first implementation of the first aspect of the present invention, defining the configuration space for operator parameters and generating multiple initial parameter combinations based on the configuration space to obtain an initial parameter set includes: obtaining vehicle path planning requirements; defining the configuration space for operator parameters based on the vehicle path planning requirements, wherein the operator parameters include destruction operator parameters, repair operator parameters, and acceptance criterion parameters; generating multiple parameter combinations based on the configuration space using a random sampling method, each parameter combination corresponding to a set of path search rules; and integrating multiple parameter combinations to obtain the initial parameter set.
[0012] Optionally, in a second implementation of the first aspect of the present invention, the step of obtaining vehicle route planning requirements and generating multiple initial path solutions based on the vehicle route planning requirements to obtain an initial solution set includes: obtaining vehicle route planning requirements, which include customer coordinates, customer required weight, vehicle load limit, and delivery center location; using the delivery center location as the starting point, generating multiple initial path solutions using a route planning algorithm, each of the initial path solutions satisfying preset basic route planning constraints, which include no overload constraint and full customer node coverage constraint; and integrating the multiple initial path solutions to obtain an initial solution set.
[0013] Optionally, in a third implementation of the first aspect of the present invention, the step of constructing multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population includes: obtaining a computing resource configuration; determining the size information of the initial population based on the computing resource configuration; randomly combining any initial parameter combination and any initial path solution from the initial parameter set and the initial solution set based on the size information to construct multiple search individuals; and integrating the multiple search individuals to obtain the initial population.
[0014] Optionally, in the fourth implementation of the first aspect of the present invention, the parallel local optimization of each search individual in the initial population to obtain an optimized population includes: for each search individual, initializing the selection weights of the destruction operator and the repair operator based on the initial parameter combination of the search individual; randomly selecting initial destruction operators and initial repair operators from a preset destruction operator library and a preset repair operator library based on the initialized selection weights; performing destruction operations and repair operations on the search individual based on the initial destruction operators and the initial repair operators to obtain an initial optimized individual; evaluating and accepting the initial optimized individual based on a preset objective function value and the acceptance criterion parameters of the search individual, and dynamically adjusting the selection weights of the destruction operator and the repair operator based on the judgment result; determining whether a preset individual iteration condition is met, and if not, replacing the initialized selection weights with the dynamically adjusted selection weights, replacing the search individual with the initial optimized individual, and returning to execute the step of randomly selecting initial destruction operators and initial repair operators from the preset destruction operator library and the preset repair operator library based on the initialized selection weights.
[0015] Optionally, in a fifth implementation of the first aspect of the present invention, the step of performing a dynamic screening operation on the optimized population to obtain an elite population includes: performing an evaluation and ranking operation on the optimized population according to a preset objective function value to obtain a ranking result; identifying elite individuals and inferior individuals in the elite population based on the ranking result; retaining the elite individuals and eliminating the inferior individuals to form an elite population.
[0016] Optionally, in a sixth implementation of the first aspect of the present invention, the step of performing co-evolutionary processing on the elite population to obtain an evolved population includes: determining whether a preset search stagnation condition is met; if the preset search stagnation condition is not met, then using a crossover operator to generate evolved individuals based on the elite population; if the preset search stagnation condition is met, then using a crossover operator and a diversification operator to generate evolved individuals based on the elite population, the initial parameter set, and the initial solution set; and integrating the elite population and the evolved individuals to obtain an evolved population.
[0017] A second aspect of the present invention provides a vehicle path planning device, comprising: a first generation module, configured to define a configuration space for operator parameters, and generate multiple initial parameter combinations based on the configuration space to obtain an initial parameter set; a second generation module, configured to acquire vehicle path planning requirements, and generate multiple initial path solutions based on the vehicle path planning requirements to obtain an initial solution set; a construction module, configured to construct multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population; an optimization module, configured to perform parallel local optimization on each search individual in the initial population to obtain an optimized population; a screening module, configured to perform dynamic screening on the optimized population to obtain an elite population; an evolution module, configured to perform co-evolution processing on the elite population to obtain an evolved population; and a loop module, configured to determine whether a preset iteration stopping condition is met based on the evolved population, and if not, replace the initial population with the evolved population and return to perform parallel local optimization on each search individual in the initial population to obtain an optimized population.
[0018] A third aspect of the present invention provides a vehicle routing device, the vehicle routing device comprising: a memory and at least one processor, the memory storing instructions; the at least one processor invokes the instructions in the memory to cause the vehicle routing device to perform the various steps of the vehicle routing method described in any of the preceding claims.
[0019] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed by a processor, implement the steps of the vehicle routing method described in any of the preceding claims.
[0020] In the technical solution of this invention, by defining the configuration space of operator parameters and generating multiple initial parameter combinations, and combining them with vehicle path planning requirements to generate multiple initial solution sets, an initial population containing multiple parameter combinations and multiple initial solutions is constructed. This avoids the limitations of a single fixed parameter and can adapt to diverse CVRP instance scenarios. Secondly, by performing parallel local optimization, dynamic selection of elite populations, and co-evolution processing on the initial population, the co-evolution of multiple parameter combinations and multiple initial solutions is achieved: parallel local optimization can simultaneously optimize multiple search individuals, improving optimization efficiency; dynamic selection retains high-quality elite individuals, concentrating resources to optimize key directions; co-evolution promotes information fusion among elite individuals, reduces sensitivity to initial conditions, effectively breaks through local optima, and improves the quality and stability of the solution; finally, through a cyclic iteration mechanism, the solution is continuously optimized until the preset iteration stopping condition is met, realizing the generation of a vehicle path planning scheme that takes into account universality, stability, and solution quality. Attached Figure Description
[0021] Figure 1 A flowchart illustrating the vehicle routing method provided in an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of the vehicle routing device provided in an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the vehicle routing device provided in an embodiment of the present invention. Detailed Implementation
[0024] This invention provides a vehicle routing method, apparatus, device, and storage medium. In this invention, the terms "first," "second," "third," "fourth," etc. (if present)," in the specification, claims, and accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0025] This application discloses a vehicle routing method. For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 One embodiment of the vehicle route planning method in this invention includes:
[0026] 101. Define the configuration space for operator parameters, and based on the configuration space, generate multiple initial parameter combinations to obtain an initial parameter set;
[0027] In this embodiment, the configuration space for operator parameters is a range of legal parameter values specifically constructed for the vehicle routing problem, covering parameters of three core operators: destructive operator parameters, repair operator parameters, and acceptance criterion parameters. The destructive operator parameters include destructive degree and destructive range. The destructive degree ranges from 0.01 to 0.5 with a uniform distribution, and the destructive range is divided into global destructive and local area destructive types. The repair operator parameters include the client node re-insertion priority and the load constraint adaptation coefficient. The insertion priority can be sorted by distance priority or demand priority, and the load constraint adaptation coefficient is used to prevent vehicle overloading after re-insertion. The acceptance criterion parameters include the cooling rate of simulated annealing (SA) and the acceptance threshold of hill climbing (HC), etc.
[0028] In this embodiment, by defining the configuration space of operator parameters, the diversity and legality of the initial parameter combinations are ensured, avoiding the inductive bias caused by manual parameter configuration, and laying the foundation for the subsequent automatic adaptation of instance-level parameters.
[0029] 102. Obtain vehicle route planning requirements, and generate multiple initial route solutions based on the vehicle route planning requirements to obtain an initial solution set;
[0030] In this embodiment, the vehicle route planning requirements specifically include core information such as customer coordinates, customer demand weight, vehicle load limit, and delivery center location. When generating the initial route solution, a greedy algorithm (such as the nearest neighbor method) is used as the core implementation method. Starting from the delivery center, customer nodes that are closest to the current vehicle location and whose inclusion will not cause the vehicle to be overloaded are prioritized for inclusion in the current route. When the vehicle reaches its load limit, a new vehicle is activated to continue the above selection process until all customer nodes are covered. Each generated initial route solution must meet the preset basic constraints of route planning, namely, no overload constraint and full customer node coverage constraint. The no overload constraint means that the actual load of each vehicle does not exceed the vehicle load limit, and the full customer node coverage constraint means that all customers to be delivered are included in at least one route. Multiple initial route solutions that meet the requirements are integrated to form an initial solution set. The number of solutions in the initial solution set is consistent with the number of parameter combinations in the initial parameter set.
[0031] In this embodiment, the generated initial path solution is itself a legal vehicle path planning scheme that can be directly implemented, providing a reliable starting point for subsequent algorithm optimization. This avoids the inefficiency caused by starting the search process from scratch. At the same time, the initial solution is generated based on actual path planning requirements and strict constraints, ensuring the practicality and effectiveness of the initial solution and providing a good foundation for improving the quality of the solution in the subsequent optimization process.
[0032] 103. Based on the initial parameter set and the initial solution set, construct multiple search individuals to obtain an initial population;
[0033] In this embodiment, before constructing the initial population, it is necessary to obtain computing resource configuration information. The size of the initial population is determined based on computing resource conditions such as the number of processor cores and memory size. The size of the initial population is usually set to 30 to 100 individuals, denoted as N. When constructing search individuals, a one-to-one binding method is adopted. A set of initial parameter combinations is randomly selected from the initial parameter set and combined with an initial path solution randomly selected from the initial solution set to form an independent search individual. Each search individual is essentially a path solving unit with its own search rules. Multiple such search individuals are integrated to form the initial population. In the initial population, the parameter combinations and initial path solutions of each individual are not repeated, ensuring the diversity of the population.
[0034] In this embodiment, by binding parameter combinations with initial path solutions to construct search individuals, multiple sets of search rules and multiple sets of path solutions are maintained in parallel, breaking the limitations of traditional single-solution iterative search. The diversity of the population provides sufficient material for subsequent adaptive survival and co-evolution. At the same time, the population size is dynamically determined based on computing resources, taking into account both the algorithm's solution efficiency and hardware adaptability.
[0035] 104. Perform parallel local optimization on each search individual in the initial population to obtain an optimized population;
[0036] In this embodiment, the core implementation of parallel local optimization relies on the parameterized adaptive large-scale neighborhood search (ALNS) module. Each search individual in the initial population independently performs optimization operations, and the optimization process of all search individuals is carried out simultaneously. After all search individuals have completed optimization, they are integrated to form an optimized population. This parallel processing significantly improves the efficiency of local optimization and avoids the time consumption caused by serial processing. The destruction-repair process of parameterized ALNS ensures that the path solution of each individual continues to optimize while satisfying constraints. Dynamically adjusting operator weights makes it easier to select high-quality operators, further improving the solution quality of each individual. The optimized population provides a high-quality foundation for subsequent selection and evolution.
[0037] 105. Perform a dynamic screening operation on the optimized population to obtain an elite population;
[0038] In this embodiment, the core of dynamic screening is to evaluate and rank all individuals in the optimization population based on the objective function value. The evaluation criterion is to minimize the total mileage of the vehicles, while also considering constraint satisfaction (no overload, full coverage). Individuals with better objective function values are ranked higher. When performing dynamic screening, individuals in the taboo list must be excluded. If an individual is ranked low but is in the taboo list (e.g., it has recently generated a high-quality solution), it is not considered a low-quality individual to avoid mistakenly deleting individuals with potential optimization value. The retained elite individuals are integrated to form an elite population. Through dynamic screening, high-quality resources in the population are effectively preserved, inefficient individuals with poor fit are eliminated, and invalid searches in the subsequent evolution process are reduced, improving the overall quality of the population. At the same time, by setting a reasonable elite ratio and taboo mechanism, the optimization efficiency and diversity of the population are balanced, providing high-quality parent individuals for subsequent co-evolution.
[0039] 106. Perform co-evolutionary processing on the elite population to obtain an evolved population;
[0040] In this embodiment, the co-evolutionary process includes the application of crossover and diversification operators. By introducing entirely new evolved individuals, the diversity of the population is supplemented, ultimately forming an evolved population whose size remains consistent with the initial population. The co-evolutionary mechanism achieves gene fusion of high-quality individuals through the crossover operator, inheriting superior characteristics adapted to the current instance. The diversification operator breaks population homogeneity when the search stalls, effectively preventing the algorithm from getting trapped in local optima. The combination of the two enhances the algorithm's global exploration capability, ensuring that the algorithm can continuously find better path solutions, thus improving the algorithm's stability and robustness.
[0041] 107. Based on the evolutionary population, determine whether the preset iteration stopping condition is met. If not, replace the initial population with the evolutionary population and return to perform parallel local optimization on each search individual in the initial population to obtain the optimized population.
[0042] In this embodiment, the preset iteration stopping conditions include two categories: first, reaching the preset maximum number of population iterations, which can be set to 50 to 200 generations depending on the instance size; second, the global optimal solution of the population does not improve for several consecutive generations (e.g., 10 consecutive generations), meaning the algorithm cannot find a better solution. When judging, if either of the above conditions is met, the iteration is terminated and the global optimal solution in the evolutionary population is output; if not, the evolutionary population directly replaces the initial population, and the algorithm returns to the parallel local optimization step, repeating the cyclic process of parallel local optimization, dynamic selection, and co-evolution until the iteration stopping conditions are met. Through the cyclic iteration process, the algorithm is ensured to continuously optimize the quality of path solutions, and the optimal parameter combination and optimal path solution suitable for the current instance are gradually selected through multiple rounds of iteration. At the same time, the adaptive adjustment in the cyclic process enables the algorithm to dynamically adapt to the instance characteristics, further improving the practicality and optimality of the final solution.
[0043] The vehicle routing planning method disclosed in this invention defines a configuration space for operator parameters and generates multiple initial parameter combinations. Combined with vehicle routing planning requirements, it generates multiple initial solution sets, constructing an initial population containing multiple parameter combinations and multiple initial solutions. This avoids the limitations of single fixed parameters and is adaptable to diverse CVRP instance scenarios. Secondly, by performing parallel local optimization, dynamic selection of elite populations, and co-evolution processing on the initial population, it achieves the co-evolution of multiple parameter combinations and multiple initial solutions: parallel local optimization can simultaneously optimize multiple search individuals, improving optimization efficiency; dynamic selection retains high-quality elite individuals, concentrating resources to optimize key directions; co-evolution promotes information fusion among elite individuals, reducing sensitivity to initial conditions, effectively breaking through local optima, and improving the quality and stability of the solution; finally, a cyclic iteration mechanism ensures that the solution is continuously optimized until a preset iteration stopping condition is met, achieving the generation of a vehicle routing planning scheme that balances universality, stability, and solution quality.
[0044] Furthermore, in this embodiment of the invention, the configuration space defining the operator parameters is used to generate multiple initial parameter combinations based on the configuration space to obtain an initial parameter set, including:
[0045] 201. Obtain vehicle routing requirements, and define a configuration space for operator parameters based on the vehicle routing requirements. The operator parameters include destruction operator parameters, repair operator parameters, and acceptance criterion parameters.
[0046] In this embodiment, the vehicle route planning requirements encompass key information such as customer distribution characteristics, customer demand weight distribution, vehicle load limits, and delivery timeliness requirements. When defining the operator parameter configuration space, it is necessary to combine the vehicle route planning requirements to ensure the practicality and relevance of the operator parameters, avoiding meaningless parameter values that waste search resources. The value range of all parameters has been verified through extensive engineering practice to ensure effective configuration under different scenarios, forming a complete operator parameter configuration space. This provides a guarantee for the subsequent generation of diverse parameter combinations, enabling the algorithm to adapt to route planning instances with different customer distributions, demand scales, and constraint structures.
[0047] 202. Based on the configuration space, multiple parameter combinations are generated using a random sampling method, and each parameter combination corresponds to a set of path search rules;
[0048] In this embodiment, the random sampling method strictly follows the predefined distribution of each parameter. For example, the destruction degree is sampled from the uniform distribution Uniform (0.01, 0.5), ensuring that the sampling results of each parameter are within the effective range in engineering practice. Each parameter combination contains complete parameter settings for destruction operators, repair operators, and acceptance criteria, corresponding to an independent set of path search rules. For example, a parameter combination of "destruction degree 0.2 + global destruction range + distance priority repair + SA cooling rate 0.95" defines the complete search logic of "deleting 20% of global client nodes + re-inserting according to distance priority + accepting new solutions according to the SA criterion". Since the random sampling method does not rely on training data or human experience, it can effectively avoid inductive bias in parameter configuration. The generated multiple parameter combinations can cover different search strategies, ensuring parameter diversity during population initialization and providing sufficient candidate schemes for subsequent instance-level parameter adaptive screening, thus improving the algorithm's adaptability to different scenarios.
[0049] 203. Integrate multiple parameter combinations to obtain an initial parameter set;
[0050] In this embodiment, the number of parameter combinations in the initial parameter set is consistent with the size of the initial population, and each parameter combination is unique, ensuring the smooth progress of subsequent parallel optimization and evolution processes.
[0051] Furthermore, in this embodiment of the invention, the step of obtaining vehicle route planning requirements and generating multiple initial route solutions based on the vehicle route planning requirements to obtain an initial solution set includes:
[0052] 301. Obtain vehicle route planning requirements, which include customer coordinates, customer required weight, vehicle load limit, and delivery center location.
[0053] In this embodiment, the customer coordinates are specific coordinate values in a Cartesian coordinate system or a geographic coordinate system, used to calculate the driving distance between customers and between customers and the distribution center; the customer demand weight is the specific weight of the goods to be delivered for each customer, with the unit consistent with the vehicle load limit; the vehicle load limit is the maximum load capacity of each delivery vehicle, determined by the vehicle model and the safety specifications of the logistics company; the distribution center location is the coordinates of one or more delivery starting points. If there are multiple distribution centers, the number of available vehicles and the load limit for each distribution center must be specified.
[0054] 302. Starting from the location of the distribution center, a path planning algorithm is used to generate multiple initial path solutions. Each initial path solution satisfies the preset basic constraints of path planning, including the constraint of no overload and the constraint of full coverage of customer nodes.
[0055] In this embodiment, in addition to the nearest neighbor method, the path planning algorithm can also use greedy algorithms such as the saving algorithm. When generating multiple initial path solutions, the diversity of solutions can be achieved by adjusting the initial selection strategy of the algorithm. The availability of multiple path planning algorithms and the adjustment of the initial selection strategy ensure the diversity of initial path solutions, providing rich basic materials for population evolution.
[0056] 303. Integrate multiple initial path solutions to obtain an initial solution set;
[0057] In this embodiment, during integration, it is necessary to ensure that the number of initial path solutions in the initial solution set is consistent with the number of parameter combinations in the initial parameter set, and that each initial path solution has a clear structure, including key information such as the number of vehicles, the delivery node order of each vehicle, the mileage of each vehicle, and the actual load, so as to facilitate targeted optimization after binding with parameter combinations; diverse initial path solutions can cover different path structures, providing the possibility for the algorithm to break through local optima.
[0058] Furthermore, in this embodiment of the invention, the step of constructing multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population includes:
[0059] 401. Obtain the computing resource configuration, and determine the initial population size information based on the computing resource configuration;
[0060] In this embodiment, the computing resource configuration includes key indicators such as the number of processor cores, memory capacity, and allowed computing time. When determining the initial population size, resource adaptation is required: if there are many processor cores, large memory capacity, and long allowed computing time, the population size can be set to a larger value (e.g., 80 to 100 individuals) to improve population diversity and search performance; if computing resources are limited, the population size is set to a smaller value (e.g., 30 to 50 individuals) to balance search performance and computing efficiency. Once the population size information is determined, it remains unchanged throughout the iteration process to ensure the stability of the algorithm. By dynamically determining the population size based on computing resource configuration, the algorithm can flexibly adapt to different hardware environments, avoiding the problem of insufficient resources due to an excessively large population size or poor search performance due to an excessively small population size, thus balancing the practicality and efficiency of the algorithm.
[0061] 402. Based on the scale information, randomly combine any initial parameter combination and any initial path solution from the initial parameter set and the initial solution set to construct multiple search individuals;
[0062] In this embodiment, the combination process employs random pairing to ensure that each parameter combination in the initial parameter set can be bound to a different initial path solution in the initial solution set, and that the parameter combination and initial path solution of each search individual are unique, ensuring no duplicate combinations. Each constructed search individual contains complete parameter configuration and path solution information, and can independently perform subsequent local optimization operations. By using random combination, the diversity of the initial population is maximized, avoiding the search limitations caused by the fixed binding of parameter combinations and initial path solutions. Each search individual has unique search rules and initial path foundations, providing rich material for subsequent parallel optimization and adaptive selection, and increasing the probability of the algorithm finding the global optimum.
[0063] 403. Integrate multiple searched individuals to obtain an initial population;
[0064] In this embodiment, during the integration process, a unique identifier needs to be assigned to each search individual, and key information such as its parameter combination and initial path solution needs to be recorded to facilitate tracking and management in subsequent iterations. Complete individual information provides reliable data support for subsequent optimization, screening and evolution processes, ensuring the smooth operation of the algorithm.
[0065] Furthermore, in this embodiment of the invention, the parallel local optimization of each search individual in the initial population to obtain an optimized population includes:
[0066] 501. For each search individual, initialize the selection weights of the destruction operator and the repair operator based on the initial parameter combination of the search individual;
[0067] In this embodiment, the initial weights of the destruction and repair operators are determined by the operator configuration in the initial parameter combination. For example, if the parameter combination specifies that the distance-first repair operator should be used first, then the initial weight of this repair operator is set to a higher value (e.g., 0.6). The initial weights of other repair operators are distributed proportionally (e.g., 0.2 for the random repair operator and 0.2 for the greedy repair operator), with a total weight of 1. This ensures the probabilistic regularity of the operator selection process, provides a guarantee for the probability calculation of operator selection, and improves the orderliness and efficiency of local optimization. The initial weight setting provides a basis for subsequent dynamic adjustment based on search results. Furthermore, the weight initialization process based on the initial parameter combination ensures that the initial operator selection strategy of each search entity matches its own parameter configuration, thus ensuring the targeting of local optimization.
[0068] 502. Based on the initial selection weights, randomly select initial destruction operators and initial repair operators from the preset destruction operator library and the preset repair operator library;
[0069] In this embodiment, the preset destruction operator library includes various types such as random destruction operators, region clustering destruction operators, worst-case destruction operators, and string destruction operators. The repair operator library includes various types such as distance-first repair operators, load-first repair operators, greedy repair operators, and demand-first repair operators. The selection process adopts the roulette wheel selection method, where the higher the selection weight of an operator, the greater the probability of it being selected, ensuring that high-quality operators are more likely to be selected first. The roulette wheel selection method, combined with weight allocation, realizes the probabilistic and optimal selection of operators. The diverse operator library provides rich optimization strategies for the search, avoids the search limitations caused by a single operator, and improves the ability to explore the solution space during local optimization.
[0070] 503. Based on the initial destruction operator and the initial repair operator, perform destruction and repair operations on the search individual respectively to obtain the initial optimized individual;
[0071] In this embodiment, when performing a destruction operation, corresponding customer nodes are randomly or regularly deleted from the path solutions of the current search individual, based on the type and parameters of the initial destruction operator. During the deletion process, only nodes are removed, while the overall skeleton of the path is preserved. At the same time, the list of deleted nodes and related information (such as node required weight and coordinates) are recorded. When performing a repair operation, based on the parameters of the initial repair operator, the deleted nodes are re-inserted one by one into the legal positions of the existing path. During insertion, the total mileage of the path and the vehicle load need to be calculated in real time to ensure that the path satisfies the constraints of no overload and full coverage after insertion, generating a new path solution. The search individual containing the new path solution is the initial optimized individual. The combination of destruction and repair operations breaks the local optimum structure of the current path solution, providing the possibility of exploring better paths. The constraint verification in the repair operation ensures the legality of the new path solution and avoids the generation of invalid solutions. The generation of the initial optimized individual improves the quality of the path solution of each search individual, laying the foundation for subsequent evaluation and weight adjustment.
[0072] 504. Based on the preset objective function value and the acceptance criterion parameters of the search individual, evaluate and accept the initial optimized individual, and dynamically adjust the selection weights of the destruction operator and the repair operator based on the judgment result;
[0073] In this embodiment, the preset objective function value takes minimizing the total mileage of the vehicle as the core objective, and a penalty term is introduced: if the path solution of the initial optimization individual is overloaded, the objective function value is increased by the proportion of the overload weight; if there are customers not covered, the objective function value is increased by the number of uncovered customers. The smaller the objective function value, the better the solution quality.
[0074] When evaluating and accepting an initial individual, the corresponding logic is executed according to the type of the acceptance criterion parameter: if it is the SA criterion, the acceptance probability is calculated based on the current temperature and the difference between the objective function value of the new solution and the original solution; if it is the HC criterion, only the new solution with a better objective function value is accepted; if it is the RRT criterion, the new solution with an objective function value within a preset threshold range is accepted.
[0075] When dynamically adjusting weights based on the judgment results, if the new solution generated by the selected destruction operator and repair operator is accepted and the objective function value increases, the weight of the operator is increased; if the new solution is rejected or the objective function value decreases, the weight of the operator is decreased, and the total weight remains 1 after the adjustment.
[0076] In this embodiment, the design of the objective function value takes into account both the core optimization objective and the constraint satisfaction, ensuring the comprehensiveness and rationality of the evaluation. The diversification of acceptance criteria adapts to different search strategies, and the dynamic weight adjustment continuously increases the probability of selecting high-quality operators, optimizing the efficiency and direction of local search and driving the continuous improvement of the solution quality of each search entity.
[0077] 505. Determine whether the preset individual iteration conditions are met. If not, replace the initial selection weight with the dynamically adjusted selection weight, replace the search individual with the initial optimized individual, and return to execute the step of randomly selecting the initial destruction operator and the initial repair operator from the preset destruction operator library and the preset repair operator library based on the initial selection weight.
[0078] In this embodiment, the preset individual iteration conditions include reaching a preset maximum number of individual iterations and path solution convergence. The maximum number of individual iterations can be set to 50 to 200 times. Path solution convergence means that the change in the objective function value after multiple consecutive iterations is less than a preset threshold, such as 0.1%. During the judgment, if either condition is met, the local optimization of the search individual is terminated; if not, the dynamically adjusted operator selection weights are used as new initial weights, the initially optimized individual is used as a new search individual, and the process of operator selection, destruction, repair, evaluation, and weight adjustment is repeated until the individual iteration conditions are met. The cyclic execution of the individual iteration process ensures that the path solution of each search individual can be fully optimized, and the continuous updating of dynamic weights enables the search strategy to be continuously optimized, improving the depth and efficiency of the local search and providing high-quality individuals for subsequent population screening.
[0079] Furthermore, in this embodiment of the invention, the step of performing a dynamic screening operation on the optimized population to obtain an elite population includes:
[0080] 601. Based on the preset objective function value, perform an evaluation and ranking operation on the optimized population to obtain the ranking result;
[0081] In this embodiment, during evaluation, the objective function value of each individual in the optimization population is calculated one by one. The calculation logic of the objective function value is consistent with that of the local optimization stage, namely, the total mileage plus the overload penalty and the uncovering penalty. The sorting operation adopts a descending order sorting method, with the individual with the smallest objective function value ranked first and the individual with the largest objective function value ranked last. If individuals with the same objective function value are found during the sorting process, the vehicle utilization rate of the path is further compared. The individual with the higher vehicle utilization rate is ranked higher, ensuring the uniqueness and rationality of the sorting results. The sorting results provide a clear basis for the subsequent selection of elite individuals and the elimination of inferior individuals, improving the accuracy and efficiency of dynamic screening.
[0082] 602. Based on the ranking results, identify the elite individuals and inferior individuals in the elite population;
[0083] In this embodiment, when identifying elite individuals, the top M individuals (M is usually 20% to 30% of the population size) are selected according to the ranking results. The total mileage of the path solutions of these individuals is short, the constraint satisfaction is high, and the parameter combinations they carry have good adaptability to the current path planning instance. When identifying inferior individuals, the bottom K individuals (K is usually 40% to 50% of the population size) are selected. The total mileage of the path solutions of these individuals is long, or there are obvious constraint violations. The parameter combinations they carry have poor adaptability and low optimization potential.
[0084] 603. Retain the elite individuals and eliminate the inferior individuals to form an elite population;
[0085] In this embodiment, when retaining elite individuals, their parameter combinations and path solution information are fully preserved and used as parent individuals for subsequent co-evolution; when eliminating inferior individuals, they are directly removed from the optimized population, freeing up resources to accommodate newly generated evolved individuals; the formation of the elite population improves the starting quality of the subsequent evolutionary process, enabling the evolutionary operation to focus on the fusion and optimization of high-quality features, thus accelerating the convergence speed of the algorithm.
[0086] Furthermore, in this embodiment of the invention, performing co-evolutionary processing on the elite population to obtain an evolved population includes:
[0087] 701. Determine whether the preset search stall conditions are met;
[0088] In this embodiment, the preset search stagnation condition is that within T consecutive generations, the total mileage of the global optimal solution of the evolutionary population does not decrease at all, and the decrease is less than a preset threshold (e.g., 0.5%). Here, T can be set to 8 to 15 generations depending on the instance complexity. When judging, the total mileage of the global optimal solution in each generation needs to be recorded. By comparing the recorded values of T consecutive generations, if none of them meet the decrease requirement, it is determined that the search stagnation condition is met; if the total mileage of the global optimal solution in any generation decreases more than the threshold, it is determined that the search stagnation condition is not met.
[0089] 702. If the preset search stagnation condition is not met, the crossover operator is used to generate evolved individuals based on the elite population;
[0090] In this embodiment, when using the crossover operator, two parent individuals (denoted as parent A and parent B) are randomly selected from the elite population. The crossover operation focuses on the exchange of key fragments of the path solution: First, the path solutions of parent A and parent B are split, and the delivery node sequence of each vehicle is extracted as a path fragment; then, some path fragments are randomly selected for exchange, for example, exchanging the node sequence of vehicle 1 in parent A with the node sequence of vehicle 2 in parent B; after the exchange, the constraint satisfaction of the path solution needs to be re-verified. If there are problems such as overload, duplicate customer coverage, or omissions, the exchanged path fragments are adjusted until a new path solution that satisfies the constraints is formed; finally, the parameter combination of the parent individuals is matched for the new path solution to generate evolved individuals; the number of evolved individuals is consistent with the number of inferior individuals eliminated to ensure the stability of the population size; the application of the crossover operator realizes the fusion of the high-quality path features of elite individuals, and the generated evolved individuals inherit the adaptability advantages of the parents. At the same time, a new path structure is introduced through the exchange of path fragments, avoiding the homogenization of population features, improving the evolutionary potential of the population, and driving the algorithm to continuously find better solutions.
[0091] 703. If the preset search stagnation condition is met, then the crossover operator and the diversification operator are used to generate an evolutionary individual based on the elite population, the initial parameter set and the initial solution set;
[0092] In this embodiment, the operation of the crossover operator is consistent with that when the search stagnation condition is not met, generating some evolved individuals. When using the diversification operator, firstly, random sampling is performed again from the initial configuration space to generate entirely new parameter combinations, ensuring that there is no overlap with the parameter combinations in the existing population. Then, the initial solution generation module is called to generate entirely new initial path solutions through a greedy algorithm, ensuring that the structure of the path solutions in the existing population is significantly different. Finally, the new parameter combinations are bound to the new initial path solutions to generate entirely new evolved individuals. The sum of the number of evolved individuals generated by crossover and those generated by diversification is consistent with the number of inferior individuals eliminated, ensuring that the size of the evolved population remains consistent with the initial population. The combined application of the crossover operator and the diversification operator, while inheriting the superior characteristics of elite individuals, introduces entirely new search rules and path structures, effectively breaking the homogeneity stalemate of the population, successfully escaping the local optimum solution space, injecting new exploratory vitality into the algorithm, ensuring that the algorithm can be continuously optimized, and improving the quality of the final solution and the robustness of the algorithm.
[0093] 704. By integrating the elite population and the evolved individuals, an evolved population is obtained;
[0094] In this embodiment, the size of the integrated evolutionary population is the same as that of the initial population. The integrated evolutionary population needs to update individual identifiers and related records to provide complete and standardized input data for the next round of parallel local optimization, so that the algorithm can continue to maintain its exploration capabilities and further improve the quality and stability of the solution.
[0095] The vehicle routing method in the embodiments of the present invention has been described above. The vehicle routing device in the embodiments of the present invention will be described below. Please refer to [link / reference]. Figure 2 One embodiment of the vehicle route planning device in this invention includes:
[0096] The first generation module 801 is used to define the configuration space of operator parameters, and generate multiple initial parameter combinations based on the configuration space to obtain an initial parameter set;
[0097] The second generation module 802 is used to obtain vehicle route planning requirements and generate multiple initial route solutions based on the vehicle route planning requirements to obtain an initial solution set.
[0098] Construction module 803 is used to construct multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population;
[0099] Optimization module 804 is used to perform parallel local optimization on each search individual in the initial population to obtain an optimized population;
[0100] The screening module 805 is used to perform dynamic screening operations on the optimized population to obtain an elite population;
[0101] Evolution module 806 is used to perform co-evolutionary processing on the elite population to obtain an evolved population;
[0102] The loop module 807 is used to determine whether the preset iteration stopping condition is met based on the evolutionary population. If not, the evolutionary population is used to replace the initial population, and the loop module returns to perform parallel local optimization on each search individual in the initial population to obtain the optimized population.
[0103] Based on the same ideas as the methods in the above embodiments, the apparatus provided in this application can implement the methods in the above embodiments.
[0104] above Figure 2 The vehicle routing device in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The vehicle routing device in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0105] Figure 3This is a schematic diagram of a vehicle routing device 900 provided in an embodiment of the present invention. The vehicle routing device 900 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 910 and memory 920, and one or more storage media 930 (e.g., one or more mass storage devices) storing application programs 933 or data 932. The memory 920 and storage media 930 can be temporary or persistent storage. The program stored in the storage media 930 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the vehicle routing device 900. Furthermore, the processor 910 may be configured to communicate with the storage media 930 and execute the series of instruction operations in the storage media 930 on the vehicle routing device 900 to implement the steps of the vehicle routing method provided in the above-described method embodiments.
[0106] The vehicle routing device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input / output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated vehicle routing device structure does not constitute a limitation on the vehicle routing device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0107] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a vehicle routing method.
[0108] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0109] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0110] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A vehicle route planning method, characterized in that, include: Define the configuration space for operator parameters, and based on the configuration space, generate multiple initial parameter combinations to obtain an initial parameter set; Specifically, the vehicle routing requirements are obtained, and a configuration space for operator parameters is defined based on these requirements. The operator parameters include destructive operator parameters, repair operator parameters, and acceptance criterion parameters. The configuration space is a range of legal parameter values specifically constructed for the vehicle routing problem. Based on the configuration space, multiple parameter combinations are generated using a random sampling method, and each parameter combination corresponds to a set of path search rules. The multiple parameter combinations are then integrated to obtain an initial parameter set. Obtain vehicle route planning requirements, and generate multiple initial path solutions based on these requirements to obtain an initial solution set. Specifically, the vehicle route planning requirements include customer coordinates, customer required weight, vehicle load limit, and delivery center location. Starting from the delivery center location, a route planning algorithm is used to generate multiple initial path solutions, each of which satisfies preset basic route planning constraints, including no overload constraints and full customer node coverage constraints. Integrate the multiple initial path solutions to obtain the initial solution set. Based on the initial parameter set and the initial solution set, multiple search individuals are constructed to obtain an initial population; specifically, the computing resource configuration is obtained, and the size information of the initial population is determined according to the computing resource configuration; based on the size information, any initial parameter combination and any initial path solution are randomly combined from the initial parameter set and the initial solution set to construct multiple search individuals; the multiple search individuals are integrated to obtain the initial population. Parallel local optimization is performed on each search individual in the initial population to obtain an optimized population; A dynamic screening operation is performed on the optimized population to obtain an elite population; Perform co-evolutionary processing on the elite population to obtain an evolved population; specifically, determine whether the preset search stagnation condition is met. If the preset search stall condition is not met, the crossover operator is used to generate evolved individuals based on the elite population; If the preset search stagnation condition is met, then the crossover operator and the diversification operator are used to generate evolved individuals based on the elite population, the initial parameter set, and the initial solution set; the elite population and the evolved individuals are integrated to obtain the evolved population. Based on the evolutionary population, it is determined whether the preset iteration stopping condition is met. If not, the evolutionary population is used to replace the initial population, and the process returns to perform parallel local optimization on each search individual in the initial population to obtain the optimized population.
2. The vehicle routing method according to claim 1, characterized in that, The process of performing parallel local optimization on each search individual in the initial population to obtain an optimized population includes: For each search individual, the selection weights of the destruction operator and the repair operator are initialized based on the initial parameter combination of the search individual; Based on the initial selection weights, the initial destruction operator and the initial repair operator are randomly selected from the preset destruction operator library and the preset repair operator library; Based on the initial destruction operator and the initial repair operator, destruction and repair operations are performed on the search individual to obtain the initial optimized individual; Based on the preset objective function value and the acceptance criterion parameters of the search individual, the initial optimized individual is evaluated and accepted, and the selection weights of the destruction operator and the repair operator are dynamically adjusted based on the judgment results. Determine whether the preset individual iteration conditions are met. If not, replace the initial selection weight with the dynamically adjusted selection weight, replace the search individual with the initial optimized individual, and return to execute the process of randomly selecting the initial destruction operator and the initial repair operator from the preset destruction operator library and the preset repair operator library based on the initial selection weight.
3. The vehicle routing method according to claim 1, characterized in that, The step of performing a dynamic screening operation on the optimized population to obtain an elite population includes: Based on the preset objective function value, an evaluation and ranking operation is performed on the optimized population to obtain the ranking result; Based on the ranking results, the elite individuals and inferior individuals in the elite population are identified; The elite individuals are retained while the inferior individuals are eliminated, forming an elite population.
4. A vehicle route planning device, characterized in that, include: The first generation module is used to define the configuration space of operator parameters, and based on the configuration space, generate multiple initial parameter combinations to obtain an initial parameter set; Specifically, the vehicle routing requirements are obtained, and a configuration space for operator parameters is defined based on these requirements. The operator parameters include destructive operator parameters, repair operator parameters, and acceptance criterion parameters. The configuration space is a range of legal parameter values specifically constructed for the vehicle routing problem. Based on the configuration space, multiple parameter combinations are generated using a random sampling method, and each parameter combination corresponds to a set of path search rules. The multiple parameter combinations are then integrated to obtain an initial parameter set. The second generation module is used to obtain vehicle route planning requirements and generate multiple initial path solutions based on these requirements, thus obtaining an initial solution set. Specifically, the vehicle route planning requirements are obtained, including customer coordinates, customer required weight, vehicle load limit, and delivery center location. Starting from the delivery center location, multiple initial path solutions are generated using a route planning algorithm. Each initial path solution satisfies preset basic route planning constraints, including no overload constraints and full customer node coverage constraints. The multiple initial path solutions are then integrated to obtain the initial solution set. A construction module is used to construct multiple search individuals based on the initial parameter set and the initial solution set to obtain an initial population; specifically, it obtains the computing resource configuration, determines the size information of the initial population according to the computing resource configuration; based on the size information, it randomly combines any initial parameter combination and any initial path solution from the initial parameter set and the initial solution set to construct multiple search individuals; and it integrates the multiple search individuals to obtain the initial population. The optimization module is used to perform parallel local optimization on each search individual in the initial population to obtain an optimized population; The filtering module is used to perform dynamic filtering operations on the optimized population to obtain an elite population; The evolution module is used to perform co-evolution processing on the elite population to obtain an evolved population; specifically, it determines whether a preset search stagnation condition is met. If the preset search stall condition is not met, the crossover operator is used to generate evolved individuals based on the elite population; If the preset search stagnation condition is met, then the crossover operator and the diversification operator are used to generate evolved individuals based on the elite population, the initial parameter set, and the initial solution set; the elite population and the evolved individuals are integrated to obtain the evolved population. The loop module is used to determine whether the preset iteration stopping condition is met based on the evolutionary population. If not, the evolutionary population is used to replace the initial population, and the process returns to perform parallel local optimization on each search individual in the initial population to obtain the optimized population.
5. A vehicle routing planning device, characterized in that, The vehicle routing device includes: a memory and at least one processor, wherein the memory stores instructions; At least one of the processors invokes the instructions in the memory to cause the vehicle routing device to perform the steps of the vehicle routing method as described in any one of claims 1-3.
6. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions are executed by the processor, they implement the various steps of the vehicle routing method as described in any one of claims 1-3.
Citation Information
Patent Citations
Vehicle routing planning method and planning system
CN105157712A
Path planning method for multi-parking-lot distribution
CN116362435A