CN116128173A - Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm - Google Patents
Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm Download PDFInfo
- Publication number
- CN116128173A CN116128173A CN202211721406.XA CN202211721406A CN116128173A CN 116128173 A CN116128173 A CN 116128173A CN 202211721406 A CN202211721406 A CN 202211721406A CN 116128173 A CN116128173 A CN 116128173A
- Authority
- CN
- China
- Prior art keywords
- rect
- rectangular
- rectangle
- length
- diagonal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/004—Artificial life, i.e. computing arrangements simulating life
- G06N3/006—Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
Abstract
The invention discloses a rectangular coverage path planning method based on clustering partition and an improved ant colony algorithm, which comprises the following steps of 1) designing a rectangular clustering scheme with a self-adaptive K value based on K-means clustering; 2) Based on the external spiral matrix, designing a rectangular coverage scheme with the minimum coverage number; 3) The ant colony algorithm based on the ant colony algorithm design improvement can obtain a better solution on the basis of reducing the iteration time. This approach can reduce iteration time and form shorter paths based on the set of differently sized rectangles being covered by the designated sized rectangle.
Description
Technical Field
The invention relates to a computer science and operation research technology, in particular to a rectangular coverage path planning method based on clustering partition and an improved ant colony algorithm.
Background
Path planning problems aim to seek a better path under the constraint that such problems generally belong to NP-hard problems, i.e. non-deterministic polynomial time-hard problems. In recent years, for practical application of the path planning problem, a crowd focuses on the problems such as TSP problem, robot path planning problem, JSP workshop scheduling problem, VRP vehicle path and the like, but focuses on rectangular coverage path planning less. The rectangular coverage path planning is an abstraction of industrial photographing measurement positioning, and the method converts a machine lens into a rectangular lens with a fixed size by converting a workpiece to be measured on an operation table into a rectangular data set, so as to search a better moving route of the machine lens and complete the whole photographing of the workpiece to be measured.
For a solving method of a path planning problem, common methods comprise a Dijkstra algorithm based on searching, an A-type algorithm and the like; sampling-based RRT algorithms, etc.; bat algorithm, particle swarm algorithm, ant colony algorithm, etc. based on swarm intelligence. The ant colony algorithm is one of heuristic algorithms, and is proposed by Italian scholars Dorigo et al in the early 90 th of the 20 th century under the inspired action of ant foraging. In recent times, with practical application to specific problems and scenes, the scholars start to perform different improved optimization on the ant colony algorithm. For the TSP problem, stodola et al obtain a better solution value by combining an ant colony algorithm with a simulated annealing algorithm, but at a longer time cost; for the robot path planning problem, ma Xiaoliu et al ensure consistency of convergence speed and global searching capability by integrating a searching strategy of an ant colony algorithm and a jump point searching algorithm; for the vehicle path problem, liu Ziyu et al introduced a saving matrix and piecewise function to solve the problem of slow ant colony convergence and easy sinking into a locally optimal solution.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art and provides a rectangular coverage path planning method based on clustering partition and an improved ant colony algorithm. This approach can reduce iteration time and form shorter paths based on the set of differently sized rectangles being covered by the designated sized rectangle.
The technical scheme for realizing the aim of the invention is as follows:
a rectangular coverage path planning method based on clustering partition and improved ant colony algorithm comprises the following steps:
1) Randomly generating N rectangular Rect sets A= { Rect 1 ,Rect 2 ,…,Rect N Setting an overlay rectangle Rect f ;
2) Performing cluster division on a rectangular Rect set A according to an improved K-means clustering algorithm to obtain n clusters, wherein the K-means clustering method mainly aims at point clustering, the number K of clusters is required to be specified, then the distance between each object and each seed clustering center is calculated by randomly selecting K objects as initial clustering centers, each object is distributed to the clustering center closest to the object, the clustering centers and the objects distributed to the clustering centers represent one cluster, once all the objects are distributed, the clustering center of each cluster is recalculated according to the existing objects in the clusters, and the process is repeated until a certain termination condition is met, and the improved K-means clustering algorithm comprises the following steps:
2-1) constructing a minimum distance matrix between rectangles in a rectangular set A, wherein the rectangles Rect i And rectangular Rect j The minimum distance p between them is:
wherein d ij Is rectangular Rect i Diagonal intersection point and rectangle Rect j Distance between diagonal intersections, z i Is Rect i Diagonal intersection at Rect j Diagonal intersection direction to Rect i Distance of boundary, z j Is Rect j Diagonal intersection at Rect i The intersection direction of the object line reaches to Rect j The distance of the boundary, and the distance z from the intersection point of the diagonal lines of the rectangle to the boundary in the direction of any point u are calculated as follows:
where x is the abscissa of the rectangular diagonal intersection, y is the ordinate of the rectangular diagonal intersection, a is the length of the rectangle, b is the width of the rectangle, and x u The abscissa of point u, y u D is the distance between the intersection point of the diagonal line of the rectangle and the point u, and k is the slope of a straight line formed by the intersection point of the point u and the diagonal line of the rectangle;
2-2) to specify the overlay rectangle Rect f Is used as a range of diagonal length, and traverses a calculation setThe density of each rectangle in the set is used for obtaining a density parameter set D, and the density parameter sets D are ordered from big to small;
2-3) in order of density values to cover rectangular Rect f The diagonal length is the distance between the maximum rectangles, the rectangles are gathered in sequence to form clusters, and the clusters are removed in the parameter set correspondingly until the set D is empty;
3) Covering the n rectangular clusters in an outer spiral grid mode sequentially to obtain m covered rectangular Rect f The position is specifically:
3-1) to cover rectangular Rect f Dividing the clusters into grids according to the size, and traversing the clusters in an external spiral mode;
3-2) covering a set of rectangles within each grid rectangle, wherein there are three coverage scenarios for two rectangles:
3-2-1) rectangular Rect i Is rectangular Rect f Full coverage;
3-2-2) partial coverage status 1: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into two small rectangles, including in Rect f Rectangular Rect in range i1 And rectangle outside the range Rect i2 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 The calculation formula of (2) is as follows:
a i1 =min(x i +0.5*a i ,x f +0.5*a f )-max(x i -0.5*a i ,x f -0.5*a f ),
b i1 =min(y i +0.5*b i ,y f +0.5*b f )-max(y i -0.5*b i ,y f -0.5*b f ),
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
3-2-3) partial coverage status 2: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into three small rectangles, including in Rect f Rectangular Rect in range i1 Rectangle outside the range Rect i2 、Rect i3 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 ,Rect i3 Is (x) i3 ,y i3 ) Length a i3 Width b i3 The calculation formula of (2) is as follows:
a i1 =min(x i +0.5*a i ,x f +0.5*a f )-max(x i -0.5*a i ,x f -0.5*a f ),
b i1 =min(y i +0.5*b i ,y f +0.5*b f )-max(y i -0.5*b i ,y f -0.5*b f ),
a i2 =a i -a i1 ,
b i2 =b i1 ,
y i2 =y i ,
a i3 =a i ,
b i3 =b i -b i1 ,
x i3 =x i ,
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
4) Carrying out path planning among the n clusters according to a greedy algorithm, and obtaining a better path among the clusters and a starting point and an end point of each cluster:
5) And carrying out path planning of known starting points and end points among the rectangles in the clusters on the n clusters according to an improved ant colony search strategy, wherein the improved ant colony search strategy comprises the following steps:
5-1) initializing all ants according to parameters of a standard ant colony algorithm:
5-2) selecting an ant to place at the starting point;
5-3) sequentially calculating the transition probability P of the rectangle where the current ant is located at the moment of all the connected but unselected rectangles ij (t) selecting a rectangular position for the next selection run by using a roulette manner according to all the transition probability values;
5-4) judging whether the rectangle is still walked and whether the rectangle reaches the end point, if yes, returning to the step 5-3), otherwise, calculating the total length of the path walked by the ant;
5-5) judging whether m ants are all finished, if so, ending the iteration and obtaining an optimal path of the iteration, otherwise, returning to the step 5-2);
5-6) updating the pheromone, wherein the calculation formula of the updating rule of the pheromone at the time t+1 in the traditional ant colony algorithm is as follows:
wherein τ ij (t) represents a rectangle Rect at time t i And rectangular Rect j Original pheromone on the path, ρ represents defined pheromone volatilization coefficient, deltaτ ij k Representing the kth ant in rectangle Rect i And rectangular Rect j The calculation formula of the pheromone left by the path is as follows:
wherein Q is the total amount of defined pheromones, distance k Traversing the resulting path length for ant k;
according to the trend of ants in iteration, the pheromone is updated, and the specific updating rule of the technical scheme comprises two parts, namely global updating and local updating:
5-6-1) the calculation formula of the global updating rule of the pheromone at the time t+1 is as follows:
wherein τ ij (t) represents a rectangle Rect at time t i And rectangular Rect j Original pheromone on the path, ρ represents defined pheromone volatilization coefficient, deltaτ ij k Representing the kth ant in rectangle Rect i And rectangular Rect j The calculation formula of the pheromone left by the path is as follows:
in the formula, greedDistance is an optimal path obtained by a greedy algorithm; bestdistance is the currently optimal path length, distance k Traversing the resulting path length for ant k;
5-6-2) pheromone tau on optimal path obtained for this iteration at time t+1 ij (t+1) performing local update, wherein the pheromone update calculation formula is as follows:
wherein GreedDistance is an optimal path obtained by greedy algorithm, ρ represents defined pheromone volatility coefficient, distance best(t+1) Representing the optimal path length of iteration at the t+1 time;
5-7) judging whether the maximum iteration times are reached, if so, outputting an optimal path in the iteration, otherwise, returning to the step 5-2), and restarting a new iteration;
6) And adding the inter-cluster paths obtained in the step 4) and the intra-cluster paths obtained in the step 5) to obtain a global optimal path solution.
Compared with the prior art, the technical scheme has the following advantages:
1) Providing a rectangular clustering scheme with a self-adaptive K value based on K-means clustering;
2) Providing a rectangular coverage scheme with a minimum coverage number based on the outer spiral matrix;
3) Based on the ant colony algorithm, the improved ant colony algorithm can obtain a better solution on the basis of shortening the iteration time.
This approach can reduce iteration time and form shorter paths based on the set of differently sized rectangles being covered by the designated sized rectangle.
Drawings
FIG. 1 is a flow chart of a method in an embodiment;
fig. 2 is a schematic flow chart of an improved ant colony search strategy in an embodiment;
FIG. 3 is a random rectangular position diagram in an embodiment;
FIG. 4 is a graph of cluster partition results in an embodiment;
FIG. 5 is a graph of the results of the outer spiral coverage in the example;
FIG. 6 is a schematic diagram of an embodiment of an optimal path layout.
Detailed Description
The present invention will now be further illustrated with reference to the drawings and examples, but is not limited thereto.
Examples:
as shown in fig. 1, a rectangular coverage path planning method based on clustering partition and improved ant colony algorithm includes the following steps:
1) Input rectangular Rect set a= { Rect 1 ,Rect 2 ,…,Rect N Setting an overlay rectangle Rect f ;
2) Performing cluster division on the rectangular set A according to an improved K-means clustering algorithm to obtain n clusters, wherein the improved K-means clustering algorithm comprises the following steps:
2-1) constructing a minimum distance matrix between rectangles in a rectangular set A, wherein the rectangles Rect i And rectangular Rect j The calculation formula of the minimum distance p between the two is as follows:
wherein d ij Is rectangular Rect i Diagonal intersection point and rectangle Rect j Distance between diagonal intersections, z i Is Rect i Diagonal intersection at Rect j Diagonal intersection direction to Rect i Distance of boundary, z j Is Rect j Diagonal intersection at Rect i The intersection direction of the object line reaches to Rect j The distance of the boundary, and the distance z from the intersection point of the diagonal lines of the rectangle to the boundary in the direction of any point u are calculated as follows:
where x is the abscissa of the rectangular diagonal intersection, y is the ordinate of the rectangular diagonal intersection, a is the length of the rectangle, b is the width of the rectangle, and x u The abscissa of point u, y u D is the distance between the intersection point of the diagonal line of the rectangle and the point u, and k is the slope of a straight line formed by the intersection point of the point u and the diagonal line of the rectangle;
2-2) to specify the overlay rectangle Rect f Traversing the density of each rectangle in the calculation set to obtain a density parameter set D, and sequencing from large to small;
2-3) in order of density values to cover rectangular Rect f The diagonal length is the distance between the maximum rectangles, the rectangles are gathered in sequence to form clusters, and the clusters are removed in the parameter set correspondingly until the set D is empty;
3) Covering the n rectangular clusters in an outer spiral grid mode sequentially to obtain m covered rectangular Rect f The position is specifically:
3-1) to cover a rectangleRect f Dividing the clusters into grids according to the size, and traversing the clusters in an external spiral mode;
3-2) covering a set of rectangles within each grid rectangle, wherein there are three coverage scenarios for two rectangles:
3-2-1) full coverage: rectangular Rect i Is rectangular Rect f Full coverage;
3-2-2) partial coverage status 1: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into two small rectangles, including in Rect f Rectangular Rect in range i1 And rectangle outside the range Rect i2 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 The calculation formula of (2) is as follows:
a i1 =min(x i +0.5*a i ,x f +0.5*a f )-max(x i -0.5*a i ,x f -0.5*a f ),
b i1 =min(y i +0.5*b i ,y f +0.5*b f )-max(y i -0.5*b i ,y f -0.5*b f ),
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
3-2-3) partial coverage status 2: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into three small rectangles, including in Rect f Rectangular Rect in range i1 Rectangle outside the range Rect i2 、Rect i3 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 ,Rect i3 Is (x) i3 ,y i3 ) Length a i3 Width b i3 The calculation formula of (2) is as follows:
a i1 =min(x i +0.5*a i ,x f +0.5*a f )-max(x i -0.5*a i ,x f -0.5*a f ),
b i1 =min(y i +0.5*b i ,y f +0.5*b f )-max(y i -0.5*b i ,y f -0.5*b f ),
a i2 =a i -a i1 ,
b i2 =b i1 ,
y i2 =y i ,
a i3 =a i ,
b i3 =b i -b i1 ,
x i3 =x i ,
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
4) Carrying out path planning among the n clusters according to a greedy algorithm, and obtaining a better path among the clusters and a starting point and an end point of each cluster:
5) As shown in fig. 2, path planning of known starting points and ending points between rectangles within a cluster is performed for n clusters using an improved ant colony search strategy comprising:
5-1) initializing all ants according to parameters of a standard ant colony algorithm;
5-2) selecting an ant to place at the starting point;
5-3) sequentially calculating the transition probability P of the rectangle where the current ant is located at the moment of all the connected but unselected rectangles ij (t) selecting a rectangular position for the next selection run by using a roulette manner according to all the transition probability values;
5-4) judging whether the rectangle is still walked and whether the rectangle reaches the end point, if yes, returning to the step 5-3), otherwise, calculating the total length of the path walked by the ant;
5-5) judging whether m ants are all finished, if so, ending the iteration and obtaining an optimal path of the iteration, otherwise, returning to the step 5-2);
5-6) updating the pheromone according to the trend of ants in iteration, wherein the specific updating rule comprises two parts of global updating and local updating:
5-6-1) the calculation formula of the global updating rule of the pheromone at the time t+1 is as follows:
wherein τ ij (t) represents a rectangle Rect at time t i And rectangular Rect j Original pheromone on the path, ρ represents defined pheromone volatilization coefficient, deltaτ ij k Representing the kth ant in rectangle Rect i And rectangular Rect j The calculation formula of the pheromone left by the path is as follows:
in the formula, greedDistance is an optimal path obtained by a greedy algorithm; bestdistance is the currently optimal path length, distance k Traversing the resulting path length for ant k;
5-6-2) pheromone tau on optimal path obtained for this iteration at time t+1 ij (t+1) performing local update, wherein the pheromone update calculation formula is as follows:
wherein GreedDistance is an optimal path obtained by greedy algorithm, ρ represents defined pheromone volatility coefficient, distance best(t+1) Representing the optimal path length of iteration at the t+1 time;
5-7) judging whether the maximum iteration times are reached, if so, outputting an optimal path in the iteration, otherwise, returning to the step 5-2), and restarting a new iteration;
6) And adding the inter-cluster paths obtained in the step 4) and the intra-cluster paths obtained in the step 5) to obtain a global optimal path solution.
In this example, as shown in fig. 3, 40 rectangular data sets are generated randomly in a plane of 1200×800, the rectangular data sets are decovered by 20×20, the minimum coverage path is obtained, 21 rectangular clusters are obtained by adopting the improved K-means clustering method in this example and are shown in fig. 4, the 21 rectangular clusters are respectively covered by 20×20 rectangles, 499 20×20 rectangles are shown in fig. 5, and path planning in clusters is performed before cluster for 499 rectangles, so that path length 10745.1 is obtained and is shown in fig. 6.
Claims (1)
1. A rectangular coverage path planning method based on clustering partition and an improved ant colony algorithm is characterized by comprising the following steps:
1) Randomly generating N rectangular Rect sets A= { Rect 1 ,Rect 2 ,,Rect N Setting an overlay rectangle Rect f ;
2) Performing cluster division on the rectangular set A according to an improved K-means clustering algorithm to obtain n clusters, wherein the improved K-means clustering algorithm comprises the following steps:
2-1) constructing a minimum distance matrix between rectangles in a rectangular set A, wherein the rectangles Rect i And rectangular Rect j The calculation formula of the minimum distance p between the two is as follows:
wherein d ij Is rectangular Rect i Diagonal intersection point and rectangle Rect j Distance between diagonal intersections, z i Is Rect i Diagonal intersection at Rect j Diagonal intersection direction to Rect i Distance of boundary, z j Is Rect j Diagonal intersection at Rect i The intersection direction of the object line reaches to Rect j The distance of the boundary, and the distance z from the intersection point of the diagonal lines of the rectangle to the boundary in the direction of any point u are calculated as follows:
where x is the abscissa of the rectangular diagonal intersection, y is the ordinate of the rectangular diagonal intersection, a is the length of the rectangle, b is the width of the rectangle, and x u The abscissa of point u, y u D is the distance between the intersection point of the diagonal line of the rectangle and the point u, and k is the slope of a straight line formed by the intersection point of the point u and the diagonal line of the rectangle;
2-2) to specify the overlay rectangle Rect f Traversing the density of each rectangle in the calculation set to obtain a density parameter set D, and sequencing from large to small;
2-3) in order of density values to cover rectangular Rect f The diagonal length is the distance between the maximum rectangles, the rectangles are gathered in sequence to form clusters, and the clusters are removed in the parameter set correspondingly until the set D is empty;
3) Covering the n rectangular clusters in an outer spiral grid mode sequentially to obtain m covered rectangular Rect f The position is specifically:
3-1) to cover rectangular Rect f Dividing the clusters into grids according to the size, and traversing the clusters in an external spiral mode;
3-2) covering a set of rectangles within each grid rectangle, wherein there are three coverage scenarios for two rectangles:
3-2-1) full coverage: rectangular Rect i Is rectangular Rect f Full coverage;
3-2-2) partial coverage status 1: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into two small rectangles, including in Rect f Rectangular Rect in range i1 And rectangle outside the range Rect i2 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 The calculation formula of (2) is as follows:
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
3-2-3) partial coverage status 2: rectangular Rect i Is rectangular Rect f Partially cover, and Rect i Can be divided into three small rectangles, including in Rect f Rectangular Rect in range i1 Rectangle outside the range Rect i2 、Rect i3 According to Rect i1 Length a of (2) i1 And width b i1 Is different from the related parameter Rect i1 Is (x) i1 ,y i1 ) Length a i1 Width b i1 ,Rect i2 Is (x) i2 ,y i2 ) Length a i2 Width b i2 ,Rect i3 Is (x) i3 ,y i3 ) Length a i3 Width b i3 The calculation formula of (2) is as follows:
a i1 =min(x i +0.5*a i ,x f +0.5*a f )-max(x i -0.5*a i ,x f -0.5*a f ),
b i1 =min(y i +0.5*b i ,y f +0.5*b f )-max(y i -0.5*b i ,y f -0.5*b f ),
a i2 =a i -a i1 ,
b i2 =b i1 ,
y i2 =y i ,
a i3 =a i ,
b i3 =b i -b i1 ,
x i3 =x i ,
wherein x is i 、y i 、a i 、b i Respectively rectangular Rect i A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width; x is x f 、y f 、a f 、b f Respectively rectangular Rect f A diagonal intersection abscissa, a diagonal intersection ordinate, a length, a width;
4) Carrying out path planning among the n clusters according to a greedy algorithm, and obtaining a better path among the clusters and a starting point and an end point of each cluster;
5) And carrying out path planning of known starting points and end points among the rectangles in the clusters on the n clusters according to an improved ant colony search strategy, wherein the improved ant colony search strategy comprises the following steps:
5-1) initializing all ants according to parameters of a standard ant colony algorithm;
5-2) selecting an ant to place at the starting point;
5-3) sequentially calculating the transition probability P of the rectangle where the current ant is located at the moment of all the connected but unselected rectangles ij (t) selecting a rectangular position for the next selection run by using a roulette manner according to all the transition probability values;
5-4) judging whether the rectangle is still walked and whether the rectangle reaches the end point, if yes, returning to the step 5-3), otherwise, calculating the total length of the path walked by the ant;
5-5) judging whether m ants are all finished, if so, ending the iteration and obtaining an optimal path of the iteration, otherwise, returning to the step 5-2);
5-6) updating the pheromone according to the trend of ants in iteration, wherein the specific updating rule comprises two parts of global updating and local updating:
5-6-1) the calculation formula of the global updating rule of the pheromone at the time t+1 is as follows:
wherein τ ij (t) represents a rectangle Rect at time t i And rectangular Rect j Original pheromone on the path, ρ represents defined pheromone volatilization coefficient, deltaτ ij k Representing the kth ant in rectangle Rect i And rectangular Rect j The calculation formula of the pheromone left by the path is as follows:
in the formula, greedDistance is an optimal path obtained by a greedy algorithm; bestdistance is the currently optimal path length, distance k Traversing the resulting path length for ant k;
5-6-2) pheromone tau on optimal path obtained for this iteration at time t+1 ij (t+1) performing local update, wherein the pheromone update calculation formula is as follows:
wherein GreedDistance is an optimal path obtained by greedy algorithm, ρ represents defined pheromone volatility coefficient, distance best(t+1) Representing the optimal path length of iteration at the t+1 time;
5-7) judging whether the maximum iteration times are reached, if so, outputting an optimal path in the iteration, otherwise, returning to the step 5-2), and restarting a new iteration;
6) And adding the inter-cluster paths obtained in the step 4) and the intra-cluster paths obtained in the step 5) to obtain a global optimal path solution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211721406.XA CN116128173A (en) | 2022-12-30 | 2022-12-30 | Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211721406.XA CN116128173A (en) | 2022-12-30 | 2022-12-30 | Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116128173A true CN116128173A (en) | 2023-05-16 |
Family
ID=86294978
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211721406.XA Pending CN116128173A (en) | 2022-12-30 | 2022-12-30 | Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116128173A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117310348A (en) * | 2023-11-23 | 2023-12-29 | 东莞市时实电子有限公司 | Power adapter fault real-time monitoring method and system |
-
2022
- 2022-12-30 CN CN202211721406.XA patent/CN116128173A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117310348A (en) * | 2023-11-23 | 2023-12-29 | 东莞市时实电子有限公司 | Power adapter fault real-time monitoring method and system |
CN117310348B (en) * | 2023-11-23 | 2024-03-12 | 东莞市时实电子有限公司 | Power adapter fault real-time monitoring method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN116128173A (en) | Rectangular coverage path planning method based on clustering partition and improved ant colony algorithm | |
CN113221403B (en) | Finite element mesh optimization method, device and medium based on deep reinforcement learning | |
CN109855627A (en) | Unmanned plane divides method, apparatus, equipment and the storage medium in sortie planning course line | |
CN113589753B (en) | Three-dimensional model surface path planning method, system and equipment | |
CN115713856B (en) | Vehicle path planning method based on traffic flow prediction and actual road conditions | |
CN114415663A (en) | Path planning method and system based on deep reinforcement learning | |
WO2019019653A1 (en) | Device and method for extracting topographical boundary | |
CN114967680B (en) | Mobile robot path planning method based on ant colony algorithm and convolutional neural network | |
CN115526140A (en) | Global wiring method considering advanced process constraint and unit movement | |
CN115543626A (en) | Power defect image simulation method adopting heterogeneous computing resource load balancing scheduling | |
CN112417070B (en) | Road network topology construction method and device, electronic equipment and storage medium | |
CN116186571B (en) | Vehicle clustering method, device, computer equipment and storage medium | |
CN114937137B (en) | BIM and GIS-based building environment intelligent analysis method | |
CN115494840B (en) | Monte Carlo factor-based MC-IACO welding robot path planning method | |
CN116777091A (en) | Path planning method for grain unloading process of pseudo-ginseng harvester based on 2D convolutional neural network and improved ant colony algorithm | |
CN115293623A (en) | Training method and device for production scheduling model, electronic equipment and medium | |
CN114237282A (en) | Intelligent unmanned aerial vehicle flight path planning method for intelligent industrial park monitoring | |
CN113139024A (en) | Visual analysis method for MADDPG multi-agent reinforcement learning model | |
CN115082629A (en) | Environment map construction method and robot using same | |
CN112163549A (en) | Remote sensing image scene classification method based on automatic machine learning | |
Cheng et al. | Study of a Complete Traversal Path Planning Algorithm | |
Yan | Research on the A Star Algorithm for Finding Shortest Path | |
CN111008598B (en) | Island automatic selection method based on buffer zone growth model | |
CN116911245B (en) | Layout method, system, equipment and storage medium of integrated circuit | |
CN117553807B (en) | Automatic driving navigation method and system based on laser radar |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |