Path planning method based on pheromone enhanced ant colony algorithm

Through adaptive distance pheromone initialization and elite solution pheromone enhancement strategy, the ant colony algorithm is optimized, combined with the pheromone update of path length and number of turns, the local optimal problem of traditional ant colony algorithm in path planning is solved, and efficient and stable path planning is achieved.

CN120403685APending Publication Date: 2025-08-01FUDAN UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510555059.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In path planning, traditional ant colony algorithm has high randomness in initial state transition, is prone to falling into local optimal, and is difficult to quickly focus on potentially optimal path areas. It also lacks in-depth utilization of path geometric features, resulting in low search efficiency and unstable path quality.

Method used

Adaptive distance pheromone initialization, elite solution pheromone enhancement strategy and prospective steering optimization strategy are adopted. High-concentration pheromone is concentrated in the near optimal solution area through the adaptive distance pheromone initialization method, and the pheromone matrix is updated in combination with elite solution, and the pheromone update amount is determined by path length and number of turns, and path selection is optimized.

Benefits of technology

It improves the global optimization efficiency and convergence speed of path search, generates smooth and efficient path planning results, is highly adaptable, and can quickly obtain accurate and stable path planning under complex obstacle environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120403685A_ABST
    Figure CN120403685A_ABST
Patent Text Reader

Abstract

The invention discloses a path planning method based on a pheromone enhanced ant colony algorithm, and particularly relates to the technical field of path planning. By constructing an initial pheromone matrix, the ratio of the linear Euclidean distance between a path starting point and a path end point to the sum of the Euclidean distance from the path starting point to a candidate grid position and the Euclidean distance from the path end point to the candidate grid position is calculated, and the initial pheromone concentration is distributed near a theoretical optimal path; an elite solution pheromone enhancement strategy is adopted, all generated paths are sorted according to path quality in each iteration, and a high-quality path is selected, copied and then combined with a global optimal path to be used for updating a pheromone matrix; a prospective steering optimization strategy is utilized, punishment is applied to redundant turning in the searching process, and the pheromone updating amount is determined through the path length and the turning frequency; through multi-round iteration, stable pheromone distribution is realized, so that a final optimized path is obtained, the search efficiency is improved, and the method is suitable for a path planning task in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of path planning, and more specifically, the present invention relates to a path planning method based on a pheromone-enhanced ant colony algorithm. Background Art

[0002] There are still several technical bottlenecks in the traditional ant colony algorithm for path planning tasks. In the initialization stage of the traditional ant colony algorithm, a uniform pheromone concentration distribution is generally adopted, resulting in too high randomness in the state transition process of ant individuals in the initial stage, making it difficult to quickly focus on potential optimal path areas, thus reducing the search efficiency. The path selection process of the traditional ant colony algorithm is easily affected by the local optimal solution of the path length. Especially in complex maps or obstacle environments, the path search process is prone to falling into local optimality, resulting in slow convergence speed or unstable path quality. In addition, in terms of the pheromone update rule, the traditional ant colony algorithm usually only weights based on the path length or historical selection frequency, lacking in-depth utilization of spatial structure characteristics such as path geometric features, and it is difficult to fully guide the path structure to evolve towards a smooth and efficient direction.

[0003] To solve the above problems, a technical solution is provided now. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a path planning method based on a pheromone-enhanced ant colony algorithm to solve the problems raised in the above background art.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A path planning method based on a pheromone-enhanced ant colony algorithm, comprising the following steps:

[0007] Step S1: Construct an initial pheromone matrix. By using an adaptive distance pheromone initialization method, calculate the initial pheromone concentration according to the ratio of the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the starting point and the ending point and the candidate positions, so that the high-concentration pheromone is concentrated in the area close to the optimal solution;

[0008] Step S2: Based on the elite solution pheromone reinforcement strategy, sort the quality of all solutions obtained in the current iteration after each round of iteration, select high-quality elite solutions for replication, and combine the globally optimal elite solution with the best performance in history to update the pheromone matrix in the environment;

[0009] Step S3: Adopt a forward-looking turning optimization strategy, impose a penalty on the number of turns of redundant paths during the ant search process, and optimize the path selection in real time. Determine the pheromone update amount jointly by the path length and the number of turns;

[0010] Step S4: By iteratively executing Steps S2 to S3, the ant colony algorithm converges to obtain the final optimized path.

[0011] In a preferred embodiment, an initial pheromone matrix is constructed. Through an adaptive distance pheromone initialization method, according to the ratio of the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the starting point and the ending point and the candidate positions, the initial pheromone concentration is calculated, so that the high-concentration pheromone is concentrated in the area close to the optimal solution. Specifically:

[0012] Take the straight-line Euclidean distance between the starting point and the ending point as the reference benchmark;

[0013] Calculate the sum of the Euclidean distances between the starting point and the ending point and any candidate position;

