A multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variation

CN122573335APending Publication Date: 2026-08-14NANJING UNIV OF INFORMATION SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-30
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

总服务代价目标容易导致少数车辆承担极长路线、其余车辆路线过短的不均衡现象,无法满足实际作业中对工作负荷公平性的需求

Benefits of technology

[0051]针对多仓库、多车辆的物流配送场景,旨在通过智能优化算法合理规划各车辆的行驶路径,在满足所有用户被精确覆盖的前提下,本方法最小化所有车辆路径中的最大服务代价,从而实现车辆工作量的均衡分配。可广泛应用于城市快递配送、工厂物料搬运、外卖即时配送、应急物资调度等需要多车协同作业的领域,尤其适用于大规模、动态变化的物流网络。通过将边组装交叉算子、用户重分配变异机制与融合用户节点删除与插入和2-opt的局部搜索相结合,能够在保证求解效率的同时显著提升路径规划质量,为物流企业提供智能化、协同化的决策支持,有效降低运营成本、提高资源利用率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122573335A_ABST
    Figure CN122573335A_ABST
Patent Text Reader

Abstract

This invention provides a multi-vehicle collaborative method that integrates edge assembly crossover and user redistribution mutation, aiming to solve the challenges of uneven load distribution and maximum service cost optimization in multi-warehouse vehicle routing planning. This invention constructs alternating loops through an edge assembly crossover strategy, combined with sub-path splitting and merging based on minimum incremental cost, achieving load balancing while inheriting high-quality paths; it enhances global exploration capabilities by utilizing user redistribution mutation operators; and it integrates node deletion and insertion with 2-opt local search for refined operations, effectively reducing the maximum service cost. This solution balances total cost and operational balance, significantly improving logistics scheduling efficiency and achieving cost savings and efficiency gains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of scheduling optimization, and in particular relates to a multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variation. Background Technology

[0002] Multi-vehicle routing is a widely applied problem in logistics distribution, express sorting, and factory material handling, and is a typical NP-hard problem. Typically, businesses need to dispatch multiple logistics vehicles from multiple warehouses to provide delivery or pickup services to users scattered throughout a city, requiring the vehicles to return to their respective originating warehouses after completing their tasks. One of the core objectives of this problem is to balance the workload of each vehicle, that is, to minimize the maximum service cost across all vehicle routes, in order to avoid excessive fatigue of some vehicles, resource idleness, and overall inefficiency.

[0003] Existing methods face several challenges when dealing with multi-vehicle routing problems. First, most research focuses on optimizing the total service cost, while relatively few studies aim to minimize the maximum service cost across all vehicle routes. The total service cost objective can easily lead to an imbalance where a few vehicles take on extremely long routes while others take excessively short routes, failing to meet the workload fairness requirements of real-world operations. Second, most existing methods presuppose fixed warehouse locations, while in actual operation, warehouses can often be flexibly selected from candidate users, limiting the optimization space. Furthermore, when facing large-scale, multi-vehicle problems, the accuracy and stability of existing algorithms often decrease significantly. Summary of the Invention

[0004] Purpose of the invention: The technical problem to be solved by this invention is to address the shortcomings of existing technologies by providing a multi-logistics vehicle collaborative method that integrates side-assembly crossover and user redistribution variations, including the following steps:

[0005] Step S1, Information Reading and Problem Modeling: Obtain logistics user information and vehicle information. The logistics user information includes the number of users, user location coordinates, and transportation service costs between users. The vehicle information includes the number of vehicles. The multi-logistics vehicle route planning problem is modeled as a constrained optimization problem with the optimization objective of minimizing the maximum service cost among all vehicle routes. This ensures that each user is visited by only one vehicle once, and that each vehicle departs from and returns to its selected warehouse, forming a closed path.

[0006] Step S2: Initialize the population using a random initialization method, initializing the population size NP and the mutation probability P. MInitialize the maximum fitness evaluation count Max_FV, initialize the local search nearest neighbor count parameter k, initialize the longest subpath splitting threshold, and evaluate the fitness of each individual, i.e., the service cost of the longest subpath in the path scheme corresponding to each individual; record the current global optimal solution;

[0007] Step S3: Randomly shuffle the individuals in the population, select adjacent individuals (each individual is selected only once) for pairwise crossover. If the population size is odd, the last individual does not participate in the crossover and directly enters the new population. Perform adaptive edge assembly crossover operation on each selected parent individual to generate two new child individuals. The crossover operation generates intermediate solutions by constructing alternating cycles and exchanging edge sets. Then, adopt a splitting and merging strategy based on minimum incremental cost to balance the load of each sub-path while inheriting the excellent edge structure of the parent.

[0008] Step S4: For each individual, first generate a random number rand∈[0,1). If rand... <P M If the user is not found to be in the solution space, the user reassignment mutation operation is performed; otherwise, the user reassignment mutation operation is skipped. The user reassignment mutation operation includes: removing a user using a roulette wheel strategy and then using a roulette wheel strategy to select a position for insertion in order to explore a new solution space.

[0009] Step S5: For each individual, a local search strategy combining user node deletion and insertion with 2-opt is executed. 2-opt is a local search operator that attempts to optimize the service cost of a path by selecting two users in the path and reversing the path sequence. First, the 2-opt operator is used to optimize the internal structure of each sub-path of all individuals in the population. Then, users are migrated between sub-paths to balance the load through the user node deletion and insertion strategy. Finally, the 2-opt operator is applied to each sub-path of the best individual in the population for further optimization.

