A priority-variable-based multi-agv path planning method

By dynamically adjusting the priority and unlocking process of AGVs, the deadlock and delay issues in multi-AGV path planning are resolved, improving system efficiency and response speed, and achieving more efficient path planning.

CN122308348APending Publication Date: 2026-06-30INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF MICROELECTRONICS CHINESE ACAD OF SCI LTD
Filing Date
2024-12-27
Publication Date
2026-06-30

Smart Images

  • Figure CN122308348A_ABST
    Figure CN122308348A_ABST
Patent Text Reader

Abstract

This invention relates to a multi-AGV path planning method based on variable priority, belonging to the field of multi-AGV path planning technology. It solves the problems of ineffective optimization of total delay costs and the susceptibility to deadlocks in existing technologies for large-scale multi-AGV path planning. The method includes: acquiring task data for each AGV; obtaining and initializing path planning data for each AGV based on its task data; obtaining the initial priority of each AGV based on its task deadline; dynamically updating the priority of each AGV at the next moment according to its initial priority, current priority, and task completion status, and determining whether deadlock has occurred. If deadlock occurs, an unlocking process is performed; the unlocking process includes reversing the next moment's priority and a general action array of AGVs that have not yet reached their destination; and planning the next moment's position of each AGV based on its next moment's priority and the general action array, until all AGVs have reached their task endpoint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of multi-AGV path planning technology, and in particular to a multi-AGV path planning method based on variable priority. Background Technology

[0002] Since the introduction of "Internet+" and "Industry 4.0", major logistics companies have introduced Automated Guided Vehicles (AGVs) for fully automated sorting operations. AGV systems based on multi-AGV collaborative operations have greatly improved sorting efficiency, and multi-AGV path planning has become the key to affecting the quality of sorting operations.

[0003] The multi-AGV path planning problem is categorized under Multi-Agent Path Finding (MAPF). Existing multi-AGV path planning algorithms can be divided into optimal and suboptimal algorithms. Optimal algorithms are inefficient for solving large-scale multi-AGV path planning problems; therefore, suboptimal algorithms are often used. Common suboptimal algorithms include priority-based algorithms, push and swap algorithms, and algorithms based on priority inheritance and backtracking. These algorithms often have high efficiency. However, suboptimal algorithms are prone to deadlock in path planning using acyclic map structures. Furthermore, suboptimal algorithms do not consider the task deadlines of each AGV during path planning, making it difficult to effectively optimize the overall delay cost. Summary of the Invention

[0004] Based on the above analysis, the embodiments of the present invention aim to provide a multi-AGV path planning method based on variable priority, in order to solve the problems of existing large-scale multi-AGV path planning that cannot effectively optimize the total delay cost and are prone to deadlock.

[0005] The objective of this invention is mainly achieved through the following technical solutions:

[0006] This invention provides a multi-AGV path planning method based on variable priority, comprising the following steps:

[0007] Obtain task data for each AGV, including the task start point, task end point, and corresponding task deadline for each AGV;

[0008] Based on the task data of each AGV, the path planning data of each AGV is obtained and initialized; the path planning data includes: optimal path length, initial priority and general action array; wherein, the initial priority of each AGV is obtained based on the task deadline of each AGV;

[0009] Based on the initial priority, current priority, and task completion status of each AGV, the priority of each AGV at the next moment is dynamically updated, and it is determined whether a deadlock has occurred. If a deadlock occurs, an unlocking process is executed. The unlocking process includes flipping the priority of the AGV that has not reached the destination at the next moment and the general action array.

[0010] Based on the priority and general action array of each AGV at the next moment, the position of each AGV at the next moment is planned until all AGVs have reached the corresponding task endpoint.

[0011] Further, calculating the initial priority includes:

[0012] Based on the task deadline and optimal path length of each AGV, the estimated time for each AGV to complete its task is calculated using the following formula:

[0013] d i =Deadline i -l i

[0014] Where, d i This represents the estimated time margin for the i-th AGV to complete its task; Deadline i This indicates the deadline for the task of the i-th AGV; l i This represents the optimal path length for the i-th AGV;

[0015] Based on the estimated time margin for each AGV to complete its task, the initial priority is calculated using the following formula:

[0016]

[0017] Where, ε i Let represent the initial priority of the i-th AGV; len(A) represents the number of AGVs; and D represents the set of estimated margins for all AGVs to complete their tasks.

[0018] Furthermore, the step of calculating the priority of each AGV in the next moment based on its current task completion status includes:

[0019] When the AGV has reached the end of the task at the current moment, its priority at the next moment is set to its initial priority;

[0020] If the AGV has not reached the task endpoint at the current moment, its priority at the next moment is calculated based on its current priority, the corresponding task deadline, and the distance between its current position and the task endpoint.

[0021] Furthermore, the calculation of its priority at the next moment based on its current priority, the corresponding task deadline, and the distance between its current location and the task endpoint includes:

