Multi-task and multi-equipment collaborative distribution path planning method under mountain terrain

Through dynamic DBSCAN clustering, A* search and improved gray wolf optimization algorithm, the coordinated allocation and path planning of multi-tasks and multi-equipment under mountainous terrain is realized, solving the problem that small agricultural machinery and equipment is difficult to efficiently complete large-scale agricultural tasks in mountainous areas, and improving production efficiency and safety.

CN120146349APending Publication Date: 2025-06-13YUNNAN UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510294602.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Under mountainous terrain, it is difficult for multiple small agricultural machinery equipment to move long distances without stable recharge conditions, resulting in the inability to complete large-scale agricultural tasks alone and efficiently, and the complex terrain increases accident risk and energy consumption.

Method used

A collaborative allocation path planning method of multi-task and multi-equipment is adopted, tasks are divided through dynamic DBSCAN clustering algorithm, A* search algorithm performs path planning with constraints, and uses the improved gray wolf optimization algorithm to optimize access path order.

Benefits of technology

It realizes efficient coordinated allocation and path planning of multi-tasks and multiple equipment under mountainous terrain, reduces energy consumption and accident risks, and improves the efficiency and effectiveness of agricultural production tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120146349A_ABST
    Figure CN120146349A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-task and multi-device collaborative allocation path planning method under mountain terrain. The method comprises the following steps: S1, dividing a plurality of tasks and cooperatively allocating the tasks to different devices; s2, obtaining paths and costs among tasks in each group; and S3, optimizing the path sequence of the access task. The problems that paths are not reachable when a plurality of small devices execute agricultural tasks in a mountainous area environment, accidents possibly occur due to obstacles, the tasks are difficult to complete due to too high energy loss and the like are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of agricultural automation, and particularly relates to a collaborative allocation path planning method for multi-tasks and multi-equipments under mountainous terrain. Background Art

[0002] The mechanized development of agriculture is the main area in plain regions. In these regions, due to the flat terrain, the development of agricultural mechanization is relatively easy, and through mechanization, the production efficiency has been significantly improved. However, according to the preliminary statistics of geographical data, the global land area is about 148.3 million square kilometers, of which the area of plain regions only accounts for about 12%, while the proportion of hilly and mountainous areas is about 52%, and the proportion of plateau terrain is about 26%. Therefore, effectively integrating land resources and making full use of terrains such as mountains and plateaus to develop agricultural mechanization and three-dimensional agriculture has gradually become an important way and an inevitable trend for the sustainable development of agriculture.

[0003] In areas such as mountainous regions, due to the large terrain slope and weak surface stability, the adaptability of traditional large agricultural machinery and equipment is significantly limited. In contrast, small agricultural machinery and equipment, with its flexible mobility and easy operation, has become an important production tool under such terrain conditions. However, limited by its own energy reserve and the unique rugged terrain of mountains, these small equipments are difficult to move long distances without stable supply conditions, and thus cannot efficiently complete large-scale agricultural tasks alone. They often need multiple small devices to cooperate to complete large-scale agricultural tasks. In addition, due to the relatively complex mountainous terrain, the altitude change is often relatively large. In order to avoid accidents during the task scheduling process of small mechanical equipments and excessive energy consumption, and reduce the operation time and cost of the equipments, collaborative task allocation and efficient path planning can help multiple equipments better adapt to mountainous terrain, improve the efficiency and effect of agricultural production tasks, reduce risks and costs, and are of great significance to agricultural production. Therefore, a collaborative allocation and path planning method for multi-tasks and multi-equipments under mountainous terrain is needed.

[0004] For the collaborative allocation and path planning of multi-tasks and multi-equipments under mountainous terrain, it is necessary to focus on considering the collaborative allocation between task points, the path planning with constraints, and the optimization of access paths between multiple task points. There are complex coupling relationships in the solutions to these problems. Therefore, it is necessary to comprehensively consider factors such as the particularity of the scenario and the limited energy consumption of the equipments. Summary of the Invention

[0005] The purpose of the embodiments of the present invention is to provide a collaborative allocation path planning method for multi-tasks and multi-equipments under mountainous terrain, so as to solve problems such as inaccessible paths, possible accidents due to encountering obstacles, and excessive energy consumption that make it difficult to complete tasks when multiple small equipments execute agricultural tasks in mountainous environments.

[0006] To solve the above technical problems, the technical solution adopted by the present invention is a collaborative allocation path planning method for multiple tasks and multiple equipment in a mountainous terrain, including the following steps:

[0007] S1, divide multiple tasks and collaboratively allocate them to different equipment;

[0008] S2, obtain the paths and costs among tasks within each group;

[0009] S3, optimize the path order of accessing tasks.

[0010] Further, the step S1 includes:

[0011] Construct a network model in a mountainous agricultural environment according to terrain height data, then randomly generate multiple task points, and divide multiple tasks through a density-based spatial clustering algorithm with noise applications. Each piece of equipment processes a group, enabling multiple pieces of equipment to collaboratively complete multiple tasks; the spatial clustering algorithm includes two parameters, radius ε and minimum sample number minPts. If the number of points within the radius ε of a point is greater than minPts, then this point is a core point; if there are other core points within the radius range of the core point, then these core points are grouped into one cluster.

[0012] Further, the spatial clustering algorithm is as follows:

[0013] ε inew = ε - γ(ε - δ i ) (1)

[0014]