[0010] Step S6: Merge the parent population with the offspring population generated in steps S3 to S5, select the NP individuals with the best fitness values ​​to form a new generation population, and update the global optimal solution.

[0011] Step S7: If the iteration termination condition is not met, proceed to step S3; if it is met, output the globally optimal logistics vehicle route planning scheme.

[0012] In step S1, the logistics user information includes the number of users N, the user location coordinates (x, y), and the service cost d between user i and user j. ij Vehicle information includes the number of vehicles M; it also uses direct path encoding to store a set of M sub-paths; where x represents the horizontal coordinate and y represents the vertical coordinate.

[0013] In step S1, the optimization objective is to minimize the maximum service cost across all vehicle paths, mathematically expressed as follows:

[0014] ,

[0015] Here, the maximum service cost across all vehicle paths is denoted by Z, and Minimize Z means minimizing the objective value Z. Let be a binary decision variable, representing whether vehicle k travels directly from user i to user j. If vehicle k travels directly from user i to user j, then... The value is 1 if it is set to 1, and 0 otherwise.

[0016] The constraints include: each user is visited by exactly one vehicle once, each vehicle's path forms a closed loop, and each vehicle visits at least two users.

[0017] Step S2 includes: First, randomly shuffle the access order of all users and perform two rounds of allocation. In the first round, M users are extracted from the shuffled sequence as the starting warehouses for each vehicle. In the second round, M more users are extracted and allocated to each vehicle to ensure that each vehicle's path contains at least two users. Then, the remaining unallocated users are randomly inserted into the existing paths.

[0018] In step S3, the adaptive edge assembly cross operation includes the following steps:

[0019] Step S301: Extract the corresponding edge sets E1 and E2 from the two parent individuals P1 and P2 according to their paths, and then merge the two edge sets E1 and E2 to construct a union to obtain graph G (if a certain edge appears in both E1 and E2, then both edges are recorded in graph G).

[0020] Step S302 involves alternately tracing edges from edge sets E1 and E2 in graph G to generate several alternating cycles. Specifically, this includes: selecting any unused edge from graph G as the starting edge, adding the starting edge to the current cycle, and marking the affiliation of the starting edge as parent generation 1; setting the endpoint h of the current edge, and then searching for an unused edge with endpoint h in the edge set of another parent generation 2 (since the graph is a complete graph and each node has a degree of 2 in both parents, such an edge must exist), and adding it to the current cycle; then, starting from the other endpoint of the newly added edge, continuing to search for the next unused edge from the edge set of parent generation 1, and alternating the selection process; when returning to the starting point of the starting edge, a closed loop is formed, called an alternating cycle.

[0021] Repeat step S302, and all edges are divided into several alternating cycles;

[0022] Step S303: Select the alternating cycle with the most edges as the central alternating cycle, and apply it to the two parent individuals P1 and P2 to generate temporary sub-path set 1 and temporary sub-path set 2 respectively. The specific operations include: removing the P1 edges belonging to the central alternating cycle in the parent individual P1 and adding the P2 edges belonging to the central alternating cycle, arranging the resulting cycles in descending order of edge count, and deleting the longest cycle to obtain temporary sub-path set 1; removing the P2 edges belonging to the central alternating cycle in P2 and adding the P1 edges belonging to the central alternating cycle, arranging the resulting cycles in descending order of edge count, and deleting the longest cycle to obtain temporary sub-path set 2.

[0023] Step S304: Divide the edge set extracted based on the selected alternating ring into two categories. The edge set used to operate on parent P1 is denoted as operation edge set 1, and the edge set used to operate on parent P2 is denoted as operation edge set 2. First, add the central alternating ring to both operation edge set 1 and operation edge set 2. Then, add the alternating rings that share a common vertex with temporary sub-path set 1 (excluding the central alternating ring) to operation edge set 1. Add the alternating rings that share a common vertex with temporary sub-path set 2 (excluding the central alternating ring) to operation edge set 2.

[0024] Step S305: For the original P1 operation, intermediate solution 1 is generated by removing P1 edges belonging to operation edge set 1 and adding P2 edges belonging to operation edge set 1; for the original P2 operation, intermediate solution 2 is generated by removing P2 edges belonging to operation edge set 2 and adding P1 edges belonging to operation edge set 2.

[0025] Step S306: Apply subpath splitting and merging operations based on minimum incremental cost to intermediate solution 1 and intermediate solution 2 respectively. All intermediate solutions first need to check whether the ratio of the service cost of the longest subpath to the shortest subpath exceeds the set subpath splitting threshold. If it exceeds the threshold, the longest subpath will be split until it does not exceed the threshold (the longest subpath will be updated after each split). Then, the number of subpaths of each solution is checked. If the number of subpaths is greater than the number of vehicles M, the subpath merging operation is used until the number of subpaths equals M. If the number of subpaths is less than the number of vehicles M, the subpath splitting operation is used until the number of subpaths equals M. If the number of subpaths equals the number of vehicles M, no splitting or merging is performed.

[0026] In step S306, the sub-path splitting and merging operation based on minimum incremental cost is used to split the longest sub-path into two, and the split incremental cost is calculated accordingly. The calculation formula is as follows:

[0027] ,

[0028] Where e1 and e2 are two non-adjacent edges deleted from the atomic path, e3 and e4 are two new edges added, and d(e1), d(e2), d(e3), and d(e4) represent the service costs on edges e1, e2, e3, and e4, respectively; exhaustive search is used to... Minimize the number of split pairs to achieve load balancing while minimizing the increase in total service cost;

