CN-122022659-A - Logistics distribution path acquisition method, device, equipment and storage medium
Abstract
The invention is applicable to the technical field of computers, and provides a method, a device, equipment and a storage medium for acquiring a logistics distribution path, wherein the method comprises the following steps: modeling a logistics distribution path plan as a CVRP model based on an optimization target and constraint conditions, generating CVRP model examples according to positions of clients to be distributed, distribution amount of each client to be distributed and distribution vehicle capacity, obtaining CVRP model examples, randomly inserting initial solutions, destroying and reconstructing distribution paths corresponding to the randomly inserted initial solutions based on CVRP model examples and preset number of first path destruction heuristics, obtaining a coarse-granularity solution of CVRP model examples, locally searching distribution paths corresponding to the coarse-granularity solution based on CVRP model examples and preset number of second path destruction heuristics, obtaining fine-granularity solutions of CVRP model examples, determining the fine-granularity solutions as optimal solutions of CVRP model examples, and determining optimal logistics distribution paths according to the optimal solutions.
Inventors
- LI GENGHUI
- Dong Xinbu
- LIU XIANGSHENG
- LI ZHENYI
- CUI LAIZHONG
- LIU SONGBAI
- MA LIJIA
- LIN QIUZHEN
Assignees
- 深圳大学
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1.A method for obtaining a logistics distribution path, the method comprising the steps of: Receiving an optimization target and constraint conditions of a logistics distribution path plan, and modeling the logistics distribution path plan as a CVRP model based on the optimization target and constraint conditions, wherein the optimization target is used for minimizing the total travel distance of all vehicle distribution paths; generating CVRP model examples according to the positions of the clients to be distributed, the distribution amount of each client to be distributed and the distribution vehicle capacity, and obtaining random insertion initial solutions of the CVRP model examples; based on the CVRP model instance and a preset number of first path damage heuristics, carrying out damage and reconstruction on the distribution path corresponding to the random insertion initial solution to obtain a coarse-grained solution of the CVRP model instance; based on the CVRP model instance and a preset number of second path damage heuristics, carrying out local search on the distribution path corresponding to the coarse-granularity solution to obtain a fine-granularity solution of the CVRP model instance; And determining the fine-granularity solution as an optimal solution of the CVRP model example, and determining an optimal logistics distribution path according to the optimal solution.
- 2. The method of claim 1, wherein the step of obtaining a random insertion initial solution for the CVRP model instance comprises: Initializing a non-access client node set according to the positions of clients to be distributed and the distribution amount of each client to be distributed; Constructing vehicle delivery paths one by taking a delivery center as a starting point, and calculating distance increment generated by inserting each non-visited client node into different positions of the current vehicle delivery path under the constraint of the delivery vehicle capacity; Selecting a plurality of candidate nodes with the distance increment smaller than a preset increment, randomly selecting one candidate node from the plurality of candidate nodes to be inserted into the corresponding position of the current vehicle distribution path, and starting the next vehicle distribution path until all the client nodes are accessed when the current vehicle distribution path cannot be continuously inserted into the client nodes, so as to obtain the random insertion initial solution.
- 3. The method of claim 1, wherein the step of destroying and reconstructing the distribution path corresponding to the randomly inserted initial solution based on the CVRP model instance and a predetermined number of first path destruction heuristics to obtain a coarse-grained solution for the CVRP model instance comprises: generating a preset number of damage parameter matrixes by utilizing the preset number of first path damage heuristics, wherein each damage parameter matrix represents the continuous damage times, the damage starting index of each damage-reconstruction iteration and the sub-path length; and according to each damage parameter matrix, carrying out continuous damage times damage and reconstruction on the distribution path corresponding to the random insertion initial solution based on the CVRP model instance in parallel to obtain the coarse-granularity solution.
- 4. The method of claim 3, wherein the step of destroying and reconstructing the distribution path corresponding to the randomly inserted initial solution based on the CVRP model instance and a predetermined number of first path destruction heuristics, before the step of obtaining a coarse-grained solution for the CVRP model instance, comprises: step a, prompting a first LLM to generate a preset number of parent heuristic by using a first optimization strategy prompting word for a plurality of times; Step b, based on the father heuristic and a plurality of different path evolution strategies, prompting the first LLM by using a first evolution strategy prompt word to generate a preset number of offspring heuristic strategies for each path evolution strategy; and c, carrying out adaptability evaluation on all the father heuristics and the offspring heuristics by utilizing training examples in the training set, setting the heuristics with preset values before the adaptability ranking as the next generation father, judging whether the first iteration times are reached, setting the next generation father as the first path damage heuristics if the first iteration times are reached, otherwise, jumping to the step b, wherein the preset values are the same as the preset values.
- 5. The method of claim 1, wherein the step of locally searching the delivery path corresponding to the coarse-grained solution based on the CVRP model instance and a preset number of second path disruption heuristics to obtain a fine-grained solution for the CVRP model instance comprises: generating a candidate node matrix by using the second path disruption heuristic based on the CVRP model instance and the coarse-grained solution; and based on the CVRP model instance, executing 2-opt operation guided by the candidate node matrix for each coarse-granularity solution for a preset round to obtain a corresponding fine-granularity solution.
- 6. The method of claim 5, wherein prior to the step of locally searching the distribution path corresponding to the coarse-grained solution based on the CVRP model instance and a preset number of second path-breaking heuristics, comprising: Step a, prompting a second LLM to generate a preset number of parent heuristic by using a second optimization strategy prompting word for a plurality of times; Step b, based on the father heuristic and a plurality of different path evolution strategies, prompting the second LLM by using a second evolution strategy prompting word to generate a preset number of offspring heuristic strategies for each path evolution strategy; And c, carrying out fitness evaluation on all the father heuristics and the offspring heuristics by utilizing training examples in a training set, setting the heuristics with preset values before ranking the fitness as the next generation father, judging whether the second iteration times are reached, setting the next generation father as the second path damage heuristics if the second iteration times are reached, otherwise, jumping to the step b, wherein the preset values are the same as the preset values, and the second optimization strategy prompt words and the second evolution strategy prompt words are generated based on the 2-opt operation.
- 7. The method of claim 6, wherein generating a candidate node matrix using the second path disruption heuristic based on the CVRP model instances and the coarse-grained solution comprises: determining the neighborhood of each node according to the position of the node in the coarse-granularity solution based on the CVRP model instance; and in each neighborhood, calculating the score of each neighborhood node by using the second path disruption heuristic, setting the score Top-K node as a candidate node of the current node, and generating a candidate node matrix based on the candidate node of each node.
- 8. A logistics distribution path acquisition apparatus, said apparatus comprising: The planning modeling unit is used for receiving an optimization target and constraint conditions of logistics distribution path planning, and modeling the logistics distribution path planning into a CVRP model based on the optimization target and constraint conditions, wherein the optimization target is used for minimizing the total travel distance of all vehicle distribution paths; The first solution obtaining unit is used for generating CVRP model examples according to the positions of the clients to be distributed, the distribution amount of each client to be distributed and the distribution vehicle capacity, and obtaining random insertion initial solutions of the CVRP model examples; the second solution obtaining unit is configured to break and reconstruct the distribution path corresponding to the random insertion initial solution based on the CVRP model instance and a preset number of first path break heuristics, so as to obtain a coarse-granularity solution of the CVRP model instance; A third solution obtaining unit, configured to perform local search on the delivery path corresponding to the coarse-granularity solution based on the CVRP model instance and a preset number of second path damage heuristics to obtain a fine-granularity solution of the CVRP model instance, and And the optimal path determining unit is used for determining the fine-granularity solution as an optimal solution of the CVRP model example and determining an optimal logistics distribution path according to the optimal solution.
- 9. A computing device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
- 10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
Description
Logistics distribution path acquisition method, device, equipment and storage medium Technical Field The invention belongs to the technical field of software, and particularly relates to a method, a device, equipment and a storage medium for acquiring a logistics distribution path. Background In modern urban logistics distribution systems, it is often necessary to schedule a plurality of distribution vehicles to provide distribution services for customers distributed in different geographical locations, each customer corresponding to a certain number of distribution demands, and the distribution vehicles typically have fixed loading capacity and distribution range limitations. In the actual distribution process, the system needs to plan reasonable distribution paths for a plurality of distribution vehicles according to the information of the client positions, the number of the demands, the vehicle capacity and the like, so that all the client demands are met, and meanwhile, the whole transportation distance or the transportation cost is reduced as much as possible. With the rapid development of electronic commerce and instant logistics industry, the number of clients in the urban distribution network is continuously increased, and distribution requirements are characterized by large scale, complex distribution, rapid dynamic change and the like. In a large-scale distribution scene, how to plan a high-quality distribution path for a plurality of vehicles in a reasonable time becomes a key optimization problem in a logistics system. Because the number of delivery path combinations grows exponentially with the customer size, solving directly through exhaustion is computationally infeasible, and therefore efficient path optimization algorithms need to be relied upon to obtain near optimal delivery schemes. The current research on the problem of optimizing the distribution path mainly comprises a manual design heuristic algorithm, a neural network driven combination optimization method, a method for assisting in algorithm design by using a large language model, and the like. The traditional heuristic algorithm is usually to manually design a specific search rule or neighborhood operation, continuously adjust the distribution path to obtain a better solution, and the neural combination optimization method is to train a deep neural network learning path generation strategy so that the model can directly generate the distribution path according to the information such as the client position and the like. In recent years, with the development of large language models, some studies have begun to attempt to generate heuristic strategies or auxiliary optimization processes with large language models to reduce the reliance on manual rule design. However, in a large-scale urban logistics distribution scene, the existing method still has obvious defects in solving efficiency, searching capability, algorithm stability and the like. For example, heuristic search rules depend on manual design, adaptability is limited, errors are easily accumulated in a neural network generated path, a high-quality distribution scheme is difficult to obtain stably, and an existing large language model auxiliary method lacks a stable optimization cooperative mechanism, so that unstable search process is easily caused, and overall solving efficiency and solution quality are affected. Disclosure of Invention The invention aims to provide a method, a device, equipment and a storage medium for acquiring a logistics distribution path, which aim to solve the problem that the efficiency of acquiring the logistics distribution path is poor because the prior art cannot provide an effective method for acquiring the logistics distribution path. In a first aspect, the present invention provides a method for obtaining a logistics distribution path, the method comprising the steps of: receiving an optimization target and constraint conditions of a logistics distribution path plan, and modeling the logistics distribution path plan as a CVRP (CAPACITATED VEHICLE Routing Problem, vehicle path Problem with capacity constraint) model based on the optimization target and constraint conditions, wherein the optimization target is used for minimizing the total travel distance of all vehicle distribution paths; generating CVRP model examples according to the positions of the clients to be distributed, the distribution amount of each client to be distributed and the distribution vehicle capacity, and obtaining random insertion initial solutions of the CVRP model examples; based on the CVRP model instance and a preset number of first path damage heuristics, carrying out damage and reconstruction on the distribution path corresponding to the random insertion initial solution to obtain a coarse-grained solution of the CVRP model instance; based on the CVRP model instance and a preset number of second path damage heuristics, carrying out local search on the distribution p