[0014] For each candidate position, divide the reference benchmark by the sum of the Euclidean distances of the candidate position to obtain the value of the initial pheromone concentration;

[0015] Based on the distance between the candidate position and the ending point, adjust the weight of the weighting factor.

[0016] In a preferred embodiment, based on the elite solution pheromone intensification strategy, after each iteration, the quality of all solutions obtained in the current iteration is sorted, and high-quality elite solutions are selected for replication, and combined with the globally elite solution with the best performance in history, the pheromone matrix in the environment is updated. Specifically:

[0017] Record all path solutions in each iteration and sort them according to the quality of the solutions;

[0018] Select the first half of the path solutions in the sorting result and determine them as the high-quality elite solutions of the current iteration;

[0019] From the high-quality elite solutions of the current iteration, each elite solution is replicated five times to form a set of elite solution copies;

[0020] According to the cumulative path solution quality records in the iteration history, determine the globally elite solution with the best quality;

[0021] Based on the set of elite solution copies and the globally elite solution, they are jointly used to update the pheromone concentration to form a pheromone matrix.

[0022] In a preferred embodiment, a forward-looking steering optimization strategy is adopted. During the ant search process, a penalty is imposed on the number of turns of redundant paths, and the path selection is optimized in real time. The update amount of the pheromone is jointly determined by the path length and the number of turns. Specifically:

[0023] When each ant makes a search selection, record the length of each path passed by the ant and the number of turns in the path;

[0024] Set a penalty term for the number of turns of the path, and combine it with the length of the path to jointly constitute the basis for updating the pheromone concentration;

[0025] After an ant completes a search, update the pheromone concentration between the positions passed on the path according to the sum of the path length and the number of turns;

[0026] By reducing redundant turns, optimize the path selection when the ant conducts the next iterative search.

[0027] In a preferred embodiment, the ant colony algorithm is converged by iteratively executing steps S2 to S3 to obtain the final optimized path, specifically:

[0028] Set the maximum number of iterations and the convergence determination criterion of the ant colony algorithm;

[0029] In each iteration, repeat the operations of path search, elite solution selection, pheromone update, and path reconstruction;

[0030] Judge whether the cost change between the optimal path of the current round and the optimal path of the previous round is less than the preset threshold, or whether the maximum number of iterations has been reached;

[0031] When either convergence condition is met, output the current optimal path as the final path planning result.

[0032] In a preferred embodiment, set the maximum number of iterations and the convergence determination criterion of the ant colony algorithm, specifically:

[0033] Before the path planning task is executed, determine the maximum number of iterations allowed for the ant colony algorithm in advance according to the size of the map grid scale and the complexity of the task;

[0034] In each iteration process, record the path length and the number of turns of the optimal path obtained in the current iteration respectively, and determine the cost of the optimal path obtained in the current iteration based on the path length and the number of turns;

[0035] Compare the cost of the optimal path obtained in the current iteration with the cost of the optimal path obtained in the previous iteration, record the numerical value of the path cost change between iterations through continuous multiple comparisons, and set the threshold standard for convergence determination based on the numerical value of the path cost change.

[0036] In a preferred embodiment, judge whether the cost change between the optimal path of the current round and the optimal path of the previous round is less than the preset threshold, or whether the maximum number of iterations has been reached, specifically:

[0037] After each iteration is executed, determine the optimal path obtained in the current iteration, record the path length and the number of turns of the optimal path obtained in the current iteration, and determine the cost of the optimal path obtained in the current iteration based on the path length and the number of turns;

[0038] Calculate the difference between the cost of the optimal path obtained in the current iteration and the cost of the optimal path obtained in the previous iteration, and compare the calculated difference with a pre-set convergence threshold;

[0039] When the difference in path cost calculated in consecutive iterations is less than the convergence threshold, it is determined that the algorithm has converged and the iterative process is terminated;

[0040] If the number of executed iterations reaches the maximum number of iterations of the ant colony algorithm set in advance, the iterative process is terminated, and the optimal path obtained in the current iteration is determined as the final optimized path.

[0041] The technical effects and advantages of a path planning method based on a pheromone-enhanced ant colony algorithm of the present invention:

[0042] Through the adaptive distance pheromone initialization, elite solution pheromone reinforcement strategy, and prospective steering optimization strategy, the global optimization efficiency of path search and the search convergence speed are effectively improved. Based on the discretization of the map, the straight-line Euclidean distance between the path start point and the path end point is accurately calculated, and the initial pheromone concentration is determined according to the distance relationship between the start point, end point, and candidate grid positions, so that the pheromone concentration rapidly accumulates in the high-quality path area. By strictly recording the quality of all path solutions, an elite path copy is constructed by copying from the high-quality paths, and the pheromone matrix is further updated in combination with the historical global optimal path, significantly reducing the local optimal problem. Introduce a path turning penalty mechanism to balance the path length and the number of turns, making the final output path tend to be smooth, short, and efficient, with high versatility and adaptability, and can quickly obtain accurate, stable, and real-time navigation requirement-satisfying path planning results in a complex obstacle environment, while reducing the consumption of computing resources and running time. Brief Description of the Drawings

