Multi-robot assignment method based on Hungary algorithm

By combining K-Means++ clustering and the Hungarian algorithm, the cost matrix is ​​constructed and deformed, which solves the problem that the number of robots is less than the number of task points in multi-robot task allocation, improves the efficiency and scientificity of task allocation, and simplifies the calculation process. .

CN118569784APending Publication Date: 2024-08-30SHENYANG INST OF AUTOMATION - CHINESE ACAD OF SCI
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310172437.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The traditional Hungarian algorithm cannot be directly applied to scenarios where the number of robots is less than the number of target task points, and the K-Means clustering algorithm has local optimality problems, large amounts of calculation, and low efficiency.

Method used

Combining the K-Means++ clustering algorithm and the Hungarian algorithm, multi-robot task allocation is achieved by constructing and deforming the cost matrix, which is suitable for non-balanced assignment problems.

Benefits of technology

It improves the efficiency and scientificity of task allocation, simplifies the calculation speed, and reduces the possibility of local optimality, making the Hungarian algorithm applicable when there are more target task points than the number of robots.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118569784A
    Figure CN118569784A
Patent Text Reader

Abstract

The invention relates to a multi-robot assignment method based on a Hungary algorithm, and the method comprises the steps: carrying out the modeling of a multi-robot operation scene, and obtaining the distance between each robot and each target task point; clustering the target task points by applying a K-Means + + algorithm according to the number of current idle robots; and robot task allocation is completed by using a Hungary algorithm. On one hand, compared with a K-Means algorithm, the adopted K-Means + + algorithm is higher in convergence speed, not prone to falling into local optimum and higher in calculation efficiency; on the other hand, the common unbalanced assignment problem in the real task can be solved by adopting the assignment method combining the K-Means + + clustering and the Hungary algorithm, the application range of the Hungary algorithm is expanded, and the requirements of the actual operation scene are better met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of multi-robot task scheduling, and in particular relates to a multi-robot assignment method based on the Hungarian algorithm and combined with K-Means++ clustering. Background Art

[0002] With the continuous development of robot intelligence, robots are increasingly used in logistics distribution, industrial production and other fields. The task environment faced by robots is becoming more and more complex. Traditional robots operating alone often cannot meet the efficiency requirements of large-scale parallel operations. Therefore, the collaborative application of multiple robots is becoming more and more extensive. In real multi-robot application scenarios, there are often multiple task target points. The assignment problem is the task allocation problem of multiple robots. The research focus of this problem is to assign tasks of different target points to idle robots through a reasonable assignment algorithm to improve the utilization rate of robots and the efficiency of task completion.

[0003] Task allocation algorithms can be divided into two methods: centralized and distributed. Centralized algorithms rely on a central agent to achieve the best allocation by considering the elements in the system. The principle of distributed algorithms is that multiple independent agents interact to achieve global goals while trying to optimize local goals within their scope. The Hungarian algorithm is a commonly used algorithm in centralized methods. The algorithm generates the optimal match based on the cost matrix, has the ability to quickly solve task allocation, and shows good efficiency.

[0004] The Hungarian algorithm achieves the minimum matching of a bipartite graph by finding an augmenting path. The definition of a bipartite graph is: for an undirected graph G = (V, E), if there are two sets X and Y such that X∪Y=V, And for every edge e={x,y}, x∈X,y∈Y, then G is called a bipartite graph. If any x in X and any y in Y have one and only one edge e∈E, such that e={x,y}, then G is called a complete bipartite graph. The Hungarian algorithm achieves optimal matching by performing a minimum matching on a complete bipartite graph, but the algorithm can only solve the balanced assignment problem, which requires that the number of robots is equal to the number of target task points. In actual work scenarios, the number of target task points is often greater than the number of robots, so the Hungarian algorithm cannot be directly applied.

