Path planning method, device, equipment and computer readable storage medium
By predetermining the critical path and its length and iteratively adjusting the node sequence, combined with a simulated annealing algorithm, the problem of difficulty in solving the speed and quality in multi-point logistics distribution path planning is solved, and efficient and high-quality path planning is achieved.
Patent Information
- Application Number
- CN202311422043.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-27
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2043-10-27
AI Technical Summary
The prior art is difficult to take into account both the solution speed and the solution quality in multi-point logistics distribution path planning. Accurate algorithms are complex and time-consuming to calculate, while heuristic algorithms are difficult to balance between the solution quality and speed.
By predetermining the critical path and its length, avoiding subsequent repeated calculations, iteratively adjusting the node sequence to optimize the path, and combining a simulated annealing algorithm to improve the algorithm efficiency.
It significantly improves the solution efficiency of multi-point logistics distribution path planning, takes into account the solution quality, and can find high-quality solutions within a reasonable time to meet practical application needs.
Smart Images

Figure CN117371634B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motion planning technology, and in particular to a path planning method, device, equipment and computer-readable storage medium. Background Art
[0002] In recent years, unmanned logistics distribution technology has developed rapidly, among which path planning technology plays a vital role and is one of the key technologies for realizing unmanned logistics distribution. Path planning can be divided into two main parts, namely global path planning and local path planning. Global path planning usually relies on a pre-built map model, and its main goal is to find an optimal path at the macro level so that the unmanned vehicle can reach the destination at the lowest cost. There are many classic global path planning algorithms that can achieve this goal, including Dijkstra algorithm, A* algorithm, fast random search tree algorithm (RRT) and artificial potential field method. These algorithms can work well when solving the shortest path between points, but there are some limitations when dealing with multi-point logistics distribution path planning problems. Specifically, the multi-point logistics distribution path planning problem can be summarized as: in a network topology graph, the starting point, the end point and a varying number of necessary points are specified, and it is required to find a shortest path starting from the starting point, passing through all the necessary points, and finally reaching the end point.
[0003] In order to deal with the above-mentioned multi-point logistics distribution path planning problem, two types of algorithms are generally used in the existing technology, namely, exact algorithm and heuristic algorithm. However, there are the following problems:
[0004] If an exact algorithm is used to solve the problem, a global optimal solution can be obtained, but the computational complexity of the exact algorithm grows exponentially with the increase in the size of the problem, which means that on large-scale problems, the algorithm requires a lot of computing time and may not be able to find the optimal solution within a reasonable time.
[0005] If a heuristic algorithm is used to solve the problem, it is impossible to strike a good balance between the speed of solution and the quality of solution. In addition, the generalization of this type of method is poor. For example, parameters such as the fitness function in the genetic algorithm and the pheromone volatility rate in the ant colony algorithm need to be selected differently for different environmental models.
[0006] Based on this, there is an urgent need for a path planning method that can take into account both solution speed and solution quality. Summary of the invention
[0007] The present application provides a path planning method, device, equipment and computer-readable storage medium, which can solve the technical problem existing in the prior art that both solution speed and solution quality cannot be taken into account.
[0008] In a first aspect, an embodiment of the present application provides a path planning method, the path planning method comprising:
[0009] Determine a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes;
[0010] Determine the critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes;
[0011] Determine a node sequence according to the set of necessary nodes, and determine the cost corresponding to reaching the end point by sequentially passing through multiple intermediate nodes according to the node sequence from the starting point based on the length of the critical path, wherein the node sequence represents the order in which the multiple intermediate nodes are passed;
[0012] Based on the length of the critical path, two adjacent nodes with the longest shortest path are determined from the node sequence, positions of the two adjacent nodes in the node sequence are adjusted to obtain a new node sequence, and based on the length of the critical path, a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence is determined in sequence;
[0013] comparing the new cost with the cost;
[0014] If the new cost is less than the cost, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the new cost is not less than the cost, a random number is generated and the acceptable probability of the new node sequence is calculated; if the acceptable probability is greater than the random number, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the acceptable probability is not greater than the random number, the node sequence and the cost are kept unchanged;
[0015] Check whether the conditions for stopping iteration are met;
[0016] If the condition for stopping iteration is not met, returning to the step of determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path;
[0017] If the conditions for stopping iteration are met, a path is obtained based on the critical path planning, which starts from the starting point and passes through multiple intermediate nodes in sequence according to the node sequence to reach the end point.
[0018] In a second aspect, an embodiment of the present application provides a path planning device, the path planning device comprising:
[0019] A first determination module is used to determine a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes;
[0020] A second determination module is used to determine a critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes;
[0021] A third determination module is used to determine a node sequence according to the set of necessary nodes, and determine a cost corresponding to reaching an end point by sequentially passing through a plurality of intermediate nodes according to the node sequence from a starting point based on the length of the critical path, wherein the node sequence represents the order in which the plurality of intermediate nodes are passed;
[0022] A sequence reconstruction module is used to determine two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjust the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determine a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence based on the length of the critical path;
[0023] A comparison module, configured to compare the new cost with the cost;
[0024] An updating module, configured to replace the node sequence with the new node sequence and the cost with the new cost if the new cost is less than the cost; generate a random number and calculate an acceptable probability of the new node sequence if the new cost is not less than the cost; replace the node sequence with the new node sequence and the cost with the new cost if the acceptable probability is greater than the random number; and keep the node sequence and the cost unchanged if the acceptable probability is not greater than the random number;
[0025] A detection module is used to detect whether the conditions for stopping iteration are met;
[0026] A control module, for controlling the sequence reconstruction module to execute the steps of determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjusting the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determining a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence in sequence based on the length of the critical path if the stop iteration condition is not met;
[0027] The planning module is used to obtain a path from the starting point through multiple intermediate nodes in sequence according to the node sequence to the end point based on the critical path planning if the stopping iteration condition is met.
[0028] In a third aspect, an embodiment of the present application provides a path planning device, which includes a processor, a memory, and a path planning program stored in the memory and executable by the processor, wherein when the path planning program is executed by the processor, the steps of the path planning method described above are implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a path planning program is stored, wherein when the path planning program is executed by a processor, the steps of the path planning method as described above are implemented.
[0030] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:
[0031] In the embodiment of the present application, the critical path and its length are determined in advance, which avoids the repeated calculation of the same critical path in the subsequent solution process, thereby saving computing resources and time. Secondly, in the process of iteratively seeking the optimal solution, the two adjacent nodes with the longest shortest path are determined from the node sequence based on the length of the critical path, and the positions of the two adjacent nodes in the node sequence are adjusted to obtain a new node sequence. There is a greater probability of generating a node sequence with a lower cost, thereby reducing the number of iterations and improving the efficiency of the algorithm. Through the embodiment of the present application, the solution efficiency of the multi-point logistics distribution path planning problem is significantly improved while taking into account the solution quality, which can well meet the needs of practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is a flow chart of the first embodiment of the path planning method of the present application;
[0033] Figure 2 This is a flow chart of the second embodiment of the path planning method of the present application;
[0034] Figure 3 Schematic diagram of the high-precision map used for testing;
[0035] Figure 4 This is a schematic diagram of the functional modules of an embodiment of a path planning device of the present application;
[0036] Figure 5 This is a schematic diagram of the hardware structure of the path planning device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0039] In a first aspect, an embodiment of the present application provides a path planning method.
[0040] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the path planning method of this application. Figure 1 As shown, the path planning method includes:
[0041] Step S10, determining a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes;
[0042] In this embodiment, the path planning method is used to plan the motion path of the moving object, and the moving object may be an unmanned vehicle, a drone or other equipment.
[0043] The starting point can be determined according to the position information of the object to be moved.
[0044] The end point is set according to actual needs.
[0045] The set of necessary nodes is determined according to the task. For example, in a logistics delivery task, the set of necessary nodes is composed of delivery points.
[0046] Furthermore, in one embodiment, the step of determining the starting point includes:
[0047] Determine a candidate road that is consistent with the heading of the object to be moved; determine a target candidate road that is closest to the object to be moved from the candidate roads; and use the end node of the target candidate road as the starting point.
[0048] In this embodiment, the global map information, the heading and the position of the object to be moved are obtained. First, a candidate road that is consistent with the heading of the object to be moved is determined based on the global map information and the heading of the object to be moved; then, a target candidate road that is closest to the object to be moved is determined from the candidate roads based on the global map information and the position of the object to be moved; finally, the end node of the target candidate road is used as the starting point.
[0049] Step S20, determining a critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes;
[0050] In this embodiment, the starting point is A, the end point is E, and the multiple intermediate nodes included in the must-pass node set are B, C, and D. The critical path includes:
[0051] The path from A to B, the path from A to C, the path from A to D, the path from B to E, the path from C to E, the path from D to E, the path from B to C, the path from B to D, the path from C to B, the path from C to D, the path from D to C, and the path from D to B.
[0052] The critical path and its length are determined by the function A_star. A_star:
[0053] This function is a path planning function based on the A* algorithm, which is used to find the shortest path from a node to another node and the corresponding length. In the A* algorithm, the cost of the node is calculated in the following way:
[0054] f(n)=g(n)+h(n)
[0055] Where: f(n) is the cost of reaching another node from one node through the node to be expanded n; g(n) is the actual distance from one node to the node to be expanded n; h(n) is the estimated distance from the node to be expanded n to another node.
[0056] In order to ensure that the shortest path is found, we need to select a suitable heuristic function h(n). If the selected heuristic function value is smaller than the actual distance value from the current node to be expanded to another node, the search will cover more nodes and the search range will be wider, while ensuring that the optimal solution is obtained. Conversely, if the selected heuristic function value is greater than the actual distance value from the current node to be expanded to another node, the search will skip some nodes and the search range will be smaller, but it may lead to suboptimal solutions. In summary, in order to ensure that the optimal solution is obtained when solving the critical path, our heuristic function h(n) should be smaller than the actual distance value, and should be as close to the actual distance value as possible to speed up the solution. In this embodiment, the Euclidean distance between the node to be expanded and another node is selected as the heuristic function:
[0057]
[0058] Where: x n ,y n are the horizontal and vertical coordinates of the node to be expanded, respectively. t ,y t are the horizontal and vertical coordinates of another node respectively.
[0059] Furthermore, after determining the critical path and its length, the critical path and its length are stored in a hash table, where the key in the hash table structure consists of the start point id and the end point id of the critical path, and the value is the length.
[0060] Step S30, determining a node sequence according to the set of necessary nodes, and determining the cost corresponding to reaching the end point by sequentially passing through multiple intermediate nodes according to the node sequence from the starting point based on the length of the critical path, wherein the node sequence represents the order in which the multiple intermediate nodes are passed;
[0061] In this embodiment, the node sequence is determined for the first time, and it can be randomly determined based on multiple intermediate nodes included in the must-pass node set. For example, if the multiple intermediate nodes included in the must-pass node set are B, C, and D, the node sequence determined for the first time can be to pass through B first, then C, and finally D. Since the length of the critical path has been determined in step S20, the length from the starting point A to B, the length from B to C, the length from C to D, and the length from D to the end point E can be determined based on the length of the critical path, and then these lengths are added together to obtain the length of A→B→C→D→E, and the length of A→B→C→D→E is used as the corresponding cost.
[0062] Step S40, determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjusting the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determining a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence based on the length of the critical path;
[0063] In this embodiment, based on the length of the critical path, the two adjacent nodes with the longest shortest path in the node sequence can be determined. For example, the node sequence is B→C→D→E→F, where the shortest path of D→E is longer than the shortest paths of other adjacent nodes. Then, the positions of D and E in the node sequence are adjusted. For example, the new node sequence obtained is B→D→C→F→E.
[0064] After the new node sequence is obtained, a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence is determined in a manner substantially similar to the embodiment of step S30.
[0065] Step S50, comparing the new cost with the cost;
[0066] Step S60, if the new cost is less than the cost, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the new cost is not less than the cost, a random number is generated and the acceptable probability of the new node sequence is calculated; if the acceptable probability is greater than the random number, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the acceptable probability is not greater than the random number, the node sequence and the cost are kept unchanged;
[0067] In this embodiment, it is easy to understand that if the new cost is less than the cost, then the path from the starting point to the end point along the new node sequence passing through multiple intermediate nodes is better than the path from the starting point to the end point along the node sequence passing through multiple intermediate nodes.
[0068] If the new cost is less than the price, the node sequence is directly replaced by the new node sequence, and the price is replaced by the new cost;
[0069] If the new cost is not less than the cost, a random number is generated and the acceptable probability of the new node sequence is calculated. If the acceptable probability is greater than the random number, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost. If the acceptable probability is not greater than the random number, the node sequence and the cost are kept unchanged.
[0070] Furthermore, the iterative solution process can utilize the simulated annealing algorithm, which is a random optimization algorithm based on the Monte-Carlo iterative solution strategy. The solution process of the acceptable probability P of the new node sequence is as follows:
[0071]
[0072] Among them, e is the natural constant, T is the current temperature, cost 0 For the cost, cost new is the new cost. The random number ranges from 0 to 1.
[0073] Step S70, detecting whether the condition for stopping iteration is met;
[0074] If the condition for stopping iteration is not met, return to step S40;
[0075] Step S80: If the condition for stopping iteration is met, a path from the starting point through a plurality of intermediate nodes in sequence according to the node sequence to the end point is obtained based on the critical path planning.
[0076] In this embodiment, if the condition for stopping iteration is not met, the process returns to step S40, i.e., iterative solution is continued; if the condition for stopping iteration is met, the current node sequence is taken as the optimal solution, and a path from the starting point to the end point through multiple intermediate nodes in sequence according to the node sequence is obtained based on the critical path planning. For example, if the starting point is A, the end point is E, and the optimal solution is C→D→B, then the shortest path from A to C, the shortest path from C to D, the shortest path from D to B, and the shortest path from B to E are determined based on the critical path, and finally these paths are spliced together to plan a path from the starting point to the end point through multiple intermediate nodes in sequence according to the node sequence.
[0077] In the embodiment of the present application, the critical path and its length are determined in advance, which avoids the repeated calculation of the same critical path in the subsequent solution process, thereby saving computing resources and time. Secondly, in the process of iteratively seeking the optimal solution, the two adjacent nodes with the longest shortest path are determined from the node sequence based on the length of the critical path, and the positions of the two adjacent nodes in the node sequence are adjusted to obtain a new node sequence. There is a greater probability of generating a node sequence with a lower cost, thereby reducing the number of iterations and improving the efficiency of the algorithm. Through the embodiment of the present application, the solution efficiency of the multi-point logistics distribution path planning problem is significantly improved while taking into account the solution quality, which can well meet the needs of practical applications.
[0078] Further, in one embodiment, referring to Figure 2 , Figure 2 This is a flow chart of the second embodiment of the path planning method of this application. Figure 2 As shown, step S70 includes:
[0079] Detecting whether the number of iterations reaches the Markov chain length, wherein the number of iterations increases by one each time the step of comparing the new cost with the cost is performed, and the initial value of the number of iterations is zero;
[0080] If the number of iterations does not reach the Markov chain length, it is determined that the condition for stopping iteration is not met.
[0081] In this embodiment, the Markov chain length is the preset number of iterations. If the number of iterations does not reach the Markov chain length, it is determined that the stop iteration condition is not met.
[0082] Further, in one embodiment, continue to refer to Figure 2 , after the step of detecting whether the number of iterations reaches the Markov chain length, further comprising:
[0083] If the number of iterations reaches the Markov chain length, the current temperature is updated according to the temperature drop rate; it is determined whether the current temperature is less than the stable temperature; if it is less than the stable temperature, it is determined that the condition for stopping iteration is met.
[0084] Further, in one embodiment, continue to refer to Figure 2 After the step of determining whether the current temperature is less than the stable temperature, the method further includes:
[0085] If it is not less than the temperature temperature, it is determined that the condition for stopping iteration is not met, and the number of iterations is initialized to zero.
[0086] It should be noted that Figure 2 For details of steps S10, S20, S30, S40, S50, S60 and S80, refer to Figure 1 .
[0087] In this embodiment, the iterative solution process introduces a simulated annealing algorithm, which overcomes the challenge of the traditional exact algorithm that the search space grows exponentially when the problem scale gradually increases. The simulated annealing algorithm allows a certain amount of randomness to be introduced in the search process to find potential high-quality paths.
[0088] Referring to the above description, this embodiment combines the advantages of the precise algorithm and the heuristic algorithm, and can well balance the relationship between the speed of solution and the quality of solution. The performance of the algorithm in this paper is verified by experiments.
[0089] Based on high-precision maps, the method of this embodiment is experimentally compared with the following three algorithms:
[0090] Algorithm 1: A* algorithm based on full permutation.
[0091] Algorithm 2: Genetic algorithm.
[0092] Algorithm 3: Ant Colony Algorithm.
[0093] The experimental environment is: Ubuntu 20.04 system, i7-7700K CPU, 16GB memory, programming language is C++, compiler is GCC9.4.0. The high-precision map used in the test is as follows Figure 3 This map contains 101 roads and 73 nodes, with a large data scale, which can effectively test the performance of our algorithm.
[0094] Among the three algorithms mentioned above, Algorithm 1 is classified as an exact algorithm, while Algorithm 2 and Algorithm 3 are heuristic algorithms. These two types of algorithms have different characteristics when solving problems. Exact algorithms have the ability to find the optimal solution to a problem, but they require a long computing time. When the problem scale is large, exact algorithms often cannot obtain a solution within an acceptable time. Heuristic algorithms have a faster solution speed, and they can find a solution close to the optimal solution in a relatively short time.
[0095] We conducted eight experiments for different numbers of nodes that must be passed through. In each experiment, we repeated the experiment three times and averaged the results of the three experiments to obtain the final reliable results. It should be noted that for those experiments where the calculation time exceeds three minutes, we adopted a timeout process. In addition, we also provide the length of the optimal solution for comparison, which is calculated by the exact algorithm mentioned above. The experimental results are shown in Table 1.
[0096]
[0097] Table 1
[0098] From the data in Table 1, it can be seen that for the multi-point logistics path planning problem, the method of this embodiment can obtain a higher quality solution at a lower time cost. Compared with the exact algorithm in the experiment, the calculation time of the method of this embodiment is much less than that of the exact algorithm, and the solution obtained is also close to the optimal solution, which can meet the requirements of practical applications; compared with the heuristic algorithm Algorithm 2 in the experiment, the method of this embodiment performs better in terms of solution quality and solution speed; compared with the heuristic algorithm Algorithm 3, the method of this embodiment can obtain a higher quality solution at a similar solution speed.
[0099] In a second aspect, an embodiment of the present application also provides a path planning device.
[0100] In one embodiment, referring to Figure 4 , Figure 4 This is a functional module diagram of an embodiment of the path planning device of the present application. Figure 4 As shown, the path planning device includes:
[0101] A first determination module 10 is used to determine a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes;
[0102] A second determination module 20 is used to determine a critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes;
[0103] A third determination module 30 is used to determine a node sequence according to the set of necessary nodes, and determine a cost corresponding to reaching an end point by sequentially passing through a plurality of intermediate nodes according to the node sequence from a starting point based on the length of the critical path, wherein the node sequence represents the order in which the plurality of intermediate nodes are passed;
[0104] A sequence reconstruction module 40 is used to determine two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjust the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determine a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence based on the length of the critical path;
[0105] A comparison module 50, for comparing the new cost with the cost;
[0106] An updating module 60 is used to replace the node sequence with the new node sequence and the cost with the new cost if the new cost is less than the cost; if the new cost is not less than the cost, generate a random number and calculate the acceptable probability of the new node sequence; if the acceptable probability is greater than the random number, replace the node sequence with the new node sequence and the cost with the new cost; if the acceptable probability is not greater than the random number, keep the node sequence and the cost unchanged;
[0107] A detection module 70, used to detect whether a stop iteration condition is met;
[0108] The control module 80 is used to control the sequence reconstruction module 40 to execute the steps of determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjusting the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determining a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence in sequence based on the length of the critical path if the stop iteration condition is not met;
[0109] The planning module 90 is used to obtain a path from the starting point through a plurality of intermediate nodes in sequence according to the node sequence to the end point based on the critical path planning if the iteration stopping condition is met.
[0110] Further, in one embodiment, the first determining module 10 is specifically configured to:
[0111] Determine a candidate road that is consistent with the heading of the object to be moved;
[0112] Determine a target candidate road from the candidate roads that is closest to the object to be moved;
[0113] The end node of the target road is used as the starting point.
[0114] Furthermore, in one embodiment, the detection module 70 is specifically used for:
[0115] Detecting whether the number of iterations reaches the Markov chain length, wherein the number of iterations increases by one each time the step of comparing the new cost with the cost is performed, and the initial value of the number of iterations is zero;
[0116] If the number of iterations does not reach the Markov chain length, it is determined that the condition for stopping iteration is not met.
[0117] Furthermore, in one embodiment, the detection module 70 is specifically used for:
[0118] If the number of iterations reaches the Markov chain length, the current temperature is updated according to the temperature drop rate;
[0119] Determine whether the current temperature is lower than the stable temperature;
[0120] If it is less than the stable temperature, it is determined that the condition for stopping iteration is met.
[0121] Furthermore, in one embodiment, the detection module 70 is specifically used for:
[0122] If it is not less than the temperature temperature, it is determined that the condition for stopping iteration is not met, and the number of iterations is initialized to zero.
[0123] Among them, the functional implementation of each module in the above-mentioned path planning device corresponds to the various steps in the above-mentioned path planning method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0124] In a third aspect, an embodiment of the present application provides a path planning device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0125] Reference Figure 5 , Figure 5 Schematic diagram of the hardware structure of the path planning device involved in the embodiment of the present application. In the embodiment of the present application, the path planning device may include a processor, a memory, a communication interface and a communication bus.
[0126] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0127] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the path planning device, and the interface used to realize the interconnection between the path planning device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0128] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0129] The processor may be a general-purpose processor, and the general-purpose processor may call the path planning program stored in the memory and execute the path planning method provided by the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the path planning program is called may refer to the various embodiments of the path planning method of the present application, which will not be repeated here.
[0130] Those skilled in the art will understand that Figure 5 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0131] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0132] A path planning program is stored on the computer-readable storage medium of the present application, wherein when the path planning program is executed by a processor, the steps of the path planning method as described above are implemented.
[0133] Among them, the method implemented when the path planning program is executed can refer to the various embodiments of the path planning method of the present application, and will not be repeated here.
[0134] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0135] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0136] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0137] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0138] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0139] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0140] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A path planning method, characterized in that: The path planning method comprises: Determine a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes; Determine the critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes; Determine a node sequence according to the set of necessary nodes, and determine the cost corresponding to reaching the end point by sequentially passing through multiple intermediate nodes according to the node sequence from the starting point based on the length of the critical path, wherein the node sequence represents the order in which the multiple intermediate nodes are passed; Based on the length of the critical path, two adjacent nodes with the longest shortest path are determined from the node sequence, positions of the two adjacent nodes in the node sequence are adjusted to obtain a new node sequence, and based on the length of the critical path, a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence is determined in sequence; comparing the new cost with the cost; If the new cost is less than the cost, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the new cost is not less than the cost, a random number is generated and the acceptable probability of the new node sequence is calculated; if the acceptable probability is greater than the random number, the node sequence is replaced by the new node sequence, and the cost is replaced by the new cost; if the acceptable probability is not greater than the random number, the node sequence and the cost are kept unchanged; wherein, the iterative solution process introduces the simulated annealing algorithm, and the solution process of the acceptable probability P of the new node sequence is as follows: Among them, e is the natural constant, T is the current temperature, cost0 is the cost, cost new is the new cost, the random number range is between 0 and 1; Check whether the conditions for stopping iteration are met; If the condition for stopping iteration is not met, returning to the step of determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path; If the conditions for stopping iteration are met, a path is obtained based on the critical path planning, which starts from the starting point and passes through multiple intermediate nodes in sequence according to the node sequence to reach the end point.
2. The path planning method according to claim 1, characterized in that: Steps to determine your starting point include: Determine a candidate road that is consistent with the heading of the object to be moved; Determine a target candidate road from the candidate roads that is closest to the object to be moved; The end node of the target road is used as the starting point.
3. The path planning method according to claim 1, characterized in that: The step of detecting whether the condition for stopping iteration is met comprises: Detecting whether the number of iterations reaches the Markov chain length, wherein the number of iterations increases by one each time the step of comparing the new cost with the cost is performed, and the initial value of the number of iterations is zero; If the number of iterations does not reach the Markov chain length, it is determined that the condition for stopping iteration is not met.
4. The path planning method according to claim 3, characterized in that: After the step of detecting whether the number of iterations reaches the Markov chain length, the method further includes: If the number of iterations reaches the Markov chain length, the current temperature is updated according to the temperature drop rate; Determine whether the current temperature is lower than the stable temperature; If it is less than the stable temperature, it is determined that the condition for stopping iteration is met.
5. The path planning method according to claim 4, characterized in that: After the step of determining whether the current temperature is less than the stable temperature, the method further includes: If it is not less than the temperature temperature, it is determined that the condition for stopping iteration is not met, and the number of iterations is initialized to zero.
6. A path planning device, characterized in that: The path planning device comprises: A first determination module is used to determine a starting point, an end point, and a set of necessary nodes, wherein the set of necessary nodes includes a plurality of intermediate nodes; A second determination module is used to determine a critical path and its length, wherein the critical path includes the shortest path from the starting point to each intermediate node, the shortest path from each intermediate node to the end point, and the shortest path between all intermediate nodes; A third determination module is used to determine a node sequence according to the set of necessary nodes, and determine a cost corresponding to reaching an end point by sequentially passing through a plurality of intermediate nodes according to the node sequence from a starting point based on the length of the critical path, wherein the node sequence represents the order in which the plurality of intermediate nodes are passed; A sequence reconstruction module is used to determine two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjust the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determine a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence based on the length of the critical path; A comparison module, configured to compare the new cost with the cost; An updating module is used to replace the node sequence with the new node sequence and the cost with the new cost if the new cost is less than the cost; if the new cost is not less than the cost, generate a random number and calculate the acceptable probability of the new node sequence; if the acceptable probability is greater than the random number, replace the node sequence with the new node sequence and the cost with the new cost; if the acceptable probability is not greater than the random number, keep the node sequence and the cost unchanged; wherein, the iterative solution process introduces a simulated annealing algorithm, and the solution process of the acceptable probability P of the new node sequence is as follows: Among them, e is the natural constant, T is the current temperature, cost0 is the cost, cost new is the new cost, the random number range is between 0 and 1; A detection module is used to detect whether the conditions for stopping iteration are met; A control module, for controlling the sequence reconstruction module to execute the steps of determining two adjacent nodes with the longest shortest path from the node sequence based on the length of the critical path, adjusting the positions of the two adjacent nodes in the node sequence to obtain a new node sequence, and determining a new cost corresponding to reaching the end point from the starting point through multiple intermediate nodes in the new node sequence in sequence based on the length of the critical path if the stop iteration condition is not met; The planning module is used to obtain a path from the starting point through multiple intermediate nodes in sequence according to the node sequence to the end point based on the critical path planning if the stopping iteration condition is met.
7. The path planning device according to claim 6, characterized in that: The first determination module is specifically used for: Determine a candidate road that is consistent with the heading of the object to be moved; Determine a target candidate road from the candidate roads that is closest to the object to be moved; The end node of the target road is used as the starting point.
8. The path planning device according to claim 6, characterized in that: The detection module is specifically used for: Detecting whether the number of iterations reaches the Markov chain length, wherein the number of iterations increases by one each time the step of comparing the new cost with the cost is performed, and the initial value of the number of iterations is zero; If the number of iterations does not reach the Markov chain length, it is determined that the condition for stopping iteration is not met.
9. A path planning device, characterized in that: The path planning device includes a processor, a memory, and a path planning program stored in the memory and executable by the processor, wherein when the path planning program is executed by the processor, the steps of the path planning method as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a path planning program, wherein when the path planning program is executed by a processor, the steps of the path planning method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Goods picking path generation method and generation apparatus, and corresponding storage management system
CN104992241A
AGV multi-target point autonomous navigation method facing smart factories
CN109974711A