A robot-task assignment method based on km algorithm

By transforming the robot-task assignment problem into a bipartite graph optimal matching problem and using the KM algorithm to update the vertex labels, the efficiency and accuracy issues of task assignment in multi-robot systems are solved, achieving efficient task assignment on dense graphs.

CN117271080BActive Publication Date: 2026-07-03BEIJING INST OF COMP TECH & APPL
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING INST OF COMP TECH & APPL
Filing Date
2023-09-21
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently solve task allocation problems in multi-robot systems, especially in small systems where optimal solutions cannot be found. Furthermore, existing methods are computationally expensive or have poor scalability.

Method used

We adopt the Kuh_Munkras (KM) algorithm to transform the robot-task assignment problem into a bipartite graph optimal matching problem. We use the Hungarian algorithm to find the maximum matching and update the vertex values ​​as necessary to find the optimal matching.

Benefits of technology

This paper presents an easy-to-implement and efficient robot task allocation method that demonstrates superior efficiency compared to other algorithms on dense graphs and is suitable for task allocation in multi-robot systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271080B_ABST
    Figure CN117271080B_ABST
Patent Text Reader

Abstract

This invention relates to a robot-task allocation method based on the KM algorithm, belonging to the field of robotics. The invention transforms the integer programming problem into a bipartite graph optimal matching problem, solves the maximum matching problem in the bipartite graph using the Hungarian algorithm, and then uses the KM algorithm to solve the optimal matching problem. This invention provides an easy-to-implement, efficient, and effective robot task allocation method. This algorithm is more efficient than other algorithms on dense graphs and can be applied to multi-robot systems performing tasks such as patrol and rescue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of robotics, specifically relating to a robot-task allocation method based on the KM algorithm. Background Technology

[0002] In the field of robotics, task allocation applications include search and rescue missions, patrol operations, attacks or surveillance, and physical disaster management. How to intelligently achieve multi-task allocation across multiple robot systems is a hot topic in the field of unmanned equipment.

[0003] The main techniques used to solve task allocation problems in multi-robot systems include auction (or market)-based methods, game theory-based methods, optimization-based methods (heuristic algorithms, Hungarian algorithms, etc.), and machine learning techniques. Depending on the technique used, optimal or almost always approximate solutions can be found, and various methods exhibit varying degrees of scalability, complexity, and adaptability. Auction-based techniques typically have high computational costs, making them unsuitable for large-scale systems. Furthermore, deterministic optimization techniques have high computational costs and low scalability in medium to large systems, but they are suitable for small systems (e.g., systems with only four robots) and exhibit very good efficiency in small systems. Game theory methods have very low costs, making them ideal for providing fast solutions with moderate to good efficiency; these methods can also be used in large systems due to their excellent scalability. Heuristic and learning methods are moderately costly, efficient, and scalable, and can be used in medium-sized environments, and sometimes even larger ones, depending on the specific problem. Machine learning techniques are particularly prominent in dynamic task allocation and dynamic environments, but most models remain in academic laboratory settings and are currently difficult to implement in real-world scenarios. Given that some application scenarios are small systems (less than 10 robots), deterministic optimization methods (such as the Hungarian algorithm) have high computational efficiency and can find the optimal solution to the problem. However, the Hungarian algorithm will not be able to find the optimal solution when a perfect match cannot be found.

[0004] This invention employs a robot-task allocation method based on the Kuh_Munkras (KM) algorithm. Compared with traditional enumeration methods and heuristic algorithms, the KM algorithm has significant advantages in both accuracy and speed, and can better meet the real-time and accuracy requirements of the robotics field. Summary of the Invention

[0005] (a) Technical problems to be solved

[0006] The technical problem to be solved by this invention is how to provide a robot-task allocation method based on the KM algorithm to solve the task allocation problem in a multi-robot system.

[0007] (II) Technical Solution

[0008] To address the aforementioned technical problems, this invention proposes a robot-task allocation method based on the KM algorithm, which includes the following steps:

[0009] S1. First, initialize the node index values ​​of the robot set and the task target set, where v1 is the task set to be assigned and v2 is the robot set; let the index of v1 be lx[i] and the index of v2 be ly[j], in order to satisfy The premise of lx[i]+ly[j]≥W[i,j] is that lx[i]=max 1≤j≤n {W[i,j]},ly[j]=0, W[i,j] is the edge<i,j> The weights;

[0010] S2. Then, find the subgraph formed by all nodes and edges that satisfy lx[i]+ly[j]=W[i,j] in the bipartite graph, i.e. the equality subgraph.

[0011] S3. Use the Hungarian algorithm to search for the maximum matching in the equality subgraph and determine whether the maximum matching is a complete matching. If it is, output the complete matching, which is the best matching, and end the process; otherwise, modify the feasible vertex values, continue to search for equality subgraphs, and repeat the above steps.

[0012] (III) Beneficial Effects

[0013] This invention proposes a robot-task allocation method based on the KM algorithm. The advantages of this invention compared to existing technologies are:

[0014] This invention provides an easy-to-implement, efficient, and effective robot task allocation method. This algorithm is more efficient than other algorithms on dense graphs and can be applied to multi-robot systems to perform tasks such as patrol and rescue. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the execution flow of the KM algorithm for task allocation in this invention;

[0016] Figure 2 This is the first step of the KM algorithm;

[0017] Figure 3 This is the second step of the KM algorithm;

[0018] Figure 4 This is the third step of the KM algorithm;

[0019] Figure 5 This represents the final matching result of the KM algorithm. Detailed Implementation

[0020] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.

[0021] This invention relates to robot-task assignment methods, and in particular to a robot-task assignment method based on the Kuh_Munkras (KM) algorithm.

[0022] The purpose of this invention is to provide an efficient and accurate robot task allocation method, enabling the robot system to autonomously allocate task objectives based on its own payload, ensuring that the total time required to complete all tasks is minimized.

[0023] This invention proposes a robot task allocation method based on the KM algorithm, which transforms the integer programming problem into a bipartite graph optimal matching problem, solves the bipartite graph maximum matching problem using the Hungarian algorithm, and then uses the KM algorithm to solve the optimal matching problem.

[0024] The robot-task assignment problem can be described as follows: n robots are assigned n tasks, each robot can only be assigned one task, each task can only be assigned to one robot, and each robot needs a specific amount of time to perform a task. The question is how to assign tasks to minimize the total time cost.

[0025] Let x be the number of times x is used. ij To determine whether the j-th task is completed by the i-th robot, i.e., when x... ij =0 indicates that the j-th task is not completed by the i-th robot, when x ij When = 1, it means that the j-th task is completed by the i-th robot. Therefore, the integer programming model for the task assignment problem is:

[0026]

[0027]

[0028]

[0029] x ij ={0,1},i,j=1,2,...,n