[0022] Based on the corresponding task deadline and the distance between the current location and the task endpoint, the priority heuristic value is calculated using the following formula:

[0023]

[0024] in, Represents the priority heuristic value of the i-th AGV; Deadline i The deadline for the i-th AGV's mission is indicated by t; the current time is indicated by h. i This represents the distance between the current position of the i-th AGV and the destination position of the task;

[0025] The priority at the current moment is added to the priority heuristic value to obtain the priority at the next moment.

[0026] Furthermore, the determination of whether a deadlock has occurred includes:

[0027] Based on the optimal path length of each AGV and the number of AGVs, the deadlock detection threshold is obtained using the following formula:

[0028] T max = max(L) + len(A)

[0029] Where L represents the set of optimal path lengths for all AGVs; len(A) represents the number of AGV vehicles;

[0030] When the current time t > T max When a deadlock occurs, it is determined that a deadlock has occurred.

[0031] When the current time t≤T max At that time, it is determined that no deadlock has occurred.

[0032] Furthermore, the unlocking process includes:

[0033] For AGVs that have not reached the task endpoint, sort their priorities for the next moment from high to low to obtain the current priority array;

[0034] The priorities in the current priority array are flipped and used as the adjusted priorities for the next moment of the AGV that has not reached the task endpoint.

[0035] The elements in the general action array are flipped to obtain the adjusted general action array.

[0036] Furthermore, the priorities of each AGV in the next time step are sorted from high to low. Based on the sorting results, the positions of the AGVs that have not yet been planned for the next time step are planned in turn, including:

[0037] Based on the general action array, an initial candidate position array for the AGV to be planned at the next moment is generated, and based on the map boundary and the position of obstacles in the map, the candidate positions that cannot be moved are removed to obtain the candidate position array for the AGV to be planned at the next moment.

[0038] Calculate the distance of each location in the candidate location array from the destination path of the AGV to be planned, and sort them in a stable descending order to obtain the sorted candidate location array;

[0039] Iterate through the sorted array of candidate positions, and for each candidate position, determine whether any other AGV has reserved the current candidate position in the next time step;

[0040] When another AGV has already reserved the current candidate position for the next moment, the next candidate position is determined for the AGV to be planned.

[0041] Set the position of the AGV to be planned at the next moment as the current candidate position;

[0042] When there are conflicting AGVs, the position for the next moment is planned for the conflicting AGV; wherein, the conflicting AGV is the AGV that has a current alternative position reserved at the current moment and has not planned a position for the next moment.

[0043] When the conflicting AGV successfully plans its position in the next moment, the traversal of the sorted candidate position array ends.

[0044] When the conflicting AGV fails to plan its position in the next moment, the next alternative position is determined for the AGV to be planned.

[0045] When the sorted candidate position array is traversed to the end and no valid position is found for the AGV to be planned in the next moment, the position of the AGV to be planned in the next moment is set to the position of the AGV to be planned in the current moment.

[0046] Furthermore, planning the next position for the conflicting AGV includes:

[0047] Based on the general action array, an initial candidate position array for the conflicting AGV at the next moment is generated, and based on the map boundary and the position of obstacles in the map, the candidate positions that cannot be moved are removed to obtain the candidate position array for the conflicting AGV at the next moment.

[0048] Calculate the path length from each position in the candidate position array of the conflicting AGV to the destination of the conflicting AGV, and sort them in a stable descending order to obtain the sorted candidate position array of the conflicting AGVs.

[0049] Iterate through the sorted array of candidate positions for the conflicting AGVs. For each candidate position of a conflicting AGV, determine whether any other AGV has reserved the candidate position of the current conflicting AGV in the next time step.

[0050] If another AGV has already reserved a candidate position for the currently conflicting AGV in the next moment, determine the next candidate position for the conflicting AGV;

[0051] When the AGV to be planned has reserved a candidate position for the currently conflicting AGV at the current time, the next candidate position is determined for the conflicting AGV;

[0052] Set the position of the conflicting AGV in the next moment as the alternative position of the current conflicting AGV;

[0053] When a second conflicting AGV exists, the position of the second conflicting AGV at the next moment is planned; wherein, the second conflicting AGV is the AGV that has reserved an alternative position for the current conflicting AGV at the current moment, but has not planned a position for the next moment.

[0054] When the second conflicting AGV successfully plans its position in the next moment, the traversal of the candidate position array after sorting the conflicting AGVs ends;

[0055] When the second conflicting AGV fails to plan its position in the next moment, a next alternative position is determined for the conflicting AGV.

[0056] When the array of candidate positions after sorting the conflicting AGVs is traversed to the end, and no valid position is found for the conflicting AGV in the next moment, the position of the conflicting AGV in the next moment is set to the position of the conflicting AGV in the current moment.

[0057] Furthermore, the following formula is used to generate the array of candidate positions for the AGV at the next time step:

[0058]