[0005] The K-Means clustering algorithm is a representative of unsupervised clustering algorithms. The main idea is to cluster multiple sample data sets into K clusters and assign each sample to the set closest to its cluster. The farther the sample value is from the center value, the greater the deviation of the value from the average value. However, due to the randomness of the selection of the initial cluster center of the K-Means algorithm, it sometimes falls into the local optimum or the calculation amount is huge due to too many iterations, which is inefficient. The K-Means++ algorithm optimizes this shortcoming of the K-Means algorithm. When selecting the initial cluster center, it makes the distance between the center points as far as possible, which greatly speeds up the convergence of the algorithm and significantly reduces the possibility of falling into the local optimum. Summary of the invention

[0006] The technical problem solved by the present invention is to provide a multi-robot assignment method combining K-Means++ clustering with the Hungarian algorithm, which can be applied to work scenarios where the number of robots is less than the number of target task points. The present invention has loose application conditions, small calculation amount, high efficiency and strong practicality for solving the multi-robot task allocation problem.

[0007] The technical solution adopted by the present invention to achieve the above-mentioned purpose is:

[0008] A multi-robot assignment method based on the Hungarian algorithm comprises the following steps:

[0009] 1) Construct a multi-robot system model based on the positions of the robots and target task points;

[0010] 2) Use K-Means++ algorithm to cluster the target task points;

[0011] 3) Establish a cost matrix based on the distance between the robot and the target task point;

[0012] 4) Using the Hungarian algorithm to transform the cost matrix;

[0013] 5) Obtain the allocation matrix based on the transformed cost matrix to complete the robot assignment.

[0014] The step 1) is specifically as follows:

[0015] Assume that there are m idle robots and n target task points in the multi-robot system. Establish a rectangular coordinate system to obtain the coordinates R of each robot. i (x i ,y i ) and the coordinates of each target task point T j (x j ,y j ), where: i = 1, 2,…, m; j = 1, 2,…, n.

[0016] The step 2) comprises the following steps:

[0017] 2.1) Randomly select a target task point T k The position of is taken as the initial cluster center, and the Euclidean distance D between each other target task point and the initial cluster center is calculated. jk , where k = 1, 2, ..., n;

[0018] 2.2) Use the roulette wheel selection method to select m cluster centers;

[0019] 2.3) Based on m cluster centers, the target task points are clustered using the traditional K-Means algorithm until the cluster center coincides with the centroid of the cluster.

[0020] The step 2.2) comprises the following steps:

[0021] 2.2.1) Calculate the nearest cluster center T between each target task point and the existing k The probability P of the distance accounting for the sum of the distances j :

[0022]

[0023] 2.2.2) Calculate the cumulative probability Q j :

[0024]

[0025] 2.2.3) Randomly generate a random number r∈[0,1], then the next cluster center is selected as T l ,in:

[0026]

[0027] 2.2.4) Repeat steps 2.2.1) to 2.2.3) until m cluster centers are selected.

[0028] The step 3) comprises the following steps:

[0029] 3.1) Taking the Euclidean distance between the centroid of each cluster and each robot as the cost, calculate the Euclidean distance c between each robot and each target task point ij :

[0030]

[0031] 3.2) Based on the Euclidean distance, construct the cost matrix C:

[0032]

[0033] The step 4) comprises the following steps:

[0034] Step 4.1) Subtract the minimum number of each row of the cost matrix;

[0035] Step 4.2) Subtract the minimum number from each column of the cost matrix;

[0036] Step 4.3) Cover all "0" elements in the cost matrix with the least horizontal or vertical lines;

[0037] Step 4.4) If the number of lines is equal to the matrix order, the transformation is complete; otherwise, find the smallest element a among the elements not covered by the lines, subtract a from the elements not covered by the lines, and add a to the elements at the intersection of the lines;

[0038] Step 4.5) Repeat steps 4.3) to 4.4) until the number of lines is equal to the matrix order m.

[0039] The step 5) is specifically as follows:

[0040] Let the elements at the independent zero element positions in the transformed cost matrix be "1", and the elements at other positions be "0", and use the row and column values ​​corresponding to the element "1" as the optimal matching result between the robot and the cluster, and complete the robot assignment based on the result.