[0043] Figure 1 It is a schematic diagram of a path planning method based on a pheromone-enhanced ant colony algorithm of the present invention. Detailed Embodiments

[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0045] Embodiment 1

[0046] Figure 1 A path planning method based on a pheromone-enhanced ant colony algorithm of the present invention is given, which includes the following steps:

[0047] Step S1: Construct an initial pheromone matrix. Through the adaptive distance pheromone initialization method, calculate the initial pheromone concentration according to the ratio of the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the starting point and the ending point and the candidate positions, so that the high-concentration pheromone is concentrated in the area close to the optimal solution;

[0048] Step S2: Based on the elite solution pheromone reinforcement strategy, after each iteration, sort the quality of all solutions obtained in the current iteration, select high-quality elite solutions for replication, and combine the globally elite solution with the best performance in history to update the pheromone matrix in the environment;

[0049] Step S3: Adopt the prospective turning optimization strategy, impose a penalty on the number of turns of redundant paths during the ant search process, and optimize the path selection in real time. The update amount of the pheromone is jointly determined by the path length and the number of turns;

[0050] Step S4: By iteratively executing Steps S2 to S3, converge the ant colony algorithm to obtain the final optimized path.

[0051] Specifically, to construct an initial pheromone matrix, through the adaptive distance pheromone initialization method, calculate the initial pheromone concentration according to the ratio of the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the starting point and the ending point and the candidate positions, so that the high-concentration pheromone is concentrated in the area close to the optimal solution, including:

[0052] Use the straight-line Euclidean distance between the starting point and the ending point as the reference benchmark;

[0053] Specifically, in the path planning task, first discretize the two-dimensional map to be planned into a rectangular area composed of grid cells. The spatial coordinates of the starting position of the path in the two-dimensional grid are the grid coordinates corresponding to the intersection of the first horizontal axis and the first vertical axis, and the spatial coordinates of the ending position of the path in the two-dimensional grid are the grid coordinates corresponding to the intersection of the last horizontal axis and the last vertical axis.

[0054] By calculating the straight-line Euclidean distance between the starting position of the path and the ending position of the path, obtain the shortest distance between the starting position of the path and the ending position of the path. The straight-line Euclidean distance between the starting position of the path and the ending position of the path is the value obtained by taking the square root of the sum of the square of the difference in the horizontal coordinates and the square of the difference in the vertical coordinates of the starting grid coordinates and the ending grid coordinates of the path. The straight-line Euclidean distance between the starting position of the path and the ending position of the path is used as the reference benchmark distance in the calculation of the initial pheromone concentration.

[0055] Calculate the sum of the Euclidean distances between the starting point and the ending point and any candidate position;

[0056] Specifically, when constructing the initial pheromone matrix, all candidate grid positions in the entire map except for obstacle grids are traversed in sequence. For each candidate grid position, the Euclidean distance between the path start position and the candidate grid position is calculated.

[0057] The Euclidean distance between the path end position and the candidate grid position is calculated. The Euclidean distance between the path start position and the candidate grid position is added to the Euclidean distance between the path end position and the candidate grid position to obtain the total spatial offset of each candidate grid position at both ends of the path. The total spatial offset is used to measure the geometric deviation degree of the candidate grid position relative to the overall path.

[0058] For each candidate position, by dividing the reference standard by the sum of the Euclidean distances of the candidate position, the value of the initial pheromone concentration is obtained;

[0059] Specifically, the calculation method of the initial pheromone concentration value is: taking the straight-line Euclidean distance between the obtained path start position and the path end position as the numerator of the ratio calculation, and taking the sum of the Euclidean distance between the obtained path start position and the candidate grid position and the Euclidean distance between the path end position and the candidate grid position as the denominator of the ratio calculation.

[0060] For each candidate grid position, a ratio calculation operation is performed once, that is, dividing the Euclidean straight-line distance between the path start and the path end by the sum of the Euclidean distance between the path start position and the candidate grid position and the Euclidean distance between the path end position and the candidate grid position. The calculation result is the initial pheromone concentration value of the candidate grid position.

[0061] The larger the initial pheromone concentration value, the higher the path attractiveness of the candidate grid position near the straight-line path formed between the start and end points.

[0062] Based on the distance between the candidate position and the end point, the weighting factor is adjusted;

[0063] Specifically, when the Euclidean distance between the path end position and the candidate grid position is less than the average value of the Euclidean distances between the path end position and all candidate grid positions, the pheromone concentration value weighting factor is set to value two;

[0064] When the Euclidean distance between the path end position and the candidate grid position is greater than the average value of the Euclidean distances between the path end position and all candidate grid positions, the pheromone concentration value weighting factor is set to value one.