[0030] Let C = (c ij ),X=(x ij If the matrix C is called the value coefficient matrix of the task allocation problem, then X is called the matching matrix of the solution to the allocation problem.

[0031] The robot-task assignment problem can be further transformed into a bipartite graph optimal matching problem.

[0032] A bipartite graph is a special type of graph structure. Assume graph G = ...<V,E> It is a bipartite graph whose vertices can be partitioned into two subsets v1 and v2 that satisfy the following condition: Take any edge in E...<i,j> , v1 and v2 are two disjoint sets. In the robot task assignment problem, v1 can be viewed as the set of tasks to be assigned, and v2 can be viewed as the set of robots.

[0033] The matching problem in bipartite graphs is frequently used in the allocation of limited resources to ensure that a given resource is allocated to exactly one user. The matching problem in a bipartite graph can be viewed as a subgraph g of a bipartite graph that satisfies the following condition: in this subgraph g, there are no two edges attached to the same vertex.

[0034] In bipartite graph matching, there are two common matching objectives: maximum matching, which aims to pair as many vertices in v1 and v2 as possible; and optimal matching, which is used in weighted bipartite graphs where every vertex in v1 is paired with at least one vertex in v2, maximizing the sum of the edge weights. Assuming that in task assignment, the weight represents the reciprocal of the time it takes for a robot to perform a task, we can find the optimal matching in the bipartite graph to assign each task to a specific robot while minimizing the total time to complete all tasks.

[0035] The Hungarian algorithm is an easy-to-understand and easy-to-use algorithm that can solve the maximum matching problem in a bipartite graph. Its core idea is to find augmenting paths. Assuming that ei is already assigned an edge and ci is an unassigned edge, if there exists a path similar to c0~e0~c1~e1~...~cm, start searching from the unassigned edges, alternating between assigned and unassigned edges along the way, and finally ending with an unassigned edge. Such a path is called an augmenting path.

[0036] The calculation process of the Hungarian algorithm is as follows:

[0037] S11. Initialize the set of matched edges. That is, all edges are non-matching edges;

[0038] S12. Find an augmenting path, invert the matching state of all edges on the path, and obtain a larger matching S'.

[0039] S13. Repeat step S12 until there are no augmenting paths in the graph.

[0040] The algorithm attempts to find a matching v2 node y for each v1 set node x. For y to match x, one of the following two conditions must be met:

[0041] (2) y itself is a non-matching point: At this time, the undirected edge (x,y) itself is a non-matching point, forming an augmenting path of length 1.

[0042] (2) y has already matched one of the points x' in v1, but starting from x', another point y' in v2 can be found to match it: at this time, the path x~y~x'~y' is an augmenting path.

[0043] In the program implementation, a depth-first search framework is used to recursively search for an augmenting path starting from x. If a path is found, the matching state of the path is inverted during the depth-first search backtracking. Additionally, a global boolean array can be used to mark the node's visit status, avoiding redundant searches.

[0044] The Hungarian algorithm described above found the maximum matching. Next, the KM algorithm is used to find the optimal matching.

[0045] In the KM algorithm, the concept of perfect matching is involved. Perfect matching means that all points in v1 are matched with a point in v2, that is, the points of one side are completely matched.

[0046] Let M be a complete matching of a weighted bipartite graph. Given a vertex label for each vertex, let the vertex label in v1 be lx[i] and the vertex label in v2 be ly[j]. If for any<i,j> For any ∈ M, lx[i] + ly[j] = W[i,j], then M is an optimal matching.

[0047] When the KM algorithm finds an optimal matching, it first uses the Hungarian algorithm for matching. If a perfect matching satisfying the condition lx[i] + ly[j] = W[i,j] required by the theorem can be found, then the optimal matching is found. However, during the search, such a perfect matching may not be found, and only the current maximum matching can be found. If the maximum matching is not the optimal matching, the vertex indices need to be updated so that the process of finding the optimal matching can continue. Assume that the point already traversed in v1 is p, and the point traversed in v2 is q. Let s∈p, t∈(v2-q), r∈q, calculate the increment d = min(lx[s] + ly[t] - W[s,t]), then update the vertex indices lx[s] - d, ly[r] + d, and then use the Hungarian algorithm for matching again. Repeat the above process until the optimal matching is found.

[0048] Example 1:

[0049] This invention is a robot-task allocation method based on the Kuh_Munkras (KM) algorithm.

[0050] Figure 1 This is a schematic diagram of the robot-task allocation method based on the Kuh_Munkras (KM) algorithm of the present invention.

[0051] S1. First, initialize the node index values ​​of the robot set and the task target set, where v1 is the task set to be assigned and v2 is the robot set; let the index of v1 be lx[i] and the index of v2 be ly[j], in order to satisfy The premise of lx[i]+ly[j]≥W[i,j] is that lx[i] is generally assigned the value of max. 1≤j≤n {W[i,j]},ly[j]=0, W[i,j] is the edge<i,j> The weights;

[0052] S2. Then, find the subgraph formed by all nodes in the bipartite graph and the edges that satisfy lx[i] + ly[j] = W[i,j], i.e., the equality subgraph.

[0053] S3. Use the Hungarian algorithm to search for the maximum matching in the equality subgraph and determine whether the maximum matching is a complete matching. If it is, output the complete matching, which is the best matching, and end the process; otherwise, modify the feasible vertex values, continue to search for equality subgraphs, and repeat the above steps.

[0054] A robot-task allocation method based on the Kuh_Munkras (KM) algorithm, comprising the following steps:

[0055] 1) Mathematical description of the robot task allocation problem.