[0041] A multi-robot assignment system based on the Hungarian algorithm, including:

[0042] The model building module is used to build a multi-robot system model based on the positions of the robots and target task points;

[0043] Task point clustering module, used to cluster target task points using K-Means++ algorithm;

[0044] The cost matrix construction module is used to establish the cost matrix according to the distance between the robot and the target task point, and use the Hungarian algorithm to deform the cost matrix;

[0045] The task assignment module is used to obtain the allocation matrix according to the transformed cost matrix to complete the robot assignment.

[0046] A multi-robot assignment system based on the Hungarian algorithm comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement the multi-robot assignment method based on the Hungarian algorithm when executing the computer program.

[0047] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the multi-robot assignment method based on the Hungarian algorithm is implemented.

[0048] The present invention has the following beneficial effects and advantages:

[0049] 1. The present invention introduces cost value as a benefit parameter for measuring the robot's completion of different tasks, improves the utility evaluation mechanism in the process of the robot completing tasks, can reflect the advantages and disadvantages of the robot in completing different tasks, can take into account timeliness and energy consumption, and improves the scientificity and rationality of the task allocation results.

[0050] 2. The present invention uses the K-Means++ clustering algorithm to pre-process the target task points, simplifies the task allocation model, speeds up subsequent calculations, and transforms the unbalanced assignment problem into a balanced assignment problem, so that the Hungarian algorithm can also be applied when the number of target task points is greater than the number of idle robots.

[0051] 3. The present invention optimizes the selection method of the initial cluster center based on the K-Means clustering algorithm, accelerates the algorithm convergence speed and improves the clustering effect, and reduces the possibility of falling into the local optimum. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a flow chart of a multi-robot assignment method based on the Hungarian algorithm and combined with K-Means++ clustering of the present invention;

[0053] Figure 2 It is a flow chart of clustering target task points using K-Means++ algorithm in the present invention;

[0054] Figure 3 It is a flow chart of the present invention using the Hungarian algorithm to process the cost matrix for task allocation. DETAILED DESCRIPTION

[0055] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0056] Combination Figure 1 The present invention provides a multi-robot assignment method based on the Hungarian algorithm, comprising the following steps:

[0057] Step 1: Model the multi-robot system;

[0058] Step 2: Apply K-Means++ algorithm to cluster the target task points;

[0059] Step 3: Establish a cost matrix based on the distance between the robot and the target task point;

[0060] Step 4: Apply the Hungarian algorithm to transform the cost matrix;

[0061] Step 5: Obtain the allocation matrix based on the transformed cost matrix to complete the robot assignment.

[0062] Furthermore, in step 1, assume that there are m idle robots and n target task points in the system, and establish a rectangular coordinate system to obtain the coordinates R of each robot i (x i ,y i ) and the coordinates of each target task point T j (x j ,y j ), where: i = 1, 2,…, m; j = 1, 2,…, n.

[0063] Furthermore, step 2 applies K-Means++ algorithm to cluster the target task points, such as Figure 2 As shown, specifically:

[0064] Step 2-1: Randomly select a target task point T k The position of is taken as the initial cluster center, and the Euclidean distance D between each other target task point and the initial cluster center is calculated. jk , where k = 1, 2, ..., n;

[0065] Step 2-2: Use the roulette wheel selection method to select the next cluster center. Each target task point is closest to the existing cluster center T k The probability that the distance accounts for the sum of the distances is:

[0066]

[0067] Step 2-3, calculate the corresponding cumulative probability:

[0068]

[0069] Step 2-4: Randomly generate a random number r∈[0,1], and the next cluster center is selected as T l ,in

[0070]

[0071] Repeat steps 2-2 to 2-4 according to this rule until m cluster centers are selected;

[0072] Step 2-5: Apply the traditional K-Means algorithm to cluster the target task points until the cluster center coincides with the cluster centroid.

