A CCBS multi-agent path planning method based on heuristic strategy
By using heuristic strategies in the CCBS multi-agent path planning algorithm, constructing undirected weighted graphs and CT tree nodes, and handling conflicts first, the problem of low efficiency of the CCBS algorithm in path planning is solved, and a faster optimal path is achieved. planning.
Patent Information
- Application Number
- CN202411524701.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-10-30
AI Technical Summary
When ensuring path optimization, CCBS multi-agent path planning algorithm has a large number of conflicts, resulting in a significant reduction in efficiency.
The CCBS multi-agent path planning method based on heuristic strategy is used to construct an undirected weighted graph, initialize the agent parameters, use the SIPP algorithm to plan the initial solution, generate CT tree nodes, and adopt priority conflict strategies and conflict avoidance strategies. Systematically prioritize and handle conflicts to improve search efficiency.
It effectively improves the search efficiency of the CCBS algorithm, quickly finds the optimal solution for path planning, reduces the time for conflict processing, and improves the overall performance of multi-agent path planning.
Smart Images

Figure CN119043368B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a multi-agent path planning method, and in particular to a CCBS multi-agent path planning method based on a heuristic strategy. Background Art
[0002] MAPF (Multi-Agent Pathfinding) is the problem of finding paths for multiple agents such that each agent can reach a goal point along its own path from a starting point and does not collide with each other while moving along these paths. Although finding a solution to MAPF can be done in polynomial time, the optimal solution MAPF is NP-hard under several common assumptions. Despite this, AI researchers have made substantial progress in finding optimal solutions for an increasing number of scenarios and large-scale agents, however, most previous work is based on the following assumptions: 1) time is discretized into time steps; 2) the duration of each action is one time step; 3) each agent occupies exactly one position in each time step. These simplifying assumptions limit its applicability in practical applications. An effective solution is based on the CCBS (Continuous-time Conflict Based Search) algorithm, a MAPF algorithm that does not rely on any of these assumptions and is sound, complete, and optimal.
[0003] The CCBS algorithm is based on a customized version of SIPP (Safe Interval Path Planning), which is an improvement on CBS (Conflict Based Search) and is an advanced multi-agent pathfinding algorithm. The CCBS algorithm relies on accurately detecting collisions between agents and calculating the safe intervals between agents, so that agents can move from the starting point to the target point in the shortest time without collisions. However, in order to ensure the optimality of the path, there are a large number of conflicts in the paths planned by multiple agents, which greatly reduces the efficiency of the CCBS algorithm. Based on the above scenario requirements, a CCBS multi-agent path planning method based on heuristic strategies is designed, which is mainly divided into two aspects to achieve:
[0004] 1) Use the Prioritizing Conflict (PC) strategy to classify each conflict into cardinality conflicts, semi-cardinality conflicts, and non-cardinality conflicts, and systematically prioritize the conflicts;
[0005] 2) By using the Bypassing Conflict (BP) strategy, a lot of search time can be potentially saved by adopting beneficial bypasses. Summary of the invention
[0006] In order to improve the efficiency of path planning for multiple agents to move from a starting point to an end point in the shortest time without causing collisions, the present invention proposes a CCBS multi-agent path planning method based on a heuristic strategy, which includes the following steps:
[0007] S1. Construct an undirected weighted graph, which includes multiple vertices and edges between vertices. Set the corresponding starting points of multiple agents on the vertices of the undirected weighted graph. and target point ;
[0008] S2. Initialize the parameters of each agent, use the underlying algorithm SIPP to plan the initial solution for multiple agents to move from the starting point through the vertices and edges to the end point on the undirected weighted graph in the obstacle environment, and generate the initial CT node of the CT tree according to the initial solution;
[0009] S3, adding the initial CT node to the preset OPEN linked list, when the OPEN linked list is not empty, selecting the CT node with the smallest total cost in the solutions of multiple agents from the OPEN linked list and removing it, checking whether there is a conflict in the CT node with the smallest total cost, if no conflict occurs, executing step S6, otherwise, if there is a conflict, executing step S4;
[0010] S4. Classify all conflicts using the PC algorithm to obtain classified conflicts, where the classified conflicts include cardinality conflicts, set priorities for the classified conflicts and sort them according to the priorities to obtain sorted conflicts;
[0011] S5, select the conflict with the highest priority from the sorted conflicts. If the conflict with the highest priority is a cardinality conflict, add constraints to the two agents corresponding to the conflict and generate two child nodes. Insert the two generated child nodes into the OPEN linked list, and determine whether the current conflict search time reaches the preset time threshold. If not, repeat steps S3 to S5 and perform the next round of search. Otherwise, if the preset time threshold is reached, execute step S6.
[0012] S6. When the search end condition is met, the path planning results of multiple agents are output.
[0013] Preferably, in S2, an initial CT node of the CT tree is generated according to the initial solution, and the CT node specifically includes the following: the total cost of the solution, the constraints imposed on the agent, the solution satisfying the constraint conditions, and the conflict generated by the solution, wherein the conflict of the solution can be determined according to the preset conflict generation conditions.
[0014] Preferably, the constraints imposed on the agent can be specifically expressed as:
[0015] ;
[0016] In the formula, Indicates constraints, Representing an Agent Actions performed, including moving and waiting, represents the time interval of the constraint, represents the constraint start time, represents the constraint termination time, Indicates the time interval Internally banned agents Execute an action .
[0017] Preferably, the conflict generated by the solution can be specifically expressed as:
[0018] ;
[0019] In the formula, Indicates conflicts, including vertex conflicts or edge conflicts. Representing an Agent Actions performed, Representing an Agent exist Always perform actions With Agent exist Always perform actions A vertex or edge conflict has occurred.
[0020] Preferably, the preset conflict generating conditions are specifically:
[0021] If two agents are at the same vertex in an undirected weighted graph at the same time, the two agents are in conflict; and / or:
[0022] If two agents move towards each other along the same edge in an undirected weighted graph in the same time period, then the two agents are in conflict.
[0023] Preferably, in S4, all conflicts are classified using the PC algorithm to obtain classified conflicts. The specific process is as follows:
[0024] S41, randomly selecting one conflict from all conflicts, adding constraints to the two agents corresponding to the selected conflict, splitting the CT node with the minimum total cost, and obtaining a first child node and a second child node;
[0025] S42, calculating the total cost difference between the CT node with the minimum total cost and the first child node and the second child node and ;
[0026] S43, based on the total cost difference and Classify the selected conflict: If and , then the selected conflict is the cardinality conflict ,like and or and , then the selected conflict is a semi-cardinality conflict ,like and , then the selected conflict is a non-cardinality conflict ;
[0027] S44. Select another conflict from all conflicts until all conflicts are selected, and repeat steps S41 to S43 to obtain classified conflicts.
[0028] Preferably, in S4, priorities are set for the classified conflicts and the conflicts are sorted according to the priorities to obtain sorted conflicts. The specific process is as follows:
[0029] S45, setting priorities for the classified conflicts, where the priorities of different types of conflicts are, from high to low, cardinality conflicts, semi-cardinality conflicts, and non-cardinality conflicts;
[0030] S46, check the number of each type of conflict, if the number of a certain type of conflict is more than one, execute step S47, otherwise, if the number of each type of conflict is only one, execute step S48;
[0031] S47. Calculate the cost impact of multiple conflicts in a certain type of conflict , according to cost impact The size of the conflict arranges the priorities of multiple conflicts in this type from high to low;
[0032] S48, end the priority sorting, and obtain the sorted conflicts.
[0033] Preferably, if the conflict with the highest priority is not a cardinality conflict, adding constraints to the two agents corresponding to the conflict and generating two child nodes in S5 also includes:
[0034] The BP algorithm is used to peek at whether there is a beneficial solution in the solutions of the two generated child nodes. If there is a beneficial solution, the beneficial solution is used to update the solution in the CT node with the smallest total cost, and the CT node with the smallest total cost with the updated solution is inserted into the OPEN linked list. Otherwise, there is no beneficial solution, and the two generated child nodes are inserted into the OPEN linked list.
[0035] Preferably, the BP algorithm is used to peek at whether the solutions in the two generated child nodes are beneficial solutions, which specifically includes the following:
[0036] S51, randomly select one child node from the two generated child nodes, and calculate the total cost and the number of conflicts of the selected child node;
[0037] S52, comparing the total cost and the number of conflicts of the CT node with the minimum total cost with the total cost and the number of conflicts of the selected child nodes respectively;
[0038] S53, if the preset condition is met, the solution corresponding to the selected child node is a beneficial solution, and step S54 is executed; if the preset condition is not met, another child node is selected from the two generated child nodes, and steps S51 to S53 are repeated. If the other child node meets the preset condition, step S54 is executed; if the other child node does not meet the preset condition, step S55 is executed; wherein the preset condition is: the total cost of the CT node with the smallest total cost is equal to the total cost of the selected child node, and the number of conflicts of the CT node with the smallest total cost is less than the number of conflicts of the selected child node, and does not contain conflicts corresponding to the two generated child nodes;
[0039] S54: There is a beneficial solution among the solutions of the two generated child nodes, and the peeking ends;
[0040] S55. There is no beneficial solution among the solutions of the two generated child nodes, and the peeking ends.
[0041] Preferably, S6 specifically includes:
[0042] There is no conflict among the CT nodes with the minimum total cost, and the conflict-free path planning of multiple agents is output; or,
[0043] The current search time reaches the preset search time threshold, and conflict-free path planning for multiple agents fails.
[0044] The above CCBS multi-agent path planning method based on heuristic strategy first constructs an undirected weighted graph and sets the corresponding starting points of multiple agents on the vertices of the undirected weighted graph. and target point , and then initialize the parameters of each agent, and use the underlying algorithm SIPP to plan the solution of multiple agents moving from the starting point through the vertices and edges to the end point on the undirected weighted graph in the obstacle environment. Generate the initial CT node of the CT tree according to the solution and add it to the preset OPEN linked list, select the CT node with the smallest total cost in the solution of multiple agents from the OPEN linked list and remove it, check whether there is a conflict in the CT node with the smallest total cost, if there is no conflict, the search end condition is met, otherwise, classify and sort the conflicts, select the conflicts with the highest priority to process, until the search end condition is met, and output the path planning results of multiple agents. This method can effectively improve the search efficiency of the CCBS algorithm and find the optimal solution for path planning more quickly. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flow chart of a CCBS multi-agent path planning method based on a heuristic strategy in one embodiment of the present invention;
[0046] Figure 2 It is a schematic diagram of an initial solution for two agents to move from a starting point through vertices and edges to an end point on an undirected weighted graph in an obstacle environment using the underlying algorithm SIPP in one embodiment of the present invention;
[0047] Figure 3 is a schematic diagram of the initial CT nodes of the CT tree corresponding to two agents in one embodiment of the present invention;
[0048] Figure 4 is a schematic diagram of a process of obtaining two child CT nodes M and N when the conflict with the highest priority is a cardinality conflict in one embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of a process of using the BP algorithm to peek and see whether the solutions in the two child nodes O and P generated are beneficial solutions when the conflict with the highest priority in one embodiment of the present invention is not a cardinality conflict. DETAILED DESCRIPTION
[0050] In order to enable those skilled in the art to better understand the technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings.
[0051] See also Figure 1 , Figure 1 The flowchart of a CCBS multi-agent path planning method based on a heuristic strategy in one embodiment of the present invention is as follows. A CCBS multi-agent path planning method based on a heuristic strategy comprises the following steps:
[0052] S1. Construct an undirected weighted graph, which includes multiple vertices and edges between vertices. Set the corresponding starting points of multiple agents on the vertices of the undirected weighted graph. and target point .
[0053] Specifically, the undirected weighted graph can be represented as ,in, is the set of vertices in an undirected weighted graph, It is the set of edges between vertices in an undirected weighted graph.
[0054] For any agent ( =1, 2, ..., n), with a unique starting point and target point When the agent is at a vertex other than the target point, it can perform a moving action or a waiting action, namely:
[0055] or .
[0056] in, Representing an Agent At the vertex at time t, Representing an Agent The moment of reaching the target point is also the moment when the agent From the starting point Move to target point The time it takes, Representing an Agent The edge between the vertices at time t and time t+1, .
[0057] The weight of each edge represents the duration of the moving action and can be set in advance. The duration of the waiting action can be any positive real number.
[0058] Agent A plan is a collection of actions , when the agent After executing this series of actions, it will start from the starting point Reach the target point The set of plans of all agents is called a solution, and the solution is denoted by S. The total time spent on the solution is called the total cost, and the total time cost is denoted by Cost. The task of path planning for multiple agents is to find a conflict-free solution and require that the total time cost is optimal, that is, the optimal solution.
[0059] S2. Initialize the parameters of each agent, and use the underlying algorithm SIPP to plan the initial solution for multiple agents to move from the starting point through the vertices and edges to the end point on the undirected weighted graph in an obstacle environment, and generate the initial CT node of the CT tree based on the initial solution.
[0060] Specifically, the CCBS algorithm has a two-layer structure, in which the lower layer is used to plan the optimal path for multiple single agents, and the top layer is used to resolve path conflicts between multiple agents. It mainly detects conflicts between actions and time periods and resolves them by adding constraints.
[0061] See also Figure 2 , Figure 2 This is a schematic diagram of an initial solution for two agents moving from a starting point through vertices and edges to an end point on an undirected weighted graph in an obstacle environment using the underlying algorithm SIPP in one embodiment of the present invention.
[0062] Assume that all agents have the same shape and size, move at a constant speed, ignore inertial effects, and have a radius of (keep two decimal places), set the speed of the agent to 1 m / s, and ignore the turning time. Figure 2 As shown, consider a size of The dark grids in the figure represent obstacles. The center of each grid without obstacles represents a vertex. The distance between adjacent vertices can be customized, which is set to 1 meter here. At this time, the discrete grid graph can be regarded as an undirected weighted graph.
[0063] from Figure 2 It can be seen that there are two agents and , where H and L are the starting points of the two agents respectively. and , B and F are the target points of the two agents respectively and First, the underlying algorithm SIPP is used to plan a series of actions for the two agents to move from the starting point through the vertices and edges to the end point on the undirected weighted graph in the obstacle environment, forming an initial solution, which includes:
[0064] Agent The initial solution of: i-(H,0),(I,1),(J,2),(E,3),(B,4), represents the agent At time 0, it is at the starting point H, reaches vertex I after 1 second, vertex J after 2 seconds, vertex E after 3 seconds, and reaches the target point B after 4 seconds;
[0065] Agent The initial solution of: j-(L,0),(I,1), (D,2),(E,3),(F,4), represents the agent At time 0, it is at the starting point L, reaches vertex I after 1 second, vertex D after 2 seconds, vertex E after 3 seconds, and reaches the target point F after 4 seconds.
[0066] The solution includes the actions that each agent needs to perform and the corresponding accumulated time cost after performing the corresponding actions.
[0067] The underlying algorithm SIPP is used to plan the above two agents in the obstacle environment and After the initial solution is obtained, the initial CT node of the CT tree (Constraint tree) is generated according to the initial solution, denoted as R'.
[0068] Furthermore, in S2, an initial CT node of the CT tree is generated according to the initial solution. The CT node specifically includes the following: the total cost of the solution, the constraints imposed on the agent, the solution that satisfies the constraints, and the conflict caused by the solution. The conflict of the solution can be determined according to the preset conflict generation conditions.
[0069] If the current CT node has a child CT node directly connected to it, a pointer pointing to the child CT node is also included. The pointer pointing to the child CT node is specifically an arrow from the current CT node to the child CT node corresponding to the current CT node.
[0070] Furthermore, the constraints imposed on the agent can be specifically expressed as:
[0071] ;
[0072] In the formula, Indicates constraints, Representing an Agent Actions performed, including moving and waiting, The time interval that expresses the constraint, represents the constraint start time, represents the constraint termination time, Indicates the time interval Internally banned agents Execute an action .
[0073] Furthermore, the solution that satisfies the constraints is: , that is, the set of plans of all agents satisfies the constraints.
[0074] Furthermore, the preset conflict generating conditions are specifically:
[0075] If two agents are at the same vertex in an undirected weighted graph at the same time, then the two agents have a vertex conflict; and / or:
[0076] If two agents move towards each other along the same edge in an undirected weighted graph in the same time period, then the two agents are in conflict.
[0077] Furthermore, the conflicts generated by the solution can be specifically expressed as:
[0078] ;
[0079] In the formula, Indicates conflicts, including vertex conflicts or edge conflicts. Representing an Agent Actions performed, Representing an Agent exist Always perform actions With Agent exist Always perform actions A vertex or edge conflict has occurred.
[0080] Furthermore, the total cost of the solution can be expressed as , that is, the sum of the time taken by all agents to reach the target point from the initial point, Representing an Agent From the starting point Move to target point The time it takes.
[0081] Specifically, SIPP calculates the temporal safety interval of each vertex, which can be considered as a constraint imposed on the waiting action at the vertex. Initially, the temporal safety interval of each vertex is set to For constraints ,like is the waiting action of a vertex, then the safety interval of the vertex is divided into and To prohibit the agent exist Wait at the vertex when is a vertex movement action, the agent is prohibited from At Move from this vertex to the next vertex and add a Waiting for the moment After a certain time, the action of moving from this vertex to the next vertex is executed.
[0082] See also Figure 3 , Figure 3 Schematic diagram of the initial CT nodes of the CT tree corresponding to two agents in one embodiment of the present invention.
[0083] Since the initial CT nodes of the CT tree do not need to consider constraints, Figure 3 In the initial CT node R' of the CT tree, it is applied to the agent and The set corresponding to the constraints on is empty.
[0084] Two Agents and The corresponding solution that satisfies the constraints is the initial solution planned using the SIPP algorithm:
[0085] i-(H,0),(I,1),(J,2),(E,3),(B,4); j-(L,0),(I,1), (D,2),(E,3),(F,4).
[0086] According to the above preset conflict generation conditions, the conflicts generated by the above two solutions are:
[0087] Conflict 1:<i,(H,I),(0,1),j,(L,I),(0,1)> , that is, the intelligent agent and Agent All start from the starting point at time 0 and reach vertex I after 1 second. and Agent A vertex conflict will occur after 1 second;
[0088] Conflict 2:<i,(J,E),(2,3),j,(D,E),(2,3)> , that is, the intelligent agent Starting from the starting point at time 0, it reaches vertex J after 2 seconds and vertex E after 3 seconds. Starting from the starting point at time 0, it will reach vertex D after 2 seconds and vertex E after 3 seconds. and Agent After 3 seconds a vertex conflict will occur.
[0089] Total cost of solution =4+4=8.
[0090] S3. Add the initial CT node to the preset OPEN linked list. When the OPEN linked list is not empty, select the CT node with the smallest total cost in the solutions of multiple agents from the OPEN linked list and remove it. Check whether there is a conflict in the CT node with the smallest total cost. If no conflict occurs, execute step S6. Otherwise, if there is a conflict, execute step S4.
[0091] Specifically, an OPEN linked list is preset, and the OPEN linked list is used to store the CT nodes to be traversed. The initial CT node R' is added to the preset OPEN linked list. When the OPEN linked list is not empty, the CT node with the smallest total cost (denoted as R) is selected from the OPEN linked list and removed. In the initial case, the initial CT node is added to the preset OPEN linked list, and the OPEN linked list only contains the initial CT node. At this time, the CT node with the smallest total cost is selected from the OPEN linked list and removed. At this time, the CT node R with the smallest total cost is the initial CT node R'.
[0092] Agent and There are two situations that may cause conflicts:
[0093] 1) Vertex conflict , at the same time t, the two robots are located at the same vertex of the undirected weighted graph;
[0094] 2) Border conflict , the two robots move towards each other along the same edge.
[0095] Check whether there is a conflict in the CT node R with the smallest total cost. From the previous judgment, it can be seen that since the CT node R with the smallest total cost is also the initial CT node R', the conflict of the CT node with the smallest total cost is the same as the conflict corresponding to the initial CT node, specifically:
[0096] Conflict 1:<i,(H,I),(0,1),j,(L,I),(0,1)> Conflict 2:<i,(J,E),(2,3),j,(D,E),(2,3)> .
[0097] S4. Classify all conflicts using the PC algorithm to obtain classified conflicts, where the classified conflicts include cardinality conflicts. Set priorities for the classified conflicts and sort them according to the priorities to obtain sorted conflicts.
[0098] Furthermore, in S4, the PC algorithm is used to classify all conflicts to obtain classified conflicts. The specific process is as follows:
[0099] S41, randomly selecting one conflict from all conflicts, adding constraints to the two agents corresponding to the selected conflict, splitting the CT node with the minimum total cost, and obtaining a first child node and a second child node;
[0100] S42, calculating the total cost difference between the CT node with the minimum total cost and the first child node and the second child node and ;
[0101] S43, based on the total cost difference and Classify the selected conflict: If and , then the selected conflict is the cardinality conflict ,like and or and , then the selected conflict is a semi-cardinality conflict ,like and , then the selected conflict is a non-cardinality conflict ;
[0102] S44. Select another conflict from all conflicts until all conflicts are selected, and repeat steps S41 to S43 to obtain classified conflicts.
[0103] Specifically, see Figure 3 , for the above two agents and The conflicts of CT node N with the smallest total cost are classified according to the PC algorithm. After calculation, conflict 1 (corresponding to Figure 3 In<i,(H,I),(0,1),j,(L,I),(0,1)> ) belongs to cardinality conflict and can be expressed as , conflict 2 (corresponding to Figure 3 In<i,(J,E),(2,3),j,(D,E),(2,3)> ) belongs to a semi-cardinality conflict and can be written as .
[0104] Furthermore, in S4, priorities are set for the classified conflicts and sorted according to the priorities to obtain sorted conflicts. The specific process is as follows:
[0105] S45, setting priorities for the classified conflicts, where the priorities of different types of conflicts are, from high to low, cardinality conflicts, semi-cardinality conflicts, and non-cardinality conflicts;
[0106] S46, check the number of each type of conflict, if the number of a certain type of conflict is more than one, execute step S47, otherwise, if the number of each type of conflict is only one, execute step S48;
[0107] S47. Calculate the cost impact of multiple conflicts in a certain type of conflict , according to cost impact The size of the conflict ranks the priorities of multiple conflicts in this category from high to low, among which the cost affects The calculation formula is:
[0108] ;
[0109] in, is the total cost difference between the CT node N with the minimum total cost and the first child node, The total cost difference between the CT node N with the smallest total cost and the second child node.
[0110] S48, end the priority sorting, and obtain the sorted conflicts.
[0111] Specifically, after classifying the conflicts in the CT node R with the smallest total cost, a cardinality conflict is obtained: (corresponding to conflict 1 above) and a half-cardinality conflict (Conflict 2 above), according to the priority order, the priority of cardinality conflict is higher than that of semi-cardinality conflict.
[0112] S5. Select the conflict with the highest priority from the sorted conflicts. If the conflict with the highest priority is a cardinality conflict, add constraints to the two agents corresponding to the conflict and generate two child nodes. Insert the two generated child nodes into the OPEN linked list to determine whether the current conflict search time reaches the preset time threshold. If not, repeat steps S3 to S5 and perform the next round of search. Otherwise, if the preset time threshold is reached, execute step S6.
[0113] Specifically, since the priority of cardinality conflicts is higher than that of semi-cardinality conflicts, cardinality conflicts are resolved first, that is, conflicts are resolved first. , at this time, the agents and Adding constraints and , where 0.41 is the calculated value of the two agents and The time of the collision contact is a critical value, and the added constraints indicate that the agent is prohibited from exist The time period performs the movement action from vertex H to vertex I , prohibiting the agent exist The time period performs the movement action from vertex L to vertex I , and then generate two child CT nodes M and N, such as Figure 4 As shown, the two CT nodes M and N are inserted into the OPEN linked list to determine whether the current conflict search time reaches the preset time threshold. If not, repeat steps S3 to S5 and perform the next round of search. Otherwise, the current conflict search time reaches the preset time threshold, and execute step S6.
[0114] It should also be noted that if half-cardinality conflicts are resolved first, then: =<i,(J,E),(2,3),j,(D,E),(2,3)> , at this time, for the intelligent agent and Add constraints separately and After that, two child CT nodes O and P are generated, such as Figure 5 As shown, at this time, there is still a conflict in the sub-CT nodes O and P, and the judgment is made in the same way as described above. There is a cardinality conflict in the sub-CT node P Therefore, the child CT node P needs to be split again to obtain the child CT nodes Q and T, which will increase the number of CT nodes in the CT tree, thereby reducing the algorithm search efficiency.
[0115] Furthermore, if the conflict with the highest priority is not a cardinality conflict, S5 adds constraints to the two agents corresponding to the conflict and generates two child nodes, and also includes:
[0116] The BP algorithm is used to peek at the solutions in the two generated child nodes to see if there is a beneficial solution. If there is a beneficial solution, the beneficial solution is used to update the solution in the CT node R with the minimum total cost. At the same time, the CT node with the minimum total cost with the updated solution is inserted into the OPEN linked list. If there is no beneficial solution, the two generated child nodes are inserted into the OPEN linked list.
[0117] Furthermore, the BP algorithm is used to peek into the solutions of the two generated child nodes to see if there are any beneficial solutions, which specifically includes the following:
[0118] S51, randomly select one child node from the two generated child nodes, and calculate the total cost and the number of conflicts of the selected child node;
[0119] S52, comparing the total cost and the number of conflicts of the CT node with the minimum total cost with the total cost and the number of conflicts of the selected child nodes respectively;
[0120] S53, if the preset condition is met, the solution corresponding to the selected child node is a beneficial solution, and step S54 is executed; if the preset condition is not met, another child node is selected from the two generated child nodes, and steps S51 to S53 are repeated. If the other child node meets the preset condition, step S54 is executed; if the other child node does not meet the preset condition, step S55 is executed; wherein the preset condition is: the total cost of the CT node with the smallest total cost is equal to the total cost of the selected child node, and the number of conflicts of the CT node with the smallest total cost is less than the number of conflicts of the selected child node, and does not contain conflicts corresponding to the two generated child nodes;
[0121] S54: There is a beneficial solution among the solutions of the two generated child nodes, and the peeking ends;
[0122] S55. There is no beneficial solution among the solutions of the two generated child nodes, and the peeking ends.
[0123] Specifically, if the conflict to be resolved is not a cardinality conflict, the BP algorithm is used to peek into the solutions in the two child CT nodes O and P of the CT node R with the smallest total cost. Peeking means that although the child nodes of R are generated by the underlying algorithm, they will not be added to the OPEN linked list, and the size of the CT tree will not increase due to the generation of new child nodes.
[0124] like Figure 5 As shown in , if the conflict with the highest priority among the conflicts to be selected is not a cardinality conflict, that is =<i,(J,E),(2,3),j,(D,E),(2,3)> When and Adding constraints and After that, two child CT nodes O and P are generated. According to the BP algorithm, the cost of the two direct child CT nodes O and P of the CT node R with the smallest total cost is equal to that of the R node (both are 8), the number of conflicts of the P node (1) is less than the number of conflicts of the R node (2), and the conflicts corresponding to the two generated child nodes O and P are not included. , it means that the direct child CT node P contains a beneficial solution, and the solution in P can be directly used to update the solution in R, and the CT node R with the updated solution can be inserted into the OPEN linked list.
[0125] Similarly, if after the above peeping, the child CT node P does not contain a beneficial solution, the peeping fails, and the same peeping can be performed on another generated child CT node O.
[0126] In the worst case, if the peeking operations on both child CT nodes O and P fail, then the two child nodes O and P can be inserted into the OPEN linked list.
[0127] Through the above-mentioned peeking operation, there is no need to add new nodes to the OPEN linked list after splitting to generate O and P nodes, which reduces the size of the constraint tree, may save a lot of search time, and even avoid low-level search for another child node.
[0128] S6. When the search end condition is met, the path planning results of multiple agents are output.
[0129] Furthermore, S6 specifically includes:
[0130] There is no conflict in the CT node with the minimum total cost, and the conflict-free planning path of multiple agents is output; or,
[0131] The current search time reaches the preset search time threshold, and conflict-free path planning for multiple agents fails.
[0132] Specifically, if after the above judgment, the agent and If there is no conflict in the two child CT nodes M and N, it means that the agent is found. and There are two optimal solutions without conflicts, such as Figure 4 As shown, the optimal solution in the output child CT node M is output as the agent and The conflict-free planning path (the constraint tree generally stipulates that the left node has a higher priority), namely i-(H,0),(I,1.41),(J,2.41),(E,3.41),(B,4.41); j-(L,0),(I,1),(D,2),(E,3),(F,4).
[0133] Alternatively, if the current search time reaches the preset search time threshold, conflict-free path planning for multiple agents fails.
[0134] The above CCBS multi-agent path planning method based on heuristic strategy first constructs an undirected weighted graph and sets the corresponding starting points of multiple agents on the vertices of the undirected weighted graph. and target point , and then initialize the parameters of each agent, and use the underlying algorithm SIPP to plan the solution of multiple agents moving from the starting point through the vertices and edges to the end point on the undirected weighted graph in the obstacle environment. Generate the initial CT node of the CT tree according to the solution and add it to the preset OPEN linked list, select the CT node with the smallest total cost in the solution of multiple agents from the OPEN linked list and remove it, check whether there is a conflict in the CT node with the smallest total cost, if there is no conflict, the search end condition is met, otherwise, classify and sort the conflicts, select the conflict with the highest priority to process, until the search end condition is met, and output the path planning results of multiple agents. This method can effectively improve the search efficiency of the CCBS algorithm and find the optimal path planning solution more quickly.
[0135] The above is a detailed introduction to the CCBS multi-agent path planning method based on heuristic strategy provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the core idea of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, the present invention can also be improved and modified, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A CCBS multi-agent path planning method based on heuristic strategy, characterized in that: The method comprises the following steps: S1. Construct an undirected weighted graph, which includes multiple vertices and edges between vertices. Set the corresponding starting points of multiple agents on the vertices of the undirected weighted graph. and target point ; S2. Initialize the parameters of each agent, use the underlying algorithm SIPP to plan the initial solution for multiple agents to move from the starting point through the vertices and edges to the end point on the undirected weighted graph in the obstacle environment, and generate the initial CT node of the CT tree according to the initial solution; S3, adding the initial CT node to the preset OPEN linked list, when the OPEN linked list is not empty, selecting the CT node with the smallest total cost in the solutions of multiple agents from the OPEN linked list and removing it, checking whether there is a conflict in the CT node with the smallest total cost, if no conflict occurs, executing step S6, otherwise, if there is a conflict, executing step S4; S4. Classify all conflicts using the PC algorithm to obtain classified conflicts, where the classified conflicts include cardinality conflicts, set priorities for the classified conflicts and sort them according to the priorities to obtain sorted conflicts; S5, select the conflict with the highest priority from the sorted conflicts. If the conflict with the highest priority is a cardinality conflict, add constraints to the two agents corresponding to the conflict and generate two child nodes. Insert the two generated child nodes into the OPEN linked list, and determine whether the current conflict search time reaches the preset time threshold. If not, repeat steps S3 to S5 and perform the next round of search. Otherwise, if the preset time threshold is reached, execute step S6. S6. When the search end condition is met, the path planning results of multiple agents are output.
2. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 1, characterized in that: In S2, the initial CT nodes of the CT tree are generated according to the initial solution. The CT nodes specifically include the following: the total cost of the solution, the constraints imposed on the agent, the solution that meets the constraints, and the conflicts caused by the solution. The conflicts of the solution can be determined based on the preset conflict generation conditions.
3. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 2, characterized in that: The constraints imposed on the agent can be specifically expressed as: ; In the formula, Indicates constraints, Representing an Agent Actions performed, including moving and waiting, represents the time interval of the constraint, represents the constraint start time, represents the constraint termination time, Indicates the time interval Internally banned agents Execute an action .
4. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 3, characterized in that: The conflicts generated by the solution can be specifically expressed as: ; In the formula, Indicates conflicts, including vertex conflicts or edge conflicts. Representing an Agent Actions performed, Representing an Agent exist Always perform actions With Agent exist Always perform actions A vertex or edge conflict has occurred.
5. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 4, characterized in that: The preset conflict generation conditions are as follows: If two agents are at the same vertex in an undirected weighted graph at the same time, the two agents are in conflict; and / or: If two agents move towards each other along the same edge in an undirected weighted graph in the same time period, then the two agents are in conflict.
6. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 5, characterized in that: In S4, the PC algorithm is used to classify all conflicts and obtain the classified conflicts. The specific process is as follows: S41, randomly selecting one conflict from all conflicts, adding constraints to the two agents corresponding to the selected conflict, splitting the CT node with the minimum total cost, and obtaining a first child node and a second child node; S42, calculating the total cost difference between the CT node with the minimum total cost and the first child node and the second child node and ; S43, based on the total cost difference and Classify the selected conflict: If and , then the selected conflict is the cardinality conflict ,like and or and , then the selected conflict is a semi-cardinality conflict ,like and , then the selected conflict is a non-cardinality conflict ; S44. Select another conflict from all conflicts until all conflicts are selected, and repeat steps S41 to S43 to obtain classified conflicts.
7. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 6, characterized in that: In S4, priorities are set for the classified conflicts and sorted according to the priorities to obtain sorted conflicts. The specific process is as follows: S45, setting priorities for the classified conflicts, where the priorities of different types of conflicts are, from high to low, cardinality conflicts, semi-cardinality conflicts, and non-cardinality conflicts; S46, check the number of each type of conflict, if the number of a certain type of conflict is more than one, execute step S47, otherwise, if the number of each type of conflict is only one, execute step S48; S47. Calculate the cost impact of multiple conflicts in a certain type of conflict , according to cost impact The size of the conflict arranges the priorities of multiple conflicts in this type from high to low; S48, end the priority sorting, and obtain the sorted conflicts.
8. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 7, characterized in that: If the conflict with the highest priority is not a cardinality conflict, S5 adds constraints to the two agents corresponding to the conflict and generates two child nodes, and also includes: The BP algorithm is used to peek at whether there is a beneficial solution in the solutions of the two generated child nodes. If there is a beneficial solution, the beneficial solution is used to update the solution in the CT node with the smallest total cost, and the CT node with the smallest total cost with the updated solution is inserted into the OPEN linked list. Otherwise, there is no beneficial solution, and the two generated child nodes are inserted into the OPEN linked list.
9. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 8, characterized in that: The BP algorithm is used to peek at the solutions in the two generated child nodes to see if they are beneficial solutions, including the following: S51, randomly select one child node from the two generated child nodes, and calculate the total cost and the number of conflicts of the selected child node; S52, comparing the total cost and the number of conflicts of the CT node with the minimum total cost with the total cost and the number of conflicts of the selected child nodes respectively; S53, if the preset condition is met, the solution corresponding to the selected child node is a beneficial solution, and step S54 is executed; if the preset condition is not met, another child node is selected from the two generated child nodes, and steps S51 to S53 are repeated. If the other child node meets the preset condition, step S54 is executed; if the other child node does not meet the preset condition, step S55 is executed; wherein the preset condition is: the total cost of the CT node with the smallest total cost is equal to the total cost of the selected child node, and the number of conflicts of the CT node with the smallest total cost is less than the number of conflicts of the selected child node, and does not contain conflicts corresponding to the two generated child nodes; S54: There is a beneficial solution among the solutions of the two generated child nodes, and the peeking ends; S55. There is no beneficial solution among the solutions of the two generated child nodes, and the peeking ends.
10. The CCBS multi-agent path planning method based on heuristic strategy as claimed in claim 9, characterized in that: S6 specifically includes: There is no conflict among the CT nodes with the minimum total cost, and the conflict-free path planning of multiple agents is output; or, The current search time reaches the preset search time threshold, and conflict-free path planning for multiple agents fails.
Citation Information
Patent Citations
Multi-robot path planning method based on conflict search and speed obstacle
CN115268448A
Multi-agent optimal task allocation and planning method, device and system based on base reachable graph
CN117516575A