[0029] The subpath merging operation is used to merge two subpaths into one, merging the incremental cost. The calculation is as follows:

[0030] ,

[0031] Where l1 and l2 represent edges from two different sub-paths, l3 and l4 are the two added connecting edges, and d(l1), d(l2), d(l3), and d(l4) represent the service costs on edges l1, l2, l3, and l4, respectively; by selecting... Merging is achieved using the least number of connections.

[0032] In step S4, the user reallocation mutation operation includes the following steps:

[0033] Step S401: For each subpath containing at least three users, first calculate the reduction in subpath service cost after removing each candidate user i. ;

[0034] Step S402, based on the reduction amount Construct a roulette wheel selection probability to choose a user v to be removed, where the user with the greater reduction in service cost has a higher probability of being selected, and the probability P of user i being deleted is... i The calculation formula is:

[0035] ,

[0036] Where C is the set of all candidate users that satisfy the condition that their subpath contains at least three users. This represents the minimum service cost reduction after removing each city from the candidate user set C. This represents the maximum reduction in service cost after removing each city from the candidate user set C. ε represents the reduction in subpath service cost after removing user u, where ε is a very small positive constant approaching 0;

[0037] Step S403: Remove user v from its atomic path;

[0038] Step S404: Traverse all feasible insertion positions on all other sub-paths and calculate the increase in service cost of the sub-path after insertion. ;

[0039] Step S405, based on the increase amount Construct a roulette wheel selection probability to choose an insertion position, where positions with smaller increments have a higher probability of being selected. The probability F of user v inserting at position j is given. j The calculation formula is:

[0040] ,

[0041] in This represents the minimum increase in service cost across all insertion positions. This represents the maximum increase in service cost across all insertion positions. This represents the increase in service cost of the subpath where user v is inserted at position t;

[0042] S406, Insert user v into the selected position to generate a new individual.

[0043] In step S5, the fusion of user node deletion and insertion with the 2-opt local search strategy includes the following steps:

[0044] Step S501: Perform 2-opt optimization independently on each sub-path of each individual in the population. The 2-opt operator attempts to reduce the service cost of the sub-path by selecting two nodes in the path and reversing the path sequence.

[0045] Step S502: For each individual, iteratively execute the user node deletion and insertion strategy: find the longest sub-path in the current individual. If the number of users in the longest sub-path is not less than 3, find the user whose removal would reduce the service cost of the longest sub-path the most and temporarily remove the user.

[0046] Step S503: Use the k nearest neighbor heuristic to find the k nearest neighbor users of the removed user. The sub-paths to which the k nearest neighbor users belong (excluding the original sub-paths of the removed user) are the candidate target sub-paths.

[0047] In step S504, if the candidate target sub-path is not empty, search for the insertion position that minimizes the path service cost increment in the candidate target sub-path. If this move reduces the service cost of the longest sub-path in the entire path scheme, accept the move and repeat steps S502 to S504. Otherwise, roll back the move and terminate the local search of the current individual. If the candidate target sub-path is empty, skip step S504.

[0048] Step S505: For the updated population, find the individual with the best fitness value, perform another round of 2-opt optimization on all sub-paths of the individual with the best fitness value, and output the final population.

[0049] In step S6, an elite environment selection strategy is adopted to merge the parent and offspring populations, sort them in ascending order according to their fitness values, and select the top NP optimal individuals to form a new generation population, ensuring that the optimal solution is not lost during the evolution process.

[0050] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.

[0051] For logistics and delivery scenarios involving multiple warehouses and vehicles, this method aims to rationally plan the travel routes of each vehicle through intelligent optimization algorithms. While ensuring accurate coverage of all users, it minimizes the maximum service cost across all vehicle routes, thereby achieving a balanced distribution of vehicle workload. It can be widely applied to fields requiring multi-vehicle collaborative operations, such as urban express delivery, factory material handling, on-demand food delivery, and emergency material dispatch, and is particularly suitable for large-scale, dynamically changing logistics networks. By combining edge assembly crossover operators, user redistribution mutation mechanisms, and a fusion of user node deletion and insertion with 2-opt local search, the method significantly improves path planning quality while maintaining solution efficiency. This provides intelligent and collaborative decision support for logistics companies, effectively reducing operating costs and improving resource utilization.

[0052] Beneficial effects: 1. Problem modeling is more aligned with practical application needs: This invention provides a precise model of the multi-vehicle route planning problem, with the optimization objective being to minimize the maximum service cost among all vehicle routes. Furthermore, the vehicle departure warehouse is not pre-fixed but dynamically selected by the algorithm. Compared to existing technologies that often use fixed warehouses or only optimize the total distance, this invention better meets the needs of workload balancing and flexible warehouse location in actual logistics distribution, thus possessing higher practical value.

[0053] 2. The algorithm design is highly innovative and effectively resolves the core conflict: This invention designs a multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution mutation. Addressing the fundamental conflict between the inherent aggregation tendency of the original edge assembly crossover operator and the objective of minimizing the maximum service cost across all vehicle paths, it innovatively introduces a sub-path splitting and merging strategy based on minimum incremental cost. This allows the algorithm to intelligently dismantle excessively long "superpaths" while inheriting the superior edge structure of its parent generation. Furthermore, the proposed user redistribution mutation operator and the local search strategy that integrates user node deletion and insertion with 2-opt further enhance the algorithm's local optimization capability and convergence accuracy. Attached Figure Description