[0065] Multiply the initial pheromone concentration value corresponding to each calculated candidate grid position by the pheromone concentration value weighting factor corresponding to the current candidate grid position to obtain the final pheromone concentration value corresponding to each candidate grid position.

[0066] Fill in the final pheromone concentration values corresponding to all candidate grid positions one by one into the initialized pheromone matrix corresponding to the two-dimensional map structure to form an initialized pheromone matrix with global guidance. The initialized pheromone matrix is used to provide an initial search preference for the path search process in the path planning method based on the pheromone-enhanced ant colony algorithm.

[0067] Specifically, based on the elite solution pheromone reinforcement strategy, after each iteration, sort the quality of all solutions obtained in the current iteration, select high-quality elite solutions for replication, and combine with the globally optimal elite solution with the best performance in history to update the pheromone matrix in the environment, including:

[0068] Record all path solutions in each iteration and sort them according to the quality of the solutions;

[0069] Specifically, in each iteration process of the ant colony path search, each ant individual independently executes a complete path construction task under the guidance of the initialized pheromone matrix and the current heuristic information, and generates a continuous path from the path start position to the path end position in the two-dimensional map.

[0070] Perform a unified recording operation on the path solutions generated by all ant individuals. For each path solution, calculate the path length and the number of path turns corresponding to the path solution, and use the sum of the path length and the number of path turns as the path cost value. The smaller the path cost value, the higher the path quality.

[0071] Sort all path solutions in ascending order according to the path cost value from small to large to generate a path quality sorted list. The path solution with the smallest path cost value is located at the first position of the path quality sorted list, and the path solution with the largest path cost value is located at the last position of the path quality sorted list.

[0072] Select the first half of the path solutions in the sorting result and determine them as the high-quality elite solutions for the current iteration;

[0073] Specifically, according to the path cost value distribution result in the path quality sorted list, select the path solutions ranked in the top fifty percent to form the high-quality elite path solution set for the current iteration. Each path solution in the high-quality elite path solution set has a relatively low path cost value and can represent the better path search results in the current iteration.

[0074] The high-quality elite path solution set for the current iteration is used to construct a pheromone enhancement set to increase the expression proportion of high-quality path segments in the pheromone matrix.

[0075] From the high-quality elite solutions of the current iteration, each elite solution is copied five times to form a set of elite solution copies;

[0076] Specifically, in order to enhance the influence intensity of high-quality path solutions in the pheromone update process during the current iteration, a path copying operation is performed on each path solution in the set of high-quality elite path solutions. The rule of the path copying operation is: each path solution is copied five times, and the copying result is used as the new set of elite path copies.

[0077] The set of elite path copies has the same path structure as the original path set, only enhancing the path occurrence frequency in terms of quantity, so that high-quality path segments obtain a greater cumulative weight during the pheromone update process.

[0078] Determine the globally optimal elite solution according to the cumulative path solution quality records in the iteration history;

[0079] Specifically, during the execution of the entire path search task, continuously record the path cost values of all path solutions in each round of path search iteration. By traversing the historical path cost records, find the path solution with the smallest path cost value, and determine this path solution as the globally optimal elite path solution in the current path search task.

[0080] The globally optimal elite path solution has the overall optimal path quality characteristics and should be retained and repeatedly strengthened in the pheromone update operation for a long time to play a global guiding role in the path search direction.

[0081] Based on the set of elite solution copies and the globally optimal elite solution, they are jointly used to update the pheromone concentration to form a pheromone matrix;

[0082] Specifically, merge the set of elite path copies and the globally optimal elite path solution to form a set of elite pheromone-enhanced paths. Traverse each path in the set of elite pheromone-enhanced paths, and perform a pheromone update operation on the edge between each pair of consecutive path nodes in each path. The pheromone update operation is performed as follows:

[0083] Calculate the pheromone increment according to the path cost value of each path;

[0084] Add the pheromone increment to the position of the pheromone matrix corresponding to each edge in the path;

[0085] If an edge appears repeatedly in multiple elite paths, the pheromone increment value is repeatedly superimposed.

[0086] Through the replication enhancement effect of the elite path copy set and the long-term reinforcement effect of the global elite path solution, the concentration of pheromone gradually accumulates on high-quality path segments, and finally a strengthened pheromone concentration distribution matrix is formed. The pheromone concentration distribution matrix will be used as a new pheromone reference in the next round of path search iteration, continuously guiding ant individuals to tend to high-quality path regions during the path construction process.

[0087] Specifically, a forward-looking steering optimization strategy is adopted to impose penalties on the number of turns of redundant paths during the ant search process and optimize the path selection in real time. The amount of pheromone update is jointly determined by the path length and the number of turns, including:

[0088] When each ant makes a search selection, record the length of each path passed by the ant and the number of turns in the path;

