Double-layer task allocation algorithm for multiple unmanned cleaning ships in complex environment

Through the two-layer task allocation algorithm, combined with cluster analysis and path planning algorithm, the problem of unmanned clean ships' uneven task allocation in complex environments is solved, efficient marine garbage cleaning is achieved, and computational complexity and resource waste are reduced.

CN120355126APending Publication Date: 2025-07-22SHANGHAI MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510269862.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The task allocation algorithm of existing unmanned clean ships cannot find the optimal solution within a reasonable time in a complex environment, and is prone to falling into local optimal solutions, and unbalanced resource allocation leads to inefficient unmanned clean ships.

Method used

The two-layer task allocation algorithm is adopted, and through cluster analysis and elastic force shrinkage path planning algorithm EFCA combined with the non-dominant sorting multi-objective genetic algorithm NSGA-II, it considers load capacity and environmental constraints, plans the optimal driving path, avoids obstacles, and achieves balanced allocation of task points.

Benefits of technology

It effectively reduces the complexity of the problem, finds high-quality solution space, improves the task execution efficiency and resource utilization of unmanned clean boats, and avoids detours and imbalances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355126A_ABST
    Figure CN120355126A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a double-layer task allocation algorithm for multiple unmanned cleaning ships in a complex environment, and the algorithm comprises the steps: taking a marine garbage heap in a target sea area as a task point, and carrying out the task allocation of the unmanned cleaning ships under the load capacity constraint of the unmanned cleaning ships and the environmental constraint of the target sea area; clustering analysis is carried out on the task points according to the distance, so that the task points are distributed to each unmanned cleaning ship by taking a cluster formed after clustering analysis as a unit, and then an optimal driving path is planned for each unmanned cleaning ship by adopting an elastic force contraction path planning algorithm EFCA and a non-dominated sorting multi-target genetic algorithm NSGA-II. Therefore, the marine litter in each target sea area can be cleaned. The invention provides a brand-new double-layer task allocation method, the complexity of problem solving can be reduced by using a layered structure, and the algorithm can be effectively guided to find a high-quality solution space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computers. Specifically, it is a two - layer task allocation algorithm for multi - unmanned cleaning ships in complex environments. Background Art

[0002] Marine litter pollution has become a major global concern due to its large quantity and its impact on organisms and the ecosystem. Chassignet pointed out that 80% of marine litter comes from land, including waste discharged from landfills near the coast or riverbanks, and fishery activities; the main marine sources include shipping activities and illegal dumping. In addition to persistent solid materials (including plastics and rubbers) manufactured or processed by humans, there are also natural floating litter (including wood and algae). Harmful algal blooms have caused the death of a large number of fish and shellfish and economic losses exceeding 5.9 billion yuan. In addition, due to the toxicity, flammability, and extremely harmful characteristics to the marine environment of crude oil or chemicals leaked from shipping accidents, it may pose a huge threat to the marine environment and needs to be treated with caution. According to annual maritime transport statistics, on average, 4.63 million tons of oil leak every year, seriously affecting the marine environment, fishery resources, and the composition of ecological communities.

[0003] The Yangtze River Estuary area is the most densely populated, industrialized, port - intensive area in China and has multiple aquaculture farms. This estuary and its adjacent waters are more vulnerable to marine litter. Andrés evaluated the effectiveness and efficiency of four solutions for removing, monitoring, and managing marine litter and considered the most effective solution to be unmanned cleaning ships.

[0004] However, the existing algorithms for using unmanned cleaning ships to clean up marine litter have the following problems:

[0005] (1) The task allocation problem in complex environments often requires a large amount of computing resources. Existing algorithms may not be able to find the optimal solution within a reasonable time, especially when the number of tasks is large, resulting in the inability of unmanned cleaning ships to smoothly perform the litter - cleaning work;

[0006] (2) Some algorithms may fall into local optimal solutions and cannot find the globally optimal task allocation scheme, especially when there are multiple local optimal solutions;

[0007] (3) Existing algorithms may not be balanced enough in resource allocation, resulting in some ships being overloaded while others are idle, reducing the overall efficiency. Summary of the Invention

[0008] The present invention provides a two - layer task allocation algorithm for multi - unmanned cleaning ships in complex environments, solving the technical problems such as being unable to find the optimal solution within a reasonable time when the number of tasks is large and completing the path planning of unmanned cleaning ships.

[0009] The present invention can be implemented through the following technical solutions:

[0010] A double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments regards an ocean garbage dump in the target sea area as a task point. First, under the load capacity constraint of the unmanned cleaning ship and the environmental constraint of the target sea area, these task points are clustered based on the distance, so as to allocate these task points to each unmanned cleaning ship in units of the clusters formed after clustering analysis. Then, the Elastic Force Contraction Path Planning Algorithm (EFCA) combined with the Non-dominated Sorting Multi-objective Genetic Algorithm (NSGA-II) is used to plan the optimal travel path for each unmanned cleaning ship to complete the cleaning of ocean garbage in their respective target sea areas.

[0011] Furthermore, according to the load capacity of the unmanned cleaning ship and the garbage weight of the task point, the load capacity constraint is calculated to determine the total number of task points inside the cluster during clustering analysis;

[0012] Based on whether there are obstacles between any two task points, the environmental constraint of the target sea area is obtained to perform the division of task points inside the cluster during clustering analysis.

[0013] Furthermore, the clustering analysis is carried out according to the following steps:

[0014] Step 1: Take the two task points with the farthest distance as the clustering centers respectively. According to the load capacity constraint, screen out multiple task points closest to the clustering centers and classify them into one cluster, and a total of two clusters are divided;