[0054] Figure 1This is the main flowchart of the multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variation of the present invention.

[0055] Figure 2 This is a schematic diagram of parent generation 1 and parent generation 2 in this invention.

[0056] Figure 3 This is a schematic diagram of all alternating loops generated by the two parent edge sets in this invention.

[0057] Figure 4 This is a schematic diagram of the temporary sub-path set 1 and temporary sub-path set 2 constructed in this invention.

[0058] Figure 5 This is a schematic diagram of the operation edge set 1 generated by the present invention.

[0059] Figure 6 This is a schematic diagram of the operation edge set 2 generated by the present invention.

[0060] Figure 7 This is a schematic diagram of intermediate solution 1 and intermediate solution 2 generated by the present invention.

[0061] Figure 8 This is a schematic diagram of the offspring 1 and offspring 2 generated by the present invention.

[0062] Figure 9 This is a schematic diagram showing the user redistribution mutation operation before and after the operation in this invention.

[0063] Figure 10 This is a schematic diagram of the global optimal path scheme finally output by the algorithm of this invention. Detailed Implementation

[0064] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0065] This invention provides a multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variations, such as... Figure 1 As shown, it includes the following steps:

[0066] Step 1: Obtain logistics user and vehicle information, then model the problem. In this example, path length is used as the service cost, the number of users N=51, and user location coordinates are points on a two-dimensional plane. The number of vehicles M=3. The transportation distance between user i and user j is... The departure warehouse for each vehicle is not predetermined; it will be randomly selected from users during the initialization phase by the algorithm. User data is shown in Table 1. The multi-vehicle routing problem is then modeled. The goal of this embodiment is to find M=3 closed paths, each starting from and returning to a selected warehouse (user), covering all 51 users, while minimizing the total length of the longest path.

[0067] Table 1 Location coordinates of all users

[0068]

[0069] Step 2: Initialize the population and algorithm parameters. The algorithm parameters in this embodiment are set based on a small-scale instance, as shown in Table 2.

[0070] Table 2 Algorithm Parameter Settings

[0071]

[0072] An initial population is generated using a random initialization method: First, the access order of 51 users is randomly shuffled. From the shuffled sequence, three users are sequentially selected as the starting warehouses for each vehicle. Then, three more users are selected and assigned to each vehicle, ensuring that each vehicle's path contains at least two users. The remaining 45 users are then randomly inserted into the existing paths. This process is repeated to generate 100 initial individuals, each containing a set of three sub-paths. The fitness value (i.e., the length of its longest sub-path) of each individual is calculated, and the global optimal solution is recorded.

[0073] Step 3: Perform adaptive edge assembly and crossover operation (taking the first parent pair as an example).