[0073] Furthermore, in step 3, the Euclidean distance between the centroid of each cluster and each robot is used as the cost. The Euclidean distance between each robot and each target task point is expressed as:

[0074]

[0075] Create a cost matrix:

[0076]

[0077] Furthermore, step 4 applies the Hungarian algorithm to transform the cost matrix, such as Figure 3 As shown, specifically:

[0078] Step 4-1, subtract the minimum number of each row from the matrix;

[0079] Step 4-2: Subtract the minimum number from each column of the matrix;

[0080] Step 4-3, cover all "0" elements in the matrix with the least horizontal or vertical lines;

[0081] Step 4-4, if the number of lines is equal to the matrix order, the transformation is complete; otherwise, find the smallest element a from the elements not covered by the lines, subtract a from the elements not covered by the lines, and add a to the elements at the intersection of the lines;

[0082] Step 4-5, repeat step 4-3 to step 4-4 until the number of lines is equal to the matrix order m;

[0083] Furthermore, step 5 obtains the allocation matrix based on the transformed cost matrix, specifically setting the elements at the independent zero element position to "1" and the elements at the other positions to "0". The row and column values ​​corresponding to the element "1" represent the optimal match between the robot and the cluster, thereby completing the robot assignment.

[0084] The steps 4 and 5 of the present invention are further described in detail below with reference to examples.

[0085] Example

[0086] There are 4 idle robots. After the target task points are clustered, the distances between each robot and the centroid of each cluster are shown in Table 1:

[0087] Table 1 Distance between robot and cluster centroid

[0088]

[0089] The robot assignment is completed accordingly.

[0090] The first step is to get the cost matrix:

[0091]

[0092] The second step is to subtract the minimum value of each row of the matrix to get the matrix:

[0093]

[0094] The third step is to subtract the minimum value of each column from the matrix to get the matrix:

[0095]

[0096] The fourth step is to cover all "0" elements in the matrix with the least horizontal or vertical lines:

[0097]

[0098] Step 5. Obviously, the number of lines is not equal to the matrix order, so the matrix needs to be further transformed. The smallest uncovered element is equal to 1, so each uncovered element of the matrix is ​​subtracted by 1, and each element at the intersection of the lines is added by 1, and the matrix is ​​obtained:

[0099]

[0100] Step 6: Cover all "0" elements in the matrix with the least horizontal or vertical lines, and find that the number of lines is equal to the matrix order:

[0101]

[0102] Step 7. Obviously, the second and third columns each have only one zero element c. 12 、c 33 , the fourth row has only one zero element c 41 , so choose c 24 All independent zero elements can be found. Let the elements at the independent zero element position be "1" and the elements at the other positions be "0", and we get the distribution matrix:

[0103]

[0104] In the eighth step, the assignment plan is obtained according to the allocation matrix, that is, robot R1 goes to cluster T2, robot R2 goes to cluster T4, robot R3 goes to cluster T3, and robot R4 goes to cluster T1.

[0105] The Hungarian algorithm combined with K-Means++ clustering for multi-robot assignment adopted in the present invention can effectively simplify the problem model and speed up the solution. At the same time, the introduction of the clustering algorithm improves the universality of the Hungarian algorithm and can meet the needs of actual operation scenarios.

[0106] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0107] The present application is described with reference to the method flow chart according to the embodiment of the present application. It should be understood that each process in the flow chart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flow chart. Figure 1 A device that specifies functions in a process or multiple processes.

[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A function specified in a process or multiple processes.

[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 The steps of a specified function in a process or multiple processes.

[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A multi-robot assignment method based on the Hungarian algorithm, characterized in that: The following steps are involved: 1) Construct a multi-robot system model based on the positions of the robots and target task points; 2) Use K-Means++ algorithm to cluster the target task points; 3) Establish a cost matrix based on the distance between the robot and the target task point; 4) Using the Hungarian algorithm to transform the cost matrix; 5) Obtain the allocation matrix based on the transformed cost matrix to complete the robot assignment.

