Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a multi-AGV planning method and a multi-AGV planning system based on intelligent prediction and error identification.
In order to achieve the purpose, the invention adopts the following specific technical scheme:
a multi-AGV planning method based on intelligent prediction and error identification specifically comprises the following steps:
s1, acquiring a factory map and AGV road network information, wherein the factory map comprises task points and nodes through which the AGV passes;
s2, acquiring an idle AGV trolley list, selecting an AGV trolley with the minimum task cost from the list, and issuing a task to the AGV trolley;
s3, judging whether an idle AGV stops at the task points of other AGV, if so, issuing tasks avoiding to other task points to the idle AGV, otherwise, executing the next step;
s4, comparing two by two according to priorityWhether a public path exists among the AGV trolleys or not is judged, and if not, the step S6 is executed; if yes, respectively calculating the distance between the two AGV trolleys and the starting point and the end point of the public path, and setting the distance as Disi,start、Disi,end、Disj,startAnd Disj,endIf Dis is satisfiedj,start<Disi,start<Disj,endOr Disi,start<Disj,start<Disi,endIf yes, the conflict is determined to be generated in the public path, and the next step is executed, otherwise, the step S6 is executed;
s5, selecting an AGV with low priority to avoid, sequentially calculating the cost of pause avoidance and detour avoidance before the starting point of the public path, predicting forward to judge whether a new conflict is caused by an avoidance scheme in one step, setting an avoidance point which does not cause secondary conflict as a feasible avoidance point, directly issuing an avoidance task if the optimal avoidance point in the feasible avoidance point is the next node of the remnant path, and executing the step S6 if the optimal avoidance point is the node behind the next node of the remnant path; if the AGV trolley with the low priority does not have a feasible avoidance point, issuing an avoidance scheme to the AGV trolley with the high priority according to the same avoidance strategy, reducing the priority after the avoidance is successful, and if the two trolleys do not have the feasible avoidance point, executing the step S6;
s6, judging whether conflicts caused by prediction errors exist or not, wherein the conflicts caused by the prediction errors comprise single-side conflicts and single-point conflicts, if yes, turning around and avoiding are carried out on the AGV with low priority, namely, an avoiding path leaving a public path is searched from the last node position, and the path is vacated to allow the AGV with high priority to pass so as to resolve the conflicts; if not, executing the next step;
and S7, judging whether deadlock exists according to the avoidance relation record, if not, emptying the avoidance relation record, executing step S3, if so, trying to turn around and avoid from low priority to high priority, and if a certain AGV car avoidance scheme is feasible, issuing an avoidance task and then executing step S3.
Preferably, the specific method for determining whether the public path exists in step S4 is as follows:
and taking the nodes of the residual paths of the AGV with low priority as objects, inquiring whether the nodes exist or not on the reverse order of the residual paths of the AGV with high priority, and continuously judging backwards until the nodes are different if the nodes exist, thereby obtaining the public path.
Preferably, the avoidance cost of the AGV with the low priority in step S5 includes a waiting cost and a path cost, where the path cost is the length of the avoidance path, and the waiting cost is the distance length corresponding to the AGV with the high priority passing through the common path.
Preferably, the single-point conflict specifically means that the next positions of the two AGV carts are the same, and the current positions of the two AGV carts are the next position, assuming that the current position node of cart j is LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: pathi[0]=Pathj[0]And Locj=Pathi[1]And Loci=Pathj[1]If yes, the conflict is a single point conflict;
the unilateral conflict specifically means that the next positions of two AGV trolleys are the current positions of the AGV trolleys, and the current position node of the AGV trolley j is assumed to be the LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: locj=Pathi[0]And Loci=Pathj[0]Then it is a single side collision.
Preferably, a classic topology ranking algorithm is used to calculate whether a deadlock exists in step S7.
A multiple AGV planning system based on intelligent prediction and error recognition, comprising:
the map and road network unit is used for acquiring a factory map and AGV road network information, the factory map comprises task points and nodes through which AGV trolleys pass, and the AGV road network information refers to connection information between the nodes and between the task points;
the task unit is used for butting a task module at an upper level and starting to arrange the AGV to complete a task when a task requirement exists;
the dispatching and avoiding unit is used for acquiring an idle AGV trolley list, selecting an AGV trolley with the minimum task cost from the idle AGV trolley list and issuing a task to the AGV trolley; if an idle AGV stops at the task points of other AGV trolleys, issuing tasks avoiding other task points to the idle AGV, comparing every two AGV trolleys according to the priority to determine whether a public path exists between the AGV trolleys executing the tasks, respectively calculating the distance between the two AGV trolleys and the starting point and the end point of the public path, and setting the distance as Disi,start、Disi,end、Disj,startAnd Disj,endIf Dis is satisfiedj,start<Disi,start<Disj,endOr Disi,start<Disj,start<Disi,endIf yes, determining that the conflict is generated in the public path; selecting an AGV with low priority for avoiding, sequentially calculating the cost of pause avoiding and detour avoiding of the AGV before the starting point of a public path, predicting forward to judge whether a new conflict is caused by an avoiding scheme in one step, setting an avoiding point which does not cause secondary conflict as a feasible avoiding point, directly issuing an avoiding task if the optimal avoiding point in the feasible avoiding point is the next node of a residual path, and if the optimal avoiding point is the node behind the next node of the residual path; if the AGV trolleys with low priority do not have feasible evasion points, issuing an evasion scheme to the AGV trolleys with high priority according to the same evasion strategy, reducing the priority after the avoidance is successful, if the two trolleys do not have the feasible evasion points, judging whether conflicts caused by prediction errors exist or not, wherein the conflicts caused by the prediction errors comprise single-side conflicts and single-point conflicts, if so, performing turn-around avoidance by using the AGV trolleys with low priority, namely searching an evasion path leaving the public path from the last node position, vacating the path and allowing the AGV trolleys with high priority to pass so as to resolve the conflicts; if the AGV dolly avoidance scheme is feasible, issuing an avoidance task.
Preferably, the specific method for determining whether the common path exists is as follows:
and taking the nodes of the residual paths of the AGV with low priority as objects, inquiring whether the nodes exist or not on the reverse order of the residual paths of the AGV with high priority, and continuously judging backwards until the nodes are different if the nodes exist, thereby obtaining the public path.
Preferably, the avoidance cost of the AGV with the low priority includes a waiting cost and a path cost, the path cost is the length of the avoidance path, and the waiting cost is the distance length corresponding to the AGV with the high priority passing through the public path.
Preferably, the single-point conflict specifically means that the next positions of the two AGV carts are the same, and the current positions of the two AGV carts are the next position, assuming that the current position node of cart j is LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: pathi[0]=Pathj[0]And Locj=Pathi[1]And Loci=Pathj[1]If yes, the conflict is a single point conflict;
the unilateral conflict specifically means that the next positions of two AGV trolleys are the current positions of the AGV trolleys, and the current position node of the AGV trolley j is assumed to be the LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: locj=Pathi[0]And Loci=Pathj[0]Then it is a single side collision.
Preferably, the scheduling and avoiding unit calculates whether a deadlock exists by adopting a classic topological sorting algorithm.
The invention has the beneficial effects that:
1. aiming at the problem that when a conflict occurs, a large number of turning around situations are needed for avoiding, and therefore the efficiency is low, the path, the position and the state information of the trolley are obtained through real-time communication with the trolley, the conflict which is about to occur is predicted, the cost of avoiding at different avoiding points is calculated, the best avoiding scheme is intelligently selected, the conflict is avoided through a method of suspending or re-planning the path in advance, and therefore the efficiency of the multi-AGV planning system is improved.
2. In order to reduce the failure of the avoidance scheme caused by errors brought by prediction, the avoidance task is issued only when the trolley is about to reach the optimal avoidance point. And for conflicts caused by prediction errors, identifying and resolving conflicts through a set conflict type, and correcting errors between the prediction and the actual operation process.
3. The method comprises the steps of judging the conditions of deadlock caused by mutual avoidance of the trolleys, and solving the problem of deadlock conflict when the deadlock occurs.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Other embodiments, which can be derived by one of ordinary skill in the art from the embodiments given herein without any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, the present invention provides a multiple AGV planning method based on intelligent prediction and error identification, which specifically includes the following steps:
s1, acquiring a factory map and AGV road network information, wherein the factory map comprises task points and nodes through which the AGV passes;
s2, acquiring an idle AGV trolley list, selecting an AGV trolley with the minimum task cost from the list, and issuing a task to the AGV trolley; this step can be described in detail as follows:
s3, judging whether an idle AGV stops at the task points of other AGV, if so, issuing tasks avoiding to other task points to the idle AGV, otherwise, executing the next step;
s4, comparing every two AGV trolleys executing the task according to the priority to determine whether a public path exists between the AGV trolleys executing the task, and if not, executing the step S6; if yes, respectively calculating the distance between the two AGV trolleys and the starting point and the end point of the public path, and setting the distance as Disi,start、Disi,end、Disj,startAnd Disj,endIf Dis is satisfiedj,start<Disi,start<Disj,endOr Disi,start<Disj,start<Disi,endIf yes, the conflict is determined to be generated in the public path, and the next step is executed, otherwise, the step S6 is executed;
the specific method for determining whether the public path exists in step S4 is as follows:
and taking the nodes of the residual paths of the AGV with low priority as objects, inquiring whether the nodes exist or not on the reverse order of the residual paths of the AGV with high priority, and continuously judging backwards until the nodes are different if the nodes exist, thereby obtaining the public path.
S5, selecting an AGV with low priority to avoid, sequentially calculating the cost of pause avoidance and detour avoidance before the starting point of the public path, predicting forward to judge whether a new conflict is caused by an avoidance scheme in one step, setting an avoidance point which does not cause secondary conflict as a feasible avoidance point, directly issuing an avoidance task if the optimal avoidance point in the feasible avoidance point is the next node of the remnant path, and executing the step S6 if the optimal avoidance point is the node behind the next node of the remnant path; if the AGV trolley with the low priority does not have a feasible avoidance point, issuing an avoidance scheme to the AGV trolley with the high priority according to the same avoidance strategy, reducing the priority after the avoidance is successful, and if the two trolleys do not have the feasible avoidance point, executing the step S6;
in step S5, the avoidance cost of the AGV with low priority includes a waiting cost and a path cost, where the path cost is the length of the avoidance path, and the waiting cost is the distance length corresponding to the AGV with high priority passing through the common path.
S6, judging whether conflicts caused by prediction errors exist or not, wherein the conflicts caused by the prediction errors comprise single-side conflicts and single-point conflicts, if yes, turning around and avoiding are carried out on the AGV with low priority, namely, an avoiding path leaving a public path is searched from the last node position, and the path is vacated to allow the AGV with high priority to pass so as to resolve the conflicts; if not, executing the next step;
the single-point conflict specifically means that the next positions of two AGV trolleys are the same, and the current positions of the two AGV trolleys are the next position, and it is assumed that the current position node of the trolley j is LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: pathi[0]=Pathj[0]And Locj=Pathi[1]And Loci=Pathj[1]If yes, the conflict is a single point conflict;
the unilateral conflict specifically means that the next positions of two AGV trolleys are the current positions of the AGV trolleys, and the current position node of the AGV trolley j is assumed to be the LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: locj=Pathi[0]And Loci=Pathj[0]Then it is a single side collision.
And S7, judging whether deadlock exists according to the avoidance relation record, if not, emptying the avoidance relation record, executing step S3, if so, trying to turn around and avoid from low priority to high priority, and if a certain AGV car avoidance scheme is feasible, issuing an avoidance task and then executing step S3.
In step S7, a classic topology ranking algorithm is used to calculate whether a deadlock exists.
The invention is explained in more detail below with reference to a specific example.
A. Acquiring a factory map and AGV road network information: taking the small-scale plant map shown in fig. 2 as an example, the map G of the rasterized map is (V, E), where V is a node set of the map and includes two attributes: the AP point represents a processing or storage location of the product, called a task point; the LM points represent nodes that can be traversed; e is the set of edges in the graph, the lanes on the edges are designed as bidirectional single lines.
B. Receiving a task: and when a task demand exists, the AGV trolley can be arranged to complete the task by butting the task modules at the upper level.
C. Acquiring whether an idle trolley exists: the dispatching and avoiding system is communicated with the AGV, the state of the AGV is idle when the AGV is started, and the state of the AGV is busy when the AGV starts to run by a task; when the AGV finishes the task and stays at a certain AP point, the state of the AGV turns to idle. And communicating with all the trolleys, executing the next step if the idle trolleys exist, repeating the step if the idle trolleys do not exist, namely the trolleys are in a busy state, and waiting for the trolleys to finish the task.
D. And selecting an AGV with the minimum cost by an idle trolley and issuing the AGV: and for the received task, sequentially calculating the cost of the idle trolley for completing the task, wherein the cost calculation mode is that the shortest path distance from the position of the idle trolley to the task starting point is added with the shortest path distance from the task starting point to the task ending point, and the AGV trolley with the minimum path cost is selected to issue the task.
E. Whether the idle trolley is stopped at the task point of other trolleys: and F, when a certain AGV trolley i receives the task, if an idle AGV trolley j stops at the task starting point or the task end point of the AGV trolley i, executing the step F. Step G is performed if no free trolley is stopped at the task point of the other trolley.
F. Issuing evasion tasks to other task points for the idle trolley: because the tasks are generated according to actual requirements, when the AGV trolley 1 reaches the task point, the AGV trolley 2 cannot be guaranteed to leave the task point after receiving the tasks, at the moment, tasks avoiding to other AP points need to be sent to the idle trolleys, the task starting point is the AP point where the idle trolleys are located, the task end point selects the nearest AP point from the AP points excluding the positions where all other idle trolleys are located, the task starting points of busy trolleys and the task end point, and then the step G is executed.
G. Whether a common path exists between busy cars: b, inquiring whether a public path exists from front to back for the remaining uncompleted task paths of a certain two AGV trolleys according to the busy AGV trolleys with the set priority, and executing the step H if the public path exists; and if the public path does not exist, executing the step J.
The initial priority setting mode is that the earlier task has higher priority, and the setting is human and can be modified according to the preference.
In order to make the low-priority carts evade the high-priority carts as much as possible in the multiple-AGV system, it is assumed that there are four carts a, b, c, d with high to low priorities, and the multiple AGV carts are compared two by two in the sequence shown in FIG. 3. In such a comparison sequence, if the vehicle c needs to avoid the vehicle b and the vehicle a at the same time, the vehicle b and the vehicle c are compared (the sequence is 2 in the figure) to initially avoid the vehicle c, but because the priority of the vehicle a is higher, the vehicle b avoids the vehicle a with the higher priority first after the comparison sequence (the sequence is 4 in the figure).
H. Predicting whether the common path is simultaneously traversed: for two vehicles i and j with a common path, calculating the distance (Dis) between the vehicles i and j and the starting point and the end of the common path respectivelyi,start、Disi,end) And (Dis)j,start、Disj,end) If Dis is satisfiedj,start<Disi,start<Disj,endOr Disi,start<Disj,start<Disi,endIf the conflict is generated by the public path at the same time, executing the step I; otherwise, step J is performed.
The remaining paths for AGV car i and car j are used to find if a common path exists (assuming that j has a low priority), and the common path at this time is referred to as the opposite path. The searching mode is that the nodes of the residual path Pathj of the trolley j are sequentially taken as objects, whether the nodes exist is inquired on the reverse Repathi of the residual path Pathi of the trolley i, if yes, the nodes are continuously judged backwards, and the pointed public path is found until the nodes are not equal, which is exemplified as follows.
Example 1: remnant Path of carriage jj: LM31, LM32, AP 13; remnant Path of cart ii:LM34,LM33,LM26,AP09。
Example 2: remnant Path of carriage jj: LM29, LM30, LM31, LM32, LM33, LM26, AP 13; remnant Path of cart ii:LM34,LM33,LM26,AP09。
Example 3: remnant Path of carriage jj: LM30, LM31, LM32, LM33, LM34, LM35, AP 14; remnant Path of cart ii:LM35,LM34,LM33,LM32,AP12。
For example 1, the common path for cart j and cart i is empty; for example 2, the common path for cart j and cart i is LM 33; for example 3, the common paths for cart j and cart i are LM32, LM33, LM34, LM 35.
I. Selecting an AGV trolley to issue a pause waiting or bypassing evading task: the method comprises the steps of avoiding with an AGV trolley j with low priority, sequentially calculating the cost of each LM point of the AGV trolley j for pause avoiding and detour avoiding before the starting point of a public path, predicting forward to judge whether an avoiding scheme can cause conflict with other trolleys or not in one step, taking an avoiding point which does not cause secondary conflict as a feasible avoiding point, and issuing an avoiding task to the AGV trolley j if the optimal avoiding point in the feasible avoiding point is the next point of the residual path of the AGV trolley j (recording an avoiding relation if the optimal avoiding scheme is pause avoiding and issues the avoiding task); if the optimal avoidance point in the feasible avoidance points is a node behind the next point of the residual path of the trolley J, executing the step J; and if no feasible avoidance point exists, the AGV trolley i with high priority is used for avoiding, and the avoidance method is the same as that of the trolley j. And if the trolley i is successfully avoided, the priority of the trolley i is reduced to J, and if no feasible avoiding point exists in the two trolleys, the step J is executed.
When two trolleys comprise a common path, the AGV trolley j with low priority is used for avoiding, and the cost of each LM point for pause avoidance and detour avoidance before the starting point of the common path is calculated in sequence. Taking the task shown in fig. 4 as an example, assume that the task starting point of cart j is AP12, and the task ending point is AP 14; the task starting point of the trolley i is AP11, and the task ending point is AP 13. If cart j is currently at position 1 and cart i is currently at position 2, the common paths are LM32, LM33, LM34, and LM 35. The cost of AGV car j at each point before LM31 is calculated as: the waiting cost is the time for waiting the trolley i to pass through the public path in situ, the path cost is the length of the evaded path, and in order to unify the measurement unit, the waiting cost is redefined as the distance length to be traveled for waiting the trolley i to pass through the public path.
For each point before the common path, LM25, LM29, LM30, LM 31. And the trolley j calculates the waiting and bypassing costs in turn, intelligently selects an optimal avoidance scheme and reduces errors caused by the errors as much as possible.
For the LM25 node, for example, the cost of pausing waiting cart i through the common path is 6 (assuming the distance between the two nodes is 1), and the path cost remains 9; and bypassing, namely searching for other paths, here LM25, LM21, LM22, LM23, LM18, LM11, LM12, LM13, LM14, LM15, LM16, LM20, LM24, LM28, LM36, LM35 and AP14, wherein waiting cost is 0 without waiting at the moment, and path cost is 17. The cost of suspending the wait is better for the LM25 node. As another example of the node LM31, the cart i also advances in the process of the cart j arriving at the node LM31, and it is predicted that the cart j arrives at the position 3 and the cart i arrives at the position 4 in a constant speed manner, at this time, the waiting cost for stopping evasion is 3, and the path cost is 6; the waiting cost of the detour avoidance is 0 and the path cost is 20.
The optimal way to avoid node LM31 is to suspend avoidance at the cost of 9 and better than node LM 25. The system does not process at this time, and a pause or detour task is issued until the next point of the trolley j is the optimal avoidance point, so that the purpose of intelligently selecting the optimal avoidance scheme in such a way and reducing errors caused by the errors as much as possible is to prevent the errors from being large due to long-distance prediction. And recording the avoidance relation when the optimal avoidance scheme is to suspend avoidance and issue the avoidance task.
When the optimal avoidance point and avoidance mode are searched for the trolley j, in order that the adopted avoidance strategy does not cause secondary conflict with other trolleys, the strategy of predicting forward to judge whether the avoidance scheme causes conflict with other trolleys in one step is adopted, and the avoidance point which does not cause the secondary conflict is the feasible avoidance point. Taking the situation in fig. 5 as an example, assume that the task starting point of cart j is AP12 and the task ending point is AP 14; the task starting point of the trolley i is AP11, the task ending point is AP13, the task starting point of the trolley k is AP09, and the task ending point is AP 06. If the trolley j is currently at the position 1 and the trolley i is currently at the position 2, the priority is k, i, j from high to low. When the conflict between the trolley j and the trolley i is judged, the feasibility of performing pause avoidance and detour avoidance on each node in front of the starting point of the public path is sequentially judged. The total cost of the pause and the waiting of the trolley j at the position 1 is 15, and the total cost of the detour avoidance is 17; while the total cost of pausing at position 3 is 9 and the total cost of detour is 20. However, when the cart j is suspended waiting for the cart i at the LM31, if the cart k is at the position 5 at this time, the remaining paths of the cart i are LM32, LM33 and LM34 …, and the remaining paths of the cart k are AP09, LM26, LM33 and LM32 …, which are originally the common paths with the cart k are LM32 and LM33, but the situations of different elapsed times and no conflict are converted into conflict, because the cart j needs to wait for the cart i at the LM32 for a distance of 3. Therefore, when the feasibility and the cost of pause and detour are searched for each node which can be avoided, one-step judgment is carried out forward to judge whether secondary conflict with other vehicles is caused. At this point the car j pause scheme at position 3 is not feasible and the optimal choice is to wait at position 1. If the trolley j is at the position 6 currently, and all the possible avoidance nodes LM29, LM30 and LM31 are infeasible nodes after predicting forward by one step, the priorities of the trolley j and the trolley k are exchanged, so that a feasible scheme that the trolley j pauses the avoidance trolley i at the LM31 position and the trolley k pauses the avoidance trolley j at the LM26 position is generated.
J. Whether there are conflicts resulting from prediction errors: the prediction is premised on the assumption that the AGV passes through two LM points with equal time, but errors exist inevitably in an actual operation environment, so that conflict resolution possibly fails based on prediction, and further conflict and deadlock which cannot be resolved by prediction are generated; otherwise, executing step L.
The prediction is premised on the assumption that the time of the AGV passing through the two LM points is equal, but errors exist inevitably in an actual operation environment, so that conflict resolution possibly fails based on prediction, conflicts and deadlocks which cannot be resolved by prediction are generated, and two prediction conflict types are designed for recognizing and detecting conflicts caused by prediction errors, so that errors generated by intelligent prediction are corrected.
The single-point conflict specifically means that the next positions of two AGV trolleys are the same, and the current positions of the two AGV trolleys are the next position, and it is assumed that the current position node of the trolley j is LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: pathi[0]=Pathj[0]And Locj=Pathi[1]And Loci=Pathj[1]If yes, the conflict is a single point conflict;
the unilateral conflict specifically means that the next positions of two AGV trolleys are the current positions of the AGV trolleys, and the current position node of the AGV trolley j is assumed to be the LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: locj=Pathi[0]And Loci=Pathj[0]Then it is a single side collision.
K. Selecting an AGV to issue a rollback evasion task: and (4) turning around and avoiding the trolley j with lower priority, namely searching an avoiding path which leaves the public path from the last node position of the trolley j, and vacating the path to allow the trolley i to pass so as to resolve the conflict.
L, whether deadlock exists: the prediction is premised on the assumption that the time of the AGV passing through the two LM points is equal, but errors are unavoidably generated in an actual operation environment, so that conflict resolution possibly fails based on prediction, conflicts and deadlocks which cannot be resolved through prediction are generated, whether the deadlocks exist is judged according to the avoidance relation records recorded by the system, and if the conflicts and the deadlocks exist, the step M is executed; otherwise, the record of the avoidance relation is empty, and the step E is executed.
In the process of stopping avoidance, deadlock can be caused along with accumulation of prediction errors, and therefore in each conflict detection cycle process, whether deadlock exists is judged according to the avoidance relation recorded in the step I. The method specifically comprises the following steps:
deadlock is a situation where cars wait for each other to form a closed loop, fig. 6 is an example of a kind of three cars forming a deadlock. Assuming that the priorities of the three trolleys are i, j, k, the avoidance of k pause avoidance j, j pause avoidance i and i pause avoidance k is generated in the avoidance process, so that deadlock is formed. A classic topology ranking algorithm is used here to calculate whether there is a deadlock in the graph.
M, selecting an AGV to issue a deadlock resolution task: and (4) for a plurality of dead-locked trolleys, sequentially trying to turn around and avoid from low priority to high priority, and when an AGV trolley avoiding scheme is feasible, issuing an avoiding task and then executing the step E.
For multiple carts producing a deadlock, the evasion is attempted back-off in order from low priority to high, as for the example presented in fig. 6, the search is preferably started from the cart k with the lowest priority. And the trolley k tries to turn around, namely, the current position of the trolley k is taken as a node passed by the trolley, if the trolley is on the side, the current position is taken as a node passed by the trolley, the evading vehicle is searched for as a vehicle which suspends the evading trolley k, namely, the trolley i, the searching position is the nearest node outside the public path of the trolley j and the trolley i, and the priority of the trolley k is placed behind the trolley i. The purpose of doing so is that after the trolley k leaves the path of the trolley i which is suspended and waits for the trolley k, the trolley k starts to avoid due to low priority, the trolley i can pass through, and deadlock is resolved. Note that when the car searches for the rollback scheme, the forward prediction one-step method in step I is still adopted, and when the head-off rollback still conflicts with other cars, other cars are searched for avoiding. The purpose of doing so is that when a plurality of dollies form the deadlock, the dolly that is close to the center probably can't avoid, and one step of predicting forward can make the vehicle that is close to the periphery turn around to roll back and avoid to the conflict of successfully resolving.
And after the conflict is resolved, emptying the avoidance relation record.
The invention also provides a multi-AGV planning system based on intelligent prediction and error identification, which comprises:
the map and road network unit is used for acquiring a factory map and AGV road network information, the factory map comprises task points and nodes through which AGV trolleys pass, and the AGV road network information refers to connection information between the nodes and between the task points;
the task unit is used for butting a task module at an upper level and starting to arrange the AGV to complete a task when a task requirement exists;
the dispatching and avoiding unit is used for acquiring an idle AGV trolley list, selecting an AGV trolley with the minimum task cost from the idle AGV trolley list and issuing a task to the AGV trolley; if an idle AGV stops at the task points of other AGV trolleys, issuing tasks avoiding other task points to the idle AGV, comparing every two AGV trolleys according to the priority to determine whether a public path exists between the AGV trolleys executing the tasks, respectively calculating the distance between the two AGV trolleys and the starting point and the end point of the public path, and setting the distance as Disi,start、Disi,end、Disj,startAnd Disj,endIf Dis is satisfiedj,start<Disi,start<Disj,endOr Disi,start<Disj,start<Disi,endIf yes, determining that the conflict is generated in the public path; selecting an AGV with low priority for avoiding, sequentially calculating the cost of pause avoiding and detour avoiding of the AGV before the starting point of a public path, predicting forward to judge whether a new conflict is caused by an avoiding scheme in one step, setting an avoiding point which does not cause secondary conflict as a feasible avoiding point, directly issuing an avoiding task if the optimal avoiding point in the feasible avoiding point is the next node of a residual path, and if the optimal avoiding point is the node behind the next node of the residual path; if the AGV trolleys with low priority do not have feasible avoidance points, issuing an avoidance scheme to the AGV trolleys with high priority according to the same avoidance strategy, reducing the priority after avoidance is successful, if the AGV trolleys do not have the feasible avoidance points, judging whether conflicts caused by prediction errors exist or not, wherein the conflicts caused by the prediction errors comprise single-side conflicts and single-point conflicts, and if the conflicts exist, the conflicts caused by the prediction errors comprise single-side conflictsIf so, turning around and avoiding the AGV with low priority, namely searching an avoiding path leaving the public path from the last node position, vacating the path and enabling the AGV with high priority to pass through so as to resolve conflicts; if the AGV dolly avoidance scheme is feasible, issuing an avoidance task.
Preferably, the specific method for determining whether the common path exists is as follows:
and taking the nodes of the residual paths of the AGV with low priority as objects, inquiring whether the nodes exist or not on the reverse order of the residual paths of the AGV with high priority, and continuously judging backwards until the nodes are different if the nodes exist, thereby obtaining the public path.
Preferably, the avoidance cost of the AGV with the low priority includes a waiting cost and a path cost, the path cost is the length of the avoidance path, and the waiting cost is the distance length corresponding to the AGV with the high priority passing through the public path.
Preferably, the single-point conflict specifically means that the next positions of the two AGV carts are the same, and the current positions of the two AGV carts are the next position, assuming that the current position node of cart j is LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: pathi[0]=Pathj[0]And Locj=Pathi[1]And Loci=Pathj[1]If yes, the conflict is a single point conflict;
the unilateral conflict specifically means that the next positions of two AGV trolleys are the current positions of the AGV trolleys, and the current position node of the AGV trolley j is assumed to be the LocjThe remaining Path is PathjThe current position node of the trolley i is LociThe remaining Path is PathiIf the following conditions are met: locj=Pathi[0]And Loci=Pathj[0]Then it is a single side collision.
Preferably, the scheduling and avoiding unit calculates whether a deadlock exists by adopting a classic topological sorting algorithm.
The invention has the beneficial effects that:
1. aiming at the problem that when a conflict occurs, a large number of turning around situations are needed for avoiding, and therefore the efficiency is low, the path, the position and the state information of the trolley are obtained through real-time communication with the trolley, the conflict which is about to occur is predicted, the cost of avoiding at different avoiding points is calculated, the best avoiding scheme is intelligently selected, the conflict is avoided through a method of suspending or re-planning the path in advance, and therefore the efficiency of the multi-AGV planning system is improved.
2. In order to reduce the failure of the avoidance scheme caused by errors brought by prediction, the avoidance task is issued only when the trolley is about to reach the optimal avoidance point. And for conflicts caused by prediction errors, identifying and resolving conflicts through a set conflict type, and correcting errors between the prediction and the actual operation process.
3. The method comprises the steps of judging the conditions of deadlock caused by mutual avoidance of the trolleys, and solving the problem of deadlock conflict when the deadlock occurs.
In light of the foregoing description of the preferred embodiments of the present invention, those skilled in the art can now make various alterations and modifications without departing from the scope of the invention. The technical scope of the present invention is not limited to the contents of the specification, and must be determined according to the scope of the claims.