A logistics vehicle multi-service scheme planning method based on a ranking ant colony algorithm
By generating multiple equivalent optimal logistics solutions using the sorting ant colony algorithm, the limitations of single optimal solutions in existing technologies are overcome, enabling diversified scheduling of logistics vehicles and minimizing costs, thereby improving the flexibility and robustness of the logistics system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-05-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing logistics optimization technologies cannot generate multiple equivalent optimal solutions, making it difficult to adapt to the dynamic, flexible, and robust requirements of modern smart logistics, leading to increased transportation costs.
A multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm is adopted. Through dynamic sub-ant colony size update, key service sequence mining and pheromone matrix matching, multiple equally optimal schemes with the same cost but different service orders are generated.
While ensuring the lowest possible transportation costs, we provide diverse and optimal logistics solutions to improve scheduling efficiency and system fault tolerance, and meet the high robustness requirements of complex logistics scenarios.
Smart Images

Figure CN122155342A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of logistics scheduling optimization and computational intelligence, and in particular to a multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm. Background Technology
[0002] Existing logistics optimization technologies are generally limited to finding the optimal solution, providing only a single optimal solution. They cannot offer diverse, equivalent optimal alternatives for actual scheduling decisions, making it difficult to adapt to the dynamic, flexible, and robust requirements of modern smart logistics. Furthermore, they do not consider the set of equivalent high-quality solutions surrounding the optimal solution, and cannot support continuous operations when the optimal solution is not feasible, leading to a sharp increase in transportation costs. Therefore, the industry urgently needs a technology that can generate multiple equivalent optimal solutions and provide various optimal scheduling options for logistics vehicles to compensate for the shortcomings of existing technologies in dynamic decision-making, multi-preference adaptation, and robust scheduling. Summary of the Invention
[0003] Purpose of the invention: To provide a multi-service plan method for logistics vehicles based on the sorting ant colony algorithm, which can output multiple equally optimal solutions with the same cost but different service orders at one time while ensuring that the transportation cost of logistics vehicle service solutions is minimized, thereby providing as many equivalent optimal logistics solutions as possible for logistics scheduling.
[0004] Technical solution: A multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm, comprising the following steps:
[0005] Step 1: Read logistics data and initialize the sorting ant colony algorithm parameters. Logistics data mainly includes the quantity and location of logistics tasks and the transportation costs between tasks. Based on this data, a multi-service plan model for logistics vehicles is constructed, and an objective function is established to evaluate the quality of the service plans. The sorting ant colony algorithm parameters mainly include the ant colony size, the number of child ants, the pheromone factor, the heuristic factor, multiple pheromone matrices, the heuristic information matrix, and the archive of key service sequences. This includes the following steps:
[0006] Step 1-1: Read logistics data, including the number of logistics tasks N and the location coordinates (x, y, y) of the logistics tasks. i ,y i Transportation costs between logistics tasks (c) ij , where x i y i Let c represent the x and y coordinates of the i-th logistics task, respectively. ij This represents the transportation cost between the i-th logistics task and the j-th logistics task.
[0007] Steps 1-2: Construct a multi-service planning model for logistics vehicles. Given N logistics tasks, model the logistics tasks as a completely undirected graph, G = (V, E), where V = {(x i , y i Let {e | 1 ≤ i ≤ N} represent the set of logistics tasks; E = {e ij | i, j∈V} is the set of edges between all logistics tasks, and edge e ij The transportation cost is c ij .
[0008] The optimization objective is to find the set S of all theoretically optimal service solutions. best = {S 1 ,..., S k , ...,S K}, where K represents the number of all theoretically optimal service solutions; and S best Let S represent the set of optimal service solutions. k Let f(S) represent the k-th optimal service plan; then the transportation cost f(S) of the k-th optimal service plan is... k The expression for ) is as follows:
[0009]
[0010] in, This represents the transportation cost between the h-th logistics task and the (h+1)-th logistics task in the k-th optimal service plan. This represents the transportation cost between the Nth logistics task and the first logistics task for the kth optimal service plan.
[0011] The parameters of the sorting ant colony algorithm include the number of ants M in the ant colony and the minimum number of child ants GN. min Maximum number of ant colonies (GN) max The initial number of sub-ant colonies is GN. min The initial number of pheromone matrices is also GN. min Pheromonium factor α, heuristic pheromone factor β, pheromone evaporation rate ρ, and ant ratio r used to update the pheromone matrix. e Store the set of best service solutions found during the iterative process of the sorting ant colony algorithm, the key service sequence archive, and the maximum fitness evaluation count, MaxFES. When the sorting ant colony algorithm is initialized, both the set of best service solutions and the key service sequence archive are empty sets, where a service sequence refers to the edge between two logistics tasks.
[0012] A greedy service solution is constructed using a traditional greedy algorithm, and then GN is initialized according to the following formula. min Pheromones matrix:
[0013]
[0014] Where M represents the number of ants in the ant colony. This represents a service solution built using a greedy algorithm. The transportation cost represents the service solution constructed using a greedy algorithm. These represent the initial values of each pheromone matrix;
[0015] Heuristic information is derived from the transportation costs between logistics tasks, specifically the heuristic information between two logistics tasks i and j. The calculation formula is as follows:
[0016]
[0017] A heuristic information matrix is constructed from heuristic information.
[0018] Step 2, Determining the Number of Sub-Ants and Constructing Service Plans: Based on the designed dynamic sub-ant colony size update formula, the sub-ant colony size is determined, and ants are assigned to each pheromone matrix according to the sub-ant colony size. Each ant, based on the heuristic information matrix and its corresponding pheromone matrix, selects the next logistics task to be served according to the roulette wheel rule, until a complete service plan is finally constructed. The quality of the service plan constructed by each ant is evaluated to obtain the transportation cost of each service plan; including the following steps:
[0019] Step 2-1: Calculate the number of sub-ant colonies (GN) according to the designed dynamic sub-ant colony size update formula. The update formula is as follows:
[0020]
[0021] Among them, GN min GN represents the minimum number of child ants in the colony. max GN represents the maximum number of sub-colonies, FES represents the current number of sub-colonies, and MaxFES represents the maximum number of fitness evaluations. This indicates rounding down to the nearest integer.
[0022] The dynamic sub-ant colony size update formula makes the number of sub-ants increase linearly with the iteration, thereby reducing the algorithm's sensitivity to the number of sub-ants. In addition, through this strategy, in the early stage of evolution, a larger sub-ant colony is maintained to locate a wide range of optimal regions, while in the later stage of evolution, a smaller sub-ant colony can develop more optimal regions, thereby finding as many optimal solutions as possible.
[0023] Step 2-2: Compare whether the GN values of the new generation and the previous generation have changed. If an increase is detected, then based on the pheromone matrix with the lowest similarity to the optimal service scheme of the sub-ant colony during the previous generation matching process and its representative scheme, perform the pheromone matrix and representative scheme copying operation to keep the number of sub-ant colonies equal to the number of pheromone matrices.
[0024] Steps 2-3: Based on the number of child ants, obtain the child ant colony size GS, and then assign GS ants to each of the GN pheromone matrices. The formula for calculating the child ant colony size GS is as follows:
[0025]
[0026] Where M represents the number of ants; if it is not divisible, then one more ant is assigned to the first M % GN pheromone matrices, thus obtaining GN sub-ant colonies corresponding to the pheromone matrices.
[0027] Steps 2-4: Ant Financial constructs a service plan based on the heuristic information matrix and the corresponding pheromone matrix. The specific steps are as follows:
[0028] Step 2-4-1: For each ant, randomly select one logistics task from N logistics tasks as the starting logistics task of its planned service plan.
[0029] Step 2-4-2: Based on the pheromone matrix corresponding to the ant, select the next logistics task according to the state transition rule and construct a service plan: Take the last logistics task i of the current service plan as the current logistics task, and calculate the probability of logistics task j serving after logistics task i according to the following formula:
[0030]
[0031] Where α is the pheromone factor and β is the heuristic information factor. The pheromone matrix representing the pheromone content of logistics task i and logistics task j matched by the gn-th sub-ant colony. This represents the heuristic information between logistics task i and logistics task j. The pheromone level represents the pheromone level between logistics task i and logistics task μ in the pheromone matrix matched by the gn-th sub-ant colony. A represents the heuristic information between logistics task i and logistics task μ. S The set of candidate logistics tasks representing service solution S. The probability that service plan S will serve logistics task j after logistics task i;
[0032] Steps 2-4-3: After obtaining the probability of each logistics task in the candidate logistics task set, a roulette wheel selection mechanism is used to select the next logistics task; simultaneously, the candidate logistics task set A is maintained. S ;
[0033] Step 2-4-4: Repeat steps 2-4-1 to 2-4-3 until the candidate logistics task set A is reached. S If empty, the current Ant Financial service solution construction is complete;
[0034] Step 2-4-5: Repeat steps 2-4-1 to 2-4-4 until all ants in the colony have completed the service plan planning.
[0035] Steps 2-5 involve evaluating the quality of the service plan constructed by each ant. The lower the transportation cost of the service plan, the better its quality. The formula for calculating the transportation cost of the service plan is as follows:
[0036]
[0037] Where N represents the number of logistics tasks, S represents the service plan built by Ant Financial, and f(S) represents the transportation cost of S. Let S represent the transportation cost between the h-th logistics task and the (h+1)-th logistics task. This represents the transportation cost between the Nth logistics task and the first logistics task in S.
[0038] Step 3, Update the Optimal Service Solution Set: Based on the designed optimal service solution storage strategy based on service solution similarity, update the optimal service solution set using the service solutions constructed by ants; including the following steps:
[0039] Step 3-1: Based on the optimal service solution preservation strategy, update the optimal service solution set Best using the newly constructed service solutions of Ant Financial: For each service solution, first calculate the similarity between the current service solution and each service solution in Best according to the proposed service solution similarity rule using formula (8). If there is no similarity value of 1 in the calculation result, it means that the current solution does not exist in Best, then proceed to steps 3-2 to 3-4; if there is a similarity value of 1, then skip the current service solution and continue to execute the next service solution, that is, the current service solution does not update the optimal service solution set.
[0040] Step 3-2, find Best The worst service plan is compared to the current service plan. If the current service plan is better, it is replaced directly. Best The worst service option; thus ensuring that only the better service option can exist. BestIn this process, the survival of the fittest is achieved, ensuring... Best The quality of the alternative service plan. If it is the same as the current service plan, proceed to step 3-3; if the current service plan is worse, proceed to step 3-4.
[0041] Step 3-3, if the current service plan is consistent with... Best If the worst service plan has the same quality, then find... Best The best-quality service plan is selected, and the current service plan is compared to it. If the current service plan and the best-quality service plan have the same transportation cost, meaning that the quality of all service plans in the Best plan is the same, then the current service plan is directly added to the Best plan. Best If the current service plan has the same quality as both the worst and best service plans in the Best list, then... Best All solutions in the current database are the optimal service solutions with the same transportation cost. Therefore, the current service solution is added to the database. Best In the middle, it can make Best It can store a wider variety of optimal service solutions, thereby providing diverse and low-cost service options for logistics vehicles.
[0042] Steps 3-4, if the current service plan is better than... Best If the worst service plan is even worse, then the current service plan will remain unchanged. Best This optimal service solution saves the strategy, thereby ensuring Best The quality and diversity of service solutions.
[0043] Steps 3-5: Repeat steps 3-1 to 3-4 until all newly built service solutions have been implemented with the optimal service solution retention strategy.
[0044] Step 4, Local Optimization of Service Schemes: Based on the local optimization method that integrates key service sequences and 2-opt, the service schemes constructed for each ant are locally optimized, and the set of optimal service schemes is updated again according to the designed optimal service scheme saving strategy; including the following steps:
[0045] Step 4-1: For each service scheme, select two non-adjacent service sequence indices (i, i+1) and (j, j+1) each time, and determine whether the service sequence corresponding to the index is a critical service sequence, that is, whether it is in the critical service sequence archive (only service sequences in the critical service sequence archive are critical service sequences).
[0046] If neither is a critical service sequence, then perform the swapping step in the 2-opt optimization; if the swapped service solution is better, then replace the original service solution with the better service solution and perform step 3 to update the best service solution set with the better service solution.
[0047] If a critical service sequence exists in the service sequence corresponding to the index, then skip the non-adjacent service sequence, do not perform the 2-opt optimization operation, and continue to find the next non-adjacent service sequence. This step can effectively reduce the computational overhead and avoid the destruction of critical service sequences, thereby improving the stability of the service scheme optimization.
[0048] Step 4-2, repeat step 4-1, until all ant-built service solutions have completed local optimization; the local optimization method of integrating key service sequences and 2-opt can optimize the quality of ant-built service solutions while reducing computational costs.
[0049] Step 5, Sub-colony Division: Based on the proposed service scheme similarity criterion, the ant colony is divided into several sub-colony groups; this includes the following steps:
[0050] Step 5-1: This invention proposes a service scheme similarity criterion to determine the degree of similarity between two service schemes. The specific calculation formula is as follows:
[0051]
[0052] in, Representative Service Plan S i Service Solution S j The degree of similarity between them and Each includes service plan S i Service Solution S j All service sequences on the list, where N represents the number of logistics tasks; The larger the value, the better the service plan S. i Service Solution S j The higher the similarity between two service solutions, the lower the similarity; conversely, the lower the similarity, the more similar the two service solutions. If the similarity between two service solutions is 1, it means that the two service solutions are the same.
[0053] Step 5-2: Calculate the similarity between any two service schemes according to Step 5-1 to obtain a similarity matrix of size M×M;
[0054] Step 5-3: Construct an unassigned ant set, which initially contains all ants;
[0055] Step 5-4: Sort the service solutions constructed by the ants in the unassigned ant set in ascending order of transportation cost. The service solution with the lowest transportation cost is the optimal service solution in the unassigned ant set.
[0056] Step 5-5: Based on the sub-ant colony size GS, select the sub-ant scheme with the highest similarity to the optimal service solution. Each ant and itself are grouped into the same sub-ant colony;
[0057] Step 5-6: Remove the GS ants that were already divided in step 5-5 from the set of unassigned ants;
[0058] Steps 5-7: Repeat steps 5-4 to 5-6 until the unassigned ant set is empty and all ants have been assigned.
[0059] Step 6, matching the sub-ant colony with the pheromone matrix: Based on the proposed matching rule between the optimal service scheme of the sub-ant colony and the representative scheme of the pheromone matrix, the sub-ant colony and the pheromone matrix are matched one by one; then, the representative scheme of the matched pheromone matrix is updated according to the optimal service scheme in the sub-ant colony; the pheromone matrix with the lowest similarity and its representative scheme are recorded in the above matching process, and used to replicate and generate a new pheromone matrix when the number of sub-ant colonies increases to ensure that the two are equal in number; including the following steps:
[0060] Step 6-1: Obtain the optimal service plan among all current sub-ant colonies and the representative plan of each pheromone matrix. Based on Step 5-1, calculate the similarity between the optimal service plan and each representative plan of each sub-ant colony, and construct a GN×GN similarity matrix.
[0061] Step 6-2: Find the element with the largest value in the current similarity matrix. This element corresponds to a sub-ant colony and a pheromone matrix. Associate the sub-ant colony with the pheromone matrix. Then, remove the row containing the sub-ant colony and the column containing the pheromone matrix from the similarity matrix to ensure that each sub-ant colony and each pheromone matrix are matched only once.
[0062] Step 6-3: Repeat step 6-2 until all ant colonies have been matched with the pheromone matrix; this matching rule allows ants to search different areas and find multiple optimal service solutions in different areas.
[0063] Step 6-4: For each established pheromone matrix, compare its corresponding representative scheme with the optimal service scheme of the sub-ant colony. If the optimal service scheme is better, replace the original representative scheme with the optimal service scheme; otherwise, keep the original representative scheme unchanged.
[0064] Step 6-5: Record the pheromone matrix with the lowest similarity to the sub-ant colony and its representative scheme during the matching process. This pheromone matrix and its representative scheme will be copied to ensure that the number of sub-ant colonies is equal to the number of pheromone matrices when the number of sub-ant colonies increases.
[0065] Step 7, Pheromone Matrix Update: Based on the matched sub-ant colonies and pheromone matrix from Step 6, update the pheromone matrix using the top few ants from the corresponding sub-ant colonies; including the following steps:
[0066] Step 7-1: For the gn-th sub-ant colony, determine the number of ants used to update its matched pheromone matrix. The calculation formula is as follows:
[0067]
[0068] Among them, GS gn Let r represent the number of ants in the gn-th sub-ant colony. e It is the ant ratio used to update the pheromone matrix. This means that only the top n ants in the gn sub-ant colony are considered. e Only the service solutions built by the ants will be used to update the pheromone matrix they match;
[0069] Step 7-2: For each service sequence consisting of logistics task i and logistics task j in the pheromone matrix matched by each sub-ant colony, perform the pheromone update operation of the sorting ant colony algorithm: sort the sub-ant colonies in ascending order according to transportation cost to obtain the top n e For each ant updating its pheromone matrix, the update formula is as follows:
[0070]
[0071] in, The updated pheromone concentration between logistics task i and logistics task j in the pheromone matrix matched by the gn-th sub-ant colony represents the pheromone concentration between them. ρ represents the current pheromone concentration between logistics task i and logistics task j in the pheromone matrix matched by the gn-th sub-ant colony, ρ represents the pheromone evaporation rate, and r is the ant's sorting number. The pheromone increment between logistics task i and logistics task j in the matched pheromone matrix represents the optimal service plan in the gn-th sub-ant colony.
[0072]
[0073] in, Let $\mathbf{r}$ represent the transportation cost of the $r$-th optimal service plan in the $\n$-th sub-ant colony. This represents the r-th optimal service solution in the gn-th sub-ant colony. Representation function The reciprocal of;
[0074] Step 7-3: Repeat steps 7-1 and 7-2 until all GN pheromone matrices have been updated. Each pheromone matrix is updated only by the service scheme constructed by the ants in its matched sub-ant colony. This helps each sub-ant colony focus on the search in its own area, avoids information interference between different search areas, and thus finds multiple optimal service schemes.
[0075] Step 8, Key Service Sequence Mining and Update: Based on the proposed dynamic key service sequence mining strategy and combined with the optimal service solution set, update the key service sequence archive; including the following steps:
[0076] Step 8-1: Calculate the number N of critical service sequences. key The formula is as follows:
[0077]
[0078] Where FES represents the current fitness evaluation count, MaxFES represents the maximum fitness evaluation count, and N represents the number of logistics tasks;
[0079] Step 8-2: Obtain all optimal service solutions in the Best set of optimal service solutions, extract the service sequence consisting of all adjacent logistics tasks in the optimal service solution, count the total number of times each service sequence appears in Best, and sort the service sequences in descending order according to the number of occurrences.
[0080] Step 8-3, use the first N key These service sequences form a new critical service sequence archive, which is used in subsequent local optimization processes of service solutions. Due to the accumulation of higher-quality solutions through iteration, the critical service sequence statistics become more reliable, therefore N... key The dynamic addition of information can both avoid misleading searches in the early stages and facilitate the construction of the optimal service solution by accelerating the acquisition of reliable knowledge in the later stages.
[0081] Step 9: Repeat steps 2 to 8 until the iteration termination condition is met, and finally output all logistics vehicle service plans with the same lowest transportation cost in the optimal service plan set.
[0082] Compared with the prior art, the significant advantages of this invention are as follows:
[0083] 1. Based on the proposed dynamic key service sequence mining strategy, this invention counts the number of times service sequences appear in the optimal service solution set, identifies key edges and increases their number with iteration, which avoids early misjudgment and can accelerate the search for the optimal service solution by utilizing the stable structure in the later stage. At the same time, it works with 2-opt to reduce invalid processes and accelerate the construction of the optimal service solution.
[0084] 2. This invention maintains multiple pheromone matrices and a matching rule based on the optimal service scheme of the sub-ant colony and the representative scheme of the pheromone matrix, thereby maintaining a pheromone matrix for each sub-ant colony and realizing parallel search for optimal solutions in different regions. This effectively overcomes the problem of solution convergence caused by a single pheromone matrix in traditional logistics scheme optimization methods.
[0085] 3. Based on the sorting ant colony algorithm, this invention proposes for the first time a matching rule based on the optimal service scheme of the sub-ant colony and the representative scheme of the pheromone matrix. It integrates dynamic sub-ant colony size and dynamic key service sequence mining strategy. Under the premise of ensuring the minimum transportation cost of logistics vehicle service scheme, it outputs multiple equally optimal schemes with the same cost but different service orders at one time, which significantly improves scheduling efficiency and system fault tolerance, and provides highly robust and diversified path selection for complex logistics scenarios. Attached Figure Description
[0086] Figure 1 This is a flowchart illustrating the present invention;
[0087] Figure 2 This is a logistics task distribution diagram of a multi-service solution planning example for a logistics vehicle in this invention. This example includes 10 logistics tasks.
[0088] Figure 3 This is a schematic diagram showing the corresponding increase in the pheromone matrix when the number of sub-ant colonies increases, based on the dynamic sub-ant colony size update formula proposed in this invention.
[0089] Figure 4 This is a schematic diagram of the optimal service solution update strategy proposed in this invention in an example;
[0090] Figure 5 This is a schematic diagram of the local optimization method for integrating critical service sequences and 2-opt proposed in this invention;
[0091] Figure 6 This is a schematic diagram illustrating the service scheme similarity criteria proposed in this invention in an example;
[0092] Figure 7 This is a schematic diagram of the sub-ant colony partitioning based on the service scheme similarity criterion proposed in this invention;
[0093] Figure 8This is a schematic diagram illustrating the matching of the sub-ant colony and the pheromone matrix based on the matching rules of the sub-ant colony optimal service scheme and the pheromone matrix representative scheme proposed in this invention.
[0094] Figure 9 This is a schematic diagram of the key service sequence mining and updating proposed in this invention;
[0095] Figure 10 This invention provides the optimal multi-vehicle service solution for the final output of the proposed method for an example. Detailed Implementation
[0096] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0097] This example uses the exhaustion of the maximum fitness evaluation count as the termination condition for the algorithm iteration.
[0098] Figure 1 The flowchart illustrates a multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm proposed in this invention. Figure 2 This invention illustrates a logistics task distribution diagram for multi-service scheme planning of logistics vehicles in an example of the present invention. This example includes 10 logistics tasks. The objective, while serving all logistics tasks, is to obtain multiple optimal service scheme plans that minimize the transportation cost of the logistics vehicles. Specifically, this includes the following steps:
[0099] Step F1: Read logistics data and initialize the ant colony sorting algorithm parameters;
[0100] Step F1-1: Obtain instance information for multi-service planning of logistics vehicles, construct a multi-service planning model for logistics vehicles, and establish an optimization objective function to evaluate the quality of the planned service schemes. Instance information includes the number of logistics tasks N and the coordinates of the logistics tasks (x, y, y). i , y i ), where x i y i These represent the x and y coordinates of the logistics tasks, respectively. In this example, N = 10. The specific data for the logistics task coordinates are shown in Table 1, and the transportation costs between each logistics task are shown in Table 2.
[0101] Table 1. Location coordinates of logistics tasks
[0102]
[0103] Table 2 Transportation costs among 10 logistics tasks
[0104]
[0105] Step F1-2: Set the optimization objective. The optimization objective is to find multiple optimal logistics task service plans that minimize the transportation cost of logistics vehicles, ensuring that each logistics task is served exactly once. Each logistics vehicle service plan is a sequence of all logistics tasks.
[0106] Steps F1-3: Set the parameters of the sorting ant colony algorithm, including the number of ants M in the ant colony and the minimum number of sub-ant colonies GN. min Maximum number of ant colonies (GN) max The initial number of sub-ant colonies is GN. min The initial number of pheromone matrices is also GN. min Pheromonium factor α, heuristic pheromone factor β, pheromone evaporation rate ρ, and ant ratio r used to update the pheromone matrix. e Store the set of best service solutions found during the algorithm iteration process, the key service sequence archive, and the maximum fitness evaluation count MaxFES. At the time of algorithm initialization, both the set of best service solutions and the key service sequence archive are empty sets, where a service sequence refers to the edge between two logistics tasks.
[0107] In this example, the number of ants was set to 150, the minimum and maximum number of child ants were 2 and 8 respectively, the pheromone factor and heuristic factor were set to 1.0 and 1.5 respectively, the pheromone evaporation rate was set to 0.3, the ratio of ants used to update the pheromone matrix was set to 0.3, and the maximum number of fitness evaluations was set to 60,000. All of these parameters were experimentally optimized and represent the best parameter combination among all available options.
[0108] Steps F1-4: Based on the transportation costs between logistics tasks, construct a greedy service plan using a greedy algorithm, and initialize multiple pheromone matrices accordingly.
[0109] Greedy algorithm constructs a greedy service solution S greedy = [2, 9, 5, 6, 7, 8, 1, 0, 4, 3], the transportation cost f(S) of this service plan. greedy = 130, and τ0 = 1.15 calculated according to formula (2), and then all values in the pheromone matrix are set to 1.15.
[0110] In step F1-5, the heuristic information η between logistics tasks is calculated using formula (3), thus obtaining the heuristic information matrix.
[0111] Step F2: Determining the number of sub-ant colonies and constructing the service plan;
[0112] Step F2-1: Assuming the previous generation's ant colony size GN = 4, the current generation's ant colony size GN = 5 is calculated using formula (4). In this example, GN min = 2, GN max = 8, FES = 30500, MaxFES = 60000. It can be seen that compared to the previous generation, the number of child ants in this generation has increased. Therefore, based on the pheromone matrix with the lowest similarity to the optimal service plan of the child ant colony during the previous generation's matching process, and its representative plan, a pheromone matrix and representative plan copying operation is performed to ensure that the number of child ants is equal to the number of pheromone matrices. Specifically, as follows... Figure 3 The pheromone matrix shown in the figure is added during the operation, A. i Let represent the i-th pheromone matrix. In the previous generation of matching, the optimal service plan of the 4th sub-ant colony had the lowest similarity to the representative plan of the 1st pheromone matrix. Figure 6 It can be seen that the representative scheme of the first pheromone matrix in the previous matching process has the lowest similarity with the optimal service scheme of the matched sub-ant colony. Therefore, when the number of pheromone matrices increases, the first pheromone matrix and the representative scheme are copied as the data of the newly added pheromone matrix.
[0113] Step F2-2: Compare whether the GN values of the new generation have changed compared to the previous generation;
[0114] In step F2-3, after several iterations, taking the number of ant colonies GN = 7 as an example, we can see from formula (5) that M %GN = 3, M / / GN = 21, and the symbol " / / " indicates integer division; therefore, at this time, the number of ants allocated to the first 3 pheromone matrices is 22, and the number of ant colonies allocated to the remaining 4 pheromone matrices is 21.
[0115] In steps F2-4, each ant plans a service plan based on the heuristic information matrix and the pheromone matrix allocated in step F2-3, according to the state transition rules and the roulette wheel selection mechanism.
[0116] Step F2-5: Evaluate the quality of the service plan constructed by each ant according to formula (7). The lower the transportation cost of the service plan, the better the quality of the corresponding plan.
[0117] Step F3: Update the set of optimal service solutions;
[0118] In this example, the optimal service solution set Best = {S} best1 , S best2 , S best3Given the set {[8, 0, 4,7, 6, 3, 2, 5, 9, 1], [2, 9, 1, 0, 8, 7, 6, 4, 5, 3], [9, 1, 8, 7, 0, 4, 6, 5, 3, 2]}, then f(S) best1 ) = f (S best3 ) = 130, f (S best2 f(S1) = 136. Taking the newly constructed service schemes S1 = [9, 1, 8, 0, 7, 4, 6, 5, 3, 2] and S2 = [0, 7, 4, 3, 6, 5, 2, 9, 8, 1] as an example, f(S1) = 130 and f(S2) = 130.
[0119] For S1, firstly, according to the service solution similarity criterion, service solution S1 does not exist in the Best list. Therefore, it is similar to the worst quality service solution S1 in the Best list. best2 Comparing the two, S1 is better, therefore S1 is superior. best2 Replace with S1. After the update, Best = {S best1 , S1, S best3} = {[8, 0, 4, 7, 6, 3, 2, 5, 9, 1], [9, 1, 8, 0, 7, 4, 6, 5, 3, 2], [9, 1, 8, 7, 0, 4, 6, 5, 3, 2]}.
[0120] For S2, firstly, according to the service similarity criterion, service solution S2 does not exist in Best. Continuing the comparison with the worst-quality service solution in Best, S2's transportation cost is the same as the worst-quality service solution's transportation cost. Then, the comparison is performed with the best-quality service solution in Best, and it is found that their quality is the same. Therefore, S2 is directly added to Best. At this point, Best = {S... best1 , S1, S best3 , S2} = {[8, 0, 4, 7, 6, 3, 2, 5, 9, 1],[9, 1, 8, 0, 7, 4, 6, 5, 3, 2], [9, 1, 8, 7, 0, 4, 6, 5, 3, 2], [0, 7, 4, 3,6, 5, 2, 9, 8, 1]}. Figure 4 The above process is demonstrated.
[0121] Step F4: Using a local optimization method that integrates critical service sequences and 2-opt, the service scheme constructed by each ant is locally optimized.
[0122] In this example, a service plan For example, The non-adjacent service sequence indices are (1, 2) and (7, 8), corresponding to service sequences [9, 5] and [0, 4]. At this point, the critical service sequence is archived. It can be seen that the current service sequences [9, 5] and [0, 4] are not critical service sequences. An exchange is then performed, resulting in the new service plan. Transportation cost calculation The service plan is of even lower quality, therefore The sequence remains unchanged, meaning the non-adjacent service sequences found in this instance do not change. .
[0123] The next service sequence indices are (1, 2) and (7, 9), corresponding to service sequences [9, 5] and [4, 6]. At this point, the critical service sequences are archived. It is known that the current service sequence [4, 6] is a critical service sequence, therefore no further operations will be performed. Continue searching for the next service sequence index.
[0124] If the swapped service solution is of better quality, then step F3 needs to be repeated to update the optimal service solution set. This process is performed for each non-adjacent service sequence in the service solution. Figure 5 This provides a more vivid illustration of the process.
[0125] Repeat steps 4-1 and 4-2 until all service solutions built by Ant Financial have completed local optimization.
[0126] Step F5: Based on the service scheme similarity criterion, divide the ant colony into several sub-ant colonies;
[0127] The specific process for the division is as follows:
[0128] Step F5-1, with the plan and For example, edge set , ,but , N = 10, therefore, according to formula (8), the similarity between service scheme S4 and service scheme S5, Overlap(S4, S5) = 0.4. Figure 6 This provides a more vivid illustration of the process.
[0129] Step F5-2: Based on step F5-1, calculate the similarity between any two service schemes to obtain an M×M similarity matrix. Using 10 ants as an example, the process of dividing the sub-ant colony is illustrated. See details... Figure 7As shown, there are a total of 10 ants, with GN = 3 sub-colonies. At this point, the first sub-colon has 4 ants, and the second and third sub-colonies have 3 ants each, i.e., GS1 = 4, GS2 = 3, and GS3 = 3. Initially, the unassigned ant set contains all ants.
[0130] like Figure 7 As shown, the two matrices on the left are similarity matrices of the service solutions constructed by the ants. After sorting, it can be seen that service solution S5 has the lowest transportation cost. Therefore, we need to find the three service solutions with the highest similarity to S5. Figure 7 It is known that the schemes are S1, S3, and S9. Therefore, the first sub-ant colony includes ants 1, 3, 5, and 9. The schemes constructed by these four assigned ants are removed from the matrix, and also removed from the set of unassigned ants.
[0131] After re-sorting, the service solution with the lowest transportation cost among the remaining unassigned ants is S7. Find the two service solutions with the highest similarity to it, and then... Figure 7 We know that the solutions are S6 and S8, so the second sub-ant colony includes ants 6, 7, and 8. We then remove the solutions constructed by these three assigned ants from the matrix. At this point, only three ants remain unassigned, forming the third sub-ant colony.
[0132] Step F6 involves matching the sub-ant colony with the pheromone matrix. The specific process is as follows:
[0133] Step F6-1: Obtain the optimal service plan among all current sub-ant colonies, and the representative plans for each pheromone matrix. Based on step 5-1, calculate the similarity between the optimal service plan and each representative plan for each sub-ant colony, constructing a GN×GN similarity matrix M'. In this example, the number of sub-ant colonies GN = 4. Element M ij = Overlap(B i ,R j ), where B i R represents the optimal service plan for the i-th sub-ant colony. j A representative scheme for the j-th pheromone matrix.
[0134] Step F6-2: Find the element with the largest value in the current similarity matrix, and then... Figure 8 It can be known that it is M 34 Then, associate the third sub-ant colony with the fourth pheromone matrix, and then delete the third row and fourth column from M'.
[0135] Step F6-3, repeat step F6-2, until all sub-ant colonies have been matched with the pheromone matrix. Figure 8 The details of the remaining process are shown. The final matching results are (GN3, A4) and (GN... 1,A3), (GN2, A2), (GN4, A1), GN i Representing the i A small ant colony, A j This represents the matrix of the j-th pheromone.
[0136] Step F6-4: For each established pheromone matrix, compare its corresponding representative scheme with the optimal service scheme of the sub-ant colony. If the optimal service scheme is better, replace the original representative scheme with the optimal service scheme; otherwise, keep the original representative scheme unchanged.
[0137] In step F6-5, in this example, the fourth sub-ant colony GN4 has the lowest similarity to the first pheromone matrix A1. Therefore, we save the first pheromone matrix and its representative scheme R1.
[0138] Step F7: Pheromone matrix updated;
[0139] The specific process is as follows:
[0140] Step F7-1: For the gn-th sub-ant colony, calculate the number of ants used to update its matched pheromone matrix using formula (9). .
[0141] Step F7-2: For each service sequence consisting of logistics task i and logistics task j in the pheromone matrix matched by each sub-ant colony, perform the pheromone update operation of the sorting ant colony algorithm. Sort the sub-ant colonies in ascending order based on transportation cost to obtain the top n... e The ants that update the pheromone matrix are updated using formula (10).
[0142] Step F7-3: Repeat steps F7-1 and F7-2 until all GN pheromone matrices have been updated.
[0143] Step F8: Key service sequence mining and updating;
[0144] The specific process is as follows:
[0145] Step F8-1: Set FES = 2400, MaxFES = 60000, and N = 10. Calculate the number of critical service sequences N according to formula (12). key = 6.
[0146] Step F8-2: Obtain all optimal service solutions in the Best set of optimal service solutions. In this example, Best = {[8, 0, 4, 7, 6, 3, 2, 5, 9, 1], [2, 9, 1, 0, 8, 7, 4, 6, 5, 3], [9, 1, 8, 7, 0, 4, 6, 5, 3, 2], [9, 1, 8, 0, 7, 4, 6, 5, 3, 2], [0, 7, 4, 3, 6, 5, 2, 9, 8, 1]}. The service sequence in Best is {[0, 1], [0, 4], [0, 7], [0, 8], [1, 8], [1, 9], [2, 3], [2, 5], [2, 9], [3, 4], [3, 5], [3, 6], [4, 6], [4, 7], [5, 6], [5, 9], [6, 7], [7, 8], [8, 9]}. Count the frequency of each service sequence and sort them in descending order to obtain the N with the highest frequency. key = 6 sequences Key = {[1, 8], [1, 9], [2, 3], [2, 9], [4, 7], [5, 6]}, see more detailed diagram. Figure 9 As shown.
[0147] Step F8-3, use the first N key These service sequences form a new critical service sequence archive, which is used for subsequent local optimization of service plans.
[0148] Step F9: Repeat steps F2 to F8 until the iteration termination condition is met;
[0149] In this example, when the iteration terminates, Best = {S} best1 , S best2 , S best3 , S best4 , S best5 , S best6 ,S best7}, and f (S best5 ) = 133, f (S best1 ) = f (S best2 ) = f (S best3 ) = f (S best4 ) = f (S best6 )= f (S best7 Since ) = 130, we know that scheme S best1 , S best2 , S best3 , Sbest4 , S best6 , S best7 This example outputs the logistics vehicle service solutions with the same and lowest transportation costs. Figure 10 These final output logistics vehicle service solutions are showcased.
Claims
1. A multi-service planning method for logistics vehicles based on the sorting ant colony algorithm, characterized in that, Includes the following steps: Step 1: Read the quantity, location, and transportation cost between logistics tasks; construct a multi-service plan model for logistics vehicles; establish the objective function; and initialize the parameters of the sorting ant colony algorithm. Step 2: Determine the sub-ant colony size according to the dynamic sub-ant colony size update formula, and assign ants to each pheromone matrix according to the sub-ant colony size; each ant constructs a complete service plan based on the heuristic information matrix and the corresponding pheromone matrix; and evaluate the quality of the service plan constructed by each ant. Step 3: Update the set of optimal service solutions according to the optimal service solution saving strategy; Step 4: Based on the local optimization method of integrating key service sequences and 2-opt, the service scheme constructed by each ant is locally optimized, and the set of optimal service schemes is updated again according to the optimal service scheme saving strategy. Step 5: Based on the service scheme similarity criterion, divide the ant colony into several sub-ant colonies; Step 6: Based on the matching rules between the optimal service scheme of the sub-ant colony and the representative scheme of the pheromone matrix, match the sub-ant colony and the pheromone matrix one by one; and update the representative scheme of the matched pheromone matrix according to the optimal service scheme in the sub-ant colony. Step 7: Based on the sub-ant colony and pheromone matrix matched in Step 6, update the pheromone matrix using the best few ants in the corresponding sub-ant colony. Step 8: Based on the dynamic critical service sequence mining strategy and combined with the optimal service solution set, update the critical service sequence archive; Step 9: Repeat steps 2 to 8 until the iteration termination condition is met, and finally output all logistics vehicle service plans with the same lowest transportation cost in the optimal service plan set.
2. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, In step 1, let the number of logistics tasks be N and the location coordinates of the logistics tasks be (x, y, y). i , y i The transportation cost between logistics tasks is c. ij , where x i y i Let c represent the x and y coordinates of the i-th logistics task, respectively. ij This represents the transportation cost between the i-th logistics task and the j-th logistics task; The multi-service planning model for logistics vehicles is constructed as follows: The logistics task is modeled as a completely undirected graph, G = (V,E), where V = {(x i , y i Let {e | 1 ≤ i ≤ N} represent the set of logistics tasks; E = {e ij | i, j∈V} is the set of edges between all logistics tasks, and edge e ij The transportation cost is c ij ; The optimization objective is to find the set S of all theoretically optimal service solutions. best = {S 1 ,..., S k , ..., S K }, where K represents the number of all theoretically optimal service solutions, and S k Let k be the k-th optimal service plan; then the transportation cost of the k-th optimal service plan is... The calculation formula is as follows: , in, This represents the transportation cost between the h-th logistics task and the (h+1)-th logistics task in the k-th optimal service plan. This represents the transportation cost between the Nth logistics task and the first logistics task, which represents the kth optimal service plan. The parameters of the sorting ant colony algorithm include the number of ants M in the ant colony and the minimum number of sub-ant colonies GN. min Maximum number of ant colonies (GN) max The initial number of sub-ant colonies is GN. min The initial number of pheromone matrices is also GN. min Pheromonium factor α, heuristic pheromone factor β, pheromone evaporation rate ρ, and ant ratio r used to update the pheromone matrix. e Store the set of best service solutions found during the algorithm iteration process (Best), the key service sequence archive (Key), and the maximum fitness evaluation count (MaxFES). During the initialization of the sorting ant colony algorithm, both the set of best service solutions and the key service sequence archive are empty sets. Here, a service sequence refers to the edge between two logistics tasks. A greedy service solution is constructed using a traditional greedy algorithm, and then GN is initialized according to the following formula. min Pheromones matrix: , in, This represents a service solution built using a greedy algorithm. The transportation cost represents the service solution constructed using a greedy algorithm. These represent the initial values of each pheromone matrix; A heuristic information matrix is obtained based on the transportation costs between logistics tasks. The values in the heuristic information matrix represent heuristic information, specifically the heuristic information between two logistics tasks i and j. The calculation formula is as follows: .
3. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, The steps to obtain the optimal service plan include: Step 2-1: Calculate the number of sub-ant colonies GN according to the dynamic sub-ant colony size update formula. , Among them, GN min GN represents the minimum number of child ants in the colony. max GN represents the maximum number of sub-colonies, FES represents the current number of sub-colonies, and MaxFES represents the maximum number of fitness evaluations. indicates rounding down; Step 2-2: Compare whether the GN values of the new generation and the previous generation have changed. If an increase is detected, then based on the pheromone matrix with the lowest similarity to the optimal service scheme of the sub-ant colony during the previous generation matching process and its representative scheme, perform the pheromone matrix and representative scheme copying operation to ensure that the number of sub-ant colonies and the number of pheromone matrices remain equal. Steps 2-3: Based on the number of child ants, obtain the child ant colony size GS. The calculation formula is as follows: , Where M represents the number of ants in the ant colony; if it is not divisible, then an additional ant is assigned to the first M %GN pheromone matrices. Steps 2-4: Ants construct service solutions based on the heuristic information matrix and the corresponding pheromone matrix; Steps 2-5 involve evaluating the quality of the service plan constructed by each ant. The lower the transportation cost of the service plan, the better its quality. The formula for calculating the transportation cost of the service plan is as follows: , Where N represents the number of logistics tasks, and S represents the service solution built by Ant Financial. The transportation cost representing S, Let S represent the transportation cost between the h-th logistics task and the (h+1)-th logistics task. This represents the transportation cost between the Nth logistics task and the first logistics task in S.
4. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 3, characterized in that, The specific steps for building a service solution are as follows: Step 2-4-1: For each ant, randomly select one logistics task from N logistics tasks as the starting logistics task of its planned service plan. Step 2-4-2: Based on the pheromone matrix corresponding to the ant, select the next logistics task according to the state transition rule and construct a service plan: Take the last logistics task i of the current service plan S as the current logistics task, and calculate the probability of logistics task j serving after logistics task i according to the following formula. : , Where α is the pheromone factor and β is the heuristic information factor. The pheromone matrix representing the pheromone content of logistics task i and logistics task j matched by the gn-th sub-ant colony. This represents the heuristic information between logistics task i and logistics task j. The pheromone level represents the pheromone level between logistics task i and logistics task μ in the pheromone matrix matched by the gn-th sub-ant colony. A represents the heuristic information between logistics task i and logistics task μ. S The set of candidate logistics tasks representing service solution S. The probability that service plan S will serve logistics task j after logistics task i; Steps 2-4-3: After obtaining the probability of each logistics task in the candidate logistics task set, a roulette wheel selection mechanism is used to select the next logistics task; simultaneously, the candidate logistics task set A is maintained. S ; Step 2-4-4: Repeat steps 2-4-1 to 2-4-3 until the candidate logistics task set A is reached. S If empty, complete the current Ant Financial service solution construction; Steps 2-4-5: Repeat steps 2-4-1 to 2-4-4 until all ants in the colony have completed the logistics vehicle service plan.
5. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, In step 3, the specific steps for updating the best service solution set (Best) using the newly constructed service solution by Ant Financial are as follows: Step 3-1: For each service plan, firstly, according to the service plan similarity rules, calculate the similarity between the current service plan and each service plan in Best. If there is no similarity value of 1, it means that the current service plan does not exist in Best, then proceed to steps 3-2 to 3-4; if there is a similarity value of 1, then skip the current service plan and continue to the next service plan. Step 3-2, find Best The worst service plan is compared to the current service plan. If the current service plan is better, it is replaced directly. Best The worst service option; if it is the same quality as the current service option, proceed to step 3-3; if the current service option is worse, proceed to step 3-4. Step 3-3, if the current service plan is consistent with... Best If the worst service plan has the same quality, then find... Best The best quality service plan is selected, and the current service plan is compared to it. If the current service plan and the best quality service plan have the same transportation cost, then the current service plan is directly added to the best service plan. Best middle; Steps 3-4, if the current service plan is better than... Best If the worst service plan is even worse, then the current service plan will remain unchanged. Best ; Steps 3-5: Repeat steps 3-1 to 3-4 until all newly built service solutions have been implemented with the optimal service solution retention strategy.
6. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, The steps for locally optimizing the service solution built for each ant include: Step 4-1: For each service scheme, select two non-adjacent service sequence indices (i, i+1) and (j, j+1) each time, and determine whether the service sequence corresponding to the index is a critical service sequence. If neither is a critical service sequence, then perform the swapping step in the 2-opt optimization; if the swapped service solution is better, then replace the original service solution with the better service solution, and perform step 3 to update the best service solution set Best with the better service solution, and continue to find the next non-adjacent service sequence. If a critical service sequence exists in the service sequence corresponding to the index, then skip the non-adjacent service sequence and continue to search for the next non-adjacent service sequence. Step 4-2: Repeat step 4-1 until all service solutions built by Ant Financial have completed local optimization.
7. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, The specific steps for dividing an ant colony into several sub-colonies are as follows: Step 5-1: Use the service scheme similarity criterion to determine the degree of similarity between two service schemes. The calculation formula is as follows: , in, Representative Service Plan S i Service Solution S j The degree of similarity between them , Each includes service plan S i Service Solution S j All service sequences on the list, where N represents the number of logistics tasks; The larger the value, the greater the service plan S. i Service Solution S j The higher the similarity between two schemes, the better; if the similarity between two schemes is 1, it means that the two service schemes are the same. Step 5-2: Calculate the similarity between any two service schemes according to Step 5-1 to obtain a similarity matrix of size M×M; Step 5-3: Construct an unassigned ant set, which initially contains all ants; Step 5-4: Sort the service solutions constructed by the ants in the unassigned ant set in ascending order of transportation cost. The service solution with the lowest transportation cost is the optimal service solution in the unassigned ant set. Step 5-5: Based on the sub-ant colony size GS, select the sub-ant scheme with the highest similarity to the optimal service solution. Each ant and itself are grouped into the same sub-ant colony; Step 5-6: Remove the GS ants that were already divided in step 5-5 from the set of unassigned ants; Steps 5-7: Repeat steps 5-4 to 5-6 until the unassigned ant set is empty and all ants have been assigned.
8. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 7, characterized in that, The specific steps to obtain a representative solution are as follows: Step 6-1: Obtain the optimal service plan among all current sub-ant colonies and the representative plan of each pheromone matrix. Based on Step 5-1, calculate the similarity between the optimal service plan and each representative plan of each sub-ant colony, and construct a GN×GN similarity matrix. Step 6-2: Find the element with the largest value in the current similarity matrix. This element corresponds to a sub-ant colony and a pheromone matrix. Associate the sub-ant colony with the pheromone matrix. Then, remove the row containing the sub-ant colony and the column containing the pheromone matrix from the similarity matrix to ensure that each sub-ant colony and each pheromone matrix are matched only once. Step 6-3, repeat step 6-2, until all sub-ant colonies have been matched with the pheromone matrix; Step 6-4: For each established pheromone matrix, compare its corresponding representative scheme with the optimal service scheme of the sub-ant colony. If the optimal service scheme is better, replace the original representative scheme with the optimal service scheme; otherwise, keep the original representative scheme unchanged. Simultaneously, the pheromone matrix with the lowest similarity to the sub-ant colony and its representative scheme are recorded during the matching process.
9. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, The specific steps for updating the pheromone matrix are as follows: Step 7-1: For the gn-th sub-ant colony, determine the number of ants used to update its matched pheromone matrix. The calculation formula is as follows: , Among them, GS gn Let r represent the number of ants in the gn-th sub-ant colony. e It is the ant ratio used to update the pheromone matrix. This means that only the top n ants in the gn sub-ant colony are considered. e Only the service solutions built by the ants will be used to update the pheromone matrix they match; Indicates rounding down; Step 7-2: For each service sequence consisting of logistics task i and logistics task j in the pheromone matrix matched by each sub-ant colony, perform the pheromone update operation of the sorting ant colony algorithm. The pheromone update operation is as follows: Sort the sub-ant colonies in ascending order according to the transportation cost to obtain the top n... e For each ant updating its pheromone matrix, the update formula is as follows: , in, The updated pheromone concentration between logistics task i and logistics task j in the pheromone matrix matched by the gn-th sub-ant colony represents the pheromone concentration between them. ρ represents the current pheromone concentration between logistics task i and logistics task j in the pheromone matrix matched by the gn-th sub-ant colony, ρ represents the pheromone evaporation rate, and r is the ant's sorting number. Let represent the pheromone increment between logistics task i and logistics task j in the matched pheromone matrix of the r-th optimal service plan in the gn-th sub-ant colony, expressed as follows: , in, Let $\mathbf{r}$ represent the transportation cost of the $r$-th optimal service plan in the $\n$-th sub-ant colony. This represents the r-th optimal service solution in the gn-th sub-ant colony. Representation function The reciprocal of; Step 7-3: Repeat steps 7-1 and 7-2 until all GN pheromone matrices have been updated.
10. The multi-service scheme planning method for logistics vehicles based on the sorting ant colony algorithm according to claim 1, characterized in that, The specific steps for updating the critical service sequence archive are as follows: Step 8-1: Calculate the number N of critical service sequences. key The expression is as follows: , Where FES represents the current fitness evaluation count, MaxFES represents the maximum fitness evaluation count, and N represents the number of logistics tasks; Step 8-2: Obtain all optimal service solutions in the Best set of optimal service solutions, extract the service sequence consisting of all adjacent logistics tasks in the optimal service solution, count the total number of times each service sequence appears in Best, and sort the service sequences in descending order according to the number of occurrences. Step 8-3, use the first N key These service sequences form a new critical service sequence archive.