[0059] Among them, positions i This represents the array of candidate positions for the i-th AGV at the next moment; u now Indicates the position of the i-th AGV at the current moment; u u ,u r ,u d ,u l They represent u respectively nowThe top, right, bottom, and left positions; move represents a general action array.

[0060] Furthermore, the initial value of the general action array is set to {up, right, down, left, wait};

[0061] The optimal path length for each AGV is obtained using the A* algorithm.

[0062] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:

[0063] 1. The present invention, through initial priority setting and priority update strategy, enables the AGV system to dynamically adjust the priority of each AGV according to the task deadline, ensuring that time-sensitive tasks can obtain higher priority, thereby increasing the possibility of these tasks being completed before the deadline. This not only reduces the cost of delays, but also improves the efficiency and response speed of the entire system.

[0064] 2. This invention designs a deadlock detection threshold. When a deadlock is detected, the deadlock problem is solved by swapping the priorities of AGVs that have not reached the destination and flipping the action array, thereby increasing the probability of solving the problem and improving the robustness of the algorithm.

[0065] 3. The priority update strategy of the present invention enables AGV to avoid conflicts more intelligently during the path planning process, reducing path replanning caused by conflicts, thereby improving the efficiency of path planning.

[0066] In this invention, the above-described technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of this invention will be set forth in the following description, and some advantages may become apparent from the description or be learned by practicing the invention. The objects and other advantages of this invention can be realized and obtained from what is particularly pointed out in the description and drawings. Attached Figure Description

[0067] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0068] Figure 1 This is a flowchart illustrating a multi-AGV path planning method based on variable priority in an embodiment of the present invention.

[0069] Figure 2 This is a schematic diagram of the map structure for path planning in an embodiment of the present invention;

[0070] Figure 3 This is a flowchart illustrating the process of planning the position of each AGV at the next moment in an embodiment of the present invention. Detailed Implementation

[0071] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.

[0072] A specific embodiment of the present invention discloses a multi-AGV path planning method based on variable priority, such as... Figure 1 As shown, it includes the following steps S1-S4:

[0073] Step S1: Obtain the task data for each AGV, including the task start point, task end point, and corresponding task deadline for each AGV.

[0074] Specifically, the task start point and task end point are the initial position and the corresponding final position to be reached for each AGV in advance to complete the task. The purpose of path planning is to find the optimal or feasible path from the start point to the end point.

[0075] The corresponding task deadline for each AGV is a time limit for each AGV to complete the task within a specific time. Each AGV needs to reach the destination before the deadline, otherwise it may incur delay costs or affect the overall operation efficiency.

[0076] For example, in this embodiment, the experimental map is set as follows: Figure 2 As shown, the number of AGVs is set to 50, and a task start point, end point, and corresponding task deadline are randomly generated for them.

[0077] Step S2: Based on the task data of each AGV, obtain the path planning data of each AGV and initialize it; the path planning data includes: optimal path length, initial priority and general action array; wherein, the initial priority of each AGV is obtained based on the task deadline of each AGV.

[0078] Specifically, the optimal path length is the shortest path length from the task start point to the task end point. This shortest path length is the theoretically optimal value, calculated using a single-agent path planning algorithm. This means the AGV will not conflict with other AGVs, and the shortest path length is the number of time steps taken by the AGV from its task start point to its end point. In this embodiment, the A* algorithm is used to solve for the optimal path length of each AGV. The optimal path length array for all AGVs is set as L = {l1, l2, ..., l...} i ,…};where, l i This represents the optimal path length for the i-th AGV.

[0079] Further, calculating the initial priority includes:

[0080] Based on the task deadline and optimal path length of each AGV, the estimated time for each AGV to complete its task is calculated using the following formula:

[0081] d i =Deadline i -l i

[0082] Where, d i This represents the estimated time margin for the i-th AGV to complete its task; Deadline i This indicates the deadline for the task of the i-th AGV; l i This represents the optimal path length for the i-th AGV.

[0083] Based on the estimated time margin for each AGV to complete its task, the initial priority is calculated using the following formula:

[0084]

[0085] Where, ε i Let represent the initial priority of the i-th AGV; len(A) represents the number of AGVs; and D represents the set of estimated margins for all AGVs to complete their tasks.

[0086] Specifically, calculating the priority for each AGV ensures that AGVs with more important or urgent tasks can be prioritized for path planning, thereby completing their tasks in the shortest possible time.

[0087] The estimated time margin for AGVs to complete a task is the difference between the task deadline and the estimated completion time. If an AGV has a smaller time margin, it means it needs to complete the task faster and should therefore be given a higher initial priority. The initial priority array for all AGVs is set as E = {ε1, ε2, ..., ε...}. i ,…};where, ε i This indicates the initial priority of the i-th AGV.

