Disclosure of Invention
The inventor researches an algorithm designed in path planning and finds that the A-Star algorithm is used for estimating the remaining unfinished paths through an estimation function, so that the aim of quick search can be fulfilled. However, the A-Star algorithm has high path finding capability, but depends on the accuracy of the prediction function. If the estimated function is closer to the actual value, the path can be rapidly and accurately solved. If the prediction function can not accurately predict the obstacle in the way, the A-Star algorithm still has huge performance waste on the way searching capability. Meanwhile, the traditional path planning method lacks reasonable estimation on a dynamic road network, the congestion condition in the road network cannot participate in new route planning, the congestion of transportation equipment can be caused, and the overall transportation delivery efficiency can be influenced.
The technical problem to be solved by the invention is how to plan a more reasonable transportation path, reduce the congestion of transportation equipment and improve the transportation efficiency.
According to an aspect of an embodiment of the present invention, there is provided a path planning method, including: determining the hot spot transportation cost of the adjacent node according to the road condition of the adjacent node of the current node of the transportation equipment; adding the hot spot transportation cost of the adjacent node and the fixed transportation cost of the path from the current node to the adjacent node to obtain the dynamic transportation cost of the path from the current node to the adjacent node; adding the dynamic transportation cost of the path from the current node to the adjacent node and the fixed transportation cost of the path from the adjacent node to the destination to obtain the comprehensive transportation cost of the transportation equipment from the current node to the destination; planning the transportation equipment to an adjacent node which minimizes the comprehensive transportation cost; and recalculating the comprehensive transportation cost of the transportation equipment from the current node to the terminal, and continuously planning the transportation equipment to the adjacent node which minimizes the comprehensive transportation cost until the current node of the transportation equipment is the terminal.
In some embodiments, determining the hot spot transportation cost of the neighboring node according to the road condition of the neighboring node of the current node of the transportation device includes at least one of the following cases: determining the hot spot transportation cost of the adjacent node according to the condition of the adjacent node on the planned path of other transportation equipment; determining the hot spot transportation cost of the adjacent node according to the situation that the adjacent node has a traffic obstacle; and determining the hot spot transportation cost of the adjacent node according to the condition that whether the adjacent node is a turning node or not.
In some embodiments, determining the hot spot transportation cost of the neighboring node according to the condition that the neighboring node is on the planned path of the other transportation device includes: and under the condition that the adjacent nodes are on the planned paths of other transportation equipment, adding a first generation value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the first generation value is positively correlated with the number of other transportation devices.
In some embodiments, determining the hot spot transportation cost of the neighboring node according to the condition of the neighboring node on the planned path of the other transportation device further includes: and in the case that the adjacent node is on the opposite planning path of other multiple transportation devices, adding a second generation value to the hot spot transportation cost of the adjacent node.
In some embodiments, the second generation value is positively correlated with the number of the other plurality of transportation devices.
In some embodiments, determining the hot spot transportation cost of the neighboring node according to the traffic barrier existing on the neighboring node comprises: and under the condition that the adjacent node is on a closed-loop locking path formed by other multiple transport devices or the adjacent node is a fault point, adding a third generation value to the hot spot transport cost of the adjacent node.
In some embodiments, determining the hot spot transportation cost of the neighboring node according to whether the neighboring node is a turning node comprises: and under the condition that the adjacent nodes are turning nodes, adding a fourth cost value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the path planning method further comprises: generating a fixed transportation cost database, wherein the fixed transportation cost database comprises fixed transportation costs of paths bypassing obstacles between any two nodes; inquiring a fixed transportation cost database by using a current node and adjacent nodes to obtain the fixed transportation cost of a path from the current node to the adjacent nodes; and inquiring a fixed transportation cost database by using the adjacent nodes and the destination to obtain the fixed transportation cost of the path from the adjacent nodes to the destination.
In some embodiments, the fixed transportation cost of a path between any two nodes that bypasses the obstacle is calculated by Dijkstra's algorithm.
According to an aspect of an embodiment of the present invention, there is provided a path planning apparatus, including: the hot spot transportation cost determining module is used for determining the hot spot transportation cost of the adjacent node according to the road condition of the adjacent node of the current node of the transportation equipment; the dynamic transportation cost determining module is used for adding the hot point transportation cost of the adjacent node and the fixed transportation cost of the path from the current node to the adjacent node to obtain the dynamic transportation cost of the path from the current node to the adjacent node; the comprehensive transportation cost determining module is used for adding the dynamic transportation cost of the path from the current node to the adjacent node and the fixed transportation cost of the path from the adjacent node to the destination to obtain the comprehensive transportation cost of the transportation equipment from the current node to the destination; the transportation equipment planning module is used for planning the transportation equipment to the adjacent node which minimizes the comprehensive transportation cost; and the iteration processing module is used for recalculating the comprehensive transportation cost of the transportation equipment from the current node to the terminal, and continuously planning the transportation equipment to the adjacent node which minimizes the comprehensive transportation cost until the current node of the transportation equipment is the terminal.
In some embodiments, the hot spot transportation cost determination module is to at least one of: determining the hot spot transportation cost of the adjacent node according to the condition of the adjacent node on the planned path of other transportation equipment; determining the hot spot transportation cost of the adjacent node according to the situation that the adjacent node has a traffic obstacle; and determining the hot spot transportation cost of the adjacent node according to the condition that whether the adjacent node is a turning node or not.
In some embodiments, the hot spot transportation cost determination module is to: and under the condition that the adjacent nodes are on the planned paths of other transportation equipment, adding a first generation value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the first generation value is positively correlated with the number of other transportation devices.
In some embodiments, the hot spot transportation cost determination module is further to: and in the case that the adjacent node is on the opposite planning path of other multiple transportation devices, adding a second generation value to the hot spot transportation cost of the adjacent node.
In some embodiments, the second generation value is positively correlated with the number of the other plurality of transportation devices.
In some embodiments, the hot spot transportation cost determination module is to: and under the condition that the adjacent node is on a closed-loop locking path formed by other multiple transport devices or the adjacent node is a fault point, adding a third generation value to the hot spot transport cost of the adjacent node.
In some embodiments, the hot spot transportation cost determination module is to: and under the condition that the adjacent nodes are turning nodes, adding a fourth cost value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the path planning apparatus further comprises: the database generation module is used for generating a fixed transportation cost database, and the fixed transportation cost database comprises fixed transportation costs of a path bypassing obstacles between any two nodes; the database query module is used for querying the fixed transportation cost database by using the current node and the adjacent nodes to obtain the fixed transportation cost of the path from the current node to the adjacent nodes; and querying a fixed transportation cost database by using the adjacent nodes and the destination to obtain the fixed transportation cost of the path from the adjacent nodes to the destination.
In some embodiments, the fixed transportation cost of a path between any two nodes that bypasses the obstacle is calculated by Dijkstra's algorithm.
According to another aspect of the embodiments of the present invention, there is provided a path planning apparatus, including: a memory; and a processor coupled to the memory, the processor configured to execute the aforementioned path planning method based on instructions stored in the memory.
According to a further aspect of the embodiments of the present invention, there is provided a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the instructions are executed by a processor to implement the aforementioned path planning method.
The route planning method provided by the invention can plan a more reasonable transportation route, reduce the congestion of transportation equipment and improve the transportation efficiency.
Other features of the present invention and advantages thereof will become apparent from the following detailed description of exemplary embodiments thereof, which proceeds with reference to the accompanying drawings.
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. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
First, a path planning method according to an embodiment of the present invention is described with reference to fig. 1.
Fig. 1 shows a flow chart of a path planning method according to an embodiment of the present invention. As shown in fig. 1, the path planning method in this embodiment includes:
and S102, determining the hot spot transportation cost of the adjacent node according to the road condition of the adjacent node of the current node of the transportation equipment.
Determining a hotspot transportation cost (y) of a neighboring node y according to road conditions of the neighboring node of the current node of the transportation device, wherein the hotspot transportation cost (y) comprises at least one of the following conditions:
(1) determining the hot spot transportation cost of the adjacent node according to the condition of the adjacent node on the planned path of other transportation equipment;
(2) determining the hot spot transportation cost of the adjacent node according to the situation that the adjacent node has a traffic obstacle;
(3) and determining the hot spot transportation cost of the adjacent node according to the condition that whether the adjacent node is a turning node or not.
The specific quantification method of the hot spot transportation cost (y) is described in detail later.
Step S104, adding the hot spot transportation cost (y) of the adjacent node and the fixed transportation cost S (a, y) of the path from the current node a to the adjacent node y to obtain the dynamic transportation cost d (a, y) of the path from the current node a to the adjacent node y.
For example, the fixed transportation cost may be quantified in terms of the distance of the path between nodes. For example, if the distance between the node a and the adjacent node y is 10, the fixed transportation cost s (a, y) is 10.
Step S106, adding the dynamic transportation cost d (a, y) of the path from the current node to the adjacent node and the fixed transportation cost S (y, b) of the path from the adjacent node y to the terminal b to obtain the comprehensive transportation cost f (a, b) of the transportation equipment from the current node to the terminal.
And step S108, planning the transportation equipment to the adjacent node which minimizes the comprehensive transportation cost.
And step S110, recalculating the comprehensive transportation cost of the transportation equipment from the current node to the terminal, and continuously planning the transportation equipment to the adjacent node which minimizes the comprehensive transportation cost until the current node of the transportation equipment is the terminal.
Wherein step S110 is actually an iterative calculation step. The specific iterative method can be implemented, for example, as follows:
two sets are created first, the OPEN set holds all the nodes that have been generated but not accessed, and the CLOSED set holds the accessed nodes. And putting the current node into the OPEN set, and traversing the OPEN set. And taking the node n with the minimum cost from the OPEN set, checking whether the target node exists, and if the target node exists, directly returning.
Then, all neighboring nodes k of this node n are traversed. If the node k is in the OPEN set and the comprehensive transportation cost of the node k is less than that in the OPEN set, establishing a front-back path relation between the n point and the k point, and updating the comprehensive transportation cost in the OPEN set; if the node k is neither in the OPEN set nor in the CLOSE set, which indicates that a new node is found to be unvisited, the node k is put into the OPEN set, and the front-back queue relationship is established between the n point and the k point.
After traversing the node n, putting the node n into the accessed set CLOSE, and arranging the nodes in the OPEN set in an ascending order according to the comprehensive transportation cost so as to preferentially find the point with the minimum cost from the source point and reduce the complexity of traversing the OPEN set. This process is repeated until an endpoint is found that is put into the CLOSE set.
In the above embodiment, when planning a path for transportation equipment in a dynamic road network, road conditions of nodes are fully considered, hot transportation cost caused by the road conditions is introduced, and unified operation is performed with fixed transportation cost, so that a path with dynamic transportation cost in the dynamic road network is obtained. Then, the hot spot transportation cost is used as the comprehensive transportation cost in planning, a more reasonable transportation path can be planned for the transportation equipment in the dynamic road network, the congestion of the transportation equipment is reduced, the road network transportation is smoother, and the transportation efficiency is improved.
The detailed calculation process of the hot spot transportation cost (y) of the neighboring node y is illustrated below.
In the invention, a hot spot map system can be generated, the system records information such as positions reported by transportation equipment and unfinished routes in real time, a hot spot cost map is generated according to factors such as road conditions, and hot spot transportation cost of each node is recorded in the hot spot cost map.
(1) And determining the hot spot transportation cost of the adjacent node according to the condition of the adjacent node on the planned path of other transportation equipment.
In the case that the neighboring node is on the planned path of other transportation devices, the first generation value can be added to the hot spot transportation cost of the neighboring node. Wherein the first generation value may be positively correlated with the number of other transportation devices.
For example, the planned path of a certain transportation device is node m- > n- > p- > q, the reported point of the current transportation device is n, and n- > p- > q is an incomplete route, and there is an incomplete route cost in the point set { n, p, q }. When there is an adjacent node n on the planned path without other transportation devices, the hot spot transportation cost of the point n is zero in case (1). And the hot spot transportation cost of the point n is increased by 5 every time when the adjacent node n exists on the planned path of other transportation equipment. It will be appreciated by those skilled in the art that the first generation value may also be set to other preset values within the range of (5, 10).
Further, under the condition that the adjacent nodes are on opposite planning paths of other multiple transportation devices, the second generation value is added to the hot spot transportation cost of the adjacent nodes. Wherein the second generation value can be positively correlated with the number of the other plurality of transportation devices.
For example, if the planned path of a certain transportation device is node m- > n- > p- > q, and the planned path of the opposite transportation device exists in the bidirectional path is node q- > p- > n, the overlapped route point set is { n, p, q }, and the point set has a corresponding overlapping cost. Whenever there is a neighboring node n on the planned path of the other two transportation devices, the hot spot transportation cost of point n increases by 20. Those skilled in the art will appreciate that the second generation value may also be set to other preset values.
(2) And determining the hot spot transportation cost of the adjacent node according to the condition that the adjacent node has the traffic obstacle.
And under the condition that the adjacent node is on a closed-loop locking path formed by other multiple transport devices or the adjacent node is a fault point, adding a third generation value to the hot spot transport cost of the adjacent node.
For example, if a transportation device is suspended at a certain node m due to a fault, the node m has a fault which obstructs traffic, and the third generation value 500 can be added to the hot spot transportation cost of the node m. For another example, the route of transportation device agv _1 is m- > n- > p- > q, currently at point m; the transportation device agv _2 route is n- > p- > q- > m, and is currently at point n; the transportation device agv _3 route is p- > q- > m- > n, and is currently at point p; the transportation device agv _4 route is q- > m- > n- > p, currently at point q. The set of cars avg _1, agv _2, agv _3, agv _4 constitute a closed loop deadlock, with additional deadlock point costs for points on the closed loop. A third generation value 500 may be added for the hot spot transportation cost of the node.
(3) And determining the hot spot transportation cost of the adjacent node according to the condition that whether the adjacent node is a turning node or not.
And under the condition that the adjacent nodes are turning nodes, adding a fourth cost value to the hot spot transportation cost of the adjacent nodes.
For example, if a transport equipment operation route m- > n- > p needs to turn at n points, hot spot transport cost caused by turning exists at n points, and it can be determined by physical characteristics of the transport equipment that it takes longer to move through a certain point and turn through a certain point than to determine the hot spot transport cost caused by turning, for example, the fourth cost value can be set to 30.
Those skilled in the art will understand that the hot spot transportation cost calculation methods in the above three cases (1), (2) and (3) may be used alone or in combination of two or three cases. In the case of combined use, the hot spot transportation costs in each case can be added.
A path planning method according to another embodiment of the present invention is described below with reference to fig. 2.
Fig. 2 is a flowchart illustrating a path planning method according to another embodiment of the present invention. As shown in fig. 2, on the basis of the embodiment shown in fig. 1, before step S102, the path planning method in this embodiment further includes:
step S202, a fixed transportation cost database is generated, wherein the fixed transportation cost database comprises fixed transportation costs of routes bypassing obstacles between any two nodes.
For example, a storage system unit may be provided for pre-storing fixed transportation costs between any two points. The storage medium uses a memory-based key-value database, and the stored data structure may be start _ end: s. The fixed transportation cost of a path bypassing obstacles between any two nodes can be calculated by a Dijkstra algorithm.
And step S204, inquiring a fixed transportation cost database by using the current node and the adjacent nodes to obtain the fixed transportation cost of the path from the current node to the adjacent nodes.
And step S206, inquiring a fixed transportation cost database by using the adjacent nodes and the destination to obtain the fixed transportation cost of the path from the adjacent nodes to the destination.
In the embodiment, the fixed transportation cost of the obstacle bypassing between any two points is stored in advance, and is used as the fixed transportation cost of a subsequent path planning algorithm, so that the rapid response can be provided to avoid the fixed obstacle, the passing point can be rapidly searched to achieve the purpose of rapidly searching the path, the path is rapidly planned, and the path planning efficiency is improved.
A path planning apparatus according to an embodiment of the present invention is described below with reference to fig. 3.
Fig. 3 is a schematic structural diagram of a path planning apparatus according to an embodiment of the present invention. As shown in fig. 3, the path planning apparatus 30 of the present embodiment includes:
the hot spot transportation cost determining module 302 is configured to determine a hot spot transportation cost of an adjacent node according to a road condition of the adjacent node of a current node of the transportation device;
the dynamic transportation cost determining module 304 is configured to add the hot spot transportation cost of the adjacent node and the fixed transportation cost of the path from the current node to the adjacent node to obtain a dynamic transportation cost of the path from the current node to the adjacent node;
the comprehensive transportation cost determining module 306 is configured to add the dynamic transportation cost of the path from the current node to the adjacent node to the fixed transportation cost of the path from the adjacent node to the destination to obtain a comprehensive transportation cost of the transportation device from the current node to the destination;
a transportation equipment planning module 308, configured to plan transportation equipment to a neighboring node that minimizes the comprehensive transportation cost;
and the iterative processing module 310 is configured to recalculate the comprehensive transportation cost of the transportation device from the current node to the destination, and continuously plan the transportation device to the neighboring node that minimizes the comprehensive transportation cost until the current node of the transportation device is the destination.
In the above embodiment, when planning a path for transportation equipment in a dynamic road network, road conditions of nodes are fully considered, hot transportation cost caused by the road conditions is introduced, and unified operation is performed with fixed transportation cost, so that a path with dynamic transportation cost in the dynamic road network is obtained. Then, the hot spot transportation cost is used as the comprehensive transportation cost in planning, a more reasonable transportation path can be planned for the transportation equipment in the dynamic road network, the congestion of the transportation equipment is reduced, the road network transportation is smoother, and the transportation efficiency is improved.
In some embodiments, the hot spot transportation cost determination module 302 is configured to at least one of:
determining the hot spot transportation cost of the adjacent node according to the condition of the adjacent node on the planned path of other transportation equipment;
determining the hot spot transportation cost of the adjacent node according to the situation that the adjacent node has a traffic obstacle;
and determining the hot spot transportation cost of the adjacent node according to the condition that whether the adjacent node is a turning node or not.
In some embodiments, the hot spot transportation cost determination module 302 is to: and under the condition that the adjacent nodes are on the planned paths of other transportation equipment, adding a first generation value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the first generation value is positively correlated with the number of other transportation devices.
In some embodiments, the hot spot transportation cost determination module 302 is further configured to: and in the case that the adjacent node is on the opposite planning path of other multiple transportation devices, adding a second generation value to the hot spot transportation cost of the adjacent node.
In some embodiments, the second generation value is positively correlated with the number of the other plurality of transportation devices.
In some embodiments, the hot spot transportation cost determination module 302 is to: and under the condition that the adjacent node is on a closed-loop locking path formed by other multiple transport devices or the adjacent node is a fault point, adding a third generation value to the hot spot transport cost of the adjacent node.
In some embodiments, the hot spot transportation cost determination module 302 is to: and under the condition that the adjacent nodes are turning nodes, adding a fourth cost value to the hot spot transportation cost of the adjacent nodes.
In some embodiments, the path planning apparatus 30 further includes:
a database generation module 300, configured to generate a fixed transportation cost database, where the fixed transportation cost database includes fixed transportation costs of routes between any two nodes that bypass obstacles;
a database query module 301, configured to query a fixed transportation cost database using a current node and an adjacent node to obtain a fixed transportation cost of a path from the current node to the adjacent node; and querying a fixed transportation cost database by using the adjacent nodes and the destination to obtain the fixed transportation cost of the path from the adjacent nodes to the destination.
In some embodiments, the fixed transportation cost of a path between any two nodes that bypasses the obstacle is calculated by Dijkstra's algorithm.
In the embodiment, the fixed transportation cost of the obstacle bypassing between any two points is stored in advance, and is used as the fixed transportation cost of a subsequent path planning algorithm, so that the rapid response can be provided to avoid the fixed obstacle, the passing point can be rapidly searched to achieve the purpose of rapidly searching the path, the path is rapidly planned, and the path planning efficiency is improved.
Fig. 4 is a schematic structural diagram of another embodiment of the path planning apparatus according to the present invention. As shown in fig. 4, the path planning apparatus 40 of this embodiment includes: a memory 410 and a processor 420 coupled to the memory 410, the processor 420 configured to execute the path planning method in any of the foregoing embodiments based on instructions stored in the memory 410.
Memory 410 may include, for example, system memory, fixed non-volatile storage media, and the like. The system memory stores, for example, an operating system, an application program, a Boot Loader (Boot Loader), and other programs.
The path planner 40 may also include an input output interface 430, a network interface 440, a storage interface 450, and the like. These interfaces 430, 440, 450 and the connection between the memory 410 and the processor 420 may be, for example, via a bus 450. The input/output interface 430 provides a connection interface for input/output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 440 provides a connection interface for various networking devices. The storage interface 450 provides a connection interface for external storage devices such as an SD card and a usb disk.
The present invention also includes a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement a path planning method as in any of the preceding embodiments.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.