Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides an express sorting method based on an automatic guide vehicle.
The invention adopts the following technical scheme:
an express sorting method based on an automatic guiding vehicle comprises a square guiding path, an upper computer and the automatic guiding vehicle, wherein the automatic guiding vehicle runs along the square guiding path and communicates with the upper computer through a WiFi local area network, the upper computer distributes tasks and paths to the automatic guiding vehicle, and the automatic guiding vehicle collects express from a goods taking port and then reaches a sorting port along a preset route to finish a sorting task.
The grid-type guide path is modeled by using a directed graph, two ends of each edge of the guide path are respectively provided with one RFID tag as an identification card, the serial number information is different, each station is provided with one RFID tag as a station card, each branch point is provided with one RFID tag as an execution card, and when the automatic guide vehicle reads the execution card, the automatic guide vehicle executes a command corresponding to the last read tag card; each station is provided with an RFID tag as a station card, and when the automatic guided vehicle reads the station card, the vehicle stops immediately after arriving at the corresponding station;
and an RFID reader is arranged right below the bottom of the automatic guided vehicle, and is used for reading RFID label information and sending the RFID label information to an upper computer.
The host computer distributes task and route and gives the automatic guided vehicle, and the automatic guided vehicle arrives the letter sorting mouth along predetermined route after getting the goods mouth and collecting the express delivery, accomplishes the letter sorting task, specifically is:
the upper computer calculates off-line path node information through an A-x algorithm according to task allocation, converts the path node information into command information corresponding to each RFID label and sends the command information to the automatic guided vehicle;
the automatic guided vehicle sends the read RFID label information to the upper computer in real time, and the upper computer prevents conflicts among the multiple AGV trolleys according to a point-side anti-conflict algorithm.
The path node information is converted into information corresponding to each RFID label, and the method specifically comprises the following steps:
(1) determining that the up-down and left-right directions of the field guide track and the modeling map are consistent, and starting n from 0;
(2) comparing the edge formed by the n and n +1 nodes in the path node information with the edge formed by the n +1 and n +2 nodes, judging the directions of the two edges to obtain a command corresponding to an ending identification card of the automatic guided vehicle on the edge formed by the n and n +1 nodes, wherein n is a natural number, and continuously executing the step 3;
(3) n is increased by 1 and the process continues with step 2.
The upper computer prevents the conflict among the multiple automatic guided vehicles according to a point frontier defense conflict algorithm, and specifically comprises the following steps:
(1) according to the directed graph, an automatic guided vehicle waiting queue of each node and each bidirectional edge is established on the upper computer;
(2) when the automatic guided vehicle reads the RFID label, the card number information is sent to an upper computer layer, if the card number information is read to be the starting identification card, the step 6 is executed, and if the card number information is read to be the ending identification card, the step 3 is executed;
(3) if the next edge to be reached by the automatic guided vehicle is a bidirectional edge, executing the step 4, otherwise executing the step 5;
(4) the upper computer inquires an automatic guided vehicle waiting queue of a node adjacent to the ending identification card, simultaneously inquires an automatic guided vehicle waiting queue of the next edge, if no automatic guided vehicle exists in the automatic guided vehicle waiting queue of the node and the edge, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the edge, the upper computer does not send any instruction, the automatic guided vehicle continues to advance, otherwise, the upper computer sends an instruction to stop the automatic guided vehicle standing horse, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the edge, and then the step 2 is executed;
(5) the upper computer inquires an automatic guide vehicle waiting queue of a node adjacent to the ending identification card, if no automatic guide vehicle exists in the automatic guide vehicle waiting queue of the node, the upper computer does not send any instruction, the automatic guide vehicle continues to advance, the automatic guide vehicle trolley is added into the automatic guide vehicle waiting queue of the node and the side, otherwise, the upper computer sends an instruction to stop the automatic guide vehicle standing horse, the automatic guide vehicle is added into the automatic guide vehicle waiting queue of the node and the side, and then the step 2 is executed;
(6) if the last edge passed by the automatic guided vehicle is a bidirectional edge, executing the step 7, otherwise executing the step 8;
(7) removing the occupation of the automatic guided vehicle on the node and the edge, deleting the automatic guided vehicle in the waiting queue of the automatic guided vehicle on the node and the edge, and executing the step 9;
(8) removing the occupation of the automatic guided vehicle on the node, deleting the automatic guided vehicle in an automatic guided vehicle waiting queue of the node, and executing the step 10;
(9) inquiring whether a first automatic guided vehicle in the automatic guided vehicle waiting queue of the node still exists in the automatic guided vehicle waiting queue of other two-way edges, if the first automatic guided vehicle exists and is not arranged in the first position of the waiting queue, the automatic guided vehicle continues waiting, otherwise, the upper computer sends a starting command to the automatic guided vehicle; simultaneously inquiring whether the first automatic guided vehicle in the automatic guided vehicle waiting queue of the side still exists in the automatic guided vehicle waiting queues of other nodes, if the first automatic guided vehicle exists and is not arranged in the first position in the waiting queue, the automatic guided vehicle continues waiting, otherwise, the upper computer sends a starting command to the automatic guided vehicle, and then the step 2 is executed;
(10) and inquiring whether the first automatic guided vehicle in the automatic guided vehicle waiting queue of the node still exists in the automatic guided vehicle waiting queue of other two-way edges, if so, continuing waiting by the automatic guided vehicle, otherwise, sending a starting command to the automatic guided vehicle by the upper computer, and then executing the step 2.
The corresponding commands of the tag card are divided into four types, namely: left turn, right turn, straight going, back going.
The invention has the beneficial effects;
(1) the automatic sorting system adopts the automatic guide vehicle to realize automatic sorting of express, is more efficient than a manual sorting express mode, has low error rate, can avoid violent sorting, is more flexible than a baffle type sorting machine, and can arrange the number of AGV trolleys according to workload;
(2) the invention provides a novel RFID tag arrangement mode, so that an AGV can realize right-angle turning, the space required by the AGV turning is reduced, and the floor area of a sorting warehouse is reduced;
(3) the invention provides an A-algorithm based on a fusion time window to plan an optimal collision-free path of AGV dollies, and prevents collision among a plurality of AGV dollies by combining a point frontier defense collision algorithm;
(4) the fault tolerance, host computer system through preserving AGV dolly path information and identification card distribution information, alright know the identification card that the AGV dolly can read from the starting point to the terminal point, if the AGV dolly receives the interference and loses the card reading signal, the host computer layer can carry out automatic completion, just so can not exert an influence to the point frontier defense collision system.
Detailed Description
The present invention will be described in further detail with reference to examples and drawings, but the present invention is not limited to these examples.
Examples
As shown in fig. 1, an express sorting method based on an automatic guided vehicle includes a square guide path, an upper computer and a WiFi local area network, the automatic guided vehicle communicates with the upper computer through the WiFi local area network, the square guide path is made of cables, magnetic tapes, laser and the like, and the magnetic tapes are adopted in this embodiment.
As shown in fig. 1, the grid-type guidance route and the outlet distribution diagram are shown, wherein 1-6 are sorting outlets, RFID tags with the same number are placed around the sorting outlets to serve as outlet cards, and different sorting outlets correspond to outlet cards with different numbers; 7-10 are sorting entrances, each sorting entrance is provided with an RFID label with the same number as an entrance card, a guide track of the automatic guide vehicle is a bidirectional path, two ends of each edge are respectively provided with an RFID label with different numbers as an edge identification card, according to the running direction of the vehicle, the first label on one guide track edge is a start identification card, the second label is an end identification card, and each node is provided with an RFID label with the same number as an execution card.
And an RFID reader identification RFID tag is arranged under the bottom of the automatic guided vehicle and is sent to an upper computer, and the upper computer determines the position of the automatic guided vehicle according to the RFID tag information and carries out unified dispatching on the trolleys.
The express sorting method of the automatic guided vehicle comprises the following specific steps:
(1) a worker places the express packages on a tray of a waiting automatic guided vehicle at a sorting inlet, scans one-dimensional code information on an express bill by using a code scanning gun and uploads the information to an upper computer system, and then executes the step 2;
(2) the upper computer system calculates node information of a running path of the automatic guided vehicle through an A-algorithm of a fusion time window according to a task of the automatic guided vehicle, converts the node information into command information corresponding to each identification card and sends the command information to the automatic guided vehicle, and then executes the step 3;
(3) the automatic guided vehicle travels in a line patrol mode and reads RFID label information, if an identification card is read, the RFID label information is recorded in a register of the automatic guided vehicle, if an execution card is read, command information (left turn, right turn, forward and backward) corresponding to the identification card read last time is immediately executed, and then the step 3 is continuously executed; if the exit card of the target exit is read, stopping immediately, pouring the package into the exit, and then executing the step 4; if the sorting inlet card is read, stopping immediately, and then executing the step 1;
(4) and the upper computer dispatches an automatic guide vehicle to a corresponding sorting inlet according to the task and then executes the step 2.
The path node information of the automatic guided vehicle is obtained through A-algorithm calculation, and the method comprises the following steps:
(1) establishing a directed graph model for the field guide track to obtain a directed graph adjacency matrix, and then executing the step 2;
(2) putting the starting point A into an open list, and continuing to execute the step 3;
(3) searching nodes reachable from the node in the adjacency matrix, skipping the nodes in the close list, if the nodes are already in the open list, executing the step 5, otherwise executing the step 4;
(4) adding the nodes into an open list, and calculating the Euclidean distance from each reachable node to the terminal as an H value, wherein H (n) ═ sqrt ((dx-nx)2+(dy-ny)2) If the value G from the starting point to each reachable node is calculated, the weight of each reachable node is f (n) ═ G (n) + h (n), the node is taken as the parent node of the node, the node is deleted from the open list, the node is added into the close list, and then the step 6 is executed;
(5) the euclidean distance between each reachable node and the end point is calculated as H value, H (n) ═ sqrt ((dx-nx)2+(dy-ny)2) Calculating the value G from the starting point to each reachable node, wherein the weight of each reachable node is F (n) ═ G (n) + H (n), if the current weight is less than the original weight, the node is taken as the father node of the node, the weight is updated, otherwise, no action is executed, and then the step 6 is executed;
(6) searching a node with the lowest F value in the open list, if the node is a terminal point, finishing the algorithm, otherwise, deleting the node from the open list, adding the node into the close list, and executing the step 3;
in the step 2, converting the traveling path node information into the command information corresponding to each identification card comprises the following steps:
(1) let n be 0, (n) x represent the x coordinate of the nth node, (n) y represent the y coordinate of the nth node, continue to carry out step 2;
(2) comparing the n-th and n + 1-th nodes, and if (n) x is (n +1) x, performing the 3 rd step, and if (n) y is (n +1) y, performing the 6 th step;
(3) if (n) y > (n +1) y, executing the 4 th step, otherwise executing the 5 th step;
(4) if (n +1) x is (n +2) x, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a straight line; if (n +1) y is equal to (n +2) y and (n +1) x > (n +2) x, the ending identification card of the edge formed by the n-th and n +1 nodes corresponds to a command of left turn, if (n +1) y is equal to (n +2) y and (n +1) x < (n +2) x, the ending identification card of the edge formed by the n-th and n +1 nodes corresponds to a command of right turn, and the 9 th step is continuously executed;
(5) if (n +1) x is (n +2) x, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a straight line; if (n +1) y is (n +2) y and (n +1) x > (n +2) x, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a command of right turn, if (n +1) y is (n +2) y and (n +1) x < (n +2) x, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a command of left turn, and the 9 th step is continuously executed;
(6) if (n) x > (n +1) x, executing the 8 th step, otherwise executing the 7 th step;
(7) if (n +1) y is equal to (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a straight line; if (n +1) x is (n +2) x and (n +1) y > (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a left turn command, if (n +1) x is (n +2) x and (n +1) y < (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a right turn command, and the 9 th step is continuously executed;
(8) if (n +1) y is equal to (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a straight line; if (n +1) x is (n +2) x and (n +1) y > (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a command of right turn, if (n +1) x is (n +2) x and (n +1) y < (n +2) y, the ending identification card of the edge formed by the n-th and n + 1-th nodes corresponds to a command of left turn, and the 9 th step is continuously executed;
(9) if n is the path node number minus 2, stopping, otherwise, adding 1 to n and continuing to execute the step 2;
although the algorithm A fused with the time window can plan a collision-free driving path for the automatic guided vehicles, the method has poor robustness, and if one automatic guided vehicle delays due to faults and other vehicles drive according to plans, collision can occur between the automatic guided vehicles. The invention provides a point-edge collision prevention algorithm based on an RFID identification card to prevent collision among multiple automatic guided vehicles.
(1) According to the directed graph, an automatic guided vehicle waiting queue of each node and each bidirectional edge is established on the upper computer;
(2) when the automatic guided vehicle reads the RFID label, the card number information is sent to an upper computer layer, if the card number information is read to be the starting identification card, the step 6 is executed, and if the card number information is read to be the ending identification card, the step 3 is executed;
(3) if the next edge to be reached by the automatic guided vehicle is a bidirectional edge, executing the step 4, otherwise executing the step 5;
(4) the upper computer inquires an automatic guided vehicle waiting queue of a node adjacent to the ending identification card, simultaneously inquires an automatic guided vehicle waiting queue of the next edge, if no automatic guided vehicle exists in the automatic guided vehicle waiting queue of the node and the edge, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the edge, the upper computer does not send any instruction, the automatic guided vehicle continues to advance, otherwise, the upper computer sends an instruction to stop the automatic guided vehicle standing horse, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the edge, and then the step 2 is executed;
(5) the upper computer inquires an automatic guided vehicle waiting queue of a node adjacent to the ending identification card, if no automatic guided vehicle exists in the automatic guided vehicle waiting queue of the node, the upper computer does not send any instruction, the automatic guided vehicle continues to advance, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the side, otherwise, the upper computer sends an instruction to stop the automatic guided vehicle standing horse, the automatic guided vehicle is added into the automatic guided vehicle waiting queue of the node and the side, and then the step 2 is executed;
(6) if the last edge passed by the automatic guided vehicle is a bidirectional edge, executing the step 7, otherwise executing the step 8;
(7) removing the occupation of the automatic guided vehicle on the node and the edge, deleting the automatic guided vehicle in the waiting queue of the automatic guided vehicle on the node and the edge, and executing the step 9;
(8) and (5) releasing the occupation of the automatic guided vehicle on the node, deleting the automatic guided vehicle in the automatic guided vehicle waiting queue of the node, and executing the step (10).
(9) Inquiring whether a first automatic guided vehicle in the automatic guided vehicle waiting queue of the node is in an automatic guided vehicle waiting queue of other two-way edges, if the first automatic guided vehicle exists and is not arranged in the first position of the waiting queue, the automatic guided vehicle continues waiting, otherwise, the upper computer sends a starting command to the automatic guided vehicle; simultaneously inquiring whether the first automatic guided vehicle in the automatic guided vehicle waiting queue of the side still exists in the automatic guided vehicle waiting queues of other nodes, if the first automatic guided vehicle exists and is not arranged in the first position in the waiting queue, the automatic guided vehicle continues waiting, otherwise, the upper computer sends a starting command to the automatic guided vehicle, and then the step 2 is executed;
(10) and inquiring whether the first automatic guided vehicle in the automatic guided vehicle waiting queue of the node still exists in the automatic guided vehicle waiting queue of other two-way edges, if so, continuing waiting by the automatic guided vehicle, otherwise, sending a starting command to the automatic guided vehicle by the upper computer, and then executing the step 2.
The above embodiments are preferred embodiments of the present invention, but the present invention is not limited to the above embodiments, and any other changes, modifications, substitutions, combinations, and simplifications which do not depart from the spirit and principle of the present invention should be construed as equivalents thereof, and all such changes, modifications, substitutions, combinations, and simplifications are intended to be included in the scope of the present invention.