[0088] Set the AGV path set Paths = {π1,π2,…,π} i ,…}, element π i Let represent the path of the i-th AGV. Initialize the position of each AGV in the AGV path set at time t=0, i.e., the initial position of each AGV, as its starting position. Among them, s i This indicates the starting position of the i-th AGV.

[0089] At time t=0, i.e., the initial time, the priority of each AGV is set to its corresponding initial priority ε.i .

[0090] The general action array contains all possible positions that the AGV can move to in the next moment. The general action array provides basic action options for the movement of the AGV, and these options will be used to generate the movement path of the AGV during the path planning process.

[0091] Furthermore, the initial value of the general action array is set to {up, right, down, left, wait};

[0092] Specifically, in this embodiment, a unified action array is set for all AGVs, which reduces the need to calculate possible actions for each AGV individually, thereby reducing the computational load of the algorithm. Furthermore, during algorithm implementation, it is not necessary to maintain an independent action array for each AGV, thus simplifying the data structure and algorithm logic.

[0093] Step S3: Based on the initial priority, current priority, and task completion status of each AGV, dynamically update the priority of each AGV at the next moment, and determine whether a deadlock has occurred. If a deadlock occurs, perform an unlocking process. The unlocking process includes flipping the priority of the AGV that has not reached the destination at the next moment and the general action array.

[0094] Specifically, based on the current task status of each AGV, the priority of each GAV when planning the path for the next moment can be dynamically updated, which can ensure that all AGVs can complete their tasks before the deadline, or at least complete them with minimal delay costs.

[0095] Furthermore, the step of calculating the priority of each AGV in the next moment based on its current task completion status includes:

[0096] When the AGV has reached the end of the task at the current moment, its priority at the next moment is set to its initial priority.

[0097] Specifically, when an AGV reaches its task endpoint, it signifies that it has completed the task, and its priority is reset to its initial value. It remains stationary at the endpoint without affecting other AGVs. When a higher-priority AGV needs to pass through its endpoint, the AGV that has already reached the endpoint must yield to it. It should be noted that after an AGV that has reached the task endpoint leaves its endpoint, its priority for the next moment is calculated using the same method as before reaching the endpoint.

[0098] If the AGV has not reached the task endpoint at the current moment, its priority at the next moment is calculated based on its current priority, the corresponding task deadline, and the distance between its current position and the task endpoint, including:

[0099] Based on the corresponding task deadline and the distance between the current location and the task endpoint, the priority heuristic value is calculated using the following formula:

[0100]

[0101] in, Represents the priority heuristic value of the i-th AGV; Deadline i The deadline for the i-th AGV's mission is indicated by t; the current time is indicated by h. i This represents the distance between the current position of the i-th AGV and the destination position of the mission.

[0102] Specifically, the priority heuristic value dynamically reflects the urgency of each AGV's task completion by considering both the AGV's task deadline and its distance from the current position to the destination. When the deadline approaches or the AGV is far from the destination, the heuristic value increases, thereby raising the AGV's priority and ensuring timely task completion.

[0103] In this embodiment, according to as follows Figure 2 As shown in the map, the AGVs typically move along the axes of a Cartesian coordinate system. Therefore, the distance h between the current position of the i-th AGV and the destination position is... i The Manhattan distance is calculated using the distance between the current location and the destination of the task. This is because it directly reflects the distance traveled along the axis from one point to another, which is more consistent with the actual movement path. Moreover, the calculation of the Manhattan distance only involves basic addition and subtraction, making it very efficient in AGV systems with a large amount of computation.

[0104] The priority at the current moment is added to the priority heuristic value to obtain the priority at the next moment.

[0105] Specifically, by obtaining the priority for the next moment using the above method, it is possible to ensure that AGVs with closer task deadlines or farther from the target receive higher priority, thus being given priority consideration in path planning. This helps reduce the risk of task delays and improves the efficiency and responsiveness of the entire AGV system.

[0106] Furthermore, the determination of whether a deadlock has occurred includes:

[0107] Based on the optimal path length of each AGV and the number of AGVs, the deadlock detection threshold is obtained using the following formula:

[0108] T max = max(L) + len(A)

[0109] Where L represents the set of optimal path lengths for all AGVs; len(A) represents the number of AGV vehicles;

[0110] When the current time t > T max When a deadlock occurs, it is determined that a deadlock has occurred.

[0111] When the current time t≤T max At that time, it is determined that no deadlock has occurred.

[0112] Specifically, in the path planning process of multiple AGVs, deadlock means that multiple AGVs are waiting for each other to move so that they can continue to move forward, but no AGV can move because they are all waiting for other AGVs to move first.

[0113] For example, consider two AGVs, AGV1 and AGV2, both of which need to pass through points A and B to complete their tasks. If AGV1 occupies point A first and AGV2 occupies point B first, a deadlock will occur if they both attempt to move to the point already occupied by the other. That is, AGV1 will wait for AGV2 to leave point B, while AGV2 will wait for AGV1 to leave point A. Without any external intervention, neither of them will be able to move forward.