[0074] The individuals in the population are randomly shuffled, and adjacent individuals are selected (each individual is selected only once) for pairwise crossover, for a total of 50 crossovers. This step takes a pair of parents 1 and 2 in the population as an example (e.g., Figure 2 As shown in the diagram, this illustrates the complete process of edge assembly and intersection. The path scheme of the parent individual is as follows:

[0075] Step 301: After population perturbation, select parent generation 1 as [Logistics vehicle 1: (48, 6, 46, 12, 5, 17, 47, 18, 40, 19, 44, 15, 10, 34, 21, 28, 8, 48); Logistics vehicle 2: (3, 20, 29, 16, 50, 37, 45, 42, 41, 13, 14, 24, 43, 23, 7, 26, 31, 22, 3); Logistics vehicle 3: (11, 38, 49, 9, 30, 39, 33, 4, 25, 51, 27, 32, 1, 36, 35, 2, 11)], with a fitness value of 228.37.

[0076] The parent vehicle 2 is selected as [Logistics Vehicle 1: (25, 19, 45, 46, 32, 38, 34, 21, 36, 1, 8, 7, 43, 6, 25); Logistics Vehicle 2: (41, 13, 14, 24, 23, 26, 31, 22, 20, 35, 29, 2, 16, 50, 30, 49, 37, 12, 47, 4, 44, 42, 40, 41); Logistics Vehicle 3: (48, 27, 51, 18, 17, 15, 33, 39, 10, 9, 5, 11, 3, 28, 48)], with a fitness value of 264.96.

[0077] Step 302, generate an alternating cycle, tracing alternately from the edge sets of the two parent generations, such as... Figure 3 The diagram shows the generation of 6 alternating cycles, with the following vertex sequence: [Alternating Cycle 1: (48, 6, 43, 24, 14, 13, 41, 42, 44, 19, 25, 4, 47, 17, 18, 47, 12, 46, 45, 37, 49, 38, 32, 27, 48); Alternating Cycle 2: (6, 46, 32, 1, 36, 1, 8, 28, 3, 20, 22, 31, 26, 7, 8, 48, 28, 21, 34, 10, 39, 30, 50, 16, 2, 35, 20, 29, 3 5, 36, 21, 34, 38, 11, 5, 12, 37, 50, 16, 29, 2, 11, 3, 22, 31, 26, 23, 43, 7, 23, 24, 14, 13, 41, 40, 18, 51, 25, 6); Alternating ring 3: (5, 17, 15, 44, 4, 33, 15, 10, 9, 49, 30, 9, 5); Alternating ring 4: (40, 19, 45, 42, 40); Alternating ring 5: (39, 33, 39); Alternating ring 6: (51, 27, 51)];

[0078] Step 303: Construct temporary sub-path set 1 and temporary sub-path set 2. First, alternating cycle 2, containing the most edges, is selected as the central alternating cycle. Based on the central alternating cycle, edges belonging to parent generation 1 in the central alternating cycle are deleted, and edges belonging to parent generation 2 in the central alternating cycle are added, resulting in several sub-cycles. These sub-cycles are sorted in descending order of edge count, and the sub-cycle with the most edges is deleted, constructing temporary sub-path set 1. Similarly, edges belonging to parent generation 2 in the central alternating cycle are deleted, and edges belonging to parent generation 1 in the central alternating cycle are added, resulting in several sub-cycles. These sub-cycles are sorted in descending order of edge count, and the sub-cycle with the most edges is deleted, constructing temporary sub-path set 2. Finally, as... Figure 4As shown, the temporary sub-loop set 1 is [(24, 43, 7, 8, 1, 36, 21, 34, 38, 49, 9, 30, 50, 16, 2, 29, 35, 20, 22, 31, 26, 23, 24), (13, 14, 13)], and the temporary sub-loop set 2 is [(32, 38, 11, 2, 35, 36, 1, 32), (41, 13, 41), (14, 24, 14)].

[0079] Step 304: Construct operation edge set 1 and operation edge set 2. Based on the central alternating ring, first add the central alternating ring to both operation edge set 1 and operation edge set 2. Then, add all alternating rings (excluding the central alternating ring) to operation edge set 1 if they share a common point with temporary sub-loop set 1, and to operation edge set 2 if they share a common point with temporary sub-loop set 2. Finally, as shown... Figure 5 As shown, operation edge set 1 contains 3 alternating cycles: [Alternating cycle 2: (6, 46, 32, 1, 36, 1, 8, 28, 3, 20, 22, 31, 26, 7, 8, 48, 28, 21, 34, 10, 39, 30, 50, 16, 2, 35, 20, 29, 35, 36, 21, 34, 38, 11, 5, 12, 37, 50, 16, 29, 2, 11, 3, 22, 31, 26, 23, 43, 7.] 23, 24, 14, 13, 41, 40, 18, 51, 25, 6); Alternating ring 1: (48, 6, 43, 24, 14, 13, 41, 42, 44, 19, 25, 4, 47, 17, 18, 47, 12, 46, 45, 37, 49, 38, 32, 27, 48); Alternating ring 3: (5, 17, 15, 44, 4, 33, 15, 10, 9, 49, 30, 9, 5)]; Operation edge set 2 as Figure 6 As shown, it contains two alternating cycles: [Alternating cycle 2: (6, 46, 32, 1, 36, 1, 8, 28, 3, 20, 22, 31, 26, 7, 8, 48, 28, 21, 34, 10, 39, 30, 50, 16, 2, 35, 20, 29, 35, 36, 21, 34, 38, 11, 5, 12, 37, 50, 16, 29, 2] 11, 3, 22, 31, 26, 23, 43, 7, 23, 24, 14, 13, 41, 40, 18, 51, 25, 6); Alternating ring 1: (48, 6, 43, 24, 14, 13, 41, 42, 44, 19, 25, 4, 47, 17, 18, 47, 12, 46, 45, 37, 49, 38, 32, 27, 48)]

[0080] Step 305: Generate intermediate solutions. For parent generation 1, delete edges belonging to parent generation 1 from operation edge set 1, and add edges belonging to parent generation 2 from operation edge set 1, obtaining intermediate solution 1. For parent generation 2, delete edges belonging to parent generation 2 from operation edge set 2, and add edges belonging to parent generation 1 from operation edge set 2, obtaining intermediate solution 2. The two intermediate solutions are as follows: Figure 7 As shown, the specific path is as follows:

[0081] Intermediate Solution 1: [(40, 19, 25, 6, 43, 7, 8, 1, 36, 21, 34, 38, 32, 46, 45, 42, 44, 4, 47, 12, 37, 49, 30, 50, 16, 2, 29, 35, 20, 22, 31, 26, 23, 24, 14, 13, 41, 40); (39, 33, 15, 17, 18, 51, 27, 48, 28, 3, 11, 5, 9, 10, 39)];

[0082] Intermediate Solution 2: [(19, 45, 37, 50, 16, 29, 20, 3, 22, 31, 26, 7, 23, 43, 24, 14, 13, 41, 42, 40, 18, 47, 17, 15, 33, 39, 30, 49, 38, 11, 2, 35, 36, 1, 32, 27, 51, 25, 4, 44, 19); (10, 9, 5, 12, 46, 6, 48, 8, 28, 21, 34, 10)];

[0083] Step 306, Subpath Splitting and Merging. All intermediate solutions first need to be checked to see if the ratio of the longest to the shortest subpath exceeds a set threshold of 2. If it does, the longest subpath is split until it does not exceed the threshold (the longest subpath is updated after each execution). Then, the number of subpaths in each solution is checked. If the number of subpaths is greater than a preset 3, a merging operation is performed until it equals 3; if the number of subpaths is less than a preset 3, a splitting operation is performed until it equals 3. The offspring obtained after repairing intermediate solutions 1 and 2 are as follows: Figure 8 As shown, the specific path is as follows:

[0084] Final offspring 1 (corresponding to intermediate solution 1): [Logistics vehicle 1: (39, 33, 15, 17, 18, 51, 27, 48, 28, 3, 11, 5, 9, 10, 39); Logistics vehicle 2: (21, 34, 38, 32, 46, 45, 42, 44, 4, 47, 12, 37, 49, 30, 50, 16, 2, 29, 21); Logistics vehicle 3: (35, 20, 22, 31, 26, 23, 24, 14, 13, 41, 40, 19, 25, 6, 43, 7, 8, 1, 36, 35)], fitness value 272.03;