[0089] Specifically, during the path search process, each ant individual starts from the path start position, gradually selects adjacent grid positions to move, and finally reaches the path end position, forming a continuous path.

[0090] During the process of the ant individual moving from the path start position to the path end position, record each grid position passed by the ant individual. For each pair of adjacent grid positions, analyze the relative direction in the map coordinate system, such as up and down, left and right, upper left, lower right, etc.

[0091] If the direction between the current grid position and the previous grid position is inconsistent, that is, there is a direction change behavior, it is counted as a path turning behavior. After traversing the entire path, accumulate the number of times of direction change in the path to obtain the number of path turns.

[0092] At the same time, record the total number of all path segments in the entire path, and calculate the total path length based on the unit path segment distance. The total path length and the number of path turns are jointly used as the measurement basis for the path structure complexity.

[0093] Set a penalty term for the number of turns of the path, and jointly with the length of the path, constitute the basis for pheromone concentration update;

[0094] Specifically, to reflect the impact of the turning behavior in the path on the overall path evaluation result, a turning penalty mechanism is introduced. In the path cost evaluation model, set the path cost equal to the total path length plus the number of path turns multiplied by a turning penalty factor.

[0095] The number of path turns represents the number of direction changes in the path, and the turning penalty factor is a constant greater than or equal to one, indicating the influence weight of each direction change behavior in the path evaluation.

[0096] Add the total path length and the turning penalty result to obtain the path cost value. The smaller the path cost value, the shorter the path, the fewer the turns, and the more reasonable the structure.

[0097] The path cost value of each path is used to determine the pheromone update increment corresponding to each path edge in the path.

[0098] After an ant completes a search, update the pheromone concentration between the positions passed through on the path according to the sum of the path length and the number of turns;

[0099] Specifically, during the pheromone update process, traverse all consecutive grid position pairs in each path to identify all path edges. For each path edge, perform the following pheromone update steps:

[0100] Calculate the pheromone update increment according to the path cost value. The pheromone update increment is the value obtained by dividing a constant by the path cost value. The larger the value of the pheromone update increment, the better the path corresponding to the path edge;

[0101] Add the pheromone update increment to the position in the pheromone matrix corresponding to the path edge and accumulate it into the current pheromone concentration value;

[0102] If a path edge appears repeatedly in multiple paths, accumulate the incremental pheromone values of all paths at the path edge.

[0103] Through the inverse relationship between the path cost value and the pheromone increment, enhance the pheromone density of the path segments with a compact structure and fewer turns in the overall pheromone matrix, and suppress the interference of redundant paths on the overall search behavior.

[0104] Optimize the path selection of ants in the next iteration search by reducing redundant turns;

[0105] Specifically, after the pheromone update operation based on the completed path information, a spatial distribution with different pheromone concentrations is formed in the pheromone matrix. The path segments with a shorter total path length and fewer path turning times have a higher pheromone concentration corresponding to the path edges.

[0106] In the next round of path search iteration process, ant individuals make state transition decisions according to the current pheromone matrix and preferentially select path edges with a higher pheromone concentration to move. Since the pheromone concentration distribution is adjusted by the path turning penalty, ant individuals will automatically tend to select path segments with fewer turns and a smoother path structure during the state transition process.

[0107] Finally, the path structure in the path search process tends to be smoother and there are fewer path turns, thus forming an optimized high-quality path result.

[0108] Specifically, by iteratively executing steps S2 to S3, the ant colony algorithm converges to obtain the final optimized path, including:

[0109] Set the maximum number of iterations and the convergence determination criterion of the ant colony algorithm;

[0110] Specifically, in the initialization stage of the path search task, according to the grid scale of the map area to be planned and the complexity of the path planning problem, set the maximum number of iterations allowed for path search. The maximum number of iterations is a positive integer value, indicating the maximum number of rounds that the ant colony path search process can be repeated.

[0111] At the same time, set the convergence threshold for the change in the path cost value during the path search process. The convergence threshold for the change in the path cost value is a non-negative real value, which is used to determine whether there is a substantial improvement in the path cost value between the optimal paths in two consecutive rounds of path search. If the change amount between the path cost values in two consecutive rounds is less than the convergence threshold for the change in the path cost value, it is considered that the path search process has tended to a stable state.

[0112] The maximum number of iterations and the convergence threshold for the change in the path cost value together constitute the convergence control conditions in the path search process.

[0113] In each iteration, repeat the operations of path search, elite solution selection, pheromone update, and path reconstruction;

[0114] Specifically, in each round of path search iteration, perform the following operation process in sequence:

[0115] Path construction operation process: Each ant individual starts from the path start position under the guidance of the current pheromone matrix and heuristic information, dynamically selects the path direction, and finally reaches the path end position to generate a complete path.

