Disclosure of Invention
The embodiment of the invention provides a segment path issuing method and device, a storage medium and an electronic device, which are used for at least solving the problem that paths conflict possibly when multiple trolley devices run in a topological map simultaneously in the related art.
According to an embodiment of the present invention, a method for issuing a segment path is provided, including: carrying out global path planning aiming at the automatic guidance equipment on the current map; determining target equipment which can generate path conflict in the automatic guiding equipment according to the planned global path and the current position of the automatic guiding equipment on the map; establishing target device sets according to the map nodes of the target devices which conflict on the map for the first time, wherein each target device set comprises the identifiers of the target devices which conflict on the same map node, and the identifiers of the target devices correspond to the priority of the target devices; and issuing a next section of path to the target equipment with the highest priority in each target equipment set, wherein the section of path is a staged path divided based on the global path of the target equipment.
Optionally, determining, in the automatic guidance device, a target device where a path conflict may occur according to the planned global path and the current position of the automatic guidance device on the map includes: establishing capacity tables of the map nodes according to the current position of the automatic guide equipment on the map and the planned global path, wherein the ID of the automatic guide equipment which is about to reach the current map node and the time of the automatic guide equipment which is about to reach the current map node are stored in the capacity table of each map node; determining that the automatic guidance devices reaching the same map node at the same time are the target devices in which path conflicts can occur.
Optionally, before issuing the next segment of path to the target device with the highest priority in each target device set, the method further includes: determining attributes of a map node p corresponding to a first target device set, wherein a path conflict occurs at the map node p by target devices in the first target device set, and the attributes of the map node p include at least one of the following: the map node p with different attributes corresponds to different weights of a common node, an isolated key node and an adjacent key node; determining the priority of a first target device according to the weight of the map node p and the time length from the current position to the departure of the first target device from the map node p, wherein the first target device is a device in the first target device set, the priority of the first target device is positively correlated with the weight of the map node p, and the priority of the first target device is negatively correlated with the time length from the current position to the departure of the first target device from the map node p.
Optionally, determining the attribute of the map node p corresponding to the first target device set includes: converting the map into a depth-first tree in a depth-first mode, wherein adjacent points of any vertex V in the depth-first tree are child nodes of the vertex V; when the map node p is the root vertex of the depth-first tree and comprises at least two subtrees, determining that the map node p is a key node; when the map node p is a non-leaf vertex of the depth-first tree and no other node in the root and the subtree of the depth-first tree points to a return edge of an ancestor of the map node p, determining that the map node p is a key node; when the map node p is a key node and all adjacent nodes of the map node p are common nodes, determining that the map node p is an isolated key node; when the map node p is a key node and an adjacent node of the map node p is a key node, determining that the map node p is the adjacent key node, wherein the weight of the adjacent key node is greater than that of the isolated key node, and the weight of the isolated key node is greater than that of the common node.
Optionally, determining the priority of the first target device according to the weight of the map node p and the time length from the current location to the departure of the first target device from the map node p comprises: acquiring a first priority parameter of the first target device, wherein the first priority parameter is associated with a first path between the first target device and the map node p from the current position and the time length for passing the first path; acquiring a second priority parameter of the first target device, wherein the second priority parameter is associated with the time length of the first target device passing through the map node p; acquiring a third priority parameter of the first target device, wherein the third priority parameter is associated with a second path between the first target device leaving the map node p and reaching a next designated map node and the time length of passing the second path; and carrying out weighted summation on the first priority parameter, the second priority parameter and the third priority parameter according to a preset weight value to obtain the priority of the first target device.
Optionally, the obtaining the first priority parameter of the first target device includes: acquiring the first priority parameter func of the first target device when the map node p conflicts according to the following formulapf(cars,globalmap):
W (p) represents a weight value of a node attribute corresponding to the map node p; t1(p) represents the length of time that the first target device has traversed the first path, Call(p) represents the number of target devices within the first set of target devices that pass through or reach the map node p, Call(p) comprises the first target device, sum (N)pf) Presentation instrumentThe number of target nodes which need to pass between the current map node and the map node p of the first target device is equal to or less than a preset constant, wherein the target nodes comprise the current map node and the map node p, and L represents the preset constant.
Optionally, the obtaining of the second priority parameter of the first target device includes:
acquiring the second priority parameter func of the first target device when the map node p conflicts according to the following formulap(carId,globalmap):
funcp(carId,globalmap)=e(w(p)/T2(p))
W (p) represents a weight value of a node attribute corresponding to the map node p; t2(p) the time length of the first target device passing through the map node p, the behavior type of the first target device passing through the map node p comprises straight running or turning, and the time length corresponding to different behavior types is different.
Optionally, the obtaining of the third priority parameter of the first target device includes:
acquiring the third priority parameter of the first target device when the map node p conflicts according to the following formula:
w (p) represents a weight value of a node attribute corresponding to the map node p; t3(p) represents the length of time that the first target device has traversed the second path, Cout(p) represents the number of target devices within the first set of target devices that pass or reach the map node p and whose path direction is away from the map node p, and Cin(p) represents the number of target devices within the first set of target devices that pass or reach the map node p and whose path direction is the direction of entry into the map node p, Cout(p) and CinNone of (p) includes the first target device, sum (N)pf) Representing the first target deviceThe number of target nodes needing to pass between the current map node and the map node p is reduced, and the target nodes comprise the current map node and the map node p.
Optionally, issuing a next segment of path to the target device with the highest priority in each target device set includes: determining the target device with the highest priority in the target device set as a second target device; sending a next section of path to the second target equipment; and sending the current segment path to other target equipment except the second target equipment in the target equipment set, or suspending sending the segment paths of other target equipment.
According to another embodiment of the present invention, there is also provided a segment path issuing device, including: the planning module is used for carrying out global path planning on the automatic guidance equipment on the current map; a first determining module, configured to determine, in the automatic guidance device, a target device where a path conflict may occur according to the planned global path and a current location of the automatic guidance device on the map; the establishing module is used for establishing target equipment sets according to the map nodes of the target equipment which conflict on the map for the first time, wherein each target equipment set comprises the identifications of the target equipment which conflict on the same map node, and the identifications of the target equipment correspond to the priority of the target equipment; and the issuing module is used for issuing a next section of path to the target equipment with the highest priority in each target equipment set, wherein the section of path is a staged path divided based on the global path of the target equipment.
Optionally, the determining module includes: the establishing unit is used for establishing capacity tables of the map nodes according to the current position of the automatic guide equipment on the map and the planned global path, wherein the ID of the automatic guide equipment which is about to reach the current map node and the time of the automatic guide equipment which is about to reach the current map node are stored in the capacity table of each map node; a determination unit configured to determine that the automatic guidance devices that arrive at the same map node at the same time are the target devices where a path conflict may occur.
Optionally, the apparatus further comprises: a second determining module, configured to determine an attribute of a map node p corresponding to a first target device set, where a path conflict occurs at the map node p by target devices in the first target device set, and the attribute of the map node p includes at least one of: the map node p with different attributes corresponds to different weights of a common node, an isolated key node and an adjacent key node; a third determining module, configured to determine a priority of a first target device according to the weight of the map node p and a time length from a current location to leaving the map node p of the first target device, where the first target device is a device in the first target device set, the priority of the first target device is positively correlated with the weight of the map node p, and the priority of the first target device is negatively correlated with the time length from the current location to leaving the map node p of the first target device.
Optionally, the second determining module includes: the conversion unit is used for converting the map into a depth-first tree in a depth-first mode, wherein adjacent points of any vertex V in the depth-first tree are child nodes of the vertex V; a first determining unit, configured to determine that the map node p is a key node when the map node p is a root vertex of the depth-first tree and includes at least two subtrees; a second determining unit, configured to determine that the map node p is a key node when the map node p is a non-leaf vertex of the depth-first tree and no other node in a root or a subtree of the depth-first tree points to a return edge of an ancestor of the map node p; a third determining unit, configured to determine that the map node p is an isolated key node when the map node p is a key node and all adjacent nodes of the map node p are common nodes; a fourth determining unit, configured to determine that the map node p is an adjacent key node when the map node p is a key node and an adjacent node of the map node p is a key node, where a weight of the adjacent key node is greater than that of the isolated key node, and a weight of the isolated key node is greater than that of the normal node.
Optionally, the third determining module includes: a first acquisition unit configured to acquire a first priority parameter of the first target device, where the first priority parameter is associated with a first path between the first target device and the map node p from a current location and a length of time for the first path to pass through; a second acquisition unit configured to acquire a second priority parameter of the first target device, wherein the second priority parameter is associated with a length of time that the first target device passes through the map node p; a third acquiring unit, configured to acquire a third priority parameter of the first target device, where the third priority parameter is associated with a second path between the first target device leaving the map node p and reaching a next specified map node and a time length for passing through the second path; and the weighting unit is used for carrying out weighted summation on the first priority parameter, the second priority parameter and the third priority parameter according to a preset weight value to obtain the priority of the first target device.
Optionally, the first obtaining unit includes: a first obtaining subunit, configured to obtain the first priority parameter func of the first target device when the map node p conflicts according to the following formulapf(cars,globalmap):
W (p) represents a weight value of a node attribute corresponding to the map node p; t1(p) represents the length of time that the first target device has traversed the first path, Call(p) represents the number of target devices within the first set of target devices that pass through or reach the map node p, Call(p) comprises the first target device, sum (N)pf) Representing the first target deviceAnd the number of target nodes needing to pass between the current map node and the map node p is prepared, the target nodes comprise the current map node and the map node p, and L represents that a preset constant is a constant.
Optionally, the second obtaining unit includes: a second obtaining subunit, configured to obtain the second priority parameter func of the first target device when the map node p conflicts according to the following formulap(carId,globalmap):
funcp(carId,globalmap)=e(w(p)/T2(p))
W (p) represents a weight value of a node attribute corresponding to the map node p; t2(p) the time length of the first target device passing through the map node p, the behavior type of the first target device passing through the map node p comprises straight running or turning, and the time length corresponding to different behavior types is different.
Optionally, the third obtaining unit includes:
a third obtaining subunit, configured to obtain the third priority parameter of the first target device when the map node p conflicts according to the following formula:
w (p) represents a weight value of a node attribute corresponding to the map node p; t3(p) represents the length of time that the first target device has traversed the second path, Cout(p) represents the number of target devices within the first set of target devices that pass or reach the map node p and whose path direction is away from the map node p, and Cin(p) represents the number of target devices within the first set of target devices that pass or reach the map node p and whose path direction is the direction of entry into the map node p, Cout(p) and CinNone of (p) includes the first target device, sum (N)pf) Indicating that the first target device needs to be from the current map node to the map node pA number of target nodes to pass through, the target nodes including the current map node and the map node p.
Optionally, the issuing module is further configured to: determining the target device with the highest priority in the target device set as a second target device; sending a next section of path to the second target equipment; and sending the current segment path to other target equipment except the second target equipment in the target equipment set, or suspending sending the segment paths of other target equipment.
According to another embodiment of the present invention, there is also provided a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
According to another embodiment of the present invention, there is also provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps of any of the above method embodiments.
According to the embodiment of the invention, global path planning is carried out aiming at the automatic guidance equipment on the current map; according to the planned global path and the current positions of the automatic guiding devices on the map, which automatic guiding devices generate path conflicts can be determined, the devices which generate the path conflicts are determined as target devices, then according to the map node of the path conflict of the target equipment, establishing target equipment sets, each target equipment set comprises the identification of the target equipment which conflicts at the same map node, the identification of the target equipment corresponds to the priority of the target equipment, selecting the target equipment with the highest priority in each target equipment set to send down the next section of path, other target devices are not issued, the target device with the highest priority is guaranteed to pass preferentially, conflicts caused by the fact that a plurality of devices are simultaneously extruded to the same map node are effectively avoided, and the problem that paths of multiple trolley devices run in a topological map simultaneously in the prior art and conflict with each other is solved.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the operation on the mobile terminal as an example, fig. 1 is a hardware structure block diagram of the mobile terminal of a segment path issuing method according to an embodiment of the present invention. As shown in fig. 1, the mobile terminal 10 may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal 10 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program and a module of application software, such as a computer program corresponding to the method for acquiring the scheduled throughput in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal 10 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The embodiment of the invention provides a method for issuing a segment path. Fig. 2 is a flowchart of a method for issuing a selectable segment path in an embodiment of the present invention, and as shown in fig. 2, the method includes:
step S202, global path planning is carried out on the automatic guidance equipment on the current map;
step S204, determining target equipment which can generate path conflict in the automatic guiding equipment according to the planned global path and the current position of the automatic guiding equipment on the map;
step S206, establishing target equipment sets according to map nodes of the target equipment which conflict on the map for the first time, wherein each target equipment set comprises the identification of the target equipment which conflicts on the same map node, and the identification of the target equipment corresponds to the priority of the target equipment;
step S208, issuing a next segment path to the target device with the highest priority in each target device set, where the segment path is a staged path divided based on the global path of the target device.
Alternatively, the step S204 may be implemented by:
s1, establishing a capacity table of map nodes according to the current position of the automatic guide equipment on the map and the planned global path, wherein the capacity table of each map node stores the ID of the automatic guide equipment which is about to reach the current map node and the time when each automatic guide equipment is about to reach the current map node;
s2, the automatic guidance device that arrives at the same map node at the same time is determined to be a target device that may have a route conflict.
Optionally, an embodiment of the present invention provides a collision detection method based on a two-dimensional code map: according to the current positions of all the trolleys (namely the automatic guiding equipment) and the planned global path, a map node trolley capacity table is established, and id of the trolley to be passed and the passed time t are stored in the capacity table of each node. Because the distances between nodes in the two-dimensional code map are generally equal, the number of unit distances from the current position to the current node according to the planned path can be counted and is approximately equal to time t, wherein the unit time t0 is the interval of one two-dimensional distance in a straight line, and the 3 × t0 is achieved by completing 90-degree turning at one two-dimensional code node. The estimated approach points counted for each cart include the current incomplete segment path and 3 to 5 nodes re-expanded along the global path. Finally, a conflict node of the whole map and a trolley set with a conflict at the node are predicted according to the elapsed time t, an example of meeting is shown in fig. 3, fig. 3 is an optional schematic diagram of meeting according to the embodiment of the invention, and fig. 3 is schematic diagrams of meeting of two cars, meeting of three cars and meeting of four cars respectively. Meanwhile, due to the deployment mode of the two-dimensional code map, all the path edges are vertical, and the maximum degree of the nodes (the number of edges meeting at the point) can be known to be 4 according to the connectivity. If the trolley collides with some vehicles at an earlier time, the trolley does not continuously collide with other vehicles, and the node of each vehicle where the collision occurs has uniqueness, so that only the first conflict point of each trolley is counted.
Optionally, before the step S208, the method further includes: determining attributes of a map node p corresponding to a first target device set, wherein the target devices in the first target device set have path conflicts at the map node p, and the attributes of the map node p include at least one of the following: the map nodes p with different attributes have different corresponding weights; and determining the priority of the first target device according to the weight of the map node p and the time length from the current position to the position away from the map node p of the first target device, wherein the first target device is a device in a first target device set, the priority of the first target device is positively correlated with the weight of the map node p, and the priority of the first target device is negatively correlated with the time length from the current position to the position away from the map node p of the first target device.
Optionally, determining the attribute of the map node p corresponding to the first target device set may be implemented by: converting the map into a depth-first tree in a depth-first mode, wherein adjacent points of any vertex V in the depth-first tree are child nodes of the vertex V; when the map node p is the root vertex of the depth-first tree and comprises at least two subtrees, determining the map node p as a key node; when the map node p is a non-leaf vertex of the depth-first tree and the root of the subtree of the depth-first tree and other nodes in the subtree do not point to a return edge of an ancestor of the map node p, determining the map node p as a key node; when the map node p is a key node and the adjacent nodes of the map node p are all common nodes, determining the map node p as an isolated key node; when the map node p is a key node and an adjacent node of the map node p is a key node, determining that the map node p is the adjacent key node, wherein the weight of the adjacent key node is greater than that of the isolated key node, and the weight of the isolated key node is greater than that of the common node.
The map describes all the paths that the vehicle can travel, and the map structure determines some road nodes or road edge attributes such as flow, capacity and the like after being determined. A key node may be understood as a node that, if removed, would affect the connectivity of the entire map, the map is no longer intercommunicating between any two nodes.
The embodiment of the invention introduces a selectable method for detecting key nodes, which comprises the following steps:
firstly, a topological map is converted into a depth-first spanning tree in a depth-first mode, the depth-first spanning tree refers to a depth-first search traversal obtained from a certain vertex, and for any vertex V in the tree, a child node of the tree is an adjacent point. Two characteristics of the key node can be observed from the depth-first spanning tree:
if there are two or more subtrees at the root of the spanning tree, the root vertex must be the key node. Since there are no edges connecting the vertices of different subtrees in the graph, if this node is deleted, the tree becomes a forest.
If a non-leaf vertex V in the spanning tree has no loop edge pointing to the ancestor of V at both the root of a subtree and other nodes in the subtree, V is a key node, and because V is deleted, the subtree and other parts of the graph are segmented.
Therefore, for graph G ═ V, E, defining the traversal access function visited, and introducing a new function low, all the key nodes present in the connected map graph can be obtained by one depth-first traversal.
Defining the visited [ v ] as the sequence number of visiting the vertex v when traversing the connected map by depth-first search, wherein low [ v ] is defined as follows: min { visited [ v ], low [ w ], visited [ k ] }
Where w is the child node of v on the DFS production tree, k is the ancestor node of v on the DFS spanning tree connected by a back edge, (v, w) E, (v, k) E.
Then, for a vertex v, there is a child node w and low [ w ] ≧ visited [ v ], then the vertex v must be the key node. Because when w is the child node of v, low [ w ] ≧ visited [ v ] indicates that neither w nor its descendants have a back edge pointing to the ancestor of v. Wherein, the value of the weighted [ v ] is the sequence number of the preamble sequence of the depth-first spanning tree of v.
Then, according to the connectivity of the key nodes distributed in the map, the key nodes are divided into two types: isolated key nodes and mutually adjacent key nodes.
Finally, each node in the map is assigned a weight, the weight of the common node is w0 (assumed to be 1), and the weight of the isolated key node is wk (assumed to be 1.3). The weight of the mutually adjacent key nodes is wks (assumed to be 1.5) (the weight is adjusted according to the number of adjacent key nodes).
Fig. 4 is a schematic diagram of an optional key node according to an embodiment of the present invention, where, as shown in fig. 4, node a is an isolated key node, and node B, C, D is an adjacent key node.
Optionally, determining the priority of the first target device according to the weight of the map node p and the time length from the current location to the departure of the first target device from the map node p comprises:
s1, acquiring a first priority parameter of the first target device, wherein the first priority parameter is associated with a first path between the first target device and the map node p from the current position and the time length of the first path;
s2, acquiring a second priority parameter of the first target device, wherein the second priority parameter is associated with the time length of the first target device passing through the map node p;
s3, acquiring a third priority parameter of the first target device, wherein the third priority parameter is associated with a second path between the first target device leaving the map node p and reaching the next designated map node and the time length for passing the second path;
and S4, carrying out weighted summation on the first priority parameter, the second priority parameter and the third priority parameter according to a preset weight value to obtain the priority of the first target device.
Optionally, the obtaining the first priority parameter of the first target device includes: acquiring a first priority parameter func of a first target device when the map node p conflicts according to the following formulapf(cars,globalmap):
W (p) represents the weight value of the node attribute corresponding to the map node p; t1(p) represents the length of time that the first target device has traversed the first path, Call(p) represents the number of said target devices within the first set of target devices passing or reaching the map node p, Call(p) comprises a first target device, sum (N)pf) And the number of target nodes which need to pass between the current map node and the map node p of the first target device is represented, the target nodes comprise the current map node and the map node p, and L represents that a preset constant is a constant.
Optionally, the obtaining the second priority parameter of the first target device includes: acquiring a second priority parameter func of the first target device when the map node p conflicts according to the following formulap(carId,globalmap):
funcp(carId,globalmap)=e(w(p)/T2(p))
W (p) represents the weight value of the node attribute corresponding to the map node p; t2(p) the time length of the first target device passing through the map node p, the behavior type of the first target device passing through the map node p comprises straight running or turning, and the time lengths corresponding to different behavior types are different.
Optionally, the obtaining of the third priority parameter of the first target device includes: acquiring a third priority parameter of the first target device when the map node p conflicts according to the following formula:
w (p) represents the weight value of the node attribute corresponding to the map node p; t3(p) represents the length of time that the first target device has traversed the second path, Cout(p) represents the number of target devices within the first set of target devices that pass or reach map node p and whose path direction is away from map node p, and Cin(p) represents the number of target devices in the first set of target devices that pass or reach the map node p and whose path direction is into the map node p, Cout(p) and CinNone of (p) includes the first target device, sum (N)pf) And the number of target nodes which need to be passed by the first target device from the current map node to the map node p is represented, and the target nodes comprise the current map node and the map node p.
Still take the two-dimensional code map as an example, according to the deployment mode of the two-dimensional code map, the route only has straight going and quarter turn, and it can be known that when a certain node in the map collides, the range of the number of colliding trolleys should be 2 ═ GAV _ NUM ═ 4, and GAV _ NUM represents the number of colliding trolleys of the certain node. The meeting example is shown in fig. 4 above.
The embodiment of the invention defines a uniform priority cost function priorCost () for estimating the cost of each trolley in the conflict set for preferential passage under the current conflict environment. The equipment priority estimation for each cart is actually divided into three phases: (the path nodes of each trolley are classified into three types, namely a path node before a conflict node, a current conflict node and a departure path node after conflict), and the corresponding priority cost component also comprises three parts: current position of the cart to the collision node segment, corresponding to the cost component (corresponding to the first priority level)Parameter) funcpf(ii) a Corresponding cost component (corresponding to second priority parameter) func at conflicting nodep(ii) a Cost component (corresponding to third priority parameter) func corresponding to subsequent path node of the collision nodepn。
priorCost(carId)=λ0*funcpf(cars,globalmap)+λ1*funcp(carId,globalmap)+λ2*funcpn(cars,globalmap)
Wherein λ0、λ1、λ2The weighted value of each cost component can be adjusted according to actual requirements. Each phase is superimposed with attributes of the corresponding node.
In the first stage: from the current position of the vehicle to the predicted collision node (but not including the collision node)
The cost is described as: the distance between each predicted conflict trolley and the conflict node (although the prediction is approximate, the actual execution has a gap) is known to be closer, and the priority of the trolley is higher; the degree of overlap with the paths of other conflicting vehicles can be known from the foregoing description that the predicted vehicle conflict node is the location where the vehicle first conflicts, and therefore the path before the vehicle reaches the conflict node will not overlap with the paths of other vehicles entering the conflict node, but only overlap with the paths leaving the conflict node. It can be judged that the higher the degree of overlap, the higher the priority. The cost is defined as follows
W (p) is the weight value of the node attribute corresponding to the current node; t (p) is a time cost of a dolly passing through a node p in the planned global path, and a specific value of the time cost can be determined according to a time consumed by the dolly to arrive from a previous node of the node p and start to leave a current node p in the planned global path, and if the dolly arrives and passes through the node p in a straight-ahead manner, the time is an operation time between the two nodes; if a turn is to be made at point p, then the time to go to point p is counted, plus the turn running time at point p. The definition of the time cost of the two subsequent phases is the same as that of the two subsequent phases。CallAnd (p) the overlapping degree of the global paths of all the trolleys in the current conflict set at the point p, wherein the definition of the overlapping degree is specifically to count the total number of trolleys passing through or reaching the point p in the planned global paths of all the trolleys in the current conflict set (the range is 0-4). N is a radical ofpfRepresents the set of all nodes, sum (N), that the current vehicle passes from the current position node to the predicted collision node according to the global path planpf) Representing the total number of node elements within the set. And L is a constant, and the length of the reference segment path node is adjusted according to the set value.
The second stage is as follows: conflict node
The cost is described as the execution time unit of each conflict trolley at the node, the higher the priority is, and the straight passing or turning passing is mainly distinguished.
The cost component is defined as follows:
funcp(carId,globalmap)=e(w(p)/T(p))
the third stage: the next node of the conflict node (can continue to extend backwards according to the required precision)
The cost is described as: according to the definition, the paths of each conflict trolley are divided into three types, wherein the higher the overlapping degree of the paths of the conflict trolleys with the entering conflict nodes is, the lower the passing priority of the current trolley is (belonging to increasing conflict); the higher the degree of overlapping with the path leaving the conflict node, the higher the current vehicle passing priority (belonging to untwining traffic).
The same cost is defined as follows:
here, the definition of degree of overlap is distinguished from the definition of degree of overlap in the first phase, where C is defined in the first phaseall(p) is the total number of all vehicles passing or reaching point p, regardless of vehicle path direction, and at this stage we divide the degree of overlap into two parts: entering and leaving the conflicting node, Cout(p) represents a route or arrival at the current node p, and the routeThe direction is the total number of cars leaving the collision node, and Cin(p) represents the total number of cars passing or arriving at the current node p and the path direction is the direction of the incoming collision node. (it should be noted that here the statistics are not including the currently estimated cart cars, but all carts, including the currently estimated cart cars, are included in the first stage statistics of the total overlap).
Therefore, for each conflict set, the trolley with the highest priority cost is estimated to be in priority pass, namely to participate in the issuing of the path of the current round, other trolleys do not participate in the issuing of the path of the current round, the trolley waits in situ after the current path of the trolley is executed, and the conflict pre-judgment and equipment priority estimation of the next round are carried out to issue the corresponding path.
Optionally, issuing the next segment of path to the target device with the highest priority in each target device set includes: determining the target equipment with the highest priority in the target equipment set as second target equipment; sending a next section of path to a second target device; and transmitting the current segment path to other target equipment except the second target equipment in the target equipment set, or suspending transmitting the segment paths of other target equipment.
Fig. 5 is a flowchart of another alternative segment path issuing method according to an embodiment of the present invention, and fig. 6 is a flowchart of an alternative priority estimation method according to an embodiment of the present invention, where as shown in fig. 5 and fig. 6, an Automatic Guided Vehicle (AGV) scheduling system is initialized first, and a current state of all AGVs in the system is obtained. And then selecting a proper AGV to plan a path according to the distributed tasks. After the path is planned, the path is sent down section by section according to certain conditions. Firstly, carrying out conflict prediction between the trolleys according to the current position of the trolley and a planned global path, and dividing all the trolleys into two parts according to a prediction result: a temporary collision-free probability car (a distributable segment path car) and a collision car set.
And aiming at the conflict-free trolley, trying to send down the section path, and judging whether the section path is safe or not. If the path of the lower segment is safe, the equipment (trolley) is directly executed according to the path, and the steps are sequentially carried out until the equipment reaches the task end point.
And for the vehicles which are possible to collide, dividing the vehicles into collision sets according to the map nodes where the collisions occur, wherein each collision set comprises vehicle IDs which are possible to collide at the current map node. And then, estimating the priority of each device of each conflict set by a device priority estimation module, screening out the device with the highest priority in each conflict set to issue a next segment of path, and executing the waiting after the current segment of path by the device with the low priority. And issuing the high-priority trolley of the lower section path, and judging whether the lower section path is safe or not. If the path of the lower segment is safe, the equipment (trolley) is directly executed according to the path, and the steps are sequentially carried out until the equipment reaches the task end point.
When the judgment on whether the path of the lower segment is safe is unsafe, counting the times of judging the path to be unsafe, and if the continuous times of unsafe or the accumulated times of unsafe reach a preset threshold value, re-planning the path of the trolley is needed, wherein the re-planning can be the planning of all trolleys on a global map, or the re-planning of the path of the trolley with more times of unsafe.
For determining the trolley priority, firstly, a conflict node and a corresponding trolley set are obtained through a conflict interference detection module, the path of each trolley in the conflict set is segmented, meanwhile, the attribute of a topological map node is analyzed, the priority of the trolley corresponding to each node is obtained according to a cost function, whether the trolley in the conflict set is the trolley with the highest priority is judged according to the determined trolley priority, and if yes, the trolley is added into a normal AGV queue and a next segment of path is issued.
The scheme provided by the embodiment of the invention can be applied to any type of map and supports real-time scheduling of large-scale trolleys. In the practical application process, because of the diversity of the environment, the map formed by the running path of the trolley has great complexity, and the map of the running path of the trolley is difficult to be described simply by using a single main road or an annular or grid type. The method has better adaptability, and the node attributes in the map are extracted and analyzed in a self-adaptive manner according to the node map formed by the trolley running paths deployed in the environment. And estimating the priority cost of each trolley through a cost function, so that the trolley with high priority passes through first, and the trolley with low priority stops for waiting. The scheme is not limited to map types (various topological maps such as single trunk road, annular map, grid map and the like), is not limited by the number of the trolleys, has great adaptability, reduces the probability of occurrence of phenomena such as congestion waiting, deadlock and the like, and can effectively improve the operating efficiency of the multi-trolley scheduling system.
According to another embodiment of the present invention, there is further provided a segment path issuing device, which is configured to implement any one of the method embodiments described above, and the content that has been described herein is not repeated here. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 7 is a block diagram of a structure of a sending-down apparatus for an optional segment path according to an embodiment of the present invention, and as shown in fig. 7, the apparatus includes:
a planning module 702, configured to perform global path planning for the automatic guidance device on the current map;
a first determining module 704, configured to determine, according to the planned global path and a current location of the automatic guidance device on the map, a target device in the automatic guidance device where a path conflict may occur;
an establishing module 706, configured to establish a target device set according to a map node where a target device first collides on a map, where each target device set includes an identifier of the target device that collides on the same map node, and the identifier of the target device corresponds to a priority of the target device;
the issuing module 708 is configured to issue a next segment path to a target device with a highest priority in each target device set, where the segment path is a periodic path divided based on a global path of the target device.
Optionally, the determining module includes: the establishing unit is used for establishing capacity tables of the map nodes according to the current position of the automatic guide equipment on the map and the planned global path, wherein the ID of the automatic guide equipment which is about to reach the current map node and the time of the automatic guide equipment which is about to reach the current map node are stored in the capacity table of each map node; a determination unit configured to determine that the automatic guidance devices that arrive at the same map node at the same time are the target devices where a path conflict may occur.
Optionally, the apparatus further comprises: a second determining module, configured to determine an attribute of a map node p corresponding to a first target device set, where a path conflict occurs at the map node p by target devices in the first target device set, and the attribute of the map node p includes at least one of: the map node p with different attributes corresponds to different weights of a common node, an isolated key node and an adjacent key node; a third determining module, configured to determine a priority of a first target device according to the weight of the map node p and a time length from a current location to leaving the map node p of the first target device, where the first target device is a device in the first target device set, the priority of the first target device is positively correlated with the weight of the map node p, and the priority of the first target device is negatively correlated with the time length from the current location to leaving the map node p of the first target device.
Optionally, the second determining module includes: the conversion unit is used for converting the map into a depth-first tree in a depth-first mode, wherein adjacent points of any vertex V in the depth-first tree are child nodes of the vertex V; a first determining unit, configured to determine that the map node p is a key node when the map node p is a root vertex of the depth-first tree and includes at least two subtrees; a second determining unit, configured to determine that the map node p is a key node when the map node p is a non-leaf vertex of the depth-first tree and no other node in a root or a subtree of the depth-first tree points to a return edge of an ancestor of the map node p; a third determining unit, configured to determine that the map node p is an isolated key node when the map node p is a key node and all adjacent nodes of the map node p are common nodes; a fourth determining unit, configured to determine that the map node p is an adjacent key node when the map node p is a key node and an adjacent node of the map node p is a key node, where a weight of the adjacent key node is greater than that of the isolated key node, and a weight of the isolated key node is greater than that of the normal node.
Optionally, the third determining module includes: a first acquisition unit configured to acquire a first priority parameter of the first target device, where the first priority parameter is associated with a first path between the first target device and the map node p from a current location and a length of time for the first path to pass through; a second acquisition unit configured to acquire a second priority parameter of the first target device, wherein the second priority parameter is associated with a length of time that the first target device passes through the map node p; a third acquiring unit, configured to acquire a third priority parameter of the first target device, where the third priority parameter is associated with a second path between the first target device leaving the map node p and reaching a next specified map node and a time length for passing through the second path; and the weighting unit is used for carrying out weighted summation on the first priority parameter, the second priority parameter and the third priority parameter according to a preset weight value to obtain the priority of the first target device.
Optionally, the first obtaining unit includes: a first obtaining subunit, configured to obtain the first priority parameter func of the first target device when the map node p conflicts according to the following formulapf(cars,globalmap):
Wherein w (p) represents the map node p corresponding to the nodeA weight value of the attribute; t1(p) represents the length of time that the first target device has traversed the first path, Call(p) represents the number of target devices within the first set of target devices that pass through or reach the map node p, Call(p) comprises the first target device, sum (N)pf) And the number of target nodes which need to pass between the current map node and the map node p of the first target device is represented, the target nodes comprise the current map node and the map node p, and L represents that a preset constant is a constant.
Optionally, the second obtaining unit includes: a second obtaining subunit, configured to obtain the second priority parameter func of the first target device when the map node p conflicts according to the following formulap(carId,globalmap):
funcp(carId,globalmap)=e(w(p)/T2(p))
W (p) represents a weight value of a node attribute corresponding to the map node p; t2(p) the time length of the first target device passing through the map node p, the behavior type of the first target device passing through the map node p comprises straight running or turning, and the time length corresponding to different behavior types is different.
Optionally, the third obtaining unit includes:
a third obtaining subunit, configured to obtain the third priority parameter of the first target device when the map node p conflicts according to the following formula:
w (p) represents a weight value of a node attribute corresponding to the map node p; t3(p) represents the length of time that the first target device has traversed the second path, Cout(p) represents the number of target devices within the first set of target devices that pass or reach the map node p and whose path direction is away from the map node p, and Cin(p) represents the secondThe number of target devices passing through or reaching the map node p and having a path direction of the target devices entering the map node p, Cout(p) and CinNone of (p) includes the first target device, sum (N)pf) Representing the number of target nodes which need to be passed by the first target device from a current map node to the map node p, wherein the target nodes comprise the current map node and the map node p.
Optionally, the issuing module is further configured to: determining the target device with the highest priority in the target device set as a second target device; sending a next section of path to the second target equipment; and sending the current segment path to other target equipment except the second target equipment in the target equipment set, or suspending sending the segment paths of other target equipment.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
step S1, global path planning is carried out for the automatic guidance equipment on the current map;
step S2, according to the planned global path and the current position of the automatic guidance device on the map, determining the target device which can generate the path conflict in the automatic guidance device;
step S3, according to the map node of the target device which conflicts on the map for the first time, establishing a target device set, wherein each target device set comprises the identification of the target device which conflicts on the same map node, and the identification of the target device corresponds to the priority of the target device;
step S4, issuing a next segment path to the target device with the highest priority in each target device set, where the segment path is a staged path divided based on the global path of the target device.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
step S1, global path planning is carried out for the automatic guidance equipment on the current map;
step S2, according to the planned global path and the current position of the automatic guidance device on the map, determining the target device which can generate the path conflict in the automatic guidance device;
step S3, according to the map node of the target device which conflicts on the map for the first time, establishing a target device set, wherein each target device set comprises the identification of the target device which conflicts on the same map node, and the identification of the target device corresponds to the priority of the target device;
step S4, issuing a next segment path to the target device with the highest priority in each target device set, where the segment path is a staged path divided based on the global path of the target device.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation manners, and details of this embodiment are not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.