[0114] Specifically, the formula for calculating the deadlock threshold uses the maximum value in the set L of optimal path lengths for all AGVs. This value represents the longest path length required for a single AGV to complete its task without any interference. This value provides a time baseline for the system, meaning that ideally, all AGVs should complete their tasks within this timeframe. The number of AGVs is included in the formula to account for potential conflicts and interactions between AGVs in the system. As the number of AGVs increases, the likelihood of path conflicts also increases, thus requiring additional time to handle these conflicts.

[0115] When the current time t has exceeded the deadlock threshold, it indicates that even considering the longest path length and the number of AGVs, the AGVs in the system should have completed their tasks. If there are still AGVs that have not reached the destination at this time, the system may have deadlocked and needs to be unlocked.

[0116] Furthermore, the unlocking process includes:

[0117] For AGVs that have not reached the task endpoint, sort their priorities from highest to lowest for the next moment to obtain the current priority array.

[0118] The priorities in the current priority array are flipped and used as the adjusted priorities for the next moment of the AGV that has not reached the task endpoint.

[0119] Specifically, the current priority array is represented as: Pold (t+1)={…,p (old,i) (t+1),…,p (old,j) (t+1),…}, where P old This represents the priority array of AGVs that have not reached their destination when a deadlock occurs, at the next time step. The elements in the array are already sorted in descending order of priority, i.e., ...>p (old,i) (t+1)>…>p (old,j) (t+1)>….

[0120] The current priority array is flipped, meaning that the AGV with the highest priority is now the lowest priority, and the AGV with the lowest priority is now the highest priority. This flipping operation breaks the original priority order, thereby breaking the priority dependency chain that may lead to deadlock. In this way, the AGV that was originally waiting for resources may now get a higher priority, thus having the opportunity to act first and break the deadlock.

[0121] Therefore, the priority array of the AGVs that have not reached the destination after being flipped is represented as: P new (t+1)={…,p (new,i) (t+1),…,p (new,j) The element values ​​of (t+1),…} are represented as follows: The new priority obtained after the flip will be used to update the priority of AGVs that have not yet reached the destination in the next time step. It should be noted that for AGVs that have already arrived, their initial priority remains unchanged.

[0122] The elements in the general action array are flipped to obtain the adjusted general action array.

[0123] Specifically, the elements in the general action array are reversed in order to change the movement strategy of the AGVs, thereby preventing them from continuing to move along paths that could lead to deadlock.

[0124] For example, the current general action array is represented as: {up, right, down, left, wait}. By flipping the elements, the adjusted general action array is represented as: {wait, left, down, right, up}.

[0125] Step S4: Based on the priority and general action array of each AGV at the next moment, plan the position of each AGV at the next moment until all AGVs have reached the task endpoint.

[0126] Furthermore, the priority of each AGV in the next moment is sorted from high to low, and the position of the AGV that has not been planned for the next moment is planned in turn according to the sorting result.

[0127] Specifically, based on the priority sorting results, starting with the AGV with the highest priority, the position of each AGV at the next moment is planned in turn. When the position of the current AGV at the next moment has been planned, the position planning of the next AGV is then carried out.

[0128] like Figure 3 As shown, it includes the following steps S41-S49:

[0129] Step S41: Based on the general action array, generate an initial candidate position array for the AGV to be planned at the next moment, and remove the candidate positions that cannot be moved based on the map boundary and the position of obstacles in the map, to obtain the candidate position array for the AGV to be planned at the next moment.

[0130] Furthermore, the following formula is used to generate the initial candidate position array for the AGV to be planned at the next time step:

[0131]

[0132] Among them, positions i This represents the array of initial candidate positions for the i-th AGV at the next moment; u now Indicates the position of the i-th AGV at the current moment; u u ,u r ,u d ,u l They represent u respectively now The top, right, bottom, and left positions; move represents a general action array.

[0133] Specifically, the general motion values ​​provide the AGV with all possible movement options, and the position of the AGV to be planned at the next moment is obtained based on the general motion values.

[0134] It should be noted that when the candidate position of the AGV to be planned is outside the map boundary or there is an obstacle at this position in the next moment, this candidate position is removed from the initial candidate position array, and the remaining candidate positions maintain their original relative order to obtain the candidate position array of the AGV to be planned in the next moment.

[0135] Step S42: Calculate the distance of each position in the candidate position array from the destination path of the AGV to be planned, and sort them in stable descending order to obtain the sorted candidate position array.

[0136] Specifically, the path length between the candidate locations of the AGV to be planned and its destination is calculated. In this embodiment, the A* algorithm is used to calculate the path length.

[0137] The stable descending order ensures that, during the sorting process, if two positions have the same path length to the destination, their original relative order in the array is preserved. This is to ensure the predictability and consistency of the sorting process. In this embodiment, a descending order is used to place alternative positions farther from the destination at the beginning of the array to avoid potential path conflicts in subsequent path planning.

