A vehicle path planning method based on an improved ant colony algorithm
By introducing 3D terrain modeling and travel direction guidance functions into the ant colony algorithm, the algorithm is improved to address the blindness and limitations of the traditional ant colony algorithm in vehicle path planning, thereby improving the efficiency and accuracy of path planning.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- UNIV OF ELECTRONICS SCI & TECH OF CHINA
- Filing Date
- 2023-07-24
- Publication Date
- 2026-06-16
AI Technical Summary
Traditional ant colony algorithms suffer from several drawbacks in vehicle path planning, including strong initial search blindness, slow convergence speed, susceptibility to local optima, and failure to consider three-dimensional terrain factors.
A grid method is used for 3D terrain modeling. A total vehicle travel cost function is constructed, which includes travel distance, slope and height cost terms. A travel direction guidance function and pheromone update rule are introduced into the ant colony algorithm to improve the ant colony algorithm to adapt to the 3D terrain environment.
It effectively alleviates the initial blindness problem of traditional ant colony algorithms, improves search efficiency, and plans better vehicle paths in three-dimensional terrain.
Smart Images

Figure CN116698073B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of navigation technology and relates to vehicle path planning methods, specifically providing a vehicle path planning method based on an improved ant colony algorithm. Background Technology
[0002] With the rapid development of navigation and artificial intelligence technologies, ant colony optimization (ACO)-based path planning technology has been widely applied in logistics, manufacturing, and tourism. Simultaneously, ACO and its improved algorithms have become the core of related research, as excellent algorithms can enable vehicles to efficiently plan optimal routes within a known map. Path planning, a crucial component of navigation technology, refers to placing a vehicle in a known map environment containing obstacles, first setting the vehicle's starting and ending points within this environment, and then using algorithms to find a low-cost optimal path from the starting point to the ending point.
[0003] Ant colony optimization (ACO) is a probabilistic optimization algorithm based on swarm intelligence. Its effectiveness was first verified in solving the Traveling Salesman Problem (TSP), subsequently attracting more attention and importance from researchers. Currently, this algorithm shows promising application prospects in path planning and autonomous driving. Although ACO has advantages such as good robustness and adaptability, it still has the following drawbacks: First, ACO's initial search is highly blind, resulting in slow convergence and long search time. Second, due to the positive feedback mechanism, if a suboptimal solution is initially obtained, the positive feedback will quickly allow that suboptimal solution to gain a greater advantage, making it easy for ants to stagnate and get trapped in local optima. Third, traditional ACO does not consider the three-dimensional terrain factors during vehicle travel, and terrain undulations directly affect the cost and expenses of the vehicle's journey. Therefore, further improvements to ACO are needed to obtain an improved ACO that considers three-dimensional terrain factors, thereby enabling vehicle path planning. Summary of the Invention
[0004] The purpose of this invention is to provide a vehicle routing method based on an improved ant colony algorithm, in order to overcome the many shortcomings of the traditional ant colony algorithm in vehicle routing tasks.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] A vehicle routing method based on an improved ant colony algorithm includes the following steps:
[0007] Step 1: Use the grid method to perform 3D terrain modeling to obtain a 3D terrain model;
[0008] Step 2: Construct the total cost function for vehicle travel based on the 3D terrain model, expressed as:
[0009]
[0010] Where F represents the total cost function of the vehicle trip, f L f represents the distance traveled during the vehicle's journey. S f represents the gradient cost term during vehicle travel. H This represents the altitude cost during vehicle operation. and The cost terms f are listed in order. L f S with f H The preset weight values, and the sum of the three is 1;
[0011] Step 3: Introduce the travel direction guidance function into the state probability transition formula of the ant colony algorithm, and introduce the total cost function of vehicle travel into the pheromone update formula of the ant colony algorithm to construct the improved ant colony algorithm, and complete vehicle path planning in the three-dimensional terrain model based on the improved ant colony algorithm.
[0012] Furthermore, in step 1, the three-dimensional terrain model is represented as follows:
[0013]
[0014] Where (x,y) represents the two-dimensional plane coordinates, and z(x,y) represents the z-axis coordinate at (x,y) in the two-dimensional plane; K represents the number of hills, and k represents the label of the k-th hill; (x ok ,y ok ) represents the coordinates of the center of the two-dimensional plane of the k-th hillside, h k Let x represent the height of the k-th hillside. sk With y sk These represent the slope components of the k-th hillside in the x-axis and y-axis directions, respectively.
[0015] Furthermore, in step 2, the travel distance cost term f L Represented as:
[0016]
[0017] Where N represents the number of travel nodes, and i represents the label of the travel node; (x i ,y i ) and (x i+1 ,y i+1 ) represent the two-dimensional plane coordinates of the i-th travel node and the next travel node, respectively.
[0018] Furthermore, in step 2, the slope cost term f S Represented as:
[0019]
[0020] Where N represents the number of travel nodes, and i represents the label of the travel node; (x i ,y i ) and (x i+1 ,y i+1 Let z and z represent the two-dimensional plane coordinates of the i-th travel node and the next travel node, respectively. i With z i+1 These represent the z-axis coordinates of the i-th travel node and the next travel node, respectively.
[0021] Furthermore, in step 2, the height cost term f H Represented as:
[0022]
[0023] Where N represents the number of travel nodes, and i represents the label of the travel node; z i This represents the z-axis coordinate of the i-th travel node.
[0024] Furthermore, in step 3, the travel direction guiding function is expressed as:
[0025]
[0026] Where, ψ i,j d represents the direction guidance function between the i-th and j-th travel nodes. o,i d represents the two-dimensional planar distance from the starting point to the i-th travel node. i,j d represents the two-dimensional planar distance from the i-th travel node to the j-th travel node. j,e Let γ represent the two-dimensional planar distance from the j-th travel node to the destination, and let γ represent the direction factor.
[0027] Furthermore, in step 3, the state probability transition formula is expressed as:
[0028]
[0029] Where t represents the iteration number, m represents the ant's number, i represents the current node's number, and j represents the next node to be moved. τ represents the probability that the m-th ant chooses to move towards node j from node i in the t-th iteration; i,j (t) represents the pheromone between the i-th and j-th travel nodes, η i,j (t) represents the heuristic function between the i-th and j-th travel nodes, τ i,s (t) represents the pheromone between the i-th travel node and the s-th travel node, ηi,s (t) represents the heuristic function between the i-th and s-th travel nodes; ψ i,j ψ represents the direction guiding function between the i-th and j-th travel nodes. i,s This represents the direction guidance function between the i-th and s-th travel nodes; α and β represent the preset weights of pheromones and heuristic factors, respectively. i Let represent the set of feasible nodes at the i-th travel node.
[0030] Furthermore, in step 3, the pheromone update formula is expressed as:
[0031]
[0032]
[0033] Where t represents the iteration number, m represents the ant's number, i represents the current node's number, and j represents the next node to be moved; τ i,j (t) and τ i,j (t+1) represents the pheromone between the i-th and j-th travel nodes at the t-th and t+1-th iterations, respectively. F represents the pheromone increment generated by the m-th ant between node i and node j in the t-th iteration; ρ represents the pheromone evaporation factor, Q represents the pheromone constant, and M is the number of ants; m This represents the total cost function value of the path of the m-th ant in the t-th iteration.
[0034] Furthermore, in step 3, the specific process of vehicle route planning is as follows:
[0035] Step 3.1: Set the starting point and ending point of the vehicle in the 3D terrain model, and initialize the various parameters of the improved ant colony algorithm;
[0036] Step 3.2: Place all ants at the starting point and construct a taboo list;
[0037] Step 3.3: Calculate the transition probability according to the state probability transition formula, determine the next travel node of the ant based on the transition probability, and put the travel nodes that have been visited into the taboo list; until the ant reaches the destination (target node), the current search is completed, and the total cost function value of each ant in the current iteration is obtained;
[0038] Step 3.4: Update the pheromones according to the pheromone update formula;
[0039] Step 3.5: Compare the optimal vehicle driving paths obtained in each iteration to obtain the optimal vehicle driving path for the current iteration;
[0040] Step 3.6: Determine whether the number of iterations has reached the preset maximum value. If it has, output the optimal vehicle driving path; otherwise, proceed to the next iteration.
[0041] Based on the above technical solution, the beneficial effects of the present invention are as follows:
[0042] This invention provides a vehicle path planning method based on an improved ant colony algorithm. First, a 3D terrain model of the vehicle's driving environment is created using a grid method, resulting in a 3D terrain model. Then, considering the costs incurred by the vehicle due to slope and altitude in the 3D terrain environment, a total vehicle travel cost function is constructed, including travel distance, slope, and altitude costs. This function is then incorporated into the pheromone update rule to improve the ant colony algorithm, making it more reasonable and effective in vehicle path planning. Simultaneously, a travel direction guidance function is designed and incorporated into the state probability transition formula to further improve the ant colony algorithm, effectively alleviating the problem of strong initial blind searching in traditional ant colony algorithms. Finally, vehicle path planning is completed in the 3D terrain model based on the improved ant colony algorithm. In summary, this invention, by establishing a 3D environment, designs a total vehicle travel cost function and incorporates it into the pheromone update rule, and designs a travel direction guidance function and incorporates it into the state probability transition formula. This effectively alleviates the limitations of traditional ant colony algorithms in a 2D plane and the problem of initial blind searching, thus improving algorithm efficiency. Attached Figure Description
[0043] Figure 1 This is a flowchart illustrating the vehicle path planning method based on the improved ant colony algorithm in this invention.
[0044] Figure 2 This is a schematic diagram of the three-dimensional terrain model in this invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0046] This embodiment provides a vehicle path planning method based on an improved ant colony algorithm, the process of which is as follows: Figure 1 As shown, it mainly includes three parts: 3D terrain modeling, constructing the total cost function for vehicle formation, and improving the ant colony algorithm. The specific steps are as follows.
[0047] Step 1: Use the grid method to model the environment;
[0048] The construction of three-dimensional terrain is described using an exponential function, expressed as:
[0049]
[0050] Where (x,y) represents the two-dimensional plane coordinates, and z(x,y) represents the z-axis coordinate at (x,y) in the two-dimensional plane; K represents the number of hills, and k represents the label of the k-th hill; (x ok ,y ok ) represents the coordinates of the center of the two-dimensional plane of the k-th hillside, h k x represents the height of the k-th hillside (in the z-axis direction). sk With y sk Let h represent the slope components of the k-th hillside along the x-axis and y-axis, respectively; it should be noted that: h k That is, the z-axis coordinate of the highest point of the kth hillside;
[0051] The above model can be used to simulate the actual terrain environment in which vehicles travel, thus constructing a three-dimensional terrain model, such as... Figure 2 As shown.
[0052] Step 2: Construct a total vehicle travel cost function to measure the total cost of a vehicle traveling in a 3D terrain model;
[0053] This embodiment comprehensively considers the impact of three factors—travel distance, gradient, and altitude—on the vehicle's travel cost, and constructs a total vehicle travel cost function, specifically expressed as follows:
[0054]
[0055] Where F represents the total cost function of the vehicle trip, f L f represents the distance traveled during the vehicle's journey. S f represents the gradient cost term during vehicle travel. H This represents the altitude cost during vehicle operation. and The cost terms f are listed in order. L f S with f H The preset weight value, and These are empirical constants, and their sum is 1.
[0056] It should be noted that in a three-dimensional terrain environment, the cost of vehicle travel is related to changes in altitude and slope during the journey. However, changes in altitude and slope are two separate factors and should not be confused. When the two-dimensional plane travel distance and changes in altitude are the same, the slope experienced by the vehicle may not be the same. Therefore, this invention constructs two independent cost terms, altitude and slope, when measuring the total cost of vehicle travel in a three-dimensional terrain model.
[0057] Furthermore, the cost term f for travel distanceL This measures the loss incurred by a vehicle traveling from its starting point to its destination. In a 3D terrain model, the total distance consists of N travel nodes, and the travel distance cost term f is... L Represented as:
[0058]
[0059] Where N represents the number of travel nodes, and i represents the label of the current travel node; (x i ,y i ) and (x i+1 ,y i+1 ) represent the two-dimensional planar coordinates of the i-th travel node (the current travel node) and its next adjacent travel node, respectively;
[0060] Since this invention uses two cost terms, height and slope, to measure the impact of three-dimensional terrain on vehicle travel, when setting the travel distance cost term, only the two-dimensional planar distance of the vehicle's journey is considered. The two-dimensional planar distance, height, and slope are mutually restrictive and together constitute the total cost of the vehicle's journey.
[0061] Furthermore, the slope cost term f S This measures the wear and tear caused by the gradient of the slope during vehicle operation. The steeper the slope, the greater the wear and tear on the vehicle itself; therefore, the gradient cost term f... S Represented as:
[0062]
[0063] Among them, z i With z i+1 Let z represent the z-axis coordinates of the i-th travel node and its next adjacent travel node, respectively.
[0064] The total gradient value is obtained by summing the absolute values of the gradient between the current travel node and its next adjacent travel node. The larger the total gradient value, the greater the wear and tear on the vehicle caused by the path.
[0065] Furthermore, the high cost term f H This measures the loss caused by the vehicle's altitude during travel, using the standard deviation of altitude to characterize the altitude cost of the vehicle's journey. The altitude cost term f is... H Represented as:
[0066]
[0067] Height cost term f H The smaller the value, the less the altitude change during the vehicle's journey, meaning the vehicle travels more smoothly.
[0068] Step 3: Improve the ant colony algorithm based on the travel direction guidance function and the total cost function of vehicle travel, and complete vehicle path planning in the 3D terrain model based on the improved ant colony algorithm;
[0069] To address the problem of blind searching in the early stages of traditional ant colony algorithms, this invention designs a path guidance function to improve the state probability transition formula of the ant colony algorithm. The improved state probability transition formula is as follows:
[0070]
[0071] Where t represents the current iteration number, m represents the ant label, i represents the label of the current travel node, and j represents the label of the next travel node to be transferred. τ represents the probability that the m-th ant chooses to move towards node j from node i in the t-th iteration; i,j (t) represents the pheromone between the i-th and j-th travel nodes, η i,j (t) represents the heuristic function between the i-th and j-th travel nodes; similarly, τ i,s (t) represents the pheromone between the i-th travel node and the s-th travel node, η i,s (t) represents the heuristic function between the i-th and s-th travel nodes; ψ i,j ψ represents the direction guiding function between the i-th and j-th travel nodes. i,s This represents the direction guidance function between the i-th and s-th travel nodes; α and β represent the preset weights of pheromones and heuristic factors, respectively. i This represents the set of feasible nodes at the i-th travel node;
[0072] Unlike traditional ant colony algorithms, the improved state probability transition formula in this invention introduces a travel direction guidance function, specifically expressed as:
[0073]
[0074] Where, d o,i d represents the two-dimensional planar distance from the starting point to the i-th travel node. i,j d represents the two-dimensional planar distance from the i-th travel node to the j-th travel node. j,e γ represents the two-dimensional planar distance from the j-th travel node to the destination; γ represents the direction factor, used to indicate the relative importance of travel direction guidance, and is an empirical parameter; similarly, when j = s, we obtain ψ i,s ;
[0075] The aforementioned direction guidance function provides the ant colony algorithm with a general search direction toward the destination in the early stages, making the search more purposeful and alleviating the inefficiency caused by blind search.
[0076] Meanwhile, to adapt the ant colony algorithm to vehicle path planning problems in three-dimensional terrain environments, this invention introduces the aforementioned total vehicle travel cost function into the pheromone update rule of the ant colony algorithm. The improved pheromone update formula is as follows:
[0077]
[0078] Where, τ i,j (t) and τ i,j (t+1) represents the pheromone between the i-th and j-th travel nodes at the t-th and t+1-th iterations, respectively. F represents the pheromone increment generated by the m-th ant between node i and node j in the t-th iteration; ρ represents the pheromone evaporation factor, Q represents the pheromone constant, and M is the number of ants; m This represents the total cost function value of the path of the m-th ant in the t-th iteration;
[0079] Unlike traditional ant colony algorithms, the total cost function F in this invention... m The total cost function value F is related not only to the two-dimensional plane distance, but also to factors such as height and slope. m The shorter the path, the greater the advantage.
[0080] Furthermore, based on the improved ant colony algorithm described above, the specific process of vehicle path planning is as follows:
[0081] Step 3.1: Set the starting point and ending point of the vehicle in the 3D terrain model, and initialize the various parameters of the improved ant colony algorithm;
[0082] Step 3.2: Place all ants at the starting point and construct a tabu list; the tabu list is used to store the nodes that the ants have already visited, to prevent these nodes from being selected by the ants again.
[0083] Step 3.3: Calculate the transition probability according to the state probability transition formula, and determine the next travel node of the ant based on the transition probability. At the same time, put the travel nodes that have been visited into the taboo list until the ant reaches the destination (target node), complete the current search, and obtain the total cost function value of each ant's travel in the current iteration.
[0084] Step 3.4: Update the pheromones according to the pheromone update formula;
[0085] Step 3.5: Compare the optimal vehicle driving paths obtained in each iteration to obtain the optimal vehicle driving path for the current iteration;
[0086] Step 3.6: Determine whether the number of iterations has reached the preset maximum value. If it has, output the optimal vehicle driving path; otherwise, proceed to the next iteration.
[0087] The above description is merely a specific embodiment of the present invention. Any feature disclosed in this specification may be replaced by other equivalent or similar features unless otherwise specified. All disclosed features, or steps in all methods or processes, may be combined in any way except for mutually exclusive features and / or steps.
Claims
1. A vehicle path planning method based on an improved ant colony algorithm, characterized in that, Includes the following steps: Step 1: Use the grid method to perform 3D terrain modeling to obtain a 3D terrain model; Step 2: Construct the total cost function for vehicle travel based on the 3D terrain model, expressed as: , Where F represents the total cost function of the vehicle trip, f L f represents the distance traveled during the vehicle's journey. S f represents the gradient cost term during vehicle travel. H This represents the height cost term during vehicle travel; φ1, φ2, and φ3 are cost terms f, respectively. L f S with f H The preset weight values, and the sum of the three is 1; Travel distance cost item f L Represented as: , Where N represents the number of travel nodes, and i represents the label of the travel node; (x i ,y i ) and (x i+1 ,y i+1 ) represent the two-dimensional plane coordinates of the i-th travel node and the next travel node, respectively; Slope cost term f S Represented as: , Where N represents the number of travel nodes, and i represents the label of the travel node; (x i ,y i ) and (x i+1 ,y i+1 Let z and z represent the two-dimensional plane coordinates of the i-th travel node and the next travel node, respectively. i With z i+1 These represent the z-axis coordinates of the i-th travel node and the next travel node, respectively. Height cost term f H Represented as: , Where N represents the number of travel nodes, and i represents the label of the travel node; z i This represents the z-axis coordinate of the i-th travel node; Step 3: Introduce the travel direction guidance function into the state probability transition formula of the ant colony algorithm, and introduce the total cost function of vehicle travel into the pheromone update formula of the ant colony algorithm to construct the improved ant colony algorithm, and complete vehicle path planning in the three-dimensional terrain model based on the improved ant colony algorithm. The direction guidance function is expressed as: , Where, ψ i,j d represents the direction guidance function between the i-th and j-th travel nodes. o,i d represents the two-dimensional planar distance from the starting point to the i-th travel node. i,j d represents the two-dimensional planar distance from the i-th travel node to the j-th travel node. j,e Let γ represent the two-dimensional planar distance from the j-th travel node to the destination, and let γ represent the direction factor. The pheromone update formula is expressed as: , , Where t represents the iteration number, m represents the ant's number, i represents the current node's number, and j represents the next node to be moved; τ i,j (t) and τ i,j (t+1) represents the pheromone between the i-th and j-th travel nodes at the t-th and t+1-th iterations, respectively. F represents the pheromone increment generated by the m-th ant between node i and node j in the t-th iteration; ρ represents the pheromone evaporation factor, Q represents the pheromone constant, and M is the number of ants; m This represents the total cost function value of the path of the m-th ant in the t-th iteration; The state probability transition formula is expressed as: , Where t represents the iteration number, m represents the ant's number, i represents the current node's number, and j represents the next node to be moved. τ represents the probability that the m-th ant chooses to move towards node j from node i in the t-th iteration; i,j (t) represents the pheromone between the i-th and j-th travel nodes, η i,j (t) represents the heuristic function between the i-th and j-th travel nodes, τ i,s (t) represents the pheromone between the i-th travel node and the s-th travel node, η i,s (t) represents the heuristic function between the i-th and s-th travel nodes; ψ i,j ψ represents the direction guiding function between the i-th and j-th travel nodes. i,s This represents the direction guidance function between the i-th and s-th travel nodes; α and β represent the preset weights of pheromones and heuristic factors, respectively. i Let represent the set of feasible nodes at the i-th travel node.
2. The vehicle path planning method based on the improved ant colony algorithm according to claim 1, characterized in that, In step 1, the three-dimensional terrain model is represented as follows: , Where (x,y) represents the two-dimensional plane coordinates, and z(x,y) represents the z-axis coordinate at (x,y) in the two-dimensional plane; K represents the number of hills, and k represents the label of the k-th hill; (x ok ,y ok ) represents the coordinates of the center of the two-dimensional plane of the k-th hillside, h k Let x represent the height of the k-th hillside. sk With y sk These represent the slope components of the k-th hillside in the x-axis and y-axis directions, respectively.
3. The vehicle path planning method based on the improved ant colony algorithm according to claim 1, characterized in that, In step 3, the specific process of vehicle route planning is as follows: Step 3.1: Set the starting point and ending point of the vehicle in the 3D terrain model, and initialize the various parameters of the improved ant colony algorithm; Step 3.2: Place all ants at the starting point and construct a taboo list; Step 3.3: Calculate the transition probability according to the state probability transition formula, determine the next travel node of the ant based on the transition probability, and put the travel nodes that have been visited into the taboo list; The search continues until the ant reaches the destination (target node), completing the current search and obtaining the total cost function value of each ant's journey in the current iteration. Step 3.4: Update the pheromones according to the pheromone update formula; Step 3.5: Compare the optimal vehicle driving paths obtained in each iteration to obtain the optimal vehicle driving path for the current iteration; Step 3.6: Determine if the number of iterations has reached the preset maximum value. If it has, output the optimal vehicle travel path. Otherwise, proceed to the next iteration.