[0015] where ε inew is the neighborhood radius dynamically adjusted according to density for each point, ε is the initial radius, δ i is the density value of each point, γ is a parameter for adjusting the radius scaling degree, dist represents the three-dimensional distance between two points, τ is a parameter for adjusting the sensitivity to height during clustering, setting different values according to the scenario can better reflect the terrain difference in mountainous and hilly areas, S is all tasks in each partition, T s is the task volume of each task, D max is the maximum task volume that the equipment can handle;

[0016] After obtaining multiple task points in the given scenario, calculate the density value δ of each point according to the minimum sample number minPts i, that is, the minimum radius value that can include minPts points; then dynamically adjust the radius ε of each point according to the density value of each point. Finally, use the spatial clustering algorithm to start expanding from a core point, merge the core points within its radius into a cluster, and continue to expand until there are no other core points in the cluster or the task volume in the cluster has reached the maximum task volume that the equipment can handle, then the expansion ends, obtaining a grouping, and then process other task points, and finally obtain the task division result.

[0017] Further, the step S2 includes:

[0018] For each grouping obtained by task division in S1, first consider the specific path planning between every two task points in the grouping; perform constrained path planning for every two nodes using the A* search algorithm;

[0019] Assume that the energy loss function is as shown in formula (4),

[0020] E cost,i,j = E l,i,j + E g,i,j + E t,i,j (4)

[0021] E cost,i,j is the total energy consumption of the path between any two task points i and task point j, where E l,i,j , E g,i,j , E t,i,j are the energy consumption corresponding to the path length, the additional energy consumption for going uphill, and the energy consumption for turning respectively;

[0022] Considering obstacles and slope constraints, construct a cost function, and obtain the path with the minimum cost between task points through the A* search algorithm under the condition of meeting the constraints.

[0023] Further, the A* search algorithm explores in 16 directions;

[0024] During the entire search process, calculate the actual cost value G(n) from the start node s to the expanded node n. If there is an obstacle on this path or the slope of the path is too large, the cost value will become very large, ensuring that this path will not be selected; at the same time, calculate the cost value H(n) from the expanded node n to the target node g, and add the actual cost value G(n) from the start node s to the expanded node n and the cost value H(n) from the expanded node n to the target node g to obtain the final cost value F(n);

[0025] Then, select the node n with the minimum F(n) value as the next expansion node, as shown in the expression (5) of the evaluation function of the A* search algorithm; it is necessary to continuously find the surrounding points from the starting node, select a new point as the starting point and then loop to find until the end point is found.

[0026] F(n) = G(n) + H(n) (5).

[0027] Further, the step S3 includes:

[0028] For each group, take the path cost of passing through all task points within the group as the fitness, combine the fitness function of the total energy consumption given in step S2, and use the improved grey wolf optimization algorithm to optimize the access path order between multiple task points.

[0029] Further, in the improved grey wolf optimization algorithm, in order to optimize the access task path order, the position of each grey wolf individual is a vector, representing a solution of a multi-task path access order, that is, encode the access path order of multiple tasks as a vector and use it as the position of the grey wolf; obtain the path cost between each task, and finally the total path cost of this path access order can be obtained, and this cost is used as the fitness for evaluation.

[0030] Further, in the grey wolf optimization algorithm, divide the hierarchy of the grey wolf population into α, β, δ, and ω wolves. The α wolf is the leading wolf, and its position represents the grey wolf individual of the current optimal solution. The second-best solution and the third-best solution are β and δ wolves respectively, that is, the first three solutions with the lowest path order cost of task access, and all the remaining solutions are classified as ω wolves; the grey wolf optimization algorithm is modeled on the hunting process of the wolf pack; among them, the mathematical model of surrounding the prey is as follows:

[0031] X(t + 1) = X p (t) - A·D (6)

[0032] D = ∣C·X p (t) - X(t)∣ (7)

[0033] Among them, X p (t) is the prey position, that is, the current optimal task access path order, X(t) is the current position of the grey wolf, t is the current iteration number, D is the distance vector, reflecting the proximity of the current grey wolf to the prey, and X(t + 1) is the position of the grey wolf adjusted according to the prey position, and it is also the position of the grey wolf in the next round of iteration;

[0034] A and C are control parameters, and their mathematical formulas are as follows:

[0035] A = 2R 1 ·a - a (8)

[0036] C = 2·R2 (9)

[0037] a = 2·(1 - t / Max iter ) (10)

[0038] where t and Max iter represent the current iteration number and the maximum iteration number respectively. A and C are parameter control vectors for adjusting the positions of grey wolf individuals. The moving direction is determined by its own position and the random vector C, and the moving step size is determined by the grey wolf distance vector D and the coefficient vector A. A is in turn controlled by the parameter a, and the value of a gradually decreases with the iteration number, linearly decreasing from 2 to 0; the change of A is controlled by the value of a to determine how the access path order of other tasks changes according to the optimal task access path order; R 1 and R 2 are random numbers within the range of [0, 1];

[0039] Modify the formula of a as shown in formula (11):

[0040]

[0041] where a 1 , a 2 represent the start value and the end value of the convergence factor respectively, and m is an exponent used to control the rate of change of the parameter convergence factor a during the dynamic adjustment process;

[0042] Save the top three best solutions among all current grey wolf individuals, namely α, β, and δ. In each iteration, find the three task path access order solutions with the lowest cost, and all other solutions update their task path access orders through these three solutions to obtain the following mathematical model:

[0043]

[0044]