[0056] Assign n tasks to n robots. Each robot can only be assigned one task, and each task can only be assigned to one robot. Each robot needs a specific amount of time to perform a task. How should the tasks be assigned to ensure that the total time cost is minimized?

[0057] Let x be the number of times x is used. ij To determine whether the j-th task is completed by the i-th robot, i.e., when x... ij =0 indicates that the j-th task is not completed by the i-th robot, when x ij When = 1, it means that the j-th task is completed by the i-th robot. Therefore, the integer programming model for the task assignment problem is:

[0058]

[0059]

[0060]

[0061] x ij ={0,1},i,j=1,2,...,n

[0062] Let C = (c ij ),X=(x ijIf the matrix C is called the value coefficient matrix of the task allocation problem, then X is called the matching matrix of the solution to the allocation problem.

[0063] 2) Transform the planning problem into a bipartite graph best matching problem.

[0064] A bipartite graph is a special type of graph structure. Assume graph G = ...<V,E> It is a bipartite graph whose vertices can be partitioned into two subsets v1 and v2 that satisfy the following condition: Take any edge in E...<i,j> , v1 and v2 are two disjoint sets. In the robot task assignment problem, v1 can be viewed as the set of tasks to be assigned, and v2 can be viewed as the set of robots.

[0065] The matching problem in bipartite graphs is frequently used in the allocation of limited resources to ensure that a given resource is allocated to exactly one user. A matching problem in a bipartite graph can be viewed as a subgraph of the bipartite graph that satisfies the following condition: in this subgraph g, there are no two edges that are attached to the same vertex.

[0066] In bipartite graph matching, there are two common matching objectives: maximum matching, which aims to pair as many vertices in v1 and v2 as possible; and optimal matching, which is used in weighted bipartite graphs where every vertex in v1 is paired with at least one vertex in v2, maximizing the sum of the edge weights. Assuming that in task assignment, the weight represents the reciprocal of the time it takes for a robot to perform a task, we can find the optimal matching in the bipartite graph to assign each task to a specific robot while minimizing the total time to complete all tasks.

[0067] 3) The Hungarian algorithm is used to solve the maximum matching problem in a bipartite graph. Its core idea is to find augmenting paths.

[0068] The calculation process of the Hungarian algorithm is as follows:

[0069] 1. Initialize the set of matched edges. That is, all edges are non-matching edges;

[0070] 2. Find an augmenting path, invert the matching state of all edges on the path, and obtain a larger matching S';

[0071] 3. Repeat step 2 until there are no augmenting paths in the graph.

[0072] The algorithm attempts to find a matching v2 node y for each v1 set node x. For y to match x, one of the following two conditions must be met:

[0073] (1) y itself is a non-matching point: At this time, the undirected edge (x,y) itself is a non-matching point, forming an augmenting path of length 1.

[0074] (2) y has already matched one of the points x' in v1, but starting from x', another point y' in v2 can be found to match it: at this time, the path x~y~x'~y' is an augmenting path.

[0075] 4) Use the KM algorithm to find the best match.

[0076] In the KM algorithm, the concept of perfect matching is involved. Perfect matching means that all points in v1 are matched with a point in v2, that is, the points of one side are completely matched.

[0077] Let M be a perfect matching of a weighted bipartite graph. Given a vertex label for each vertex, let the vertex label in v1 be lx[i] and in v2 be ly[j]. If all edges<i,j> For all edges ∈ M, lx[i] + ly[j] >= W[i,j], where W[i,j] is an edge.<i,j> The weights, if for any<i,j> For any ∈ M, lx[i] + ly[j] = W[i,j], then M is an optimal matching.

