A Fast Composite Transportation Route Planning Method with Limited Loading and Unloading Times
By introducing the tuple sequence Q with a limited loading and unloading times in the Lewis algorithm, the problem of limited loading and unloading times in the composite transportation path planning is solved, and fast and accurate path planning is achieved, which reduces transportation costs.
Patent Information
- Application Number
- CN202210673769.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-06-15
AI Technical Summary
The existing Dijkstra algorithm and Kirby-Potts extension algorithm cannot effectively deal with the problem of limited loading and unloading times in composite transport path planning, resulting in increased computational complexity or inaccurate path planning.
Based on the Lewis algorithm, by extending Kirby-Potts to all vertices in the road network, tuples containing transportation mode, direction, path length and loading and unloading times are generated, and the maximum loading and unloading times is limited during the path planning process, and the shortest path calculation is performed using the tuple sequence Q.
It realizes the flexibility to plan composite transportation paths with limited loading and unloading times without increasing computational complexity, reducing transportation costs and improving the accuracy and efficiency of path planning.
Smart Images

Figure CN115187158B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of path planning, and in particular relates to a method for planning a fast composite transport path with limited loading and unloading times. Background Art
[0002] In complex transport route planning, there are two or more modes of transport. Switching between these modes requires loading and unloading operations. For example, connecting road and rail transport requires loading and unloading at train stations. Currently, the common practice is to convert loading and unloading operations into route planning costs. If the goal is to find the shortest path, this is converted to path length; if the goal is to find the fastest path, this is converted to time. Path planning is then performed using the extended Dijkstra algorithm. However, in practice, loading and unloading costs are difficult to measure and are affected by many factors. Users often request a limit on the number of loading and unloading operations.
[0003] Dijkstra's algorithm [1] is an algorithm for finding the shortest path between two vertices in a network. Without considering special data structures, its computational complexity is O(n 2 ), using a heap structure to optimize sorting increases the computational complexity to O(m + nlog(n)). The Dijkstra algorithm itself cannot solve path planning problems in complex transportation. It primarily utilizes the length properties of edges, cumulatively calculating within the network topology and selecting the minimum value reaching a vertex as the shortest path length. Therefore, each marked vertex in the Dijkstra algorithm can only have one shortest path value from the starting point.
[0004] Because the Dijkstra algorithm limits each marked vertex to only storing one optimal shortest path value, however, in a complex transportation network, the shortest path values to the same location are different after different transportation modes and different numbers of loading and unloading processes. Therefore, the Dijkstra algorithm itself cannot be used to solve complex transportation path planning problems with limited loading and unloading times.
[0005] Kirby-Potts expansion [2] expands each vertex in the road network into multiple virtual vertices according to the different modes of transportation for arrival or departure. Since each virtual vertex is only allowed to have one mode of transportation for arrival or departure, when solving with Dijkstra algorithm, the shortest path marked at the virtual vertex is the shortest path to this node using this mode of transportation, and cannot be other modes of transportation. The Kirby-Potts expansion diagram is as follows: Figure 6 As shown, for abstract description, different modes of transportation are marked with different colors, such as railway transportation using red ( Figure 6 Medium thick line segment), road transport uses black ( Figure 6The virtual line segments, etc., so the composite transportation network extended by Kirby-Potts is also called the coloring network.
[0006] Although the Kirby-Potts extended network can be solved using the Dijkstra algorithm, the number of vertices increases by M times, so the computational complexity increases by M 2 , and the computational complexity of the composite transportation path planning algorithm based on Kirby-Potts is O(M 2 n 2 ).
[0007] Based on the analysis of the Kirby-Potts extension, Rhyd Lewis [3] proposed a strategy of trading space for time. When marking nodes, the algorithm still uses the original nodes as the basis and calculates all virtual nodes simultaneously. Therefore, the Lewis algorithm does not increase the computational complexity of the Dijkstra algorithm, but requires more storage space, as Figure 7 shown.
[0008] Although the Lewis algorithm improves the computational efficiency compared to the Kirby-Potts extension algorithm and can solve the path planning problem of the composite transportation network, the Lewis algorithm still only converts the loading and unloading cost into a kind of cost and adds it to the path length to calculate the shortest path from the starting point to the ending point, without designing the algorithm from the perspective of the number of loading and unloading times.
[0009] References:
[0010] [1] E.W. Dijkstra, “A note on two problems in connexion with graphs,” Numer. Math., vol. 1, no. 1, pp. 269–271, Dec. 1959, doi: 10.1007 / BF01386390.
[0011] [2] R.F. Kirby and R.B. Potts, “The minimum route problem for networks with turn penalties and prohibitions,” Transp. Res., vol. 3, pp. 397–408, 1969.
[0012] [3]R. Lewis, “Algorithms for Finding Shortest Paths in Networks with Vertex Transfer Penalties,” Algorithms, vol. 13, no. 11, p. 269, Oct. 2020, doi: 10.3390 / a13110269. Summary of the Invention
[0013] To solve the above problem of the combined transportation path planning with limited loading and unloading times, a method for outputting the shortest path between vertices under the constraint of a specified maximum number of loading and unloading times is provided. The present invention adopts the following technical solutions:
[0014] The present invention provides a fast combined transportation path planning method with limited loading and unloading times, which is used to output the shortest path between vertices under the constraint of a specified maximum number of loading and unloading times. It is characterized by including: Step S1, performing Kirby-Potts expansion on all vertices in the road network to generate their corresponding tuples (v, c, i, l, n). The elements included in this tuple are the original vertex v pointing back to it, the transportation mode c, the entry / exit direction i, the path length l from the starting point to the current vertex, and the number of loading and unloading times n passed from the starting point to the current vertex; Step S2, selecting the maximum number of loading and unloading times n max , selecting the starting point v src and the ending point v dst , based on the Kirby-Potts expansion of the starting point v src , constructing an initial tuple sequence Q with the direction of out, that is, i = OUT; Step S3, judging whether the initial tuple sequence Q is empty; Step S4, when the judgment in Step S3 is yes, it means that there is no reachable path from the starting point to the ending point, and the planning ends; Step S5, when the judgment in Step S3 is no, select the tuple p(v, c, i, l, n) with the minimum l value from the initial tuple sequence Q and mark this tuple; Step S6, judging the direction of i in the marked tuple p(v, c, i, l, n); Step S7, when the judgment in Step S6 is IN, select the tuple that can be converted from IN to OUT and mark this tuple as p2; Step S8, judging whether the transportation mode in the tuple p2 is the same as the transportation mode in the marked tuple; Step S9, when the judgment in Step S8 is no, then record the temporary path cost as c tmp = p(l) + c tx , c tx is the transfer cost, and increase the number of loading and unloading times n tmp = p(n) + 1; Step S10, when the judgment in Step S8 is yes, it means that the transportation modes for entering and leaving the vertex are the same, then the path cost and the number of loading and unloading times remain unchanged; Step S11, judging the number of loading and unloading times n tmp>n max ; Step S12, when step S11 is judged to be yes, p2 group remains unchanged; step S13, when it is judged to be no, judge c tmp <p2(l),如果判断为是则更新p2(l)=c tmp , put the updated p2 into sequence Q and then go to step S16; otherwise, the p2 path cost remains unchanged and the p2 tuple remains unchanged; step S14, when step S6 is judged as OUT, select a tuple that can be converted from OUT to IN, has the same transportation mode and is not marked, recorded as p2, then p2(c) = p(c); step S15, calculate the temporary conversion path cost c at this time tmp =p(l)+w(p(v),p2(v)), where w is the path cost (length) of the edge between vertices, and judge c tmp <p2(l),当判断为是时,将p2放入序列Q中然后进入步骤S16;步骤S16,判断p2(v)=v dst , that is, whether the current vertex is the end point; Step S17, when step S16 is judged to be yes, it means the starting point v src and the end point v dst If the shortest path exists, calculate the total number of transfers and the total path cost; otherwise, repeat steps S5 to S17 until the end.
[0015] The present invention also provides a computer-readable storage medium for storing a computer program, characterized in that the computer program is configured to implement the above-mentioned method for planning a fast composite transport path with limited loading and unloading times when executed.
[0016] Functions and effects of the invention
[0017] The present invention provides a method for planning a fast composite transport path with limited loading and unloading times. Based on the Lewis algorithm, this method adds a restriction on the number of loading and unloading times, thus implementing a fast composite transport path planning algorithm under the condition of limited loading and unloading times. Compared to existing algorithms, the present method not only solves the problem of finding the shortest path in composite transport, but also flexibly implements fast composite transport path planning with limited loading and unloading times from the perspective of loading and unloading times without introducing additional computational complexity, thereby reducing the cost of composite transport, providing convenience for composite transport, and demonstrating high applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 1 is a flow chart of a method for planning a fast composite transport path with limited loading and unloading times according to an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of the shortest path result obtained without restrictions on the number of loading and unloading times and transfer costs in an embodiment of the present invention;
[0020] Figure 3 It is a schematic diagram of the shortest path result obtained by limiting the maximum number of loading and unloading times to 2 and not limiting the transfer cost in the embodiment of the present invention;
[0021] Figure 4 In the embodiment of the present invention Figure 3 A partial schematic diagram of the railway section.
[0022] Figure 5 It is a schematic diagram of the shortest path result obtained by setting the transfer cost to 100 meters or limiting the maximum number of loading and unloading times to 0 in the embodiment of the present invention;
[0023] Figure 6 It is a schematic diagram of the Kirby-Potts extension; and
[0024] Figure 7 It is a schematic diagram of Lewis's time-space trade-off improved coloring Dijkstra algorithm. Detailed implementation manners
[0025] Based on the Lewis algorithm, the present invention adds a limit on the number of loading and unloading times in the algorithm steps, and at the same time does not introduce additional computational complexity, and realizes a fast combined transportation path planning algorithm under the condition of limited loading and unloading times.
[0026] In order to make the technical means, creative features, achieved purposes and effects realized by the present invention easy to understand, the following specifically describes a fast combined transportation path planning method with limited loading and unloading times according to the present invention in combination with embodiments and drawings.
[0027] <Embodiment>
[0028] Figure 1 It is a schematic diagram of the process of a fast combined transportation path planning method with limited loading and unloading times in the embodiment of the present invention.
[0029] As Figure 1 shown, a fast combined transportation path planning method with limited loading and unloading times includes the following steps:
[0030] To facilitate the user to select any starting point or ending point for path planning calculation, in this embodiment, all vertices in the road network are subjected to Kirby-Potts extension, not just the local road network maps of the starting point and the ending point.
[0031] Step S1, perform Kirby-Potts extension on all vertices in the road network graph G(V, E), generate their respective corresponding tuples, and the elements included in the tuple at least have the transportation mode, the entry and exit directions, the path length from the starting point to the current vertex, and the number of loading and unloading times passed from the starting point to the current vertex.
[0032] In this embodiment, a tuple is represented as (v, c, i, l, n), where v points backward to its corresponding original vertex, c represents its corresponding transportation mode or edge color, i represents the in-out direction. If it is an extension derived from an "in-edge", then i = IN; otherwise, i = OUT. l represents the path cost (length) from the starting point to the current extended vertex, and n represents the number of loading and unloading operations experienced from the starting point to the current node.
[0033] Step S2: Select the maximum number of loading and unloading operations n max , select the starting point v src and the ending point v dst , based on the Kirby-Potts extension of the starting point v src , construct an initial tuple sequence Q with the direction being out, i.e., i = OUT.
[0034] In this embodiment, in a road network including highways and railways, the starting point and the ending point are selected, and the positions are represented by longitude and latitude coordinates. The longitude and latitude coordinates of the starting point are (117.618164, 34.595214), and the longitude and latitude coordinates of the ending point are (117.993164, 29.685058). The initial tuple sequence Q contains a tuple p = {((117.618164, 34.595214), "highway", OUT, 0, 0)} with the direction being OUT.
[0035] Step S3: Determine whether the initial tuple sequence Q is empty.
[0036] In this embodiment, at this time, the sequence Q is not empty, and it contains a tuple extending outward from the starting point.
[0037] Step S4: When the judgment in step S3 is yes, end the path planning.
[0038] This step S4 is an exit condition. When the condition of step S4 is triggered, in most cases, it is because there is no reachable path from the starting point to the ending point.
[0039] Step S5: When the judgment in step S3 is no, select the tuple p(v, c, i, l, n) with the minimum l value from the initial tuple sequence Q, and mark this tuple.
[0040] In this embodiment, in the first iteration, since there is only one tuple in the sequence Q, this unique tuple is selected; in the second iteration, p = {((117.618164, 34.595214), "highway", OUT, 0, 0)} has 50 outgoing paths, so 50 new tuples are added, and the minimum tuple is: {(117.256880, 34.70987), "highway", IN, 35458.82 meters, 0}.
[0041] Step S6: Determine the direction of i in the marked tuple p(v, c, i, l, n).
[0042] In this embodiment, in the first iteration, i = OUT; in the second iteration, i = IN. The subsequent iterations are repetitions of a similar phenomenon, that is, if the previous one is OUT, the subsequent one is IN.
[0043] Step S7, when it is judged as IN in step S6, select the tuples that can be converted from IN to OUT, and mark these tuples as p2.
[0044] In this embodiment, in the second iteration, i = IN, and there is one OUT tuple connected to it. The current value of this tuple is: {(117.256880, 34.709827), "highway", OUT, +inf, 0}. The initial costs of non-starting tuples are all recorded as infinity.
[0045] Step S8, judge whether the transportation mode in tuple p2 is the same as that in the marked tuple, that is, judge whether p(c) is equal to p2(c).
[0046] In this embodiment, in the second iteration, the transportation mode of the OUT tuple is the same as that of the IN tuple, both are highways.
[0047] Step S9, if they are different, that is, p(c) ≠ p2(c), then record the temporary path cost as c tmp = p(l) + c tx , and increase the number of loading and unloading times n tmp = p(n) + 1.
[0048] Among them, c tx is the transfer cost. If the transfer cost is measurable and additive to the path cost, then the cumulative transfer cost can be calculated to obtain the optimal total cost (including the path transportation cost and the transfer cost); of course, if the transfer cost is unknown, then set c tx = 0, and only the number of transfers is accumulated to constrain the total number of transfers in the solution. This is also one of the advantages of the path planning algorithm in this embodiment.
[0049] Step S10, if they are the same, that is, the transportation modes of entering and leaving the vertex are the same, then the path cost and the number of loading and unloading times remain unchanged.
[0050] In this embodiment, in the second iteration, since the transportation modes are the same, the path cost and the number of loading and unloading times remain unchanged.
[0051] Step S11, judge whether the number of loading and unloading times n tmp is greater than the limited maximum number of loading and unloading times n max .
[0052] Step S12, when n tmp > n maxIf so, the processing of this tuple is ignored, which is a crucial step to ensure that the final path solution does not exceed the maximum loading and unloading times.
[0053] Step S13, when n tmp < n max , judge whether c tmp is less than p2(l). If it is greater, the path cost of p2 remains unchanged; if it is less, update p2(l) = c tmp , and put the updated p2 tuple into the sequence Q and enter step S16.
[0054] In this embodiment, in the second iteration, the path cost of the OUT tuple is modified from +inf (infinity) to 35458.82 meters, which is equal to the path cost of the IN tuple. The updated OUT tuple is: {(117.256880, 34.709827), "Highway", OUT, 35458.82 meters, 0}. Add the OUT node corresponding to this tuple to the Q queue. The loading and unloading times of this node are still 0, and obviously it will not trigger the out-of-bounds condition of the maximum loading and unloading times.
[0055] Step S14, when it is judged as OUT in step S6, select the conversion from the corresponding node to all neighbor nodes with the direction of IN, the same color, and not marked tuples, and denote this tuple as p2, then p2(c) = p(c).
[0056] Step S15, calculate the temporary conversion path cost c tmp = p(l) + w(p(v), p2(v)), where w is the path cost (length) of the edge between vertices, and judge whether c tmp is less than p2(l). When it is less, put p2 into the Q queue and then enter step S16.
[0057] In this embodiment, in the first iteration, the current tuple is OUT, and it corresponds to 50 IN tuples. The path costs of modifying them are calculated as 42784.44, 38224.95, …… respectively. The minimum tuple path cost selected in the second iteration is 35458.82 meters.
[0058] Step S16, judge whether p2(v) is equal to v dst , that is, whether the current vertex is the end point.
[0059] Step S17, if p2(v) = v dst , it means that the shortest path between the starting point v src and the end point v dst exists. Calculate and output the total transfer times and the total path cost, and then end the path planning. Otherwise, repeat steps S5 to S17 until the path planning ends.
[0060] In this embodiment, the end point, i.e., the target node tuple, is: {(117.993164, 29.685058), "highway", IN, 771450.16 meters, 2}.
[0061] In summary, the result obtained by performing path planning on the starting point (117.618164, 34.595214) and the end point (117.993164, 29.685058) using the path planning method of this embodiment is: two transfers, and the total path cost is 771450.16 meters.
[0062] As described above, this embodiment provides a fast combined transportation path planning method with limited loading and unloading times. The above method can also be configured as a computer program and stored in a computer storage medium. This computer program is used to cause a computer to execute the steps of the fast combined transportation path planning method with limited loading and unloading times.
[0063] In addition, to verify the necessity of limiting the loading and unloading times in combined transportation path planning, the following tests were conducted in this embodiment based on the starting point (117.618164, 34.595214) and the end point (117.993164, 29.685058).
[0064] In Figures 2 to 5 , the thick black line represents the railway section, that is, the transportation mode of this section is railway, and the thin black line represents the highway section, that is, the transportation mode of this section is highway.
[0065] Figure 2 is a schematic diagram of the shortest path result obtained without restrictions on the number of loading and unloading times and transfer costs in the embodiment of the present invention, and Figure 3 is a schematic diagram of the shortest path result obtained by limiting the maximum number of loading and unloading times to 2 and not restricting transfer costs in the embodiment of the present invention.
[0066] If the number of transfers is not restricted and no transfer cost is set, the obtained shortest path result is as Figure 2 shown. If the maximum number of transfers is restricted to 2 and no transfer cost (cost) is set, the obtained shortest path result is as Figure 3 shown, and the local schematic diagram of its railway section is as Figure 4 shown.
[0067] Figure 5 is a schematic diagram of the shortest path result obtained when the transfer cost is 100 meters or the maximum number of loading and unloading times is restricted to 0 in the embodiment of the present invention.
[0068] If the path planning algorithm of this embodiment is not adopted, but the transfer cost must be converted into the path length in order to run the shortest path algorithm, it is found through testing that if the transfer cost is set to be equivalent to a path of 10 meters, the planning result is the same as the result without transfer cost. When the transfer cost is 100 meters, the planning result only includes roads and no railways. As Figure 5 shown, obviously, using the maximum number of transfers limit can more intuitively control the transfer situation of the planning result compared to the transfer cost.
[0069] Functions and effects of the embodiment
[0070] According to the rapid combined transportation path planning method with limited loading and unloading times provided by this embodiment, based on the Lewis algorithm, the limitation on the number of loading and unloading times is added, and the rapid combined transportation path planning algorithm is realized under the condition of limited loading and unloading times. Compared with the existing algorithms, the path planning method of this embodiment not only solves the problem of finding the shortest path in combined transportation, but also flexibly realizes the rapid combined transportation path planning with limited loading and unloading times from the perspective of the number of loading and unloading times without introducing additional computational complexity, reduces the cost of combined transportation, provides convenience for combined transportation, and has high applicability.
[0071] The above embodiments are only used to illustrate the specific implementation manners of the present invention, and the present invention is not limited to the description scope of the above embodiments.
Claims
1. A fast composite transport path planning method with limited loading and unloading times, which is used to output the shortest path between vertices under the constraint of a specified maximum loading and unloading times, characterized in that: include: Step S1: Perform Kirby-Potts expansion on all vertices in the road network to generate corresponding tuples (v, c, i, l, n). The tuple contains the elements of the original vertex v, the transportation mode c, the entry and exit direction i, the path length l from the starting point to the current vertex, and the number of loading and unloading times n from the starting point to the current vertex. Step S2, select the maximum number of loading and unloading times n max , select the starting point v src and the end point v dst , based on the starting point v src Kirby-Potts expansion of constructing the initial tuple sequence Q with the direction of out, i.e. i=OUT; Step S3, determining whether the initial tuple sequence Q is empty; Step S4: If the answer of step S3 is yes, it means that there is no reachable path from the starting point to the end point, and the planning ends; Step S5: When the result of step S3 is no, a tuple p(v, c, i, l, n) with the minimum l value is selected from the initial tuple sequence Q and the tuple is marked; Step S6, determining the direction of i in the marked tuple p(v,c,i,l,n); Step S7: When step S6 determines that the result is IN, select a tuple that can be converted from IN to OUT and mark the tuple as p2; Step S8, determining whether the mode of transport in tuple p2 is the same as the mode of transport in the marked tuple; Step S9: If the result of step S8 is no, the temporary path cost is recorded as c tmp =p(l)+c tx , c tx is the transfer cost, and the number of loading and unloading times n is increased tmp =p(n)+1; Step S10: When the judgment in step S8 is yes, it means that the transportation mode entering the vertex and leaving the vertex is the same, and the path cost and the number of loading and unloading times remain unchanged; Step S11, determine the number of loading and unloading times n tmp >n max ; Step S12: When the result of step S11 is yes, the p2 tuple remains unchanged; Step S13, when the judgment is negative, judge c tmp <p2(l). If the judgment is negative, the path cost of p2 remains unchanged. If the judgment is positive, update p2(l) = c tmp , put the updated p2 into the sequence Q and then enter step S16; Step S14: When step S6 determines that the result is OUT, select a tuple that can be converted from OUT to IN, has the same transportation mode, and is not marked, and record it as p2. Then p2(c) = p(c); Step S15, calculate the temporary conversion path cost c at this time tmp = p(l) + w(p(v), p2(v)), where w is the path cost of the edge between vertices, and judge c tmp < p2(l), when the judgment is yes, put p2 into the sequence Q and then enter step S16; Step S16, determine p2(v)=v dst , that is, whether the current vertex is the end point; Step S17: When step S16 is judged to be yes, it means the starting point v src and the end point v dst If the shortest path exists, calculate the total number of transfers and the total path cost; otherwise, repeat steps S5 to S17 until the end.
2. A computer-readable storage medium for storing a computer program, characterized in that: The computer program is configured to implement the method for planning a fast composite transport path with limited loading and unloading times as claimed in claim 1 when executed.
Citation Information
Patent Citations
Path planning method
CN109764886A
Method and device for dynamic path planning
CN110576848A