[0085] Final offspring 2 (corresponding to intermediate solution 2): [Logistics vehicle 1: (25, 24, 43, 7, 23, 14, 18, 47, 4, 17, 37, 44, 42, 40, 13, 41, 19, 25); Logistics vehicle 2: (16, 50, 49, 9, 10, 15, 45, 33, 39, 30, 34, 21, 35, 36, 3, 20, 29, 16); Logistics vehicle 3: (27, 51, 6, 48, 8, 28, 31, 26, 22, 2, 11, 38, 5, 12, 46, 32, 1, 27)], fitness value 192.15.

[0086] At this point, the edge assembly crossover operation is complete, generating two offspring individuals that inherit the superior edge structure from their parents, thus enriching the diversity of the population.

[0087] Step 4, perform user reallocation mutation operation (mutation probability P) M =0.5):

[0088] First, generate random numbers rand∈[0,1), rand<0.5, and perform a mutation operation. The individuals before mutation are: [Logistics vehicle 1: (34, 50, 21, 29, 20, 35, 36, 3, 28, 31, 26, 8, 1, 22, 2, 16, 9, 30, 34); Logistics vehicle 2: (47, 51, 46, 12, 5, 38, 11, 32, 27, 6, 48, 23, 7, 43, 24, 14, 25, 18, 47); Logistics vehicle 3: (37, 49, 10, 39, 33, 45, 15, 44, 42, 19, 40, 41, 13, 4, 17, 37)], with a fitness value of 150.88.

[0089] like Figure 9 As shown, a roulette wheel strategy is used to select user 50 to be removed from logistics vehicle 1. After removing 50, the roulette wheel strategy is used again to select a position to be inserted in logistics vehicle 3, and then 50 is inserted. After mutation, the individuals become: [Logistics vehicle 1: (34, 21, 29, 20, 35, 36, 3, 28, 31, 26, 8, 1, 22, 2, 16, 9, 30, 34); Logistics vehicle 2: (47, 51, 46, 12, 5, 38, 11, 32, 27, 6, 48, 23, 7, 43, 24, 14, 25, 18, 47); Logistics vehicle 3: (37, 49, 50, 10, 39, 33, 45, 15, 44, 42, 19, 40, 41, 13, 4, 17, 37)], with a fitness value of 168.35.

[0090] Step 5: Execute the local search strategy that combines user node deletion and insertion with 2-opt. First, perform internal optimization within 2-opt, independently optimizing each sub-path of the mutated individual to shorten its length. The individual after 2-opt is still: [Logistics Car 1: (34, 21, 29, 20, 35, 36, 3, 28, 31, 26, 8, 1, 22, 2, 16, 9, 30, 34); Logistics Car 2: (47, 51, 46, 12, 5, 38, 11, 32, 27, 6, 48, 23, 7, 43, 24, 14, 25, 18, 47); Logistics Car 3: (37, 49, 50, 10, 39, 33, 45, 15, 44, 42, 19, 40, 41, 13, 4, 17, 37)], with a fitness value of 168.35. Next, dynamic deletion and insertion optimization is performed on the optimized individuals to further balance the load of each sub-path. The algorithm identifies the longest sub-path (corresponding to the path of logistics vehicle 3, with a length of 168.35), finds the user whose removal would shorten the sub-path the most, temporarily removes the user, and uses the k-nearest neighbor strategy to find the best insertion position in other sub-paths. After multiple iterations and migrations, the individual was updated as follows: [Logistics vehicle 1: (34, 21, 29, 20, 35, 36, 3, 28, 31, 26, 8, 1, 22, 2, 16, 50, 9, 30, 34); Logistics vehicle 2: (47, 51, 46, 12, 5, 38, 11, 32, 27, 6, 48, 23, 7, 43, 24, 14, 25, 18, 47); Logistics vehicle 3: (37, 49, 10, 39, 33, 45, 15, 44, 42, 19, 40, 41, 13, 4, 17, 37)], with a fitness value of 150.52.

[0091] The longest path length decreased from 150.88 to 150.52 (corresponding to the path of logistics vehicle 2), and the lengths of each sub-path became more balanced: 149.04, 150.52, and 147.16.

[0092] Finally, 2-opt is performed again on the best individual in the new population to ensure local optima and obtain the final best individual.

[0093] Step 6, Environment Selection. In this example, after crossover, mutation, and local search, a offspring population is generated. The parent population (100 individuals) is merged with the offspring population (100 individuals), sorted in ascending order by fitness value (longest path length), and the top 100 individuals are selected as the new generation population. At the same time, the global optimum is updated.

[0094] Step 7, Iteration and Output. (For example...) Figure 10As shown, after one iteration, the current globally optimal solution is: [Logistics vehicle 1: (9, 30, 34, 21, 29, 20, 35, 36, 3, 28, 31, 26, 8, 1, 22, 2, 16, 50, 9); Logistics vehicle 2: (12, 47, 18, 25, 14, 24, 43, 7, 23, 48, 6, 27, 51, 46, 32, 11, 38, 5, 12); Logistics vehicle 3: (10, 39, 33, 45, 15, 44, 42, 19, 40, 41, 13, 4, 17, 37, 49, 10)], with a fitness value of 149.04. This example executes only one iteration to demonstrate the algorithm flow. In practical applications, the algorithm will repeat steps 3 to 6 until the maximum fitness value evaluation count (30,000 times) is reached. The final output is the globally optimal multi-logistics vehicle route planning scheme, which is the best individual obtained in all iterations.