[0078] When the KM algorithm finds an optimal matching, it first uses the Hungarian algorithm for matching. If a perfect matching satisfying the condition lx[i] + ly[j] = W[i,j] required by the theorem can be found, then the optimal matching is found. However, during the search, it may not be possible to find such a perfect matching, and only the current maximum matching can be found. At this time, the vertex indices need to be updated so that the process of finding the optimal matching can continue. Suppose that the point already traversed in v1 is p, and the point traversed in v2 is q. Let s∈p, t∈(v2-q), r∈q, calculate the increment d = min(lx[s] + ly[t] - W[s,t]), then update the vertex indices lx[s] - d, ly[r] + d, and then use the Hungarian algorithm for matching again. Repeat the above process until the optimal matching is found.

[0079] Example 2:

[0080] Below is a simple example illustrating the KM algorithm process:

[0081] Suppose there are 4 robots and 4 tasks. The efficiency of each robot in completing each task (i.e., the weight matrix in the KM algorithm) is shown in Table 1.

[0082] Table 1 Weight Matrix W

[0083]

[0084] (1) The first step of exploration is to assign a task to robot x1: Initialize the top indices lx = [3,4,6,7] and ly = [0,0,0,0] according to the KM algorithm. Since lx[1] + ly[2] = W[1,2], assign y2 to x1. Figure 2 As shown.

[0085] (2) Explore the second step, assign a task to robot x2: Since lx[2]+ly[2]=W[2,2], and task y2 has already been assigned, find the augmenting path x2~y2~x1~y4 (lx[1]+ly[4]=W[1,4]), therefore x1 matches y4, and x2 matches y2. Figure 3 As shown.

[0086] (3) Explore the third step and assign tasks to robot x3: Since lx[3]+ly[2]=W[3,2], and task y2 has already been assigned, find the augmenting path x3~y2~x2~y3 (lx[2]+ly[3]=W[2,3]), therefore x1 matches y4, x2 matches y3, and x3 matches y2. Figure 4 As shown.

[0087] (4) Exploring the fourth step, assigning tasks to robot x4: There is no augmenting path in the graph. The maximum matching that the Hungarian algorithm can find has been reached, but the optimal matching has not yet been completed. Update the vertex indices according to the KM algorithm. First, solve for d. At this time, the points traversed in v1 are {x1,x2,x3,x4}, and the points traversed in v2 are {y2,y3,y4}. Thus, we can obtain d = min s∈{1,2,3,4},t∈{1} (lx[s]+ly[t]-W[s,t])=1, updated as follows:

[0088] lx=[2,3,5,6], ly=[0,1,1,1].

[0089] (5) In the fifth step of exploration, the best match was found again based on the new top-level value. It was discovered that it was still impossible to assign a task to robot x4, so the top-level value needed to be updated again...

[0090] Finally, when the top index values ​​are lx=[-4,-3,-1,0] and ly=[0,7,7,7], since lx[1]+ly[4]=W[1,4], lx[2]+ly[3]=W[2,3], lx[3]+ly[2]=W[3,2], and lx[4]+ly[1]=W[4,1], we can find Figure 5 The optimal match shown is: x1 matches y4, x2 matches y3, x3 matches y2, and x4 matches y1. Figure 5 As shown.

[0091] The advantages of this invention compared to the prior art are:

[0092] This invention provides an easy-to-implement, efficient, and effective robot task allocation method. This algorithm is more efficient than other algorithms on dense graphs and can be applied to multi-robot systems to perform tasks such as patrol and rescue.

[0093] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A robot-task allocation method based on the KM algorithm, characterized in that, The method includes the following steps: S1. First, initialize the node index values ​​of the robot set and the task target set, where v1 is the task set to be assigned and v2 is the robot set; let the index of v1 be lx[i] and the index of v2 be ly[j], in order to satisfy The premise of lx[i]+ly[j]≥W[i,j] is that lx[i]=max 1≤j≤n {W[i,j]},ly[j]=0, W[i,j] is the edge<i,j> The weights; S2. Then, find the subgraph formed by all nodes and edges that satisfy lx[i]+ly[j]=W[i,j] in the bipartite graph, i.e. the equality subgraph. S3. Use the Hungarian algorithm to search for the maximum matching in the equality subgraph and determine whether the maximum matching is a complete matching. If it is, output the complete matching, which is the best matching, and end the process; otherwise, modify the feasible vertex values, continue to search for equality subgraphs, and repeat the above steps.