[0116] Path quality evaluation operation process: For the path generated by each ant individual, calculate the path length and the number of path turns, and construct a path cost value evaluation model to synthesize the path length and the number of path turns into the path cost value as the basis for subsequent sorting and screening.

[0117] Pheromone update operation process: According to the path cost value, perform pheromone increment update on all edges in the path, and raise the pheromone concentration on the better path segments to a higher level.

[0118] Path reconstruction operation process: After performing the pheromone update, update the path transfer strategy of the ant individual to construct the initial state for the next round of path search.

[0119] The above operation process is continuously executed in each round of path search iteration to form the core working unit of path search.

[0120] Determine whether the cost change between the optimal path in the current round and the optimal path in the previous round is less than a preset threshold, or whether the maximum number of iterations has been reached;

[0121] Specifically, after each round of path search iteration ends, select the path with the smallest path cost value from all the ant individual path sets as the optimal path in the current round. The path cost value of the optimal path in the current round is the optimal evaluation index of the current iteration result.

[0122] At the same time, read the path cost value of the optimal path selected in the previous round of path search iteration. Perform a difference calculation operation on the path cost value of the optimal path in the current round and the path cost value of the optimal path in the previous round to obtain the path cost value change amount.

[0123] The path cost value change amount represents the degree of change in path performance during two consecutive rounds of path search. The smaller the path cost value change amount, the more the path search results gradually converge to a stable state.

[0124] Compare the calculated path cost value change amount with the set path cost value change convergence threshold. If the path cost value change amount is less than the path cost value change convergence threshold, it indicates that the path search results have tended to be stable, and the path search process can be terminated in advance.

[0125] Otherwise, determine whether the current path search iteration count has been equal to or exceeded the maximum number of iterations. If the path search iteration count reaches the maximum number of iterations, it means that the path search has reached the upper limit, and the path search process should also be terminated.

[0126] The two termination conditions are that the path cost value change amount is less than the convergence threshold or the path search iteration count is equal to the maximum number of iterations. When either condition is met, immediately terminate the iterative process of the path search task.

[0127] When either convergence condition is met, output the current optimal path as the final path planning result;

[0128] Specifically, at the moment when the path search process is terminated, read the path with the smallest path cost value selected in the current path search iteration round as the final result of the path search. The final result path is a continuous space path that starts from the path start position, passes through multiple candidate grid positions in sequence, and finally reaches the path end position.

[0129] Output the final result path as the final output result of the path planning task.

[0130] Specifically, set the maximum number of iterations and the convergence determination criteria of the ant colony algorithm, including:

[0131] Before the path planning task is executed, according to the size of the map grid scale and the complexity of the task, the maximum number of iterations allowed for the ant colony algorithm is determined in advance;

[0132] Specifically, before the path planning task is executed, first obtain the map grid scale information of the area to be planned. The map grid scale information includes the total number of rows of the map grid, the total number of columns of the map grid, and the proportion of the effective passage area in the map. The map grid scale information is used as the index basis for the space complexity of the path search task.

[0133] Set the maximum number of iterations for the path search process according to the map grid scale information. The setting principle of the maximum number of iterations is:

[0134] When the map grid scale is small and the distance between the path start position and the path end position is short, set the maximum number of iterations to a medium value range;

[0135] When the map grid scale is large, or the number of obstacles in the map is large and the path search space is complex, set the maximum number of iterations to a large value range.

[0136] The maximum number of iterations is the forced termination condition for the path search process. Even if the path has not reached a stable state, if the number of rounds of the path search process reaches the maximum number of iterations, the path search will still be forced to abort.

[0137] In each iteration process, record the path length and the number of turns of the optimal path obtained in the current iteration respectively, and determine the cost of the optimal path obtained in the current iteration based on the path length and the number of turns;

[0138] Specifically, in each round of path search iteration of the path search task, record the path cost value of the optimal path in the current round, and construct a path cost change sequence according to the path search iteration order with the path cost value.

[0139] The path cost change sequence is used to evaluate the convergence speed and the path structure stability in the path search process. If the path cost change sequence remains slowly changing or basically unchanged in consecutive multiple rounds of path search, it indicates that the path search process has gradually tended to a stable state.

[0140] The path cost change sequence provides a basic basis for subsequent path convergence determination.

[0141] Compare the cost of the optimal path obtained in the current iteration with the cost of the optimal path obtained in the previous iteration, record the numerical value of the path cost change between iterations through continuous multiple comparisons, and set the threshold standard for convergence determination based on the numerical value of the path cost change;

[0142] Specifically, a difference calculation operation is performed on any pair of adjacent path cost values in the path cost value change sequence to obtain the path cost change amount. The path cost change amount represents the degree of change in the performance of the optimal path in two consecutive rounds of path search iterations.

[0143] According to the path planning task tolerance requirements and path optimization objectives, a path convergence determination threshold is set. The path convergence determination threshold is a non - negative real value, which is used to determine whether the path search has reached a stable state.