2. The multi-robot assignment method based on the Hungarian algorithm according to claim 1, characterized in that: The step 1) is specifically as follows: Assume that there are m idle robots and n target task points in the multi-robot system. Establish a rectangular coordinate system to obtain the coordinates R of each robot. i (x i ,y i ) and the coordinates of each target task point T j (x j ,y j ), where: i = 1, 2,…, m; j = 1, 2,…, n.

3. The multi-robot assignment method based on the Hungarian algorithm according to claim 1, characterized in that: The step 2) comprises the following steps: 2.1) Randomly select a target task point T k The position of is taken as the initial cluster center, and the Euclidean distance D between each other target task point and the initial cluster center is calculated. jk , where k = 1, 2, ..., n; 2.2) Use the roulette wheel selection method to select m cluster centers; 2.3) Based on m cluster centers, the target task points are clustered using the traditional K-Means algorithm until the cluster center coincides with the centroid of the cluster.

4. The multi-robot assignment method based on the Hungarian algorithm according to claim 3 is characterized in that: The step 2.2) comprises the following steps: 2.2.1) Calculate the nearest cluster center T between each target task point and the existing k The probability P of the distance accounting for the sum of the distances j : 2.2.2) Calculate the cumulative probability Q j : 2.2.3) Randomly generate a random number r∈[0,1], then the next cluster center is selected as T l ,in: 2.2.4) Repeat steps 2.2.1) to 2.2.3) until m cluster centers are selected.

5. The multi-robot assignment method based on the Hungarian algorithm according to claim 1, characterized in that: The step 3) comprises the following steps: 3.1) Taking the Euclidean distance between the centroid of each cluster and each robot as the cost, calculate the Euclidean distance c between each robot and each target task point ij : 3.2) Based on the Euclidean distance, construct the cost matrix C:

6. The multi-robot assignment method based on the Hungarian algorithm according to claim 1, characterized in that: The step 4) comprises the following steps: Step 4.1) Subtract the minimum number of each row of the cost matrix; Step 4.2) Subtract the minimum number from each column of the cost matrix; Step 4.3) Cover all "0" elements in the cost matrix with the least horizontal or vertical lines; Step 4.4) If the number of lines is equal to the matrix order, the transformation is complete; otherwise, find the smallest element a among the elements not covered by the lines, subtract a from the elements not covered by the lines, and add a to the elements at the intersection of the lines; Step 4.5) Repeat steps 4.3) to 4.4) until the number of lines is equal to the matrix order m.

7. The multi-robot assignment method based on the Hungarian algorithm according to claim 1, characterized in that: The step 5) is specifically as follows: Let the elements at the independent zero element positions in the transformed cost matrix be "1", and the elements at other positions be "0", and take the row and column values ​​corresponding to the element "1" as the optimal matching result between the robot and the cluster, and complete the robot assignment based on the result.

8. A multi-robot assignment system based on the Hungarian algorithm, characterized in that: include: The model building module is used to build a multi-robot system model based on the positions of the robots and target task points; Task point clustering module, used to cluster target task points using K-Means++ algorithm; The cost matrix construction module is used to establish the cost matrix according to the distance between the robot and the target task point, and use the Hungarian algorithm to deform the cost matrix; The task assignment module is used to obtain the allocation matrix according to the transformed cost matrix to complete the robot assignment.

9. A multi-robot assignment system based on the Hungarian algorithm, characterized in that: It comprises a memory and a processor; the memory is used to store a computer program; the processor is used to implement a multi-robot assignment method based on the Hungarian algorithm as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the multi-robot assignment method based on the Hungarian algorithm as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Hierarchical target allocation method for multiple unmanned aerial vehicle formations

    CN103744290A

  • Multi-target tracking method and system based on automobile radar

    CN109581353A

  • The invention discloses a mMulti-robot task allocation method combining pre-allocation with a Hungarian algorithm

    CN109615188A

  • Task equilibrium assignment cooperative work control method for multi-robot system

    CN110861089A

  • Robot cluster task allocation method, system and device and storage medium

    CN113269424A