2. The robot-task allocation method based on the KM algorithm as described in claim 1, characterized in that, The robot-task allocation problem is described as follows: n robots are assigned n tasks. Each robot can only be assigned one task, and each task can only be assigned to one robot. Each robot needs a specific amount of time to perform a task. The question is how to allocate tasks to ensure that the total time cost is minimized.

3. The robot-task allocation method based on the KM algorithm as described in claim 2, characterized in that, Let x be the number of times x is used. ij To determine whether the j-th task is completed by the i-th robot, i.e., when x... ij =0 indicates that the j-th task is not completed by the i-th robot, when x ij When = 1, it means that the j-th task is completed by the i-th robot. Therefore, the integer programming model for the task assignment problem is: x ij ={0,1},i,j=1,2,...,n Let C = (c ij ), X = (x ij If the matrix C is called the value coefficient matrix of the task allocation problem, and X is called the matching matrix of the solution to the allocation problem, then the robot-task allocation problem is transformed into a bipartite graph optimal matching problem.

4. The robot-task allocation method based on the KM algorithm as described in claim 3, characterized in that, The bipartite matching problem is to find a subgraph g of a bipartite graph that satisfies the following condition: in this subgraph g, there are no two edges attached to the same vertex.

5. The robot-task allocation method based on the KM algorithm as described in claim 4, characterized in that, Let M be a complete matching of a weighted bipartite graph. Given a vertex label for each vertex, let the vertex label in v1 be lx[i] and the vertex label in v2 be ly[j]. If for any<i,j> For any ∈ M, lx[i] + ly[j] = W[i,j], then M is an optimal matching.

6. The robot-task allocation method based on the KM algorithm as described in claim 5, characterized in that, Maximum matching means pairing as many points in v1 and v2 as possible; optimal matching means that in a weighted bipartite graph, every point in v1 is paired with a point in v2 such that the sum of the weights of these edges is maximized.

7. The robot-task allocation method based on the KM algorithm as described in claim 6, characterized in that, In task allocation, the weight represents the reciprocal of the time it takes for a robot to perform a certain task. By finding the best matching of the bipartite graph, each task is assigned to a specific robot, and the total time to complete all tasks is minimized.

8. The robot-task allocation method based on the KM algorithm as described in any one of claims 1-7, characterized in that, The calculation process of the Hungarian algorithm in step S3 is as follows: S11. Initialize the set of matched edges. That is, all edges are non-matching edges; S12. Find an augmenting path, invert the matching state of all edges on the path, and obtain a larger matching S'. S13. Repeat step S12 until there are no augmenting paths in the graph.

9. The robot-task allocation method based on the KM algorithm as described in claim 8, characterized in that, The Hungarian algorithm attempts to find a matching node y in the v2 set for each node x in the v1 set. For y to match x, one of the following two conditions must be met: (1) y itself is a non-matching point: At this time, the undirected edge (x,y) itself is a non-matching point, and it forms an augmenting path of length 1 by itself; (2) y has already matched one of the points x' in v1, but starting from x', another point y' in v2 can be found to match it: at this time, the path x~y~x'~y' is an augmenting path; In the program implementation, a depth-first search framework is used to recursively search for augmenting paths starting from x; if a path is found, the matching state of the path is inverted during the depth-first search backtracking. The Hungarian algorithm described above found the maximum matching.

10. The robot-task allocation method based on the KM algorithm as described in claim 9, characterized in that, In step S3, modifying the feasible top-value includes: assuming that the point already traversed in v1 is p and the point traversed in v2 is q, take s∈p, t∈(v2-q), r∈q, calculate the increment d=min(lx[s]+ly[t]-W[s,t]), then update the top-value lx[s]-d, ly[r]+d, and then use the Hungarian algorithm to perform matching, repeat the above process, and finally find the best match.

Citation Information

Patent Citations

  • AGV automatic scheduling method based on graph theory KM coupling algorithm

    CN108470238A

  • Multi-unmanned aerial vehicle coordination target allocation method

    CN110134007A