AUV task planning and re-planning method based on double-layer greedy strategy
By building a multi-constraint matrix and using greedy algorithms based on the two-layer greedy strategy, the problems of low computational efficiency and insufficient constraint satisfaction in AUV task planning are solved, and efficient task execution sequence generation is achieved.
Patent Information
- Application Number
- CN202311684684.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-06-10
AI Technical Summary
The existing AUV task planning methods have low computational efficiency, and are difficult to meet cost constraints, sequence constraints and sequential constraints. At the same time, it is difficult to reproduce the task execution sequence, and it is easy to fall into local traps.
A task planning method based on a double-layer greedy strategy is adopted, and a task execution sequence that satisfies multiple constraints is generated by constructing candidate task sets, navigation cost matrix, sequence constraint matrix and sequential constraint matrix, combining greedy strategies and corrected greedy algorithms.
The calculation efficiency of AUV task planning and re-planning is significantly improved. The generated task execution sequence meets the cost constraints of AUV, the sequence constraints and sequential constraints of multiple tasks, and improves the maximum number of tasks.
Smart Images

Figure CN120122704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mission planning, and in particular to an AUV mission planning and replanning method based on a double-layer greedy strategy. Background Art
[0002] Autonomous Underwater Vehicle (AUV) plays an important role in seabed environment mapping, marine resource exploration, deep-sea security defense, etc. due to its good flexibility, autonomy, and versatility. As an important equipment for marine resource exploration and military applications, AUV is developing towards greater depth, longer range, and more payloads. However, due to problems such as limited self-resources, changing marine environments, and limited underwater communication, AUV must be able to autonomously plan its own resources and, when there are significant fluctuations in its own state or environment, timely and autonomously adjust the task execution plan to efficiently complete as many tasks as possible and safely reach the recovery point, that is, AUV must possess autonomous mission planning and replanning capabilities. As an important technology for AUV autonomous decision-making and planning, mission planning and replanning capabilities are essential in the entire AUV system.
[0003] The mission planning and replanning problem of AUV can be described as, under the full consideration of AUV's own performance and environmental constraints, planning through a mission planning algorithm which tasks AUV needs to complete and in what order to complete these tasks at the optimal or sub-optimal cost. The mission planning and replanning problem is usually regarded as a combination of the traveling salesman problem and the knapsack problem, and the algorithms for solving it are mostly bio-inspired stochastic search algorithms such as genetic algorithms or ant colony algorithms. Most of these algorithms can give the optimal or sub-optimal solution, but at the cost of sufficient computing time and the number of iterations. Even if this condition is met, the algorithms also have problems such as the difficulty in reproducing the obtained task execution sequence and the situation of a few falling into local traps. Therefore, there are many problems in using bio-inspired stochastic search algorithms as the solution algorithms for AUV's mission planning, especially replanning problems. In addition, existing mission planning algorithms rarely consider the prior constraints and sequential constraints of task execution. Summary of the Invention
[0004] Aiming at the many deficiencies of existing mission planning methods and the problem of rarely considering the prior constraints and sequential constraints of task execution, the technical problem to be solved by the present invention is to provide a mission planning and replanning method with high computing efficiency, and make the planned task execution sequence meet the AUV cost constraint conditions, multiple task prior constraint conditions, multiple task sequential constraint conditions, and at the same time have the largest number of tasks.
[0005] The technical solution adopted by the present invention to achieve the above object is:
[0006] An AUV mission planning and replanning method based on a double-layer greedy strategy, comprising the following steps:
[0007] 1) Construct a candidate task set and generate a navigation cost matrix, and sort the candidate task set according to the priority of the tasks;
[0008] 2) Construct a precedence constraint condition matrix and a sequential constraint condition matrix respectively;
[0009] 3) Construct an optional task list and mark different types of tasks in the candidate task set;
[0010] 4) Allocate the maximum number of tasks based on the greedy strategy to obtain a task sequence;
[0011] 5) Use the modified greedy algorithm to plan the task sequence to generate a task execution sequence.
[0012] The candidate task set is the set of all alternative tasks in the AUV's current navigation mission. Each task in the set contains 5 attributes, namely task number, task priority, task starting pose, task ending pose, and the estimated cost of the task itself.
[0013] The navigation cost matrix is an adjacency matrix generated according to the original order of the tasks in the candidate task set. Among them, the matrix element is the navigation cost from the task represented by its row to the task represented by its column.
[0014] The matrix element in the precedence constraint condition matrix is the task number. Each row of the matrix represents a precedence constraint condition. In each row, the task with a smaller index is executed before the task with a larger index. Other tasks can be inserted between the tasks corresponding to two adjacent elements. When the number of tasks in a certain precedence constraint condition is less than the number of columns of the matrix, -1 is used for placeholder. The element with a value other than -1 in the matrix is called a valid element.
[0015] The matrix element in the sequential constraint condition matrix is the task number. Each row of the matrix represents a sequential constraint condition. In each row, the tasks are executed in the order of the corresponding element indices in sequence. Other tasks cannot be inserted between the tasks corresponding to two adjacent index elements. When the number of tasks in a certain precedence constraint condition is less than the number of columns of the matrix, -2 is used for placeholder. The element with a value other than -2 in the matrix is called a valid element.
[0016] The optional task list consists of 0s and 1s, and the number of elements is equal to the number of tasks in the candidate task set. Its construction method is specifically as follows:
[0017] 3.1) Divide the tasks in the candidate task set into 4 categories, namely alternative tasks, selected tasks, preoccupied tasks, and deleted tasks;
[0018] 3.2) Mark the position of the task in the candidate task set as the index of the optional task list element, where the element corresponding to the selectable task is marked as 0, and the rest are marked as 1.
[0019] The said step 4) includes the following steps:
[0020] 4.1) Initially, set the element in the optional task list whose index corresponds to the starting task position in the candidate task set to 1, indicating that the starting task has been selected, and mark the rest of the tasks as 0, indicating that the rest of the tasks are all selectable;
[0021] 4.2) Call the task execution sequence and check whether the cost of this sequence is less than the current maximum allowable cost of the AUV. If it is less, terminate the allocation and output this sequence. Otherwise, set the element in the optional task list whose index corresponds to the last task position in the candidate task set to 1, indicating that the last task has been deleted;
[0022] 4.3) If the last task is in the precedence constraint matrix, delete the element corresponding to this task in the precedence constraint matrix, and move the elements after this element in the column forward, filling the empty space with -1;
[0023] 4.4) If the last task is in the sequential constraint matrix, delete the element corresponding to this task in the sequential constraint matrix, and move the elements after this element in the column forward, filling the empty space with -2;
[0024] 4.5) Repeat steps 4.2) to 4.4) until the cost of the new sequence is less than the current maximum allowable cost of the AUV, then stop the task allocation and output the new sequence;
[0025] 4.6) If the number of deleted tasks is greater than the maximum allowable number of deleted tasks, stop the task allocation and report an error.
[0026] The said step 5) includes the following steps:
[0027] 5.1) Find all the tasks corresponding to the non-first elements in the sequential constraint matrix, and set the elements corresponding to these tasks in the optional task list to 1, indicating that these tasks are pre-occupied;
[0028] 5.2) Based on the greedy algorithm, use the starting task as the head node of the directed acyclic graph to construct the edges;
[0029] 5.3) When constructing the i-th edge, if the node i + 1 corresponds to the termination task, at this time check whether i + 1 is equal to the number of tasks N in the optional task list. If i + 1 is equal to N, the algorithm terminates and outputs the task execution sequence and the cost of this sequence. Otherwise, set the cost between the tasks corresponding to node i and node i + 1 to infinity;
[0030] 5.4) Check whether the task corresponding to node i is in the sequential constraint condition matrix. If it is in the sequential constraint condition matrix, add its column post-effective elements to the task execution sequence one by one in order. Each time a column post-effective element is added, set i = i + 1 and update the cost. Otherwise, based on the greedy algorithm, select a task corresponding to an element marked as 0 in the optional task list with the minimum cost as the task corresponding to node i + 1;
[0031] 5.5) Check whether the task selected in step 5.4) is in the precedence constraint condition matrix. If it is not in the precedence constraint condition matrix, add the task to the task execution sequence, update the cost, and then execute step 5.10). Otherwise, execute step 5.6);
[0032] 5.6) Continue to check whether all elements corresponding to the task corresponding to the column pre-element of this task in the optional task list are 1. If any one is not 1, set the cost between this task and the task corresponding to node i to infinity. Otherwise, execute step 5.7);
[0033] 5.7) Continue to check whether the column pre-element of the task selected in step 5.4) is an element in the sequential constraint condition matrix. If it is an element in the sequential constraint condition matrix, continue to check whether all elements corresponding to the task corresponding to the row first element of it in the optional task list are 1. If at least one is not 1, set the cost between the task corresponding to node i + 1 and the task corresponding to node i to infinity;
[0034] 5.8) Re-check the cost between the tasks represented by node i and node i + 1. If the cost is infinity, reconstruct the i-th edge and repeat steps 5.3) to 5.6). Otherwise, execute step 5.9);
[0035] 5.9) Add the task represented by the extended node i + 1 to the task execution sequence, update the cost of the sequence, and set the corresponding element in the optional task list to 1, indicating that this task has been selected;
[0036] 5.10) Set i = i + 1 and repeat steps 5.2) to 5.9).
[0037] The present invention has the following beneficial effects and advantages:
[0038] 1. The present invention can plan a task execution sequence that satisfies the AUV cost constraint conditions, the precedence constraint conditions of multiple tasks, and the sequential constraint conditions of multiple tasks.
[0039] 2. The present invention can quickly and efficiently plan a task execution sequence, significantly improving the AUV task planning and replanning capabilities. Description of the Drawings
[0040] Figure 1 Block diagram of mission planning and replanning method
[0041] Figure 2 Schematic diagram of navigation cost calculation method. Specific implementation manner
[0042] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0043] As Figure 1 shown, an AUV mission planning and replanning method based on a double-layer greedy strategy includes the following steps:
[0044] Step 1: Preprocessing of candidate task set: Generate a navigation cost matrix and sort the candidate task set;
[0045] Step 2: Representation of task constraint conditions: Construct a precedence constraint condition matrix and a sequential constraint condition matrix;
[0046] Step 3: Construction of optional task list: Mark different types of tasks in the candidate task set;
[0047] Step 4: Allocation of maximum task quantity: Allocate the maximum task quantity based on the greedy strategy;
[0048] Step 5: Generation of task execution sequence: Adopt a modified greedy algorithm to generate the task execution sequence;
[0049] Furthermore, in the above step 1, the candidate task set is the set of all selectable tasks in the AUV's current voyage mission. Each task in the set contains 5 attributes, namely task number, task priority, task starting pose, task ending pose, and the estimated cost of the task itself. Among them, the task number is the flag to distinguish different tasks, and each task has a number different from other tasks; the task priority is used to describe the importance of the task, and high-priority tasks are more important than low-priority tasks, and different tasks may have the same priority; the task starting pose is used to describe the position and pose at which a certain task starts; the task ending pose is used to describe the position and pose at which the task ends; the estimated cost of the task itself is used to describe the total cost expected to be consumed by the AUV from the task starting pose to the task ending pose to complete the task.
[0050] The navigation cost matrix is an adjacency matrix generated according to the original order of tasks in the candidate task set. The matrix element is the navigation cost from the task represented by its row to the task represented by its column. This navigation cost is generally provided by the path planning algorithm.
[0051] The sorting method of the candidate task set is a method of sorting tasks from highest to lowest priority. Specifically, tasks with different priorities are sorted from highest to lowest priority. For multiple tasks with the same priority, they are sorted from smallest to largest in terms of the cost to the starting task. In the sorted candidate task set, high-priority tasks come first, low-priority tasks come later, and among tasks with the same priority, tasks with a smaller cost to the starting task come first, and tasks with a larger cost to the starting task come later.
[0052] The cost can be only the navigation cost, or the sum of the navigation cost and the estimated cost of the task itself.
[0053] Further, in step 2, the matrix elements in the precedence constraint matrix are task numbers. Each row of the matrix represents a precedence constraint. The task with a smaller index in the row is executed before the task with a larger index. Other tasks can be inserted between the tasks corresponding to two adjacent elements. When the number of tasks in a certain precedence constraint is less than the number of columns in the matrix, -1 is used as a placeholder. The elements with non -1 values in the matrix are called valid elements. The matrix elements in the sequential constraint matrix are also task numbers. Each row of the matrix represents a sequential constraint. The tasks in the row are executed in the order of the indices of the corresponding elements. No other tasks can be inserted between the tasks corresponding to two adjacent index elements. When the number of tasks in a certain precedence constraint is less than the number of columns in the matrix, -2 is used as a placeholder. The elements with non -2 values in the matrix are called valid elements.
[0054] Further, in step 3, the optional task list is a list composed of 0s and 1s, and the number of elements is equal to the number of tasks in the candidate task set. The construction method of the list is to first classify the tasks in the candidate task set into 4 categories, namely tasks available for selection, tasks already selected, tasks pre - occupied, and tasks already deleted. Then, the positions of these tasks in the candidate task set are used as the indices of the elements of the optional task list for marking, where the elements corresponding to the tasks available for selection are marked as 0, and the rest are marked as 1. The tasks available for selection are tasks in the candidate task set that have not been selected, not pre - occupied, and not deleted; the tasks already selected are the tasks selected in step 5; the tasks pre - occupied are the tasks corresponding to all non - first - row elements in the task sequential constraint matrix; the tasks already deleted are the tasks deleted in step 4 to generate a task execution sequence that meets the AUV cost constraint conditions.
[0055] Further, in step 4, a greedy strategy is adopted for the allocation of the maximum number of tasks.
[0056] Specifically:
[0057] Step 4.1: Initially, set the element in the optional task list whose index corresponds to the starting task position in the candidate task set to 1, indicating that the starting task has been selected, and mark the remaining tasks as 0, indicating that the remaining tasks are all available for selection;
[0058] Step 4.2: Call the method in Step 5 to generate a task execution sequence, and check whether the cost of this sequence is less than the current maximum allowable cost of the AUV;
[0059] Step 4.3: If it is less than the current maximum allowable cost of the AUV, terminate the allocation and output this sequence;
[0060] Step 4.4: Otherwise, perform the next iteration, and in the optional task list, set the element whose index corresponds to the position of the last task in the candidate task set to 1, indicating that the last task has been deleted;
[0061] Step 4.5: If the last task is in the precedence constraint matrix, delete the element corresponding to this task in the precedence constraint matrix, and move the elements after this element forward, filling the empty space with -1;
[0062] Step 4.6: If the last task is in the sequential constraint matrix, delete the element corresponding to this task in the sequential constraint matrix, and move the elements after this element forward, filling the empty space with -2;
[0063] Step 4.7: Based on the new optional task list, precedence constraint matrix, and sequential constraint matrix, repeat Steps 4.2 to 4.6 until the cost of the new sequence is less than the current maximum allowable cost of the AUV, then the algorithm terminates and outputs the new sequence;
[0064] Step 4.8: If the number of deleted tasks is greater than the maximum allowable number of deleted tasks, the algorithm terminates and reports an error.
[0065] The last task is the task with the lowest priority in the candidate task set or the task with the lowest priority among those with the largest cost compared to the starting task and whose element corresponding to its position in the candidate task set in the optional task list is not marked as 1.
[0066] The task being in the matrix means that the task number of this task is equal to one or several matrix element values.
[0067] Furthermore, in the step 5, the method for generating the task execution sequence is a modified greedy algorithm. The algorithm describes the generation process of the task execution sequence as a process of constructing a directed acyclic graph with N nodes and N - 1 edges. Here, N is the number of tasks in the optional task list. The construction of an edge is equivalent to connecting two nodes. For example, the construction of the i-th edge actually connects the i-th node and the (i + 1)-th node. The algorithm starts to expand from the starting task (the starting task corresponds to the 1st node), and can only expand to the termination task when and only when the (N - 1)-th edge is constructed, that is, the termination task corresponds to the N-th node. The specific steps are as follows:
[0068] Step 5.1: Find all the tasks corresponding to the non-first elements in the row of the sequential constraint condition matrix, and set the corresponding elements in the optional task list to 1, indicating that these tasks are pre-occupied;
[0069] Step 5.2: Based on the greedy algorithm, with the starting task as the head node, construct the edges;
[0070] Step 5.3: When constructing the i-th edge, if the node i + 1 corresponds to the termination task, at this time check whether i + 1 is equal to N;
[0071] Step 5.4: If i + 1 is equal to N, the algorithm terminates and outputs the task execution sequence and the cost of this sequence;
[0072] Step 5.5: Otherwise, set the cost between the task corresponding to node i and the task corresponding to node i + 1 (the termination task) to infinity;
[0073] Step 5.6: Check whether the task corresponding to node i is in the sequential constraint condition matrix;
[0074] Step 5.7: If it is in the sequential constraint condition matrix, then add its column post-effective elements to the task execution sequence one by one in order. Each time a column post-effective element is added, set i = i + 1 and update the cost;
[0075] Step 5.8: Otherwise, based on the greedy algorithm, select a task with the minimum cost from all the tasks corresponding to the elements marked as 0 in the optional task list as the task corresponding to node i + 1;
[0076] Step 5.9: Check whether this task is in the precedence constraint condition matrix;
[0077] Step 5.10: If it is in the precedence constraint condition matrix, then continue to check whether all the elements corresponding to the tasks before this task in the column are all 1 in the optional task list;
[0078] Step 5.11: If there is one that is not 1, then set the cost between this task and the task corresponding to node i to infinity;
[0079] Step 5.12: Otherwise, continue to check whether the element before its column is an element of the sequential constraint condition matrix;
[0080] Step 5.13: If it is an element of the sequential constraint condition matrix, continue to check in the optional task list whether all the elements corresponding to the task corresponding to the first element in its row in the sequential constraint condition matrix are 1;
[0081] Step 5.14: If at least one is not 1, set the cost between this task and the task corresponding to node i to infinity;
[0082] Step 5.15: Re-check the cost between the tasks represented by node i and node i + 1;
[0083] Step 5.16: If the cost is infinity, reconstruct the i-th edge and repeat Steps 5.3 to 5.15;
[0084] Step 5.17: Otherwise, add the task represented by the expanded node i + 1 to the task execution sequence, update the cost of this sequence, and set the corresponding element in the optional task list to 1, indicating that this task has been selected;
[0085] Step 5.18: Set i = i + 1, and repeat Steps 5.2 to 5.17;
[0086] The valid element after the column of the task is the element in the sequential constraint condition matrix corresponding to this task, in the same row, with a column index greater than the column index of this element and a value not equal to -2.
[0087] The element before the column of the task is the element in the precedence constraint condition matrix corresponding to this task, in the same row and with a column index less than the column index of this element.
[0088] Embodiment
[0089] Step 1: Preprocessing of the candidate task set:
[0090] The candidate task set T is described in the following matrix form:
[0091]
[0092] where, ID i is the number of task i, i = 1, 2…, N; N is the number of tasks in the candidate task set; P i is the priority of task i; S i is the starting pose of task i; E i is the ending pose of task i; C i is the self-estimated cost of task i.
[0093] The navigation cost matrix D is generated according to the original order of the tasks in the candidate task set. It is described in the following matrix form:
[0094] ID 1 ID 2 … ID N
[0095]
[0096] Among them, d i,j is the navigation cost for the AUV to navigate from task i to task j, and d i,i is infinity, where i = 1, 2, …, N;
[0097] As Figure 2 shown, the above navigation cost d i,j is generally obtained by calculating through a path planning method. It should be noted that d i,j is the navigation cost from the termination pose of task i to the starting pose of task j. Without loss of generality, d i,j can be directly described using the Euclidean distance that only contains three-dimensional position information:
[0098]
[0099] Among them, E i,1 、E i,2 、E i,3 are the three-dimensional position information in the termination pose of task i respectively; S j,1 、S j,2 、S j,3 are the three-dimensional position information in the starting pose of task j respectively.
[0100] The candidate task set T is sorted from high to low according to the priority, and tasks with the same priority are sorted from small to large according to the cost to the starting task. The sorted candidate task set TO is described in the following matrix form:
[0101]
[0102] Among them, the priority of task i ≥ the priority of task j ≥ … ≥ the priority of task k; generally, the starting task has the highest priority, and the termination task has the second highest priority.
[0103] Step 2: Representation of task constraint conditions:
[0104] The precedence constraint conditions of tasks are used to describe the precedence relationship of task execution, where the tasks ranked earlier are executed first. The precedence constraint conditions of tasks can be one or more. Therefore, the precedence constraint condition matrix C1 is used to describe the precedence relationship of task execution:
[0105]
[0106] Each row of C1 represents a task order constraint; the number of columns in C1 is determined by the constraint with the largest number of tasks; the elements in C1 that are not -1, such as ID e 、ID f 、ID b etc. are task numbers; the element -1 in C1 is a placeholder. When the number of tasks in a constraint is less than the number of columns in C1, -1 is used to supplement it.
[0107] It is worth noting that the order constraint of tasks only requires that the task with the highest ranking be executed first, and does not require that the next task be executed immediately after this task. e 、ID f 、ID g It is a task order constraint, but by ID e 、ID a 、ID f 、ID b 、ID g It is reasonable to perform tasks in order.
[0108] The order constraint of a task is used to describe the order of task execution, where the task with the highest ranking is executed first, and the next task must be executed immediately after this task. Similarly, the order constraint of a task can also be one or more. The order constraint matrix C2 of the task is described in a similar way to C1:
[0109]
[0110] Each row of c2 represents the order constraint of a task. Different from C1, C2 uses element -2 as a placeholder.
[0111] It is worth noting that the order constraint of tasks requires that the next task must be executed only after the previous task, for example, ID e 、ID a 、ID b is a task order constraint. If ID e Execute first, then you must execute ID next a , executed ID a You must continue to execute ID b , in ID e 、ID a 、ID b It is unreasonable to insert any task into it.
[0112] Step 3: Optional Task List Building:
[0113] The constructed optional task list F is a list composed of 0 and 1 elements, used to describe whether the tasks in the candidate task set are available, and its description is as follows:
[0114]
[0115] Among them, is the identifier indicating whether task i is available. If then it means that task i is available. If then it means that task i has either been selected, or pre - occupied, or deleted.
[0116] To more clearly and concisely illustrate the task sequence generation process, this part integrates the maximum task quantity allocation (step 4) and the task execution sequence generation (step 5), and combines some checking and logical judgment steps. The integrated steps are as follows:
[0117] (1) Construct the optional task list in the following form:
[0118]
[0119] Among them, task start is the starting task, its identifier is 1, and the identifiers of the remaining tasks are 0;
[0120] (2) Pre - occupy all the tasks corresponding to the non - first elements of C2 in advance, that is, set the identifiers of tasks a, b, q, r, s, t, f, and g, etc. to 1 in F0, and denote the new list as F1;
[0121] (3) Initially, the task execution sequence L = {ID start}}, the cost DL of the task execution sequence = C start , the number of edges E cnt = 1, and let now be task start;
[0122] (4) If now is the task corresponding to the first element of C2, that is, now is one of e, p,..., d. Without loss of generality, if now is e, then successively add a and b to L, and set E cnt ←E cnt + 2, DL←DL + d e,a + C a + d a,b + C b ;
[0123] (5) If now is not the task corresponding to the first element of C2, then select the task next with the minimum cost with now from the tasks in F1 with an identifier of 0;
[0124] (6) If E cnt <N - 1, then set d now,nextis infinity;
[0125] (7) If next is in C1, without loss of generality, if next is g, check whether the flags of e and f in F1 are both 1. If the flag of f in F1 is 0, then set d now,next is infinity;
[0126] (8) If the flags of e and f in F1 are both 1, and f is in C2, if the flag of d in F1 is 0, then set d now,next is infinity;
[0127] (9) If d now,next is infinity, then jump to (5);
[0128] (10) Otherwise, L ← {L, ID next}, DL ← DL + d now,next + C next , E cnt ← E cnt + 1, and set the flag of next in F1 to 1;
[0129] (11) Set now ← next, and jump to (4);
[0130] (12) If E cnt = N - 1, and next is end, then the algorithm terminates, and record L and DL;
[0131] (13) If DL < the current maximum allowable cost of AUV, then complete the mission planning and output L;
[0132] (14) If DL ≥ the current maximum allowable cost of AUV, then N ← N - 1, delete the tasks in TO whose row indices are greater than N, and set the flags of the deleted tasks in F0 to 1. Denote the new list as F2. Without loss of generality, if the deleted task is r, then F2, the new C1, and the new C2 are respectively:
[0133]
[0134]
[0135]
[0136] (15) Set F0 ← F2, C1 ← C1′, C2 ← C2′, and jump to (1);
[0137] (16) If N ≤ the maximum allowable number of deleted tasks, the algorithm terminates and the planning fails.
Claims
1. An AUV mission planning and replanning method based on a double-layer greedy strategy, characterized in that, it includes the following steps: 1) Construct a candidate task set and generate a navigation cost matrix, and sort the candidate task set according to the priority of the tasks; 2) Construct a precedence constraint condition matrix and a sequential constraint condition matrix respectively; 3) Construct an optional task list and mark different types of tasks in the candidate task set; 4) Allocate the maximum number of tasks based on the greedy strategy to obtain a task sequence; 5) Use the modified greedy algorithm to plan the task sequence to generate a task execution sequence.
2. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, characterized in that, the candidate task set is a set of all alternative tasks in the AUV's current navigation mission, and each task in the set contains 5 attributes, namely task number, task priority, task starting pose, task ending pose, and the estimated cost of the task itself.
3. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, characterized in that, the navigation cost matrix is an adjacency matrix generated according to the original order of tasks in the candidate task set, where the matrix element is the navigation cost from the task represented by its row to the task represented by its column.
4. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, characterized in that, the matrix element in the precedence constraint condition matrix is the task number, and each row of the matrix represents a precedence constraint condition. In each row, the task with a smaller index is executed before the task with a larger index. Other tasks can be inserted between the tasks corresponding to two adjacent elements. When the number of tasks in a certain precedence constraint condition is less than the number of columns of the matrix, -1 is used for placeholder. The elements with non -1 values in the matrix are called valid elements.
5. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, characterized in that, the matrix element in the sequential constraint condition matrix is the task number, and each row of the matrix represents a sequential constraint condition. In each row, the tasks are executed in the order of the indices of the corresponding elements. Other tasks cannot be inserted between the tasks corresponding to two adjacent index elements. When the number of tasks in a certain precedence constraint condition is less than the number of columns of the matrix, -2 is used for placeholder. The elements with non -2 values in the matrix are called valid elements.
6. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, characterized in that, the optional task list consists of 0 and 1, and the number of elements is equal to the number of tasks in the candidate task set. The specific construction method is as follows: 3.1) Divide the tasks in the candidate task set into 4 categories, namely alternative tasks, selected tasks, pre - occupied tasks, and deleted tasks; 3.2) Mark the position of the task in the candidate task set as the index of the element in the optional task list, where the element corresponding to the alternative task is marked as 0, and the rest are marked as 1.
7. The AUV mission planning and replanning method based on a double-layer greedy strategy according to claim 1, It is characterized in that the step 4) comprises the following steps: 4.1) Initially, set the element corresponding to the index in the optional task list and the starting task position in the candidate task set to 1, indicating that the starting task has been selected, and mark the remaining tasks as 0, indicating that the remaining tasks are all available for selection; 4.2) Call the task execution sequence and check whether the cost of this sequence is less than the current maximum allowable cost of the AUV. If it is less, terminate the allocation and output this sequence. Otherwise, set the element corresponding to the index in the optional task list and the last task position in the candidate task set to 1, indicating that the last task has been deleted; 4.3) If the last task is in the precedence constraint matrix, delete the element corresponding to this task in the precedence constraint matrix, and move the elements after this element's column forward, filling the empty space with -1; 4.4) If the last task is in the sequence constraint matrix, delete the element corresponding to this task in the sequence constraint matrix, and move the elements after this element's column forward, filling the empty space with -2; 4.5) Repeat steps 4.2) to 4.4) until the cost of the new sequence is less than the current maximum allowable cost of the AUV, then stop task allocation and output the new sequence; 4.6) If the number of deleted tasks is greater than the maximum allowable number of deleted tasks, stop task allocation and report an error.
8. A method for AUV task planning and replanning based on a two-layer greedy strategy according to claim 1, it is characterized in that the step 5) comprises the following steps: 5.1) Search for the tasks corresponding to all non-first-row elements in the sequence constraint matrix, and set the elements corresponding to these tasks in the optional task list to 1, indicating that these tasks are pre-occupied; 5.2) Based on the greedy algorithm, use the starting task as the head node of a directed acyclic graph to construct edges; 5.3) When constructing the i-th edge, if node i + 1 corresponds to the termination task, at this time check whether i + 1 is equal to the number of tasks N in the optional task list. If i + 1 is equal to N, the algorithm terminates and outputs the task execution sequence and the cost of this sequence. Otherwise, set the cost between the tasks corresponding to node i and node i + 1 to infinity; 5.4) Check whether the task corresponding to node i is in the sequence constraint matrix. If it is in the sequence constraint matrix, add its effective elements after the column to the task execution sequence one by one in order. Each time an effective element after the column is added, set i = i + 1 and update the cost. Otherwise, based on the greedy algorithm, select a task with the minimum cost from the tasks corresponding to all elements marked as 0 in the optional task list as the task corresponding to node i + 1; 5.5) Check whether the task selected in step 5.4) is in the precedence constraint matrix. If it is not in the precedence constraint matrix, add this task to the task execution sequence, update the cost, and then execute step 5.10). Otherwise, execute step 5.6); 5.6) Continue to check in the optional task list whether all the elements corresponding to the tasks corresponding to the elements before the column of this task are all 1. If any one is not 1, set the cost between this task and the task corresponding to node i to infinity. Otherwise, execute step 5.7); 5.7) Continue to check whether the element before the column of the task selected in step 5.4) is an element in the sequential constraint condition matrix. If it is an element in the sequential constraint condition matrix, continue to check in the optional task list whether all the elements corresponding to the task corresponding to the element at the beginning of the row in the sequential constraint condition matrix are 1. If at least one is not 1, set the cost between the task corresponding to node i + 1 and the task corresponding to node i to infinity; 5.8) Re-check the cost between the tasks represented by node i and node i + 1. If the cost is infinity, reconstruct the i-th edge and repeat steps 5.3) to 5.6). Otherwise, execute step 5.9); 5.9) Add the task represented by the expanded node i + 1 to the task execution sequence, update the cost of this sequence, and set the corresponding element in the optional task list to 1, indicating that this task has been selected; 5.10) Set i = i + 1 and repeat steps 5.2) to 5.9).