[0045] A and C are parameter control vectors for adjusting the positions of grey wolf individuals, controlling the moving step size and the moving direction respectively, and obtaining different values through random numbers when updating each position. D α , D β , D δ represent the distances and directions from the grey wolf individual to wolves α, β, and δ after being adjusted by C respectively, providing a reference for the subsequent adjustment of the access path orders of other tasks to the optimal three task access path orders. X i = 1, 2, 3 represent the adjustments of the current wolf towards the positions of wolves α, β, and δ respectively, where C 1 , C 2 , C 3 and A 1 、A2 and 3 has the same meaning as C and A above; the gray wolf position vector X is the path order of an access task, and X α and β and δ are the path orders of the three access tasks with the lowest current cost; the gray wolf position vector in formula (14) is adjusted according to the path orders of the current three optimal access tasks;

[0046] When updating the position, make the better solution have a greater advantage, and modify the position update formula as (15):

[0047]

[0048] Secondly, in order to enhance the exploration ability of the algorithm, Gaussian perturbation is introduced when updating the position, and the specific modification is as shown in the following formula:

[0049] X(t + 1) = X(t) + σ·N(0, 1)·(X α - X(t)) (16)

[0050]

[0051] where σ is the perturbation intensity, and σ max is the maximum perturbation intensity, which gradually decreases as the number of iterations increases. N(0, 1) is the standard normal distribution, and P perturbation is the probability of triggering Gaussian perturbation;

[0052] Finally, after each path update, further use the method of randomly swapping task points to change the path. Randomly select two task points in the task point execution order group and swap them. The specific improvement is as follows:

[0053] Location(i, j) = reverse(Location(i, j)) (19)

[0054]

[0055] where Location(i, j) represents the i-th and j-th task points in the position vector, and reverse represents the swapping of the two task points, that is, swapping the access orders of the two tasks. Formula (20) represents the probability P of performing the swap change reverse .

[0056] The beneficial effects of the present invention are as follows: By combining the improved dynamic DBSCAN clustering algorithm, the optimized A* search algorithm, and the improved grey wolf optimization algorithm, the collaborative allocation and efficient path planning of multiple tasks and multiple equipment in the mountain agricultural environment are realized. Among them, the dynamic DBSCAN clustering algorithm can dynamically adjust parameters according to the distribution of task points and terrain characteristics, ensuring the balance and rationality of task allocation, enabling multiple pieces of equipment to efficiently complete tasks collaboratively; the three-dimensional multi-directional safe A* search algorithm improves the efficiency and safety of path planning by optimizing the heuristic function and expanding the search direction, significantly reducing energy consumption and task execution time; the improved grey wolf optimization algorithm enhances the global search ability and path optimization accuracy by improving the convergence strategy, introducing Gaussian perturbation and random exchange operations, avoiding local optimal traps. This method fully considers the terrain characteristics in the mountain agricultural environment, optimizes the whole process of task division, path planning, and access order, significantly improving the task execution efficiency, energy utilization rate, and system stability of small agricultural equipment, providing reliable support for intelligent and efficient production in the mountain agricultural environment, and having good adaptability and wide application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0058] Figure 1 is the implementation framework for the collaborative allocation and efficient path planning of multiple tasks and multiple equipment in the present invention;

[0059] Figure 2 is the schematic diagram of the method for the collaborative allocation and efficient path planning of multiple tasks and multiple equipment in the present invention;

[0060] Figure 3 is the module working flowchart of task allocation and path planning in the present invention, including three modules: task division, path planning with constraints, and optimization of the task access path order;

[0061] Figure 4 is the schematic diagram of the scenario construction of a simple mountain environment in the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0062] The technical solutions in the embodiments of the present invention will be clearly and completely described below 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 the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0063] A collaborative allocation path planning method for multiple tasks and multiple equipment in mountainous terrain includes the following steps:

[0064] S1. Divide multiple tasks and collaboratively allocate them to different equipment.

[0065] Among them, a network model in a mountainous agricultural environment is constructed according to terrain height data, and then multiple task points are randomly generated. Multiple tasks are divided by a Density-Based Spatial Clustering of Applications with Noise (DBSCAN) algorithm. Each piece of equipment processes a group, enabling multiple pieces of equipment to collaboratively complete multiple tasks. DBSCAN includes two parameters, radius ε and minimum number of samples minPts. If the number of points within the radius ε of a point is greater than minPts, then this point is a core point; if there are other core points within the radius range of the core point, then these core points are grouped into a cluster. Although DBSCAN does not require specifying the number of clusters, it can identify multiple clusters and can well identify various shapes. However, the prerequisite is to give a suitable ε and minPts. However, in real scenarios, it is often difficult to determine an accurate ε and minPts value, which may lead to incorrect division.

[0066] Furthermore, to solve this problem, a DBSCAN method for dynamically adjusting ε is proposed, enabling correct division without giving perfect parameters and reducing incorrect division caused by parameter sensitivity of the traditional DBSCAN method. In addition, to divide the entire large-scale task and in view of the characteristics of mountainous and hilly areas, the distance equation is improved to achieve a division that can better highlight the particularity of mountainous and hilly regions. And to avoid excessive task volume in a single area, a threshold constraint is introduced, which can ensure a more reasonable task allocation. Specifically, the main improvements made to the distance equation are as follows: In (1), ε inew is the neighborhood radius dynamically adjusted according to density for each point, ε is the initial radius, δ iδ is the density value of each point, and γ is a parameter for adjusting the degree of radius scaling. (2) is the distance equation used, where dist represents the three-dimensional distance between two points, and a parameter τ is set to adjust the sensitivity to height during clustering. Setting different values according to the scenario can better reflect the terrain differences in mountainous and hilly areas. (3) incorporates a task volume constraint in the clustering, where S is all the tasks in each partition, T s is the task volume of each task, and D max is the maximum task volume that the equipment can handle, ensuring that the task volume in each partition does not exceed the maximum task volume that the equipment can handle.