[0138] Step S43: Traverse the sorted candidate position array. For each candidate position, determine whether there are other AGVs that reserve the current candidate position in the next moment.

[0139] Step S44: When another AGV has already reserved the current candidate position in the next moment, determine the next candidate position for the AGV to be planned.

[0140] Specifically, if another AGV has already been reserved at the candidate location for the next moment, it means that the priority of the already reserved AGV is higher than the priority of the AGV to be planned. Therefore, the AGV to be planned cannot move to this location. At this time, the system needs to select the next candidate location for the AGV to be planned and repeat the above judgment steps.

[0141] Step S45: Set the position of the AGV to be planned at the next moment as the current candidate position.

[0142] Step S46: When there are conflicting AGVs, plan the position for the conflicting AGV at the next moment; wherein, the conflicting AGV is an AGV that has reserved the current alternative position at the current moment and has not planned the position for the next moment.

[0143] Specifically, when the AGV to be planned is to move to a position in the next moment, and there is an AGV in the current moment, the position of the AGV at this position in the next moment needs to be planned first. If the planning fails, that is, the AGV at this position cannot move in the next moment, then the AGV to be planned cannot reserve this position in the next moment.

[0144] Furthermore, the step of planning the next position for the conflicting AGV includes steps S4601-S4610:

[0145] Step S4601: Based on the general action array, generate an initial candidate position array for the conflicting AGV at the next moment, and remove the candidate positions that cannot be moved based on the map boundary and the position of obstacles in the map, to obtain the candidate position array for the conflicting AGV at the next moment.

[0146] Specifically, similar to the method used to plan the initial candidate position array for the AGV to be planned in the next moment, the following formula is used to generate the initial candidate position array for the conflicting AGV in the next moment:

[0147]

[0148] Among them, positions i This represents the array of initial candidate positions for the i-th AGV at the next moment; u now Indicates the position of the i-th AGV at the current moment; u u ,u r ,u d ,u l They represent u respectively now The top, right, bottom, and left positions; move represents a general action array.

[0149] It should be noted that when the candidate position of the conflicting AGV in the next moment is outside the map boundary or there is an obstacle at this position, this candidate position is removed from the initial candidate position array, and the remaining candidate positions maintain their original relative order to obtain the candidate position array of the conflicting AGV in the next moment.

[0150] Step S4602: Calculate the path length from each position in the candidate position array of the conflicting AGV to the destination of the conflicting AGV, and sort them in a stable descending order to obtain the sorted candidate position array of the conflicting AGV.

[0151] Step S4603: Traverse the sorted array of candidate positions for the conflicting AGVs. For each candidate position of the conflicting AGV, determine whether any other AGV has reserved the candidate position of the current conflicting AGV in the next moment.

[0152] Step S4604: When another AGV has already reserved a candidate position for the currently conflicting AGV in the next moment, determine the next candidate position for the conflicting AGV.

[0153] Specifically, steps S4602-S4604 are the same as steps S42-S44.

[0154] Step S4605: When the AGV to be planned has reserved a candidate position for the currently conflicting AGV at the current time, determine the next candidate position for the conflicting AGV.

[0155] Specifically, this situation is actually considered as the planned AGV and the conflicting AGV exchanging positions at the next moment. If the positions are exchanged, the two AGVs will travel towards each other on the same route. This movement may lead to a vehicle collision. Therefore, in this embodiment, this position is regarded as an illegal position, and the next alternative position needs to be determined for the conflicting AGV.

[0156] Step S4606: Set the position of the conflicting AGV at the next moment as the alternative position of the current conflicting AGV.

[0157] Step S4607: When there is a second conflicting AGV, plan the position of the second conflicting AGV at the next moment; wherein, the second conflicting AGV is an AGV that has reserved an alternative position for the current conflicting AGV at the current moment, but has not planned the position for the next moment.

[0158] Specifically, when the position that the conflicting AGV wants to move to is also occupied at the current moment, the same method as planning the path for the conflicting AGV is executed, namely steps S4601-S4610, to plan the position of the second conflicting AGV at the next moment.

[0159] Step S4608: When the second conflicting AGV successfully plans its position in the next moment, the traversal of the candidate position array after sorting the conflicting AGVs ends.

[0160] Specifically, when the second conflicting AGV successfully plans its position in the next moment, this position can be released in the next moment, and the conflicting AGV can move to this position in the next moment, while stopping the traversal of the sorted candidate position array of the conflicting AGVs.

[0161] Step S4609: When the second conflicting AGV fails to plan its position in the next moment, determine the next alternative position for the conflicting AGV.

[0162] Specifically, when the second conflicting AGV fails to plan its position in the next moment, it means that the position of the second conflicting AGV in the next moment will still be this position. Therefore, the conflicting AGV cannot move to this position and it is necessary to determine whether the next alternative position can be moved.