[0144] When the path cost change amount is less than the path convergence determination threshold, it is considered that the path search process has reached the convergence state; otherwise, the path search iteration process continues until the convergence condition is met or the maximum number of iterations is reached.

[0145] Specifically, it is determined whether the cost change between the optimal path in the current round and the optimal path in the previous round is less than the preset threshold, or whether the maximum number of iterations has been reached, including:

[0146] After each iteration is executed, the optimal path obtained in the current iteration is determined, and the path length and the number of turns of the optimal path obtained in the current iteration are recorded. The cost of the optimal path obtained in the current iteration is determined based on the path length and the number of turns.

[0147] Specifically, during the execution of the path search task, at the end of each round of path search iteration, from the paths generated by all ant individuals in this round of iteration, the path with the smallest path cost value is selected as the optimal path in the current round.

[0148] The following index extraction operations are performed on the optimal path in the current round:

[0149] The number of consecutive grid path segments included in the optimal path in the current round is counted and multiplied by the unit path segment length to obtain the path length value of the optimal path in the current round.

[0150] The direction relationship between all consecutive grid segments in the optimal path in the current round is analyzed, and the number of direction changes is counted to obtain the number of path turns value of the optimal path in the current round.

[0151] The path length value and the number of path turns value of the optimal path in the current round are input into the path cost evaluation function to calculate the path cost of the optimal path in the current round. The path cost evaluation function is the sum result of the path length value and the product of the number of path turns value and the preset turn penalty coefficient.

[0152] The difference between the cost of the optimal path obtained in the current iteration and the cost of the optimal path obtained in the previous iteration is calculated, and the calculated difference is compared with the preset convergence threshold.

[0153] Specifically, read the path cost value of the optimal path in the previous round of path search iteration from the path cost value change record sequence, and set this path cost value as the path cost value of the previous round.

[0154] Subtract the path cost value of the previous round from the path cost value of the optimal path in the current round, perform an absolute value calculation operation, and obtain the path cost value change amount between the current round and the previous round.

[0155] The path cost value change amount represents the improvement or change amplitude of the path quality in the path search process between two consecutive rounds.

[0156] When the path cost difference calculated in consecutive multiple iterations is less than the convergence threshold, it is determined that the algorithm has converged, and the iteration process is terminated;

[0157] Specifically, numerically compare the calculated path cost value change amount with the path convergence determination threshold set in the path search task initialization stage.

[0158] If the path cost value change amount is less than the path convergence determination threshold, it indicates that the path search result has entered the stable range, the path changes in consecutive multiple rounds are not significant, and the path convergence determination condition is satisfied.

[0159] When the path convergence determination condition is satisfied, immediately abort the subsequent iteration operation of the current path search task and enter the path result output process.

[0160] If the number of executed path search iterations reaches the maximum number of iterations of the ant colony algorithm set in advance, terminate the iteration process and determine the optimal path obtained in the current iteration as the final optimized path;

[0161] Specifically, if the path cost value change amount does not satisfy the path convergence determination condition, continue to perform the maximum iteration number check operation.

[0162] Read the number of path search iteration rounds that the current path search task has executed, and compare it with the maximum number of iterations set in the path search task initialization stage.

[0163] When the number of current path search iteration rounds is equal to or greater than the maximum number of iterations, it is determined that the path search task has reached the iteration upper limit, and perform the forced termination operation of the path search task without any subsequent iteration. [[ID=II]]

[0164] When the path search task is terminated due to the path convergence determination condition or the maximum number of iterations condition, select the path with the minimum path cost value from the current path search round as the final output path of the path search task.

[0165] The final output path is a two-dimensional spatial path sequence that starts from the starting position of the path, passes through a number of candidate grid positions connected in sequence, and finally reaches the ending position of the path. This path has the structural characteristics of a relatively short path length and fewer path turning times, and can be directly used for subsequent operations in a path navigation system, a path execution module, or a path visualization platform.

[0166] The above formulas are all dimensionless and take their numerical calculations. The formula is a formula obtained by collecting a large amount of data for software simulation to approximate the real situation as closely as possible. The preset parameters and threshold selection in the formula are set by those skilled in the art according to the actual situation.

[0167] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that contains one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.

[0168] Those of ordinary skill in the art can realize that the modules and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0169] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices, and modules described above can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here.

[0170] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or modules can be in electrical, mechanical, or other forms.

[0171] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules. They can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0172] In addition, in each embodiment of the present application, the functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.