[0068] ε inew = ε - γ(ε - δ i ) (1)

[0069]

[0070] After obtaining multiple task points in the given scenario, the density value δ of each point is calculated according to the minimum sample number minPts i , that is: the minimum radius value that can include minPts points; then the radius ε of each point is dynamically adjusted according to the density value of each point. Finally, the DBSCAN clustering method is used to start from a core point and expand, merging the core points within its radius into a cluster and continuing to expand until there are no other core points in the cluster or the task volume in the cluster has reached the maximum task volume that the equipment can handle, then the expansion ends, obtaining a grouping, and then processing other task points, finally obtaining the task division result.

[0071] S2. Obtain the paths and costs between tasks within each grouping.

[0072] For each grouping obtained in the above task division, first consider the specific path planning between every two task points in the grouping. The A* search algorithm is executed for each pair of nodes for constrained path planning. First, considering the need for obstacle avoidance, assume that each obstacle is an entity with its center coordinates O and a maximum radius R. The distance between the path and the obstacle is dist. When the distance dist between the path and the obstacle is less than R, the cost of the path will be infinite, equivalent to the path being unreachable. In addition, a slope constraint is added. The slope value is obtained according to the angle between the path and the horizontal plane. When it is greater than the set threshold, the slope is too steep and the cost of the path will also be set to infinite, and the path is also unreachable. At the same time, the energy consumption of the equipment will also change accordingly on paths with large slopes. Considering the above constraints and the length of the path as the cost evaluation of the path, adding the additional energy loss due to slope (only considering the additional energy loss caused by going up) and the additional two constraints to form the final path cost. Assume a simple energy loss function as formula (4), Ecost,i,j is the total energy consumption of the path between any two task points i and task point j. Where E l,i,j , E g,i,j , E t,i,j are the energy consumption corresponding to the path length, the additional energy consumption for going uphill, and the energy consumption for turning, respectively.

[0073] E cost,i,j = E l,i,j + E g,i,j + E t,i,j (4)

[0074] Considering obstacles and slope constraints, construct a cost function. Under the condition of meeting the constraints, obtain the path with the minimum cost between task points through the A* search algorithm.

[0075] Furthermore, to address the limitations of the traditional A* algorithm when navigating in the obstacle environment of mountainous areas, including redundant path nodes, excessive turning, sudden turning angles, and low efficiency. Expand the exploration of the original 4 directions to 16 directions. The expanded algorithm aims to improve the search efficiency in the free space area, reduce the search burden in the obstacle-free area, and optimize the heuristic function to reduce the number of search nodes. Therefore, it helps to discover the initial path faster. In addition, due to the expanded exploration directions, there are too many explored neighbors, and many nodes are not on the final path. They are just unimportant intermediate points in the path. By introducing the concept of jump points, these unnecessary node expansions are avoided. When moving in a certain direction, the direction will only change when encountering an obstacle or a slope that is too large. Otherwise, skip this continuous obstacle-free area and directly jump to the next point where the direction changes. By skipping unnecessary node expansions, the overall path planning efficiency is ultimately improved. During the entire search process, calculate the actual cost value G(n) from the start node s to the expanded node n. If there is an obstacle on this path, or the slope of the path is too large, the cost value will become very large to ensure that this path will not be selected. At the same time, calculate the cost value H(n) from the expanded node n to the target node g, and add the actual cost value G(n) from the start node s to the expanded node n and the cost value H(n) from the expanded node n to the target node g to obtain the final cost value F(n). Then, the algorithm selects the node n with the minimum F(n) value as the next expanded node, as shown in the expression (5) of the evaluation function of the A* algorithm. It is necessary to continuously find the surrounding points from the start node, select a new point as the starting point and then loop to find until the end point is found. In this process, G(n) represents the actual cost value of moving from the start node s to the expanded node n, and H(n) represents the cost from the expanded node to the target node.

[0076] F(n) = G(n) + H(n) (5)

[0077] The main steps of path finding are as follows: Two lists are given, namely the confirmation list and the exploration list. First, add the starting node to the exploration list. Then, check whether the surrounding nodes of the starting node have been added to the exploration list. If they have, remove the starting node from the exploration list, add it to the confirmation list, and calculate the G value of the surrounding nodes (the G value here is the same as the above-mentioned G(n) value. Since it was stated above that node n is expanded, then G(n) represents the G value of the expanded node n. Here, the surrounding nodes of this point are described below, and there is no specific symbol to represent them. The same applies to F and H in the following text). If the G value is smaller than the original, recalculate the F value of this node. Then, select the node with the smallest F value from the exploration list, add its surrounding nodes to the exploration list, and at the same time remove this node from the exploration list and add it to the confirmation list. If there are unadded nodes, calculate the F value of this point, that is, the sum of the cost G from the starting node to the current node and the cost H from this node to the target node. Repeat this process until the target node is added to the exploration list, indicating that the path has been found, and the path planning is completed. Construct a cost matrix based on the path costs between two nodes. If there are n nodes in a group, an n×n cost matrix is obtained.

[0078] S3. Optimize the path order of the access tasks.

[0079] For each group, use the path cost of passing through all task points within the group as the fitness, and use the improved grey wolf optimization algorithm to optimize the access path order between multiple task points.