[0163] Step S4610: When the traversal of the candidate position array after sorting the conflicting AGVs is completed, and no legal position is found for the next moment of the conflicting AGV, the position of the conflicting AGV at the next moment is set to the position of the conflicting AGV at the current moment.

[0164] Specifically, when the conflicting AGV fails to plan its next position, i.e., the path planning of the conflicting AGV fails, its next position is set to the current position, i.e., it remains stationary, and the AGV to be planned is notified that the path planning of the conflicting AGV has failed.

[0165] Step S47: When the conflicting AGV successfully plans its position in the next moment, the traversal of the sorted candidate position array ends.

[0166] Specifically, when the conflicting AGV successfully plans its position in the next moment, this position can be released in the next moment, and the AGV to be planned can move to this position in the next moment. At the same time, the traversal of the sorted candidate position array is stopped, and the position of the next AGV in the next moment is planned.

[0167] Step S48: When the conflicting AGV fails to plan its position in the next moment, determine the next alternative position for the AGV to be planned.

[0168] Specifically, when the conflicting AGV fails to plan its position in the next moment, it means that the conflicting AGV will still be in the same position in the next moment. Therefore, the AGV to be planned cannot move to this position and it is necessary to determine whether the next alternative position can be moved.

[0169] Step S49: When the sorted candidate position array is traversed to the end and no legal position is found for the next moment of the AGV to be planned, the position of the AGV to be planned at the next moment is set to the position of the AGV to be planned at the current moment.

[0170] Specifically, when the AGV to be planned fails to plan its position at the next moment, that is, when the path planning of the AGV to be planned fails, its position at the next moment is set to the current position, that is, it remains in place.

[0171] Finally, determine whether all AGVs have reached the destination. If so, all AGVs have planned routes. If there are still AGVs that have not reached the destination, execute steps S2-S4 to plan the position of the AGVs that have not reached the destination in the next moment.

[0172] In summary, the multi-AGV path planning method based on variable priority according to the embodiments of the present invention has the following beneficial effects:

[0173] 1. The present invention, through initial priority setting and priority update strategy, enables the AGV system to dynamically adjust the priority of each AGV according to the task deadline, ensuring that time-sensitive tasks can obtain higher priority, thereby increasing the possibility of these tasks being completed before the deadline. This not only reduces the cost of delays, but also improves the efficiency and response speed of the entire system.

[0174] 2. This invention designs a deadlock detection threshold. When a deadlock is detected, the deadlock problem is solved by swapping the priorities of AGVs that have not reached the destination and flipping the action array, thereby increasing the probability of solving the problem and improving the robustness of the algorithm.

[0175] 3. The priority update strategy of the present invention enables AGV to avoid conflicts more intelligently during the path planning process, reducing path replanning caused by conflicts, thereby improving the efficiency of path planning.

[0176] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A multi-AGV path planning method based on variable priority, characterized in that, Includes the following steps: Obtain task data for each AGV, including the task start point, task end point, and corresponding task deadline for each AGV; Based on the task data of each AGV, the path planning data of each AGV is obtained and initialized; the path planning data includes: optimal path length, initial priority and general action array; wherein, the initial priority of each AGV is obtained based on the task deadline of each AGV; Based on the initial priority, current priority, and task completion status of each AGV, the priority of each AGV at the next moment is dynamically updated, and it is determined whether a deadlock has occurred. If a deadlock occurs, an unlocking process is executed. The unlocking process includes flipping the priority of the AGV that has not reached the destination at the next moment and the general action array. Based on the priority and general action array of each AGV at the next moment, the position of each AGV at the next moment is planned until all AGVs have reached the corresponding task endpoint.

2. The method according to claim 1, characterized in that, Calculating the initial priority includes: Based on the task deadline and optimal path length of each AGV, the estimated time for each AGV to complete its task is calculated using the following formula: d i = Deadline i -l i Wherein, d i represents the estimated surplus time of the ith AGV completing the task; Deadline i represents the task deadline of the ith AGV; l i represents the optimal path length of the ith AGV; Based on the estimated time margin for each AGV to complete its task, the initial priority is calculated using the following formula: where ε i represents the initial priority of the ith AGV; len(A) represents the number of AGV vehicles; D represents a set of estimated surplus times for all AGVs to complete the task.

3. The method according to claim 2, characterized in that, The step of calculating the priority of each AGV in the next moment based on its current task completion status includes: When the AGV has reached the end of the task at the current moment, its priority at the next moment is set to its initial priority; If the AGV has not reached the task endpoint at the current moment, its priority at the next moment is calculated based on its current priority, the corresponding task deadline, and the distance between its current position and the task endpoint.