[0095] This invention provides a multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variations. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. A multi-logistics vehicle collaborative method that integrates edge assembly crossover and user redistribution variation, characterized in that, Includes the following steps: Step S1, Information Reading and Problem Modeling: Obtain logistics user information and vehicle information. The logistics user information includes the number of users, user location coordinates, and transportation service costs between users. The vehicle information includes the number of vehicles. The multi-logistics vehicle route planning problem is modeled as a constrained optimization problem with the optimization objective of minimizing the maximum service cost among all vehicle routes. This ensures that each user is visited by only one vehicle once, and that each vehicle departs from and returns to its selected warehouse, forming a closed path. Step S2: Initialize the population using a random initialization method, initializing the population size NP and the mutation probability P. M Initialize the maximum fitness evaluation count Max_FV, initialize the local search nearest neighbor count parameter k, initialize the longest subpath splitting threshold, and evaluate the fitness of each individual, i.e., the service cost of the longest subpath in the path scheme corresponding to each individual; record the current global optimal solution; Step S3: Randomly shuffle the individuals in the population, select adjacent individuals for pairwise crossover. If the population size is odd, the last individual does not participate in the crossover and directly enters the new population. Perform adaptive edge assembly crossover operation on each selected parent individual to generate two new child individuals. The crossover operation generates intermediate solutions by constructing alternating cycles and exchanging edge sets. Then, adopt a splitting and merging strategy based on minimum incremental cost to balance the load of each sub-path while inheriting the excellent edge structure of the parent. Step S4: For each individual, first generate a random number rand∈[0,1). If rand... <P M If the user is not found to be in the solution space, the user reassignment mutation operation is performed; otherwise, the user reassignment mutation operation is skipped. The user reassignment mutation operation includes: removing a user using a roulette wheel strategy and then using a roulette wheel strategy to select a position for insertion in order to explore a new solution space. Step S5: For each individual, execute a local search strategy that combines user node deletion and insertion with 2-opt. First, use the 2-opt operator to optimize the internal structure of each sub-path of all individuals in the population. Then, use the user node deletion and insertion strategy to migrate users between sub-paths to balance the load. Finally, apply the 2-opt operator to each sub-path of the best individual in the population for further optimization. Step S6: Merge the parent population with the offspring population generated in steps S3 to S5, select the NP individuals with the best fitness values ​​to form a new generation population, and update the global optimal solution. Step S7: If the iteration termination condition is not met, proceed to step S3; if it is met, output the globally optimal logistics vehicle route planning scheme.

2. The method according to claim 1, characterized in that, In step S1, the logistics user information includes the number of users N, the user location coordinates (x, y), and the service cost d between user i and user j. ij Vehicle information includes the number of vehicles M; it also uses direct path encoding to store a set of M sub-paths. Where x represents the x-coordinate and y represents the y-coordinate.

3. The method according to claim 2, characterized in that, In step S1, the optimization objective is to minimize the maximum service cost across all vehicle paths, mathematically expressed as follows: , Here, the maximum service cost across all vehicle paths is denoted by Z, and Minimize Z means minimizing the objective value Z. Let be a binary decision variable, representing whether vehicle k travels directly from user i to user j. If vehicle k travels directly from user i to user j, then... The value is 1 if it is set to 1, and 0 otherwise. The constraints include: each user is visited by exactly one vehicle once, each vehicle's path forms a closed loop, and each vehicle visits at least two users.

4. The method according to claim 3, characterized in that, Step S2 includes: First, randomly shuffle the access order of all users and perform two rounds of allocation. In the first round, M users are extracted from the shuffled sequence as the starting warehouses for each vehicle. In the second round, M more users are extracted and allocated to each vehicle to ensure that each vehicle's path contains at least two users. Then, the remaining unallocated users are randomly inserted into the existing paths.