[0080] Furthermore, for the above-mentioned improved grey wolf optimization algorithm, a fitness function of the total energy consumption is given in combination with the path costs between tasks obtained above to optimize the path order between multiple tasks and obtain the optimal task execution order. Since the traditional grey wolf optimization algorithm has problems such as slow convergence speed and being prone to falling into local optima when facing the combined path planning problem in the above environment. Therefore, an optimized grey wolf optimization algorithm is proposed. Optimize the initial population and strengthen the search strategy of the original algorithm to solve the above problems. The specific content is as follows:

[0081] In the Grey Wolf Optimization Algorithm, in order to optimize the path order of accessing tasks, the position of each grey wolf individual is a vector, representing a solution to the multi-task path access order, that is, encoding the path order of multi-task access as a vector, which serves as the position of the grey wolf. Based on the cost matrix obtained above, the path cost between each task can be obtained, and finally the total path cost of this path access order can be obtained. This cost is used as the fitness for evaluation. In the Grey Wolf Optimization Algorithm, the population includes many such grey wolf individuals, that is, many different solutions to the multi-task path access order, and each has its own fitness, that is, the total path cost of its own task point access order. Specifically, the hierarchy of the grey wolf population is divided into α, β, δ, and ω wolves. The α wolf is the leading wolf, and its position represents the grey wolf individual with the current optimal solution. The second-best and third-best solutions are β and δ wolves respectively, that is, the first three solutions with the lowest path cost of the task access path order, and all the remaining solutions are classified as ω wolves. The Grey Wolf Optimization Algorithm is modeled on the hunting process of the wolf pack. Among them, the mathematical model for surrounding the prey is as follows:

[0082] X(t + 1) = X p (t) - A·D (6)

[0083] D = ∣C·X p (t) - X(t)∣ (7)

[0084] Where, X p (t) is the prey position, that is, the current optimal task access path order, X(t) is the current position of the grey wolf, t is the current iteration number, D is the distance vector, reflecting the proximity of the current grey wolf to the prey, and X(t + 1) is the position of the grey wolf adjusted according to the prey position, which is also the position of the grey wolf in the next round of iteration.

[0085] A and C are control parameters, and their mathematical formulas are as follows:

[0086] A = 2R 1 ·a - a (8)

[0087] C = 2·R 2 (9)

[0088] a = 2·(1 - t / Max iter ) (10)

[0089] Where, t, Max iterThey respectively represent the current iteration number and the maximum iteration number. A and C are parameter control vectors for adjusting the positions of grey wolf individuals. The moving direction is determined by its own position and the random vector C, and the moving step size is determined by the isolation distance, the grey wolf distance, and the coefficient vector A. A is in turn controlled by the convergence factor a, and the value of a gradually decreases with the iteration number, linearly decreasing from 2 to 0, and the position of the grey wolf gradually converges to the prey position. By controlling the change of A with the value of a, it is determined how the access path order of other tasks changes according to the optimal task access path order.

[0090] R 1 and R 2 are random numbers within the range of [0, 1]. Regarding the convergence factor, the formula for a is modified so that a gradually decreases in the early iterations, focusing on global exploration in the initial stage, and a further decreases in the later iterations, focusing on local exploitation in the later stage to improve the accuracy of the solution. The specific modification is shown in formula (11):

[0091]

[0092] where a 1 , a 2 represent the start value and end value of the convergence factor, and m is an exponent used to control the rate of change of the convergence factor a during the dynamic adjustment process.

[0093] However, considering a search space, in reality, a grey wolf pack has the ability to identify the position of the prey and surround them. But when solving problems through simulation, we do not know the prey position, that is, the optimal solution to the problem. Therefore, the top three best solutions among all current grey wolf individuals are saved, namely α, β, and δ mentioned above, assuming that they have a better understanding of the potential position of the prey, and it is required that the grey wolf individuals update their positions according to the positions of α, β, and δ. Using this solution to find a better solution and continuously iterating and optimizing, this best solution will also continuously approach the optimal solution. That is, we do not know the solution of the task path access order with the lowest cost, and then find the three task path access order solutions with the lowest cost in each iteration, and all other solutions update their task path access order through these three solutions. The following mathematical model is obtained:

[0094]

[0095] A and C are parameter control vectors for adjusting the positions of grey wolf individuals, which respectively control the moving step size and the moving direction, and obtain different values through random numbers when updating each position. In formula (12), D α , D β , D δrespectively represent the distances and directions from a gray wolf individual to the α, β, and δ wolves after being adjusted by C, providing a reference for adjusting the access path order of the optimal three tasks from the access path order of other subsequent tasks. In (13), X i = 1, 2, 3 respectively represent the adjustments of the current wolf to the positions of the α, β, and δ wolves. Among them, C 1 , C 2 , C 3 and A 1 , A 2 , A 3 have the same meanings as C and A above. However, as can be seen from formulas (8) and (9), both A and C contain random numbers, so the values may be different each time. In (12) and (13), since the randomly generated values are different each time, the Cs and As obtained from three different random numbers are respectively denoted as C 1 , C 2 , C 3 and A 1 , A 2 , A 3 . Equation (14) represents the position update of the final gray wolf individual. Among them, the gray wolf position vector X is the access path order of a task, and X α , X β , X δ are the access path orders of the three tasks with the lowest current cost. The gray wolf position vector in formula (14) is adjusted according to the access path orders of the current three optimal tasks.