4. The method according to claim 3, characterized in that, The calculation of its priority at the next moment based on its current priority, the corresponding task deadline, and the distance between its current location and the task endpoint includes: Based on the corresponding task deadline and the distance between the current location and the task endpoint, the priority heuristic value is calculated using the following formula: in, Represents the priority heuristic value of the i-th AGV; Deadline i The deadline for the i-th AGV's mission is indicated by t; the current time is indicated by h. i This represents the distance between the current position of the i-th AGV and the destination position of the task; The priority at the current moment is added to the priority heuristic value to obtain the priority at the next moment.

5. The method according to any one of claims 1-4, characterized in that, The determination of whether a deadlock has occurred includes: Based on the optimal path length of each AGV and the number of AGVs, the deadlock detection threshold is obtained using the following formula: T max =max(L)+len(A) Where L represents the set of optimal path lengths for all AGVs; len(A) represents the number of AGV vehicles; When the current time t > T max When a deadlock occurs, it is determined that a deadlock has occurred. When the current time t≤T max At that time, it is determined that no deadlock has occurred.

6. The method according to claim 5, characterized in that, The unlocking process includes: For AGVs that have not reached the task endpoint, sort their priorities for the next moment from high to low to obtain the current priority array; The priorities in the current priority array are flipped and used as the adjusted priorities for the next moment of the AGV that has not reached the task endpoint. The elements in the general action array are flipped to obtain the adjusted general action array.

7. The method according to claim 1, characterized in that, The priorities of each AGV in the next time step are sorted from high to low. Based on the sorting results, the positions of the AGVs that have not yet been planned for the next time step are planned in turn, including: Based on the general action array, an initial candidate position array for the AGV to be planned at the next moment is generated, and based on the map boundary and the position of obstacles in the map, the candidate positions that cannot be moved are removed to obtain the candidate position array for the AGV to be planned at the next moment. Calculate the distance of each location in the candidate location array from the destination path of the AGV to be planned, and sort them in a stable descending order to obtain the sorted candidate location array; Iterate through the sorted array of candidate positions, and for each candidate position, determine whether any other AGV has reserved the current candidate position in the next time step; When another AGV has already reserved the current candidate position for the next moment, the next candidate position is determined for the AGV to be planned. Set the position of the AGV to be planned at the next moment as the current candidate position; When there are conflicting AGVs, the position for the next moment is planned for the conflicting AGV; wherein, the conflicting AGV is the AGV that has a current alternative position reserved at the current moment and has not planned a position for the next moment. When the conflicting AGV successfully plans its position in the next moment, the traversal of the sorted candidate position array ends. When the conflicting AGV fails to plan its position in the next moment, the next alternative position is determined for the AGV to be planned. When the sorted candidate position array is traversed to the end and no valid position is found for the AGV to be planned in the next moment, the position of the AGV to be planned in the next moment is set to the position of the AGV to be planned in the current moment.

8. The method according to claim 7, characterized in that, The step of planning the next position for the conflicting AGV includes: Based on the general action array, an initial candidate position array for the conflicting AGV at the next moment is generated, and based on the map boundary and the position of obstacles in the map, the candidate positions that cannot be moved are removed to obtain the candidate position array for the conflicting AGV at the next moment. Calculate the path length from each position in the candidate position array of the conflicting AGV to the destination of the conflicting AGV, and sort them in a stable descending order to obtain the sorted candidate position array of the conflicting AGVs. Iterate through the sorted array of candidate positions for the conflicting AGVs. For each candidate position of a conflicting AGV, determine whether any other AGV has reserved the candidate position of the current conflicting AGV in the next time step. If another AGV has already reserved a candidate position for the currently conflicting AGV in the next moment, determine the next candidate position for the conflicting AGV; When the AGV to be planned has reserved a candidate position for the currently conflicting AGV at the current time, the next candidate position is determined for the conflicting AGV; Set the position of the conflicting AGV in the next moment as the alternative position of the current conflicting AGV; When a second conflicting AGV exists, the position of the second conflicting AGV at the next moment is planned; wherein, the second conflicting AGV is the AGV that has reserved an alternative position for the current conflicting AGV at the current moment, but has not planned a position for the next moment. When the second conflicting AGV successfully plans its position in the next moment, the traversal of the candidate position array after sorting the conflicting AGVs ends; When the second conflicting AGV fails to plan its position in the next moment, a next alternative position is determined for the conflicting AGV. When the array of candidate positions after sorting the conflicting AGVs is traversed to the end, and no valid position is found for the conflicting AGV in the next moment, the position of the conflicting AGV in the next moment is set to the position of the conflicting AGV in the current moment.

9. The method according to any one of claims 7 or 8, characterized in that, The following formula is used to generate the array of candidate positions for the AGV at the next time step: Among them, positions i This represents the array of candidate positions for the i-th AGV at the next moment; u now Indicates the position of the i-th AGV at the current moment; u u ,u r ,u d ,u l They represent u respectively now The top, right, bottom, and left positions; move represents a general action array.

10. The method according to claim 1, characterized in that, The initial value of the general action array is set to {up, right, down, left, wait}; The optimal path length for each AGV is obtained using the A* algorithm.