[0015] Step 2: Repeat Step 1 to find the two task points with the farthest distance from the remaining task points, and then divide two more clusters, and so on until all task points complete the preliminary clustering;

[0016] Step 3: Take the average value of the two-dimensional coordinate information of all task points in each cluster as the new clustering center, calculate the distances from any task point in the current cluster to all new clustering centers respectively, and determine whether the minimum value of the distances is the distance from the task point to the new clustering center of the current cluster. If not, it is determined that both the current cluster and the cluster where the new clustering center corresponding to the minimum value of the distance is located are abnormal clusters, and these two abnormal clusters need to be optimized for clustering. Otherwise, no optimization clustering is performed, and so on to complete the optimization clustering of all clusters.

[0017] Furthermore, when performing the optimization clustering, denote the new clustering centers corresponding to the two abnormal clusters as C1' and C2' respectively, and the distances from any task point i to the new clustering centers C1' and C2' as Di1 and Di2 respectively,

[0018] Calculate the distance difference ρi = Di1 - Di2, sort all the distance differences corresponding to the task points in the two abnormal cluster classes in ascending order, and divide the task points with the top rankings into the abnormal cluster class where the clustering center C1' is located according to the new load capacity constraint, and the remaining task points are divided into the abnormal cluster class where the clustering center C2' is located.

[0019] Among them, the new load capacity constraint is set to half of the total number of task points jointly included in the two abnormal cluster classes.

[0020] Furthermore, when screening out the S task points closest to the clustering center in the preliminary clustering, if there are obstacles on the line connecting the screened task point and the corresponding clustering center, then this task point is excluded and re-screened.

[0021] Furthermore, allocate the cluster classes obtained by clustering analysis and the unmanned cleaning ships in a 1:1 ratio. For the task points within each cluster class, use the elastic force contraction path planning algorithm EFCA to plan the two-point path between any two task points, and then use the non-dominated sorting multi-objective genetic algorithm NSGA-II to calculate the Pareto front, that is, the complete path composed of these two-point paths that can cover all task points and its corresponding path length L, sailing time T, and total revenue B under the premise of meeting the target conditions, namely the shortest path length, the shortest sailing time, and the minimum total revenue.

[0022] Finally, use the following formula to calculate the score S corresponding to each Pareto solution, that is, the complete path, in the Pareto front, and select the complete path with the highest score S as the optimal driving path of the unmanned cleaning ship corresponding to the current cluster class.

[0023] S = w l ×L + w t ×T + w b ×B

[0024] w l + w t + w b = 1

[0025] Among them, w l , w t and w b are weight factors respectively.

[0026] Furthermore, allocate the unmanned cleaning ship to the target sea area where the corresponding cluster class is located according to the principle of proximity.

[0027] The beneficial technical effects of the present invention are as follows:

[0028] A brand-new two-layer task allocation method is proposed. Using a hierarchical structure can not only reduce the complexity of problem-solving, but also effectively guide the algorithm to search for a high-quality solution space.

[0029] When the upper layer considers the environmental and USCV load constraints, the task set is divided into multiple clusters through the proposed clustering analysis algorithm and then assigned to each USCV. This can reduce the difficulty of path planning for each USCV, facilitate the search for the optimal solution. At the same time, the clustering analysis algorithm adopts a new distance evaluation and task balancing method, which can effectively reduce the generation of clustering errors and unreasonable task points, ensuring the globality of clustering.

[0030] The lower layer plans the two-point path between any two task points through the EFCA algorithm, and then combines the NSGA-II algorithm to calculate the Pareto front of the shortest driving path, sailing time, and total revenue of each USCV. Using the two-point path planned by the EFCA algorithm to replace the conventional Euclidean distance can well avoid obstacles in the sea area and obtain a driving path that better conforms to the actual situation of the sea area. This is used as the input of the NSGA-II algorithm to ensure the acquisition of the subsequent optimal driving path. Finally, a fixed weight coefficient is selected to screen out the Pareto solution that best meets the actual needs from the Pareto front as the task execution sequence of the USCV, that is, the optimal driving path, to guide the USCV to complete the marine garbage cleaning task. Brief Description of the Drawings

[0031] Figure 1 It is a schematic diagram of the overall process of the present invention;

[0032] Figure 2 It is a schematic diagram of the result of the preliminary clustering of the present invention;

[0033] Figure 3 It is a schematic diagram of the result of the optimized clustering of the present invention;

[0034] Figure 4 It is a schematic diagram of the process of screening out the optimal driving path by combining the non-dominated sorting multi-objective genetic algorithm NSGA-II with weights of the present invention;

[0035] Figure 5(a) is the actual Gaode scene map corresponding to the target sea area in the specific embodiment of the present invention;

[0036] Figure 5(b) is the binary map corresponding to Figure 5(a) of the present invention;

[0037] Figure 6 It is a diagram showing the load and task volume of each USCV in different scenarios in the specific embodiment of the present invention;

[0038] Figure 7 It is a diagram showing the clustering and planning results of tasks in different scenarios in the specific embodiment of the present invention;

[0039] Figure 8 It is a diagram showing the Pareto front of each cluster in different scenarios in the specific embodiment of the present invention;

[0040] Figure 9 In the specific embodiments of the present invention, for Figure 1 Comparison diagram of clustering results using three clustering algorithms;

[0041] Figure 10 In the specific embodiments of the present invention, for Figure 1 Comparison diagram of the number of tasks to be completed by each USCV calculated using three clustering algorithms and the weight of the fished garbage;