[0096] As mentioned above, the hierarchy of the gray wolf population is divided into α, β, δ, and ω wolves. The α wolf is the current optimal solution, and the β wolf is a solution better than the δ wolf. However, in the position update equation (14) of the original gray wolf optimization algorithm, the weights of the α, β, and δ wolves are the same. To represent this hierarchical relationship and give a greater advantage to a better solution during position update, the position update formula is modified as (15):

[0097]

[0098] Secondly, to enhance the exploration ability of the algorithm, Gaussian perturbation is introduced when updating the position. The specific modification is shown in the following formula:

[0099] X(t + 1) = X(t) + σ·N(0, 1)·(X α - X(t)) (16)

[0100]

[0101] where σ is the perturbation intensity, and σ maxis the maximum perturbation intensity, which gradually decreases as the number of iterations increases. N(0,1) is the standard normal distribution, and P perturbation is the probability-triggered Gaussian perturbation.

[0102] Finally, after each path update, a method of randomly swapping task points is further used to change the path. Two task points in the task point execution order group are randomly selected and swapped. The specific improvement is as follows:

[0103] Location(i,j) = reverse(Location(i,j)) (19)

[0104]

[0105] As mentioned above, the position X of each wolf is a vector of the path access order of a task, that is, the position order of the tasks in the vector is the path access order. In formula (19), we introduce a swap change, where Location(i,j) represents the i-th and j-th task points in the position vector, and reverse represents the swap of the two task points, that is, the swap of the access order of the two tasks. Formula (20) represents the probability P of making the swap change reverse .

[0106] The main steps for optimizing the path order of the accessed tasks are as follows: Given the population number p of gray wolves, for all task points in each group, p arbitrary path access orders of task points are given and encoded as the position vectors of gray wolves. Evaluate the fitness of each gray wolf individual and sort them, that is, the cost of the path. The lowest three are obtained as the α, β, and δ wolves for iterative optimization. In each round of iteration, each gray wolf decides whether to update its position through (15) or (16) and whether to perform a swap operation through a random number. After all gray wolves update their positions, re-evaluate the fitness of each gray wolf individual, and similarly select the α, β, and δ wolves as above to enter the next round of iteration. When the number of iterations reaches the set maximum number of iterations, the optimization is completed. In the last round of iteration, the position vector of the α wolf is selected as the optimized path order solution for the accessed tasks.

[0107] Embodiment 1

[0108] The overall function implemented is as Figure 1 shown in the framework diagram and Figure 2 the schematic diagram of the method shown in Figure 3 The following is a detailed description in combination with the flowchart shown in

[0109] In the task division module, first, a grid map model in a mountainous agricultural environment is constructed according to the terrain height data, such asFigure 4 As shown, multiple task points are randomly generated. The density value of each point is calculated according to the minPts value, and the radius value ε of each point is dynamically adjusted according to the density value of each point. Using the clustering method of DBSCAN, the division result of the tasks is obtained. Due to the addition of threshold limits, there will be no overly large groups in each task group, but there may be multiple small groups. The close small groups are merged, and then the final grouping result is assigned to multiple devices for processing. Each device processes one group to achieve the collaborative completion of multiple tasks by multiple devices.

[0110] For each group obtained in the previous step, perform A* search to find a safe and suitable path. For the path between every two task points, first initialize two empty lists, one is the exploration list and the other is the determination list. In the grid map we constructed, add the starting node to the exploration list, add all reachable neighbors of this node to the exploration list, and evaluate its cumulative cost value F. For the starting node, the distance from it to itself is 0, so its G value is 0, and the H value is the estimated cost value from it to the target node. For other neighboring nodes, the G value is the cost from the starting node to the neighboring node plus the cost from this neighboring node to the target node, as shown in formula (5). Record its total value F, G value, and the previous node. When all nodes in the surrounding grid are added to the exploration list, transfer the starting node from the exploration list to the determination list; then sort the nodes in the exploration list according to the cumulative cost value F, select the point with the smallest F value as the current node, evaluate the F value of its neighboring points, and add them to the exploration list. If the neighboring node is already in the exploration list, then judge its G value, that is, the cost from the starting node to this node. If it is less than the value in the exploration list, because the position is the same, the cost to the target node is the same, so the total cost F will be smaller, indicating that a path with a smaller cost is found, and update the recorded information in the exploration list. After processing all neighboring nodes, add the current node to the determination list, and re-select the point with the smallest F value from the exploration list as the current node. If the neighboring node is the target node, the path in the determination list will be obtained; if it is not the target node, repeat the above steps, add all reachable neighbors of this node, and select the smallest F as the current node for the next round until the current node is the target node, then the path planning is completed. Construct a cost matrix according to the cost between two nodes, and each matrix records the cost from all nodes in a group to other nodes. Provide a reference for the optimization of the access path order between multiple task points in the future.

[0111] In the access path order optimization module between multitask points, the access path order is optimized according to the above costs. First, an initial population is generated. Each wolf represents a set of solutions for the access order of task point paths, which is also recorded through a list. The order of task points in the list is the access order. All solutions, that is, all wolves, form the population. We use the greedy algorithm to optimize the initial population to accelerate the convergence speed of the algorithm. If all solutions are generated by the greedy algorithm, the solutions may be very similar or even mostly the same, which may affect subsequent exploration. Therefore, we apply the greedy strategy to some solutions. Given a random number and a threshold, when the random number is greater than the threshold, a starting node is randomly selected and then the path is obtained through the greedy algorithm, that is: randomly select a starting task point, and then select the task point with the minimum cost in the corresponding row of the cost matrix as the next task point. Then, find the minimum among the unvisited task points in the corresponding row of the cost matrix of this task point as the next task point. In this way, we can obtain a relatively good initial solution.