[0173] If the above functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0174] As described above, it is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0175] Finally, the above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A path planning method based on a pheromone-enhanced ant colony algorithm, characterized in that, It includes the following steps: Step S1: Construct an initial pheromone matrix. By using an adaptive distance pheromone initialization method, calculate the initial pheromone concentration according to the ratio of the Euclidean distance between the starting point and the ending point and the sum of the Euclidean distances between the starting point and the ending point and the candidate positions, so that the high-concentration pheromone is concentrated in the area close to the optimal solution; Step S2: Based on the elite solution pheromone intensification strategy, after each iteration, sort the quality of all solutions obtained in the current iteration, select high-quality elite solutions for replication, and combine the globally elite solution with the best performance in history to update the pheromone matrix in the environment; Step S3: Adopt a prospective turning optimization strategy, impose a penalty on the number of turns of redundant paths during the ant search process, and optimize the path selection in real time. Determine the pheromone update amount jointly by the path length and the number of turns; Step S4: By iteratively executing Steps S2 to S3, converge the ant colony algorithm to obtain the final optimized path.

2. The path planning method based on the pheromone-enhanced ant colony algorithm according to claim 1, wherein Step S1 is specifically as follows: Take the straight-line Euclidean distance between the starting point and the ending point as a reference benchmark; Calculate the sum of the Euclidean distances between the starting point and the ending point and any candidate position; For each candidate position, divide the reference benchmark by the sum of the Euclidean distances of the candidate position to obtain the value of the initial pheromone concentration; Based on the distance between the candidate position and the ending point, adjust the weight of the weighting factor.

3. A path planning method based on a pheromone-enhanced ant colony algorithm according to claim 2, characterized in that, Step S2 is specifically as follows: Record all path solutions in each iteration and sort them according to the quality of the solutions; Select the first half of the path solutions in the sorting result and determine them as the high-quality elite solutions of the current iteration; From the high-quality elite solutions of the current iteration, each elite solution is replicated five times to form a set of elite solution copies; According to the cumulative path solution quality records in the iteration history, determine the globally elite solution with the best quality; Based on the set of elite solution copies and the globally elite solution, jointly update the pheromone concentration to form a pheromone matrix.

4. A path planning method based on a pheromone-enhanced ant colony algorithm according to claim 3, characterized in that, Step S3 is specifically as follows: When each ant makes a search selection, record the length of each path passed by the ant and the number of turns in the path; Set a penalty term for the number of turns of the path and jointly with the length of the path constitute the basis for updating the pheromone concentration; After an ant completes a search, update the pheromone concentration between the positions passed by the path according to the sum of the path length and the number of turns; Optimize the path selection for the ant's next iteration search by reducing redundant turns.

5. The path planning method based on pheromone enhanced ant colony algorithm according to claim 4, characterized in that, Step S4 is specifically as follows: Set the maximum number of iterations and the convergence determination criterion of the ant colony algorithm; In each iteration, repeat the operations of path search, elite solution selection, pheromone update, and path reconstruction; Judge whether the cost change between the optimal path in the current round and the optimal path in the previous round is less than the preset threshold, or whether the maximum number of iterations has been reached; When either convergence condition is met, output the current optimal path as the final path planning result.

6. A path planning method based on a pheromone-enhanced ant colony algorithm according to claim 5, characterized in that Set the maximum number of iterations and the convergence determination criterion of the ant colony algorithm, specifically as follows: Before the path planning task is executed, according to the size of the map grid scale and the complexity of the task, pre-determine the maximum number of iterations allowed for the ant colony algorithm to execute; In each iteration process, record the path length and the number of turns of the optimal path obtained in the current iteration respectively, and determine the cost of the optimal path obtained in the current iteration based on the path length and the number of turns. Compare the cost of the optimal path obtained in the current iteration with the cost of the optimal path obtained in the previous iteration. Record the numerical value of the change in path cost between iterations through continuous comparisons for multiple times. Based on the numerical value of the change in path cost, set the threshold criterion for convergence determination.

7. A path planning method based on a pheromone-enhanced ant colony algorithm according to claim 5, characterized in that Judge whether the change in cost between the optimal path in the current round and the optimal path in the previous round is less than the preset threshold, or whether the maximum number of iterations has been reached. Specifically: After each iteration is executed, determine the optimal path obtained in the current iteration, record the path length and the number of turns of the optimal path obtained in the current iteration, and determine the cost of the optimal path obtained in the current iteration based on the path length and the number of turns. Calculate the difference between the cost of the optimal path obtained in the current iteration and the cost of the optimal path obtained in the previous iteration, and compare the calculated difference with the preset convergence threshold. When the difference in path cost calculated in multiple consecutive iterations is less than the convergence threshold, it is determined that the algorithm has converged, and the iteration process is terminated. If the number of executed iterations reaches the maximum number of iterations of the preset ant colony algorithm, terminate the iteration process, and determine the optimal path obtained in the current iteration as the final optimized path.

Citation Information

Cited By

  • Continuous sampling measurement path optimization method for three-dimensional scanner and related equipment

    CN120651141A

  • Method for determining advance grouting reinforcement parameters of tunnel fault fracture zone

    CN120850813A

  • A warehouse AGV path planning method based on an ant colony algorithm

    CN122448235A