[0042] Figure 11 In the specific embodiments of the present invention, for Figure 1 Diagram showing the path regulation result after clustering using the CEDA algorithm;

[0043] Figure 12 In the specific embodiments of the present invention, for Figure 1 Diagram showing the Pareto front distribution of each cluster after clustering using the CEDCA algorithm;

[0044] Figure 13 In the specific embodiments of the present invention, for Figure 2 Comparison diagram of clustering results using three clustering algorithms;

[0045] Figure 14 In the specific embodiments of the present invention, for Figure 2 Comparison diagram of the number of tasks to be completed by each USCV calculated using three clustering algorithms and the weight of the fished garbage;

[0046] Figure 15 In the specific embodiments of the present invention, for Figure 2 Diagram showing the path regulation result after clustering using the CEDA algorithm;

[0047] Figure 16 In the specific embodiments of the present invention, for Figure 2 Diagram showing the Pareto front distribution of each cluster after clustering using the CEDCA algorithm. Detailed implementation manners

[0048] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] As Figure 1As shown in the figure, the present invention provides a double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments. Regarding an ocean garbage dump in the target sea area as a task point, first, under the load capacity constraint of the unmanned cleaning ship and the environmental constraint of the target sea area, cluster analysis is performed on these task points according to the distance, so as to allocate these task points to each unmanned cleaning ship in units of the clusters formed after cluster analysis. Then, the elastic force contraction path planning algorithm EFCA combined with the non-dominated sorting multi-objective genetic algorithm NSGA-II is used to plan the optimal driving path for each unmanned cleaning ship to complete the cleaning of ocean garbage within its respective target sea area. Considering the load capacity constraint and environmental constraint, the present invention designs a new clustering method that can take into account distance evaluation and task balance, effectively reducing the generation of clustering errors and unreasonable task points, ensuring the globality of clustering. At the same time, the optimal driving path that most meets the actual needs is selected as the task execution sequence of the unmanned cleaning ship to guide the unmanned cleaning ship to complete the ocean garbage cleaning task with high quality, providing an economical and efficient solution for ocean garbage cleaning in complex environments.

[0050] Specifically as follows:

[0051] Step 1: Define the task mathematical model.

[0052] According to the load capacity of the unmanned cleaning ship and the garbage weight of the task point, calculate the load capacity constraint to determine the total number of task points within the cluster during cluster analysis. At the same time, according to whether there are obstacles between any two task points, obtain the environmental constraint of the target sea area to perform the task point division within the cluster during cluster analysis.

[0053] Suppose there are N ocean garbage dumps in the target sea area. The present invention regards each garbage dump as a task point, the weight of each task point is M, and the load capacity of each unmanned cleaning ship USCV is M g . Therefore, the task points assigned to each unmanned cleaning ship USCV should satisfy the following load capacity constraint:

[0054]

[0055] Among them, n represents the number of task points assigned to each USCV.

[0056] Step 2: Make basic assumptions.

[0057] 1) The sea conditions in the target sea area are relatively calm

[0058] 2) The weight and garbage type of each task point are known, and the priority of each task point is defined by the weight of hazardous garbage

[0059] 3) The coastline of the island is deep enough to prevent USCV from running aground

[0060] 4) The energy of the USCV is sufficient to complete the assigned tasks

[0061] 5) The communication distance of the USCV is sufficient to cover the entire planned area

[0062] Step 3: Define the target conditions.

[0063] To reduce the impact of marine debris on the ocean, it is stipulated that preferentially fishing for marine debris with greater influence will yield higher returns. The formula for calculating the total return B of each cluster is as follows:

[0064]

[0065] where r represents the priority of the current task point; C represents a constant; K r represents the slope corresponding to different priorities. The higher the priority, the greater the slope, indicating that the return attenuation corresponding to the task point is faster; Q represents a constant, and the purpose is to convert the calculation of the maximum return into the minimum return, facilitating the selection of Pareto solutions and the ranking of non-dominated solutions.

[0066] Preferentially fishing for marine debris with greater influence does not guarantee that the impact on the ocean of all task points will be reduced. The fishing time also needs to be considered. Therefore, the total navigation time T for each USCV to complete the task is taken as one of the goals, and the calculation formula is as follows:

[0067]

[0068] where P i,j represents the path length between task point i and task point j, V represents the designed sailing speed of the unmanned cleaning ship, m represents the current amount of fished debris, that is, the total weight of the debris for which the task has been completed, and k represents a constant coefficient.

[0069] To reduce the fishing cost and improve the efficiency, the total path length L for each USCV to complete the task is taken as one of the goals, and the calculation formula is as follows:

[0070]

[0071] Step 4: Perform clustering analysis, and the specific steps are as follows:

[0072] Step 41: Take the two task points with the farthest distance as the clustering centers respectively. According to the load capacity constraint, screen out multiple task points closest to the clustering centers and group them into one cluster. A total of two clusters are divided;

[0073] Step 42: Repeat Step 41 to find the two task points with the farthest distance from the remaining task points, and then divide them into two clusters. And so on until all task points have completed the preliminary clustering.

[0074] Assume that for exampleFigure 2 Perform preliminary clustering on the tasks shown, and determine that the task volume of each cluster does not exceed 7 according to the load capacity constraint.

[0075] First, calculate the two task points that are farthest apart among all task points, such as Figure 2 the task points C1 and C2 shown, and use C1 and C2 as the clustering centers;

[0076] Then calculate the 7 task points that are closest to C1 and C2 in terms of Euclidean distance and satisfy the load capacity constraint. The mathematical description is as follows:

[0077]

[0078] where minρ j|j=1,27 represents the 7 points closest to points C1 and C2, (x i , y i ) represents the two-dimensional coordinate information of task point i, and (x C , y C ) represents the two-dimensional coordinate information of the clustering centers C1 and C2.

[0079] Finally, when screening out multiple task points (such as 7) that are closest to the clustering centers, if there are obstacles on the line connecting the screened task points and the corresponding clustering centers, then eliminate this task point and re-screen and supplement.

[0080] Such as Figure 2 the red points and blue points shown represent the clusters with C1 and C2 as the clustering centers. However, the cluster with C1 as the clustering center does not select the two task points in the blue elliptical area A, but selects the two task points in the blue elliptical area B in order to avoid detouring due to the obstacles between C1 and the two task points in the elliptical area A, and this kind of detour is unreasonable.

[0081] Figure 2 In, the colored points represent task points, represents the clustering center, C1, C2, C3, C4 represent the numbers of the clustering centers, the black area represents the obstacle area, the blue dotted line with a red × represents the influence of the obstacle between C1 and the task point, and the blue dotted line without a red × represents that there is no influence of the obstacle between C1 and the task point.

[0082] For the second clustering, after excluding the already clustered task points, calculate the two points that are farthest apart among the remaining task points, such as Figure 2 the points C3 and C4 shown, and the specific clustering process is as shown above. Finally, Figure 2 the green points and pink points in represent the clusters with C3 and C4 as the clustering centers.

[0083] When performing the third clustering, the sum of the remaining task points does not exceed 7, and the task points are not affected by obstacles. Therefore, they are grouped into a single cluster. However, at this time, the task volume of the cluster in the third clustering is significantly smaller than that of other clusters, resulting in an uneven distribution of the task volume. Therefore, it is necessary to further perform optimized clustering.

[0084] Step 43: Use the average value of the two-dimensional coordinate information of all task points in each cluster as the new clustering center, calculate the distances from any task point in the current cluster to all new clustering centers respectively, and determine whether the minimum value of the distances is the distance from the task point to the new clustering center of the current cluster. If not, it is determined that both the current cluster and the cluster where the new clustering center corresponding to the minimum value of the distance is located are abnormal clusters, and optimized clustering needs to be performed on these two abnormal clusters. Otherwise, no optimized clustering is performed, and so on, until the optimized clustering of all clusters is completed.

[0085] When performing optimized clustering, denote the new clustering centers corresponding to the two abnormal clusters as C1' and C2' respectively, and the distances from any task point i to the new clustering centers C1' and C2' as Di1 and Di2 respectively.

[0086] Calculate the distance difference ρi = Di1 - Di2, sort the distance differences corresponding to all task points in the two abnormal clusters in ascending order, and divide the task points with the smaller order according to the new load capacity constraint into the abnormal cluster where the clustering center C1' is located, and the remaining task points into the abnormal cluster where the clustering center C2' is located.

[0087] Among them, the new load capacity constraint is set to half of the total number of task points jointly included in the two abnormal clusters.

[0088] Specifically, first calculate the average value of the two-dimensional coordinate information of all task points in each cluster as the new clustering center, as Figure 3 shown by C1', C2', etc. Among them, Di1, Di2, Di3, and Di4 respectively represent the distances between the clustering center and the task points.

[0089] Then calculate the distances from any task point to all new clustering centers. If the new clustering center closest to the task point does not match the new clustering center of the cluster where the task point is located, the two clusters involved are abnormal clusters and need to perform optimized clustering, as Figure 3 shown by the pink ellipses Ⅰ and Ⅱ in the figure. This effectively reduces the workload of re-clustering. Ellipse domain Ⅰ is because the task points in ellipse domain A are closer to clustering C1' than to clustering C4', which does not match the initial clustering result, resulting in the need for re-clustering of the two clusters. Similarly, ellipse domain Ⅱ is because the task points in ellipse domains E and D are closer to clustering C5' than to clustering C3', resulting in the need for re-clustering of clusters C3' and C5'.

[0090] To avoid the poor clustering effect of task points at both ends of the elliptical domain due to the influence of constraint information, the present invention adopts a new distance calculation method to evaluate the clustering of task points, so as to Figure 2 Taking the pink elliptical domain Ⅰ in

[0091] ρi = Di1 - Di2 (6)

[0092] where Di1 and Di2 respectively represent the distances between the task point and the clustering centers of cluster classes C1' and C4'. The smaller ρi is, the closer the task point is to the left side of the pink elliptical domain Ⅰ and the clustering center of clustering C1'; on the contrary, the closer it is to the right side of the pink elliptical domain and the clustering center of clustering C4'. Therefore, only by selecting the task points with small ρi values and meeting the constraints to cluster into class C1', and clustering the remaining task points into class C4', the optimization of clustering C1' and C4' is completed. Similarly, we optimized clustering C3' and C5'. However, when optimizing clustering C3' and C5', the task amounts of clustering C3' and C5' are reduced and increased by 2 respectively, which is the result after balancing the strategy to solve the uneven distribution.

[0093] Step 5: Calculate the optimal driving path

[0094] The present invention allocates the cluster classes obtained by clustering analysis and the unmanned cleaning ships in a 1:1 ratio, and the console uniformly arranges the unmanned cleaning ships, and allocates the unmanned cleaning ships to the target sea areas where the corresponding cluster classes are located according to the principle of proximity, so as to save the deployment time of the unmanned cleaning ships and improve the deployment efficiency.