[0112] After sorting, the three wolves with the lowest fitness values are taken as the α, β, and б wolves and the subsequent iterative optimization process is carried out: In each iteration, each wolf pack obtains a random number R according to the α, β, and б wolves in the previous iteration. 1 , if the random number is not less than the perturbation probability P perturbation , except for the three leading wolves, the remaining wolves are ω wolves. They update their positions through formulas (12), (13), and (14). The ω wolves first calculate the distances from the α, β, and б wolves respectively, and then move closer to the positions of the α, β, and б wolves. Here, A controls the speed of approaching the α, β, and б wolves to a certain extent. A is mainly controlled by a. We improve a. In the first half of the iteration, the decrease rate of a is slow, focusing on exploration to find better solutions; while in the second half, the decrease rate of a accelerates, focusing on local exploitation. Otherwise, they are updated through formula (14) to obtain the distance between the original position and the position of the α wolf, and Gaussian perturbation and a perturbation intensity are introduced. Both the perturbation intensity and the perturbation probability gradually decrease as the iteration progresses. Then a second random number R is obtained. 2 , if R 2 is greater than the flip probability P reverse , then any two points in the task path order in the wolf pack are permuted. For example, if the task path access order is [1, 3, 2, 4, 5], the second and fifth are selected for permutation, and the resulting task path access order after permutation is [1, 5, 2, 4, 3]. After the iteration is completed, the obtained α wolf is the finally optimized task path access order.

[0113] To illustrate the effectiveness of our method, we designed an experimental scenario. We set the size of the mountainous area to 40×40, with undulating terrain, and randomly generated 20 task points and some obstacles that do not overlap with the task points. There are 3 small agricultural equipment to handle tasks at each task point, each responsible for a certain number of tasks, and the maximum task processing capacity of each equipment is 8 task points. First, we allocate the tasks using the original DBSCAN algorithm. Since it only clusters by density, we finally obtain two groups. One group includes 13 task points, which exceeds the maximum number of task points that a single equipment can handle, and the other group includes 7 task points. Using our improved DBSCAN algorithm, we obtain 3 groups, which contain 8, 7, and 7 task points respectively. It can be seen that our improved method can better allocate tasks. After that, we randomly select two task points from each group and use the traditional A* algorithm and our optimized A* algorithm to perform constrained path planning. Both avoid obstacles and there is no large-angle upward situation in the path, ensuring that the equipment can complete the established tasks. The costs of the two methods in the three groups are (17.4, 15.8), (24.8, 21.3), and (4, 4) respectively. Finally, we compare the traditional grey wolf optimization algorithm and the improved grey wolf optimization algorithm for the three groups respectively. The total costs of the access paths of all task points in each group are (134.3, 118.5), (123.6, 110.4), and (107.4, 93.3) respectively. Through the above experimental comparison, the effectiveness of our method is demonstrated.

[0114] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the method embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and reference can be made to the corresponding parts of the method embodiments for the relevant parts.

[0115] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain, characterized in that: The following steps are involved: S1, divide multiple tasks and coordinate them to different equipment; S2, obtain the paths and costs between tasks in each group; S3, optimize the path sequence of access tasks.

2. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 1 is characterized in that: The step S1 comprises: A network modeling in a mountainous agricultural environment is constructed based on terrain height data, and then multiple task points are randomly generated. Multiple tasks are divided by a density-based spatial clustering algorithm with noise. Each equipment handles a group, so that multiple equipment can complete multiple tasks collaboratively. The spatial clustering algorithm includes two parameters: radius ε and minimum sample number minPts. If the number of points within the radius ε of a point is greater than minPts, the point is a core point. If there are other core points within the radius of the core point, these core points are grouped into one cluster.

3. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 2 is characterized in that: The spatial clustering algorithm is as follows: e inew =e-c(e-d i ) (1) Among them, ε inew is the neighborhood radius of each point dynamically adjusted according to the density, ε is the initial radius, δ i is the density value of each point, γ is the parameter for adjusting the radius scaling, dist represents the three-dimensional distance between two points, τ is the sensitivity parameter to height when adjusting clustering, and setting different values ​​according to the scene can better reflect the terrain difference in mountainous and hilly areas, S is all tasks in each partition, and T s For each task, D max The maximum amount of tasks that the equipment can handle; After obtaining multiple task points in a given scene, the density value δ of each point is calculated according to the minimum number of samples minPts i , that is: the minimum radius value that can include minPts points; then dynamically adjust the radius ε of each point according to the density value of each point, and finally use the spatial clustering algorithm to expand from a core point, merge the core points within its radius into a cluster, and continue to expand until there are no other core points in the cluster or the task volume in the cluster has reached the maximum task volume that the equipment can handle. Then the expansion ends and a group is obtained, and then other task points are processed to finally obtain the task division result.

4. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 1 is characterized in that: The step S2 comprises: For each group obtained by task division in S1, first consider the specific path planning between each two task points in the group; execute the A* search algorithm for each two nodes to perform constrained path planning; Assuming the energy loss function is as shown in formula (4), AND cost,i,j =And l,i,j +E g,i,j +E t,i,j (4) E cost,i,j is the total energy consumption of the path between any two task points i and j, where E l,i,j , E g,i,j , E t,i,j They are the energy consumption corresponding to the path length, the additional energy consumption for going uphill, and the energy consumption for turning; Considering obstacles and slope constraints, a cost function is constructed. Under the condition of satisfying the constraints, the path with the minimum cost between task points is obtained through the A* search algorithm.

5. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 4 is characterized in that: The A* search algorithm performs exploration in 16 directions; During the entire search process, the actual cost value G(n) from the starting node s to the extended node n is calculated. If there is an obstacle on the path or the slope of the path is too large, the cost value will become very large to ensure that the path will not be selected; at the same time, the cost value H(n) from the extended node n to the target node g is calculated, and the actual cost value G(n) from the starting node s to the extended node n is added to the cost value H(n) from the extended node n to the target node g to obtain the final cost value F(n); Then, the node n with the minimum F(n) value is selected as the next expansion node. The evaluation function of the A* search algorithm is shown in expression (5). It is necessary to continuously search for surrounding points from the starting node, select a new point as the starting point, and then search again in a loop until the end point is found. F(n)=G(n)+H(n) (5).

6. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 1, characterized in that: The step S3 comprises: For each group, the path cost passing through all task points in the group is used as the fitness. Combined with step S2, the fitness function of total energy consumption is given, and the access path sequence between multiple task points is optimized using the improved gray wolf optimization algorithm.

7. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 6, characterized in that: In the improved gray wolf optimization algorithm, in order to optimize the path order of access tasks, the position of each gray wolf individual is a vector, representing a solution to a multi-task path access order, that is, the path order of multi-task access is encoded into a vector as the position of the gray wolf; the path cost between each task is obtained, and finally the total path cost of the path access order can be obtained, and this cost is evaluated as fitness.

8. The method for collaborative allocation path planning of multiple tasks and multiple equipment in mountainous terrain according to claim 6 or 7, characterized in that: In the gray wolf optimization algorithm, the gray wolf population is divided into α, β, δ and ω wolves. α wolf is the leader, and its position represents the gray wolf individual with the current optimal solution. The second-best solution and the third-best solution are β wolf and δ wolf, which are the first three solutions with the lowest sequential cost of the task access path. All other solutions are classified as ω wolf. The gray wolf optimization algorithm is based on the hunting process of wolves. The mathematical model of encircling prey is as follows: X(t+1)=X p (t)-A·D (6) D=∣C·X p (t)-X(t)∣ (7) Among them, X p (t) is the prey position, that is, the current optimal task access path sequence, X(t) is the current position of the gray wolf, t is the current iteration number, D is the distance vector, which reflects the current proximity between the gray wolf and the prey, and X(t+1) is the position of the gray wolf after adjustment based on the prey position, which is also the position of the gray wolf in the next iteration; A and C are control parameters, and their mathematical formulas are as follows: A=2R1·aa (8) C=2·R2 (9) a=2·(1-t / Max iter ) (10) Among them, t, Max iter Represent the current number of iterations and the maximum number of iterations respectively. A and C are parameter control vectors for adjusting the position of the individual gray wolf. The moving direction is determined by its own position and random vector C. The moving step is determined by the gray wolf distance vector D and coefficient vector A. A is controlled by parameter a. The value of a will gradually decrease with the number of iterations, decreasing linearly from 2 to 0. The change of A is controlled by the value of a to determine how the order of other task access paths changes according to the optimal task access path order. R1 and R2 are random numbers in the range of [0,1]. Modify the formula of a, as shown in formula (11): Where a1 and a2 represent the starting and ending values ​​of the convergence factor, and m is an index used to control the rate at which the parameter convergence factor a changes during the dynamic adjustment process; Save the top three best solutions among all the current gray wolf individuals, namely α, β, and δ, and find the three task path access order solutions with the lowest cost in each iteration. All other solutions update their task path access order through these three solutions, and get the following mathematical model: A and C are parameter control vectors for adjusting the position of the individual gray wolf, which control the moving step length and moving direction respectively. Different values ​​are obtained when each position is updated through random numbers. α , D β , D δ They represent the distance and direction of the gray wolf to the α, β, and δ wolves after adjustment by C, providing a reference for adjusting the order of the subsequent task access paths to the optimal order of the three task access paths. i =1, 2, 3 represent the adjustment of the current wolf to the position of α, β, δ wolf respectively, where C1, C2, C3 and A1, A2, A3 have the same meaning as C and A above; the gray wolf position vector X is the path sequence of a visit task, X α , X β , X δ is the path sequence of the three access tasks with the lowest cost at present; the gray wolf position vector in formula (14) is adjusted according to the path sequence of the three optimal access tasks at present; When updating the position, in order to give the better solution a greater advantage, the position update formula is modified as follows (15): Secondly, in order to enhance the algorithm's exploration ability, Gaussian perturbation is introduced when updating the position. The specific modification is shown in the following formula: X(t+1)=X(t)+σ·N(0,1)·(X α -X(t)) (16) where σ is the perturbation intensity, σ max is the maximum perturbation intensity, which gradually decreases with the increase of the number of iterations. N(0,1) is the standard normal distribution, P perturbation is the probability triggering Gaussian perturbation; Finally, after each path update, the method of random exchange of task points is further used to change the path. Two task points in the task point execution order group are randomly selected and exchanged. The specific improvements are as follows: Location(i,j)=reverse(Location(i,j)) (19) Where Location(i,j) represents the i-th and j-th task points in the location vector, reverse represents exchanging the two task points, that is, exchanging the access order of the two tasks, and formula (20) represents the probability P of exchanging the two task points. reverse .

Citation Information

Cited By

  • Path planning method and system applied to full-automatic cabin cleaning machine

    CN120927006A