5. The method according to claim 4, characterized in that, In step S3, the adaptive edge assembly cross operation includes the following steps: Step S301: Extract the corresponding edge sets E1 and E2 from the two parent individuals P1 and P2 according to their paths, and then merge the two edge sets E1 and E2 to construct the union to obtain graph G; Step S302 involves alternately tracing edges from edge sets E1 and E2 in graph G to generate several alternating loops. Specifically, this includes: selecting any unused edge from graph G as the starting edge, adding the starting edge to the current loop, and marking the affiliation of the starting edge, which is denoted as parent generation 1; setting the endpoint h of the current edge, and then searching for an unused edge with endpoint h in the edge set of another parent generation 2, and adding it to the current loop; then, starting from the other endpoint of the newly added edge, continuing to search for the next unused edge from the edge set of parent generation 1, and alternating the selection process; when returning to the starting point of the starting edge, a closed loop is formed, called an alternating loop. Repeat step S302, and all edges are divided into several alternating cycles; Step S303: Select the alternating cycle with the most edges as the central alternating cycle, and apply it to the two parent individuals P1 and P2 to generate temporary sub-path set 1 and temporary sub-path set 2 respectively. The specific operations include: removing the P1 edges belonging to the central alternating cycle in the parent individual P1 and adding the P2 edges belonging to the central alternating cycle, arranging the resulting cycles in descending order of edge count, and deleting the longest cycle to obtain temporary sub-path set 1; removing the P2 edges belonging to the central alternating cycle in P2 and adding the P1 edges belonging to the central alternating cycle, arranging the resulting cycles in descending order of edge count, and deleting the longest cycle to obtain temporary sub-path set 2. Step S304: Divide the edge set extracted based on the selected alternating ring into two categories. The edge set used to operate on parent P1 is denoted as operation edge set 1, and the edge set used to operate on parent P2 is denoted as operation edge set 2. First, add the central alternating ring to both operation edge set 1 and operation edge set 2. Then, add the alternating rings that share a common vertex with temporary sub-path set 1 (excluding the central alternating ring) to operation edge set 1. Add the alternating rings that share a common vertex with temporary sub-path set 2 (excluding the central alternating ring) to operation edge set 2. Step S305: For the original P1 operation, intermediate solution 1 is generated by removing P1 edges belonging to operation edge set 1 and adding P2 edges belonging to operation edge set 1; for the original P2 operation, intermediate solution 2 is generated by removing P2 edges belonging to operation edge set 2 and adding P1 edges belonging to operation edge set 2. Step S306: Apply subpath splitting and merging operations based on minimum incremental cost to intermediate solution 1 and intermediate solution 2 respectively. All intermediate solutions first need to check whether the ratio of the service cost of the longest subpath to the shortest subpath exceeds the set subpath splitting threshold. If it exceeds the threshold, the splitting operation is continuously performed on the longest subpath until it does not exceed the threshold. Then, the number of subpaths of each solution is determined. If the number of subpaths is greater than the number of vehicles M, the subpath merging operation is performed until the number of subpaths equals M. If the number of subpaths is less than the number of vehicles M, the subpath splitting operation is performed until the number of subpaths equals M. If the number of subpaths equals the number of vehicles M, no splitting or merging is performed.

6. The method according to claim 5, characterized in that, In step S306, the sub-path splitting and merging operation based on minimum incremental cost is used to split the longest sub-path into two, and the split incremental cost is calculated accordingly. The calculation formula is as follows: , Where e1 and e2 are two non-adjacent edges deleted from the atomic path, e3 and e4 are two new edges added, and d(e1), d(e2), d(e3), and d(e4) represent the service costs on edges e1, e2, e3, and e4, respectively; exhaustive search is used to... Minimize the number of split pairs to achieve load balancing while minimizing the increase in total service cost; The subpath merging operation is used to merge two subpaths into one, merging the incremental cost. The calculation is as follows: , Where l1 and l2 represent edges from two different sub-paths, l3 and l4 are the two added connecting edges, and d(l1), d(l2), d(l3), and d(l4) represent the service costs on edges l1, l2, l3, and l4, respectively; by selecting... Merging is achieved using the least number of connections.

7. The method according to claim 6, characterized in that, In step S4, the user reallocation mutation operation includes the following steps: Step S401: For each subpath containing at least three users, first calculate the reduction in subpath service cost after removing each candidate user i. ; Step S402, based on the reduction amount Construct a roulette wheel selection probability, where user v is selected to be removed, and the probability P of user i being deleted is given. i The calculation formula is: , Where C is the set of all candidate users that satisfy the condition that their subpath contains at least three users. This represents the minimum service cost reduction after removing each city from the candidate user set C. This represents the maximum reduction in service cost after removing each city from the candidate user set C. ε represents the reduction in the cost of subpath services after removing user u, where ε is a very small positive constant approaching 0; Step S403: Remove user v from its atomic path; Step S404: Traverse all feasible insertion positions on all other sub-paths and calculate the increase in service cost of the sub-path after insertion. ; Step S405, based on the increase amount Construct a roulette wheel selection probability to choose an insertion position, where positions with smaller increments have a higher probability of being selected. The probability F of user v inserting at position j is given. j The calculation formula is: , in This represents the minimum increase in service cost across all insertion positions. This represents the maximum increase in service cost across all insertion positions. This represents the increase in service cost of the subpath where user v is inserted at position t; S406, Insert user v into the selected position to generate a new individual.

8. The method according to claim 7, characterized in that, In step S5, the fusion of user node deletion and insertion with the 2-opt local search strategy includes the following steps: Step S501: Perform 2-opt optimization independently on each sub-path of each individual in the population. The 2-opt operator attempts to reduce the service cost of the sub-path by selecting two nodes in the path and reversing the path sequence. Step S502: For each individual, iteratively execute the user node deletion and insertion strategy: find the longest sub-path in the current individual. If the number of users in the longest sub-path is not less than 3, find the user whose removal would reduce the service cost of the longest sub-path the most and temporarily remove the user. Step S503: Use the k nearest neighbor heuristic to find the k nearest neighbor users of the removed user. The sub-paths to which the k nearest neighbor users belong are the candidate target sub-paths. In step S504, if the candidate target sub-path is not empty, search for the insertion position that minimizes the path service cost increment in the candidate target sub-path. If this move reduces the service cost of the longest sub-path in the entire path scheme, accept the move and repeat steps S502 to S504. Otherwise, roll back the move and terminate the local search of the current individual. If the candidate target sub-path is empty, skip step S504. Step S505: For the updated population, find the individual with the best fitness value, perform another round of 2-opt optimization on all sub-paths of the individual with the best fitness value, and output the final population.

9. The method according to claim 8, characterized in that, In step S6, an elite environment selection strategy is adopted to merge the parent and offspring populations, sort them in ascending order according to their fitness values, and select the top NP optimal individuals to form a new generation population, ensuring that the optimal solution is not lost during the evolution process.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 9.