[0095] The present invention selects the elastic force contraction path planning algorithm EFCA characterized by high planning efficiency, good quality and few turning points. On the premise of considering the influence of obstacles, it plans the two-point path between any two task points, calculates the corresponding path length to replace the Euclidean distance without considering the influence of obstacles to calculate the multi-objective function value, which will make the Pareto solution more in line with the actual scenario and ensure the convergence of the Pareto solution to the actual optimal solution.

[0096] As Figure 4 shown, then the non-dominated sorting multi-objective genetic algorithm NSGA-II is used to calculate the Pareto front, that is, the complete path composed of these two-point paths that can cover all task points and its corresponding path length L, sailing time T and total revenue B on the premise of meeting the target conditions, namely the shortest path length, the shortest sailing time and the minimum total revenue. Finally, using the following formula, calculate the score S corresponding to each Pareto solution, that is, the complete path, in the Pareto front, and select the complete path with the highest score S as the optimal driving path of the unmanned cleaning ship corresponding to the current cluster class,

[0097] S = w l ×L + w t×T + w b ×B

[0098] w l +w t +w b =1

[0099] Among them, w l , w t and w b are weight factors respectively.

[0100] The formula w l +w t +w b =1 means that the sum of all weight factors is equal to 1, which facilitates the adjustment of the weight factors of each target. When the actual scenario has a high requirement for the path length, a larger w l can be set, and the corresponding w t and w b values will decrease to reduce the impact of sailing time and total revenue on the weighted score. Therefore, the finally selected Pareto optimal solution better meets the actual scenario requirements.

[0101] The clustering analysis algorithm proposed by the present invention can quickly complete clustering for scenarios with different numbers of tasks without providing the number of clusters. As the number of task points increases, although the running time of the proposed algorithm increases, it can be completed within a short time, indicating the high efficiency of the proposed algorithm.

[0102] To verify the feasibility of the double-layer task allocation algorithm of the present invention, we conduct the following experiment:

[0103] 1 Configuration

[0104] Since the TITAN-100 unmanned cleaning ship produced by Orca-Uboat Company has functions such as autonomous garbage collection, water filtration and storage, its relevant technical parameters will be referred to complete the marine garbage cleaning work in the selected sea area. For example, its garbage carrying capacity is 100 kg. The sea area near Bailianshan with many busy ports and waterways is selected as the research area, which is located at longitude 122.189° and latitude 29.807°. Its actual Gaode scene map is shown in Figure 5(a), and Figure 5(b) shows the binary map.

[0105] To explore the clustering effect of the clustering algorithm CEDCA proposed by the present invention for different amounts of tasks without specifying the specific number of clusters, three scenarios with the number of tasks being 200, 300 and 400 respectively will be randomly generated in the selected sea area. The garbage weight and garbage grade distribution of the task points in each scenario are the same. The parameters of the task points and the parameters of the relevant algorithms are shown in Table 1.

[0106] Table 1

[0107] Description / Notations Value Description / Notations Value Rubbish weight distribution(kg) [2.5,4.5] Population size 40 Rubbish grade distribution 5:2:3 NSGA-II iterations maximum 1500 USCV design speed(m / s) 0.5 Crossover probability 0.3 CEDCA iterations maximum 20 Mutation probability 0.6 USCV load information R(kg) 100 <![CDATA[Path length weight factors w l > 0.7 EFCASteps 5 <![CDATA[Sailing time weight factor w t > 0.2 EFCA pendulum angle 2° <![CDATA[Total return weight factor w b > 0.1

[0108] 2 Evaluation Metrics

[0109] To verify the clustering effect of the proposed clustering algorithm, the present invention selects the silhouette coefficient and the sum of squared errors as evaluation metrics. The silhouette coefficient (SC) combines the compactness within a cluster and the separation between clusters, and measures the similarity between a task point and its own cluster as well as the nearest neighboring cluster. The calculation formula of SC is as follows:

[0110]

[0111] where i represents each task point, a(i) represents the average distance between task point i and all other task points within the same cluster. b(i) represents the average distance between task point i and all points within the nearest neighboring cluster. The value range of SC is [-1, 1]. The closer its value is to 1, it indicates that the task point is close to its own cluster and well-separated from the nearest neighboring cluster; the closer its value is to -1, it indicates that the task point may be misassigned to the wrong cluster.

[0112] The sum of squared errors (SSE) takes into account the compactness between task points within a cluster and measures the degree of aggregation within a cluster. The calculation formula of SSE is as follows:

[0113]

[0114] where C j represents the j-th clustering cluster, P represents the task points in C j . K represents the number of clusters. m j represents the clustering center. When SSE is smaller, it indicates that the task points are closer to their clustering centers and the clustering effect is better.

[0115] To verify the effect of the proposed algorithm on task assignment balance, the present invention selects the standard deviation (SD) as the evaluation metric. The standard deviation is a measure of the difference between the total garbage weight of each cluster and its mean, and is used to describe the degree of dispersion of the balance effect. The calculation formula of SD is as follows:

[0116]

[0117] where V j represents the total weight assigned to clustering j. μ represents the mean assigned to each cluster. When SD is smaller, it indicates that the degree of dispersion is smaller and the balance effect is better.

[0118] To verify the rationality of the number of clusters of the proposed algorithm, the present invention uses the minimum number of clusters (MNC) required for the total garbage weight that can carry all task points as an evaluation index. In an actual scenario, the probability that the calculated MNC is an integer is very small. Therefore, the ceiling function needs to be used when calculating MNC, and its formula is as follows:

[0119]

[0120] where R represents the constraint information of the USCV load capacity. N represents the number of tasks, and V n represents the garbage weight of the nth task. When the number of clusters of the proposed algorithm is closer to MNC, it means that fewer USCVs are required to complete the tasks, and it is more reasonable.

[0121] 3 Result Analysis

[0122] The algorithms proposed in the present invention are all carried out on a personal computer equipped with an Intel Core i7 2.50GHz CPU and a 64-bit Windows 10 operating system running MATLAB R2022b. The relevant parameter configurations are shown in Table 1. Each scenario is run separately 10 times, and the obtained experimental results are shown in Table 2. It should be emphasized that the calculation of the silhouette coefficient and the sum of squared errors is based on the two-dimensional position information of the task points after standardization. Figure 6 shows the load capacity and task volume of each USCV in different scenarios, Figure 7 shows the clustering and planning results of different scenario tasks, Figure 8 shows the Pareto front of each cluster in different scenarios.

[0123] Table 2

[0124]

[0125] The data in Table 2 show that the proposed clustering algorithm can quickly cluster scenarios with different numbers of tasks without providing the number of clusters. As the number of task points increases, although the running time of the proposed algorithm increases, it can be completed within a short time, indicating the high efficiency of the proposed algorithm. In the 200-task scenario, the number of clusters of the algorithm is higher than the minimum number of clusters (MNC) because the influence of obstacles on the relatively scattered task points is considered, which is beneficial to avoiding detours. The SD parameter in Table 2 and Figure 8It shows that the distribution of tasks in each cluster is relatively balanced, proving the effectiveness of the balancing strategy. In the 300 and 400 task scenarios, the number of clusters of the proposed algorithm is the same as that of MNC, which shows that the algorithm can not only calculate clusters that meet the constraints, but also the number of clusters reaches the theoretical minimum, effectively reducing the number of trips and cleaning costs of USCV. In different scenarios, SC and SSE do not change much and are at a relatively good level, which effectively proves the superiority and stability of the algorithm.

[0126] Figure 7 It means that most of the task points of the clusters are not affected by obstacles, which proves that the proposed clustering algorithm can effectively reduce the impact of obstacles on the clustering results and avoid detours. When there are obstacles between the task points, the NSGA-II algorithm can use the EFCA path planning algorithm to provide a feasible path to guide the USCV to complete the cleaning task. Figure 8 The X, Y, and Z coordinates represent the path length, navigation time, and total revenue of each cluster completed by the USCV, respectively. It can be seen that the path length distribution of each cluster completed by the USCV is relatively concentrated, indicating that the proposed clustering algorithm can not only balance the distribution of garbage weight, but also balance the energy demand of each USCV.

[0127] In summary, the algorithm proposed in this invention can automatically cluster into clusters of reasonable quantity and high quality without providing the number of clusters. Since the influence of environmental information is taken into account, clustering detours in the task planning stage are effectively avoided. Due to the introduction of the balance strategy, each cluster has similar resource requirements for USCV, which effectively reduces the problem of resource waste caused by uneven task allocation.

[0128] 4. Simulation

[0129] In order to verify the advancement and superiority of the proposed clustering algorithm, the present invention selects the constrained K mean (cK-mean) and the constrained split hierarchical (cDHC) clustering algorithms as control algorithms. cK-mean selects the initial centroid as far away as possible through a specific probability distribution, and clusters the task points that meet the constraints and are closest to the centroid (Euclidean distance), thereby ensuring the convergence speed and clustering quality of the algorithm. cDHC adopts a top-down strategy to gradually subdivide the tasks into smaller and smaller clusters according to the maximum Euclidean distance rule, which does not require the number of clusters to be provided and has better clustering effects on large samples. Therefore, by comparing with these two algorithms, the advantages and disadvantages of the proposed algorithm can be highlighted.

[0130] Clustering will be performed using the selected three clustering algorithms in two maps, and the clustering metrics described above will be selected to evaluate their clustering effects. The parameters of the algorithm proposed in the present invention are shown in Table 1. The number of clusters of the cK-mean and cDHC algorithms can be calculated by Formula 12, and the maximum number of iterations of the cK-mean algorithm is 10.

[0131] 4.1 Simulation in the Figure 1 map

[0132] In this set of experiments, the selected Figure 1 map, Figure 9 as shown, in which the obstacle information divides the entire space into three parts, which can effectively test the ability of the proposed clustering algorithm to reduce the influence of obstacles on the clustering results. The size of the Figure 1 map is 796×752, and there are 300 task points among them. The MNC calculated by the above formula is 11, and each algorithm runs independently 10 times. The clustering results of the three clustering algorithms are as Figure 9 shown, and the simulation results are shown in Table 3. Figure 10 It shows the number of task points that each USCV needs to complete and the weight of the captured garbage calculated by the three clustering algorithms. The left Y-axis represents the weight of the captured garbage, and the right represents the number of tasks.

[0133] Table 3

[0134] Algorithm Run time(s) Cluster number SC SSE SD CEDCA 0.204 12 0.540 8.266 5.872 cK-mean 0.042 11 0.486 11.874 15.695 cDHC 0.012 11 0.436 26.613 16.659

[0135] The data in Table 3 show that the running time of the CEDCA algorithm proposed in this paper lags far behind the cK-mean and cDHC algorithms. This is largely because CEDCA takes into account the influence of obstacles on the clustering results and the balance problem of task allocation. However, CEDCA can also complete the clustering of tasks in a relatively short time. The number of clusters calculated by CEDCA is 12, which is 1 more than the minimum number of clusters MNC. This is due to the influence of obstacles. However, the SC and SSE of the clustering by CEDCA are better than those of the other two algorithms, indicating that the compactness within the clusters and the separation between the clusters are better, which can be Figure 9 further proved. In Figure 9 (a), the clustering of CEDCA is hardly affected by obstacles and there are no obvious errors. However, in Figure 9 (b) and (c), the clustering of the cK-mean and cDHC algorithms is not only affected by obstacles, such as Figure 9 the task points in the pink elliptical area A in (b), but also there is a problem of incorrect clustering of task points, such as Figure 9The task points in the pink elliptical region B in (b). This is because they preferentially cluster the task points close to the cluster center, and due to the existing constraints, they cannot reasonably allocate the task points far from the cluster center. Therefore, this shows that the proposed algorithm CEDCA has better global performance than the cK-mean and cDHC algorithms.

[0136] Since the clustering results of the cK-mean and cDHC algorithms are affected by obstacles and it is difficult to plan an effective execution path, the present invention only gives the task planning of the clustering results of CEDCA, as Figure 9 shown. In Figure 11 , the execution path planned by the task allocation algorithm with the minimum path length, navigation time, and total revenue is only less affected by obstacles and there is no detour, which proves the effectiveness and superiority of CEDCA. In Figure 10 , the Pareto front distribution of each cluster of CEDCA is concentrated, indicating that CEDCA can evenly allocate tasks to each USCV, which can be further proved by the SD data in Table 3 and Figure 6 . The balanced task allocation improves the efficiency of marine litter fishing and the utilization rate of USCV resources, which has important practical significance.

[0137] 4.2 Simulation in Figure 2 In this set of experiments, the selected

[0138] as shown in Figure 2 can effectively test the task planning effect of the proposed algorithm in narrow waters. The map size is 604×533, and among them, 300 task points are set. The MNC calculated by the above formula is 11, and each algorithm runs independently 10 times. The clustering results of the three clustering algorithms are as Figure 13 shown, and the simulation results are shown in Table 4, Figure 13 which shows the number of task points that each USCV needs to complete and the weight of the litter caught calculated by the three clustering algorithms. The left coordinate axis represents the weight of the litter caught, and the right represents the number of tasks. Figure 14

[0139] Table 4

[0140] Algorithm Run time(s) Cluster number SC SSE SD CEDCA 0.181 11 0.592 4.214 7.694 cK-mean 0.041 11 0.561 4.923 11.346 cDHC 0.013 11 0.479 16.464 22.037

[0141] ​In Table 4, the number of clusters automatically generated by the proposed clustering algorithm CEDCA is the same as that of MNC, indicating that the algorithm can effectively control the number of clusters, which is conducive to reducing the use of USCVs and the total cost of fishing for garbage. When the number of clusters is the same, the SC and SSE of the clustering results of CEDCA are better than those of the cK-mean and cDHC algorithms, indicating that the algorithm has better clustering ability than them, thus highlighting the advancement and superiority of the algorithm; the SD is also better than that of the cK-mean and cDHC algorithms, indicating that the algorithm's ability to balance tasks is better than the other two algorithms. Figure 16 The curves of the relevant parameters in Figure 13 can further prove this. In Figure 13 , there are almost no unreasonable or incorrect cases of task point clustering in the clustering results of CEDCA. However, there are incorrect and unreasonable points in the clustering results of the other two algorithms, such as the task points in the pink elliptical areas A and B in Figure 15 (b) and (c), which indicates that the global performance of CEDCA is better than theirs. Since the global performance of the clustering results of the cK-mean and cDHC algorithms is poor, the present invention only gives the task planning results based on the clustering results of CEDCA, as shown in Figure 15 . In Figure 16 , there is no detour in the task execution process of each cluster, and a feasible execution path is given, which proves the rationality of the clustering and the feasibility of the planning. In practical applications, the planning results can be directly used to guide multiple USCVs to perform marine cleaning tasks. In

[0142] In summary, the clustering effect of the algorithm proposed in the present invention is better than that of the cK-mean and cDHC algorithms in terms of silhouette coefficient (SC) and sum of squared errors (SSE), which proves the superiority of the algorithm in clustering. The standard deviation of the task volume (SD) of each cluster is also better than that of the cK-mean and cDHC algorithms, which proves the performance of the algorithm in task balance. The balanced task allocation improves the efficiency of marine garbage fishing and the utilization rate of USCV resources, which has important practical significance. Finally, by calculating the execution sequence of each cluster through the task planning algorithm, the planning results can be directly used to guide multiple USCVs to perform marine cleaning tasks.

[0143] 5. Conclusion

[0144] The present invention proposes a double-layer task planning algorithm to solve the task planning problem of allocating floating garbage piles in the offshore waters with complex terrain to multiple unmanned cleaning vessels. The proposed clustering algorithm CEDCA mainly consists of two parts: the calculation of the initial solution and the optimization of the initial solution. The calculation of the initial solution is to cluster the remaining task points with the minimum Euclidean distance by continuously selecting the two points with the farthest Euclidean distance among the remaining task points as the clustering centers under the consideration of the influence of obstacles and the constraint of the load capacity of the USCV. This effectively reduces the influence of obstacles on the clustering results, can reduce the number of automatic clustering without providing the specific number of clusters, and has good globality. To solve the problems of unreasonable and unbalanced clustering of task points in the calculated initial solution, the optimization of the initial solution will reallocate the clusters with unreasonable and unbalanced clustering using a new distance evaluation function and more balanced constraint information, which improves the quality and rationality of the clustering. In this paper, the non-dominated sorting genetic algorithm II (NSGA-II) is used to perform task planning for each clustering result with the minimum path length, sailing time, and total revenue as the objectives, and the Pareto front of each clustering algorithm is calculated. Finally, considering the actual situation, a weight is assigned to each objective, and the weighted sum method is used to find the Pareto optimal solution that is more in line with the actual situation. The simulation results show that the silhouette coefficient (SC) and the sum of squared errors of the clusters obtained by CEDCA are better than those of the cK-mean and cDHC algorithms, indicating that the algorithm has the optimal global performance; the standard deviation (SD) of the task volume of each cluster is better than that of the cK-mean and cDHC algorithms, indicating that the algorithm has the optimal balanced performance. The balanced task allocation improves the efficiency of marine garbage fishing and the utilization rate of USCV resources, which has important practical significance. The NSGA-II algorithm performs task planning on the clustering results of CEDCA, and the Pareto front distribution of each cluster is relatively concentrated, further verifying the clustering effect of CEDCA.

[0145] Experimental verification shows that most of the task points in the clusters are not affected by obstacles, which proves that the proposed clustering algorithm can effectively reduce the influence of obstacles on the clustering results and avoid detour events. When there is an obstacle influence between task points, the NSGA-II algorithm can use the EFCA path planning algorithm to provide a feasible path to guide the USCV to complete the cleaning task. The path length distribution of each cluster completed by the USCV is relatively concentrated, indicating that the proposed clustering algorithm can not only balance the distribution of garbage weight but also balance the energy requirements of each USCV.

[0146] Although the specific implementation manners of the present invention are described above, those skilled in the art should understand that these are only examples. Without departing from the principles and essence of the present invention, various changes or modifications can be made to these implementation manners. Therefore, the protection scope of the present invention is defined by the appended claims.

Claims

1. A double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments, characterized in that: A marine garbage dump in the target sea area is regarded as a task point. Firstly, under the load capacity constraint of the unmanned cleaning ship and the environmental constraint of the target sea area, cluster analysis is performed on these task points according to the distance, so that these task points are assigned to each unmanned cleaning ship in the unit of clusters formed after cluster analysis. Then, the elastic force contraction path planning algorithm EFCA combined with the non-dominated sorting multi-objective genetic algorithm NSGA-II is used to plan the optimal driving path for each unmanned cleaning ship to complete the marine garbage cleaning in their respective target sea areas.

2. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 1, characterized in that: According to the load capacity of the unmanned cleaning ship and the garbage weight of the task point, the load capacity constraint is calculated to determine the total number of task points within the cluster during cluster analysis; According to whether there are obstacles between any two task points, the environmental constraints of the target sea area are obtained so as to divide the task points within the cluster when performing cluster analysis.

3. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 2, characterized in that Follow the steps below to perform cluster analysis: Step 1: Take the two task points with the longest distance as the cluster centers respectively, and select multiple task points closest to the cluster centers according to the load capacity constraint, and classify them into one cluster, so that two clusters are divided in total; Step 2: Repeat step 1 to find the two task points with the farthest distance from the remaining task points, and then divide them into two clusters, and so on, until all task points have completed preliminary clustering; Step 3: Take the average value of the two-dimensional coordinate information of all task points in each cluster as the new cluster center, calculate the distance from any task point in the current cluster to all new cluster centers, and determine whether the minimum distance is the distance from the task point to the new cluster center of the current cluster. If not, the current cluster and the cluster corresponding to the new cluster center with the minimum distance are both abnormal clusters. These two abnormal clusters need to be optimized clustered, otherwise the optimized clustering will not be performed. Similarly, the optimized clustering of all clusters is completed.

4. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 3, wherein: When performing optimized clustering, the new cluster centers corresponding to the two abnormal clusters are recorded as C1' and C2' respectively. The distances from any task point i to the new cluster centers C1' and C2' are Di1 and Di2 respectively. The distance difference ρi=Di1-Di2 is calculated. The distance differences corresponding to all task points in the two abnormal clusters are arranged in ascending order. According to the new load capacity constraint, the task points with the highest order are divided into the abnormal cluster where the cluster center C1' is located, and the remaining task points are divided into the abnormal cluster where the cluster center C2' is located. The new load capacity constraint is set to half of the total number of task points contained in the two abnormal clusters.

5. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 3, wherein: When S task points closest to the cluster center are screened out in the preliminary clustering, if there are obstacles on the line connecting the screened task point and the corresponding cluster center, the task point will be removed and the screening will be supplemented again.

6. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 1, characterized in that: The clusters obtained by clustering analysis and the unmanned cleaning vessels are allocated in a 1:1 ratio. For the task points within each cluster, the elastic force contraction path planning algorithm EFCA is used to plan the two-point path between any two task points. Then, the non-dominated sorting multi-objective genetic algorithm NSGA-II is used to calculate the Pareto front, that is, the complete path composed of these two-point paths that can cover all task points and its corresponding path length L, sailing time T, and total revenue B, on the premise of meeting the target conditions, namely the shortest path length, the shortest sailing time, and the minimum total revenue. Finally, using the following formula, calculate the score S corresponding to each Pareto solution, that is, the complete path, in the Pareto front, and select the complete path with the highest score S as the optimal driving path of the unmanned cleaning vessel corresponding to the current cluster. S = w l × L + w t × T + w b × B w l + w t + w b = 1 Among them, w l , w t and w b are weight factors respectively.

7. The double-layer task allocation algorithm for multi-unmanned cleaning ships in complex environments according to claim 6, wherein: According to the principle of proximity, allocate the unmanned cleaning vessel to the target sea area where the corresponding cluster is located.