Shortest path solving method and system for metro network node
By constructing a fully directed subway network model and setting appropriate arc weight values, the problem of unreflected differences in road rights at transfer stations in the existing technology is solved, and the accurate calculation of the shortest path in the subway network and the precise planning of passenger travel paths are achieved. .
Patent Information
- Application Number
- PCT/CN2023/082512
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-02-27
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-06
AI Technical Summary
The existing subway shortest path solution method cannot effectively reflect the difference between the right of way between transfer stations and other rights of way when calculating the OD trip, resulting in path calculation errors, and the traditional undirected or partially directed network model ignores transfers The right of way between nodes and the shortest path output are inaccurate.
Construct a fully directed subway network model by setting the arc weight between transfer nodes to be smaller than the arc weight between non-transfer nodes, and use the Dijkstra or Floyd algorithm to calculate the theoretical shortest path of the OD trip, and adjust the starting point according to specific correction rules. and terminal stations to obtain the actual shortest path.
It solves the problem of undirected or partially directed networks outputting wrong paths due to ignoring the right of way between transfer nodes, clearly reflecting the differences between transfer nodes and other nodes, and achieving precise planning of passenger travel paths and passenger flow. Precise distribution.
Smart Images

Figure CN2023082512_06092024_PF_FP
Abstract
Description
A method and system for solving the shortest path of subway network nodes Technical Field
[0001] The present invention relates to the technical field of transportation networks, and in particular to a method and system for solving the shortest path of subway network nodes. Background Art
[0002] With the large-scale and rapid development of subways and the continuous increase in passenger flow, both transportation demand and passenger flow control have put forward new requirements for the refined management of subway operations. Among them, a more accurate and reasonable method for solving the shortest path between the origin and destination (OD) station is conducive to promoting the refined management of subway operations.
[0003] The OD shortest path problem in the field of subway operations aims to find the shortest path between any OD pairs in the subway network and output the shortest path distance. Existing subway shortest path solution methods use undirected or partially directed networks. These networks use nodes and arcs to represent undirected stations and road sections, respectively, where only one node is used to represent a transfer station. When using the subway network model to calculate the OD journey, the right of way is set according to the distance of the actual path, or the weight of each arc is set to 1, and the weight between transfer stations is set to 0. The core ideas of the existing Dijkstra algorithm and Floyd algorithm are explained in detail below.
[0004] The core idea of Dijkstra algorithm: The weight of each edge represents the distance between two vertices and is a non-negative real number. This algorithm can find the shortest path from a node to all other nodes. S is the set of endpoints starting from a point N, and the number of paths from point N to the remaining points N is i The possible distance is D(N i ), where the initial value of the unreachable node distance is set to ∞; in each iteration, the node N with the shortest distance N in the previous iteration is selected j , S=S∪{N j},D(N j )=Min{D(N i )|N i ∈NS}; Update the shortest distance from N to the nodes in VS.
[0005] The core idea of Floyd algorithm: The weight of each edge represents the distance between two vertices. The algorithm uses the idea of dynamic programming to find the shortest path from any node to all other nodes. For a graph with n nodes, set the n-order initial distance matrix and set its diagonal elements to 0. If there is an edge N i N j , then the corresponding element of the matrix is the weight, otherwise it is ∞. i and Nj , try to insert an intermediate node N between the two points k , if from N i to N k Then to N j If it is shorter than the known path, update N i to N j Otherwise, keep the original value.
[0006] Whether using the Dijkstra algorithm or the Floyd algorithm to solve the shortest path in the subway network, there are the following limitations:
[0007] (1) When calculating OD trips using a subway network model, the existing method for setting the right of way is to calculate based on the actual length of the path, or to set the weight of each arc to 1 and the weight between transfer stations to 0. However, this weight setting method cannot reflect the difference between the right of way between transfer stations and other rights of way. Although the transfer occurs within a station, it requires passengers' time and increases the walking distance. Therefore, the weight of the transfer arc cannot be ignored when calculating the OD route.
[0008] (2) The traditional subway network structure model is undirected or partially directed. If the transfer station is only considered as a node, the wrong shortest path will be output. As shown in Figure 1, assuming that a passenger starts from O and goes to D, the correct path passes through A, B, and C in sequence. However, if the transfer station is only a node, that is, the normal right of way is 1 and the right of way between transfer stations is 0, the path O-A-B1-C-D will be output. Although the weight is still 4, this path is not the shortest path and is incorrect, as shown in Figure 2.
[0009] Therefore, there is an urgent need for a method to calculate the shortest path of subway nodes that takes transfer trips and directed subway networks into consideration.
[0010] Summary of the Invention
[0011] To this end, an embodiment of the present invention provides a method and system for solving the shortest path of subway network nodes, which is used to solve the problem that the road right setting method in the existing technology cannot reflect the difference between the road rights between transfer stations and other road rights, and that undirected or partially directed networks output incorrect paths due to ignoring the road rights between transfer nodes.
[0012] To solve the above problem, an embodiment of the present invention provides a method for solving the shortest path of a subway network node, the method comprising:
[0013] S1: Obtain station data and section data of the subway network;
[0014] S2: Based on the station data and the road segment data, a completely directed subway network model G(N,A) is constructed with stations as directed nodes and road segments as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively;
[0015] S3: Initialize the parameters of the subway network model G(N,A), and obtain all OD trips based on the subway network model G(N,A);
[0016] S4: Calculate the theoretical shortest path of the OD trip and correct the OD trip according to the set correction rules; wherein the correction rules specifically include:
[0017] Rule 1: When neither the starting station nor the ending station of a trip is a transfer node, then neither the starting station nor the ending station of the trip needs to be modified;
[0018] Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station;
[0019] Rule 3: When the final stop of the trip is transfer node D t When comparing each shortest OD t The line numbers of the last and second last node stations in the path, if the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second to last node station is the actual terminal station;
[0020] S5: Calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
[0021] Preferably, in step S3, initializing the parameters of the subway network model G(N,A) specifically includes: inputting an adjacent node matrix and setting arc weights, wherein the arc weights include arc weights between transfer nodes and arc weights between adjacent non-transfer nodes.
[0022] Preferably, the weight of the arcs between the transfer nodes is smaller than the weight of the arcs between the adjacent non-transfer nodes.
[0023] Preferably, the weights of the arcs between the transfer nodes cannot be set to zero.
[0024] Preferably, the weight of the arcs between the transfer nodes is set to 1, and the weight of the arcs between the adjacent non-transfer nodes is set to 10.
[0025] Preferably, the Dijkstra algorithm or the Floyd algorithm is used to calculate the theoretical shortest path of the OD trip.
[0026] Preferably, the method further comprises the passenger planning a travel route based on the actual shortest path matrix of all OD trips and the shortest path target value finally obtained.
[0027] An embodiment of the present invention further provides a system for solving the shortest path of a subway network node, the system comprising:
[0028] Data collection module, used to obtain station data and section data of the subway network;
[0029] A directed subway network model construction module is used to construct a completely directed subway network model G(N,A) based on the station data and the section data, with stations as directed nodes and sections as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively;
[0030] An initialization module, configured to initialize the parameters of the subway network model G(N,A) and obtain all OD trips based on the subway network model G(N,A);
[0031] The shortest path correction module is used to calculate the theoretical shortest path of the OD trip and correct the OD trip according to the set correction rules; wherein the correction rules specifically include:
[0032] Rule 1: When neither the starting station nor the ending station of a trip is a transfer node, then neither the starting station nor the ending station of the trip needs to be modified;
[0033] Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station;
[0034] Rule 3: When the final stop of the trip is transfer node D t When comparing each shortest OD t The line numbers of the last and second last node stations in the path, if the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second to last node station is the actual terminal station;
[0035] The output module is used to calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
[0036] Preferably, the system further comprises a route planning module for passengers to plan their travel routes based on the actual shortest path matrix of all OD trips and the shortest path target value finally obtained.
[0037] An embodiment of the present invention also provides a travel APP, including any one of the above-mentioned methods for solving the shortest path of subway network nodes.
[0038] It can be seen from the above technical solutions that the present invention has the following advantages:
[0039] An embodiment of the present invention provides a method and system for solving the shortest path of subway network nodes. The present invention constructs a fully directed network model, adds rights of way between transfer nodes, and corrects the calculated theoretical shortest path to obtain the actual shortest path, thereby solving the problem that undirected or partially directed networks output incorrect paths due to ignoring the rights of way between transfer nodes; the present invention sets the weight of arcs between transfer nodes to 1 and the weight of arcs between adjacent non-transfer nodes to 10, and the results can clearly show the number of stops and transfers of the passenger, thereby solving the problem that the existing right of way setting method cannot reflect the difference between the rights of way between transfer nodes and other rights of way; the present invention can realize the precise distribution of passenger flow, locate passengers to specific one-way stops, facilitate passenger travel, and solve the problem that the existing network cannot accurately predict conditions such as one-way failures. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the implementation cases of the present invention or the technical solutions in the prior art, the following is a brief description of the drawings required for use in the embodiments. By referring to the drawings, the features and advantages of the present invention will be more clearly understood. The drawings are schematic and should not be understood as limiting the present invention in any way. Those skilled in the art can derive other drawings based on these drawings without inventive effort. Among them:
[0041] Figure 1 is a schematic diagram of the correct result of the shortest path OD in the traditional subway network structure model;
[0042] Figure 2 is a schematic diagram of the shortest path OD error results in the traditional subway network structure model;
[0043] FIG3 is a flow chart of a method for solving the shortest path between nodes in a subway network according to an embodiment;
[0044] FIG4 is a schematic diagram of the correct result of the shortest path OD in the fully directed subway network structure model;
[0045] FIG5 is a schematic diagram of the shortest path OD error results in a completely directed subway network structure model;
[0046] FIG6 is a schematic diagram of a completely directed subway network;
[0047] Figure 7 is a model diagram of the Shenzhen Metro network;
[0048] Figure 8 is a schematic diagram of the fully directed model of Shenzhen Metro Line 1;
[0049] Figure 9 is a schematic diagram of the shortest path distance matrix. DETAILED DESCRIPTION
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0051] As shown in FIG3 , an embodiment of the present invention provides a method for solving the shortest path of a subway network node, the method comprising:
[0052] S1: Obtain station data and section data of the subway network;
[0053] S2: Based on the station data and the road segment data, a completely directed subway network model G(N,A) is constructed with stations as directed nodes and road segments as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively;
[0054] S3: Initialize the parameters of the subway network model G(N,A), and obtain all OD trips based on the subway network model G(N,A);
[0055] S4: Calculate the theoretical shortest path of the OD trip and correct the OD trip according to the set correction rules; wherein the correction rules specifically include:
[0056] Rule 1: When neither the starting station nor the ending station of a trip is a transfer node, then neither the starting station nor the ending station of the trip needs to be modified;
[0057] Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station;
[0058] Rule 3: When the final stop of the trip is transfer node D t When comparing each shortest ODt The line numbers of the last and second last node stations in the path, if the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second to last node station is the actual terminal station;
[0059] S5: Calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
[0060] An embodiment of the present invention proposes a method for solving the shortest path of subway network nodes. Based on the station data and section data of the existing subway network, a fully directed subway network model G(N,A) is constructed. By adding rights of way between transfer nodes and correcting the calculated theoretical shortest path, an actual shortest path is obtained. This solves the problem of undirected or partially directed networks outputting incorrect paths due to ignoring rights of way between transfer nodes. By setting the weight of arcs between transfer nodes to 1 and the weight of arcs between adjacent non-transfer nodes to 10, the result clearly shows the number of stops and transfers a passenger has taken, thereby solving the problem that existing right of way setting methods cannot reflect the differences between rights of way between transfer nodes and other rights of way. In addition, passengers can plan their travel routes based on the actual shortest path matrix and the shortest path target value of all obtained OD trips, thereby facilitating passenger travel while achieving accurate passenger flow distribution.
[0061] The present invention first obtains the station data and the section data of the existing subway network; based on the station data and the section data, a completely directed subway network model G(N,A) is constructed with the stations as directed nodes and the sections as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively.
[0062] Then, the parameters of the fully directed subway network model G(N,A) are initialized: the adjacent node matrix is input and the arc weights are set, where the arc weights include the weights of the arcs between transfer nodes and the weights of the arcs between adjacent non-transfer nodes.
[0063] Furthermore, the present invention sets the weight of arcs between transfer nodes to 1 and the weight of arcs between adjacent non-transfer nodes to 10, resolving the problem that existing right-of-way setting methods fail to reflect the differences between right-of-way between transfer nodes and other right-of-way, as shown in Figure 4.
[0064] The following specifically describes the method for setting the right of way of the present invention:
[0065] 1. The weight of arcs between transfer nodes is smaller than the weight of arcs between adjacent non-transfer nodes. A transfer is from one station on one subway line to another station on another subway line. It is important to note that arcs between transfer nodes are only included for calculating the OD path and are not included in the subway network model. Because the distance, time, and fare costs of transfer arcs are generally smaller than those of other arcs, the weight of arcs between transfer nodes should be smaller than that between adjacent non-transfer nodes.
[0066] 2. The weight of arcs between transfer nodes cannot be set to zero. Although the arcs between transfer nodes are within the same transfer station, they cannot be set to zero. On the one hand, transfers take time for passengers, and on the other hand, a zero value will lead to incorrect results for the shortest path, as shown in Figure 5.
[0067] 3. The weight of the arc between transfer nodes is set to 1, and the weight of the arc between adjacent non-transfer nodes is set to 10. This effectively distinguishes transfer nodes from other nodes. Assuming that the maximum number of transfers in a transfer trip does not exceed 10, it is easy to get the number of transfer stations and the number of other stations passed in an OD trip. For example: y represents the shortest path distance output, then the number of transfers n t for The number of non-transfer stations in the route n nt for Specifically, the output shortest path distance is 73, the number of transfers is 3, and the number of non-transfer stations in the path is 7.
[0068] Furthermore, the Dijkstra algorithm or the Floyd algorithm is used to calculate the theoretical shortest path of the OD trip. The starting station and the terminal station of the OD path are corrected through the correction rule, and the invalid path is eliminated to obtain the actual shortest path.
[0069] The amendment rules specifically include:
[0070] Rule 1: When neither the starting station nor the ending station of a trip is a transfer node, then neither the starting station nor the ending station of the trip needs to be modified;
[0071] Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station;
[0072] Rule 3: When the final stop of the trip is transfer node D t When comparing each shortest OD tThe line numbers of the last and second last node stations in the path, if the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second to last node station is the actual terminal station.
[0073] In order to make the correction rules of the present invention clearer, further explanation is given below with reference to specific drawings and actual situations.
[0074] As shown in FIG6 , a schematic diagram of a fully directed network is provided, in which the N ij 、N -ij and N of line i' i′j′ 、N -i′j′ Intersection. index Indicates a directed node, i and i' indicate line numbers, j and j' indicate station numbers, and the subscript symbol indicates the direction of operation; A index Indicates a directed road segment, its subscript has the same meaning as N index .
[0075] Example 1: For OD t Stroke N i(j-1) N -ij , the initial output theoretical shortest path is: N i(j-1) —N ij —N -ij However, due to N ij and N -ij They are at the same transfer station, so N i(j-1) N -ij The corresponding actual stroke should be: N i(j-1) N ij , the corrected shortest path is: N i(j-1) —N ij (According to Rule 3, due to OD t The line numbers of the penultimate node station and the penultimate node station in the path are different, so the penultimate node station is the actual terminal station.
[0076] Example 2: For O t D Stroke N ij N -i′(j′+1) , the initial output theoretical shortest path is: N ij —N -i′j′ —N -i′(j′+1) The actual stroke should be: N -i′j′ N -i′(j′+1) , the corrected shortest path should be: N -i′j′ —N -i′(j′+1) . (According to Rule 2, since O t The line numbers of the first and second node stations in the D path are different, so the second node station is the actual starting station.
[0077] After the above correction, the actual shortest path matrix and the shortest path target value of all OD trips are obtained, and passengers plan their travel routes based on the actual shortest path matrix and the shortest path target value of all OD trips finally obtained.
[0078] In order to further illustrate the technical solutions and advantages of the present invention, the following description is given in conjunction with specific embodiments.
[0079] The method of the present invention was applied to the Shenzhen Metro. As of December 2013, the Shenzhen Metro had five lines and 118 stations (including 13 transfer stations). A Shenzhen Metro network model diagram was established, as shown in FIG7 .
[0080] 1. Weight setting of road sections
[0081] As shown in Figure 8, Line 1 is used as an example to illustrate the section weight setting of this method. The identification numbers and symbols in the node and arc subscripts in the figure represent their positions and running directions in the subway system respectively. The code of an arc is the same as its starting node, such as N 102 Indicates the second station on Line 1 going up, while A 102 N means Line 1 is going up 102 to N 103 The road section between -102 Indicates Line 1 is going down N -103 to N -102 In particular, a station located at a terminal station (not a transfer station) is regarded as a node, such as N 101 , because the origin / destination station only provides train service in one direction.
[0082] The road section with weight 1: Baoan Center (N 124 )—>Baoan Center(N -504 ), Baoan Center (N 124 )—>Baoan Center(N 504 ), Baoan Center (N -124 )—>Baoan Center(N 504 ), Baoan Center (N -124 )—>Baoan Center(N -504 ), Baoan Center (N 504 )—>Baoan Center(N - 124 ), Baoan Center (N 504 )—>Baoan Center(N 124 ), Baoan Center (N -504 )—>Baoan Center(N 124 ), Baoan Center (N -504 )—>Baoan Center(N -124), Qianhaiwan(N 122 )—>Qianhaiwan(N 501 ), Qianhaiwan(N -122 )—>Qianhaiwan(N 501 ), Qianhaiwan(N 501 )—>Qianhaiwan(N 122 ), Qianhaiwan(N 501 )—>Qianhaiwan(N -122 ), Window of the World (N 115 )—>Window of the World(N 212 ), Window of the World (N 115 )—>Window of the World(N -212 ), Window of the World (N -115 )—>Window of the World(N 212 ), Window of the World (N -115 )—>Window of the World(N -212 ), Window of the World (N 212 )—>Window of the World(N 115 ), Window of the World (N 212 )—>Window of the World(N -115 ), Window of the World (N -212 )—>Window of the World(N 115 ), Window of the World (N -212 )—>Window of the World(N -115 ), Shopping Park (N 109 )—>Shopping Park(N 303 ), Shopping Park (N 109 )—>Shopping Park(N - 303 ), Shopping Park (N -109 )—>Shopping Park(N 303 ), Shopping Park (N -109 )—>Shopping Park(N -303 ), Shopping Park (N 303 )—>Shopping Park(N 109 ), Shopping Park (N 303 )—>Shopping Park(N -109 ), Shopping Park (N -303 )—>Shopping Park(N 109 ), Shopping Park (N -303 )—>Shopping Park(N -109 )、Convention and Exhibition Center(N 108 )—>Convention and Exhibition Center(N 413 )、Convention and Exhibition Center(N 108 )—>Convention and Exhibition Center(N -413 )、Convention and Exhibition Center(N -108 )—>Convention and Exhibition Center(N 413)、Convention and Exhibition Center(N -108 )—>Convention and Exhibition Center(N -413 )、Convention and Exhibition Center(N 413 )—>Convention and Exhibition Center(N 108 )、Convention and Exhibition Center(N 413 )—>Convention and Exhibition Center(N -108 )、Convention and Exhibition Center(N -413 )—>Convention and Exhibition Center(N 108 )、Convention and Exhibition Center(N -413 )—>Convention and Exhibition Center(N -108 ), Grand Theatre (N 104 )—>Grand Theater(N 226 ), Grand Theatre (N 104 )—>Grand Theater(N -226 ), Grand Theatre (N -104 )—>Grand Theater(N 226 ), Grand Theatre (N -104 )—>Grand Theater(N -226 ), Grand Theatre (N 226 )—>Grand Theater(N 104 ), Grand Theatre (N 226 )—>Grand Theater(N -104 ), Grand Theatre (N -226 )—>Grand Theater(N 104 ), Grand Theatre (N -226 )—>Grand Theater(N -104 ), Old Street (N 103 )—>Old Street(N 310 ), Old Street (N 103 )—>Old Street(N -310 ), Old Street (N -103 )—>Old Street(N 310 ), Old Street (N -103 )—>Old Street(N -310 ), Old Street (N 310 )—>Old Street(N 103 ), Old Street (N 310 )—>Old Street(N - 103 ), Old Street (N -310 )—>Old Street(N 103 ), Old Street (N -310 )—>Old Street(N -103 )
[0083] The weight of the road segment is 10: the weight of other road segments is 10.
[0084] 2. Shortest Path Results
[0085] FIG9 is a shortest path distance matrix from some stations on Line 2 to some stations on Line 1 solved by the shortest path solving method of the present invention.
[0086] Example of shortest path result
[0087] ①Wanxia(N 206 )—>Huaqiao East(N -113 )
[0088] Shortest path: N 206 -N 207 -N 208 -N 209 -N 210 -N 211 -N 212 -N -115 -N -114 -N -113
[0089] Shortest path distance: 81
[0090] Interpretation of the shortest path distance: The "1" in "81" means that the journey requires one transfer; the "8" means that the journey passes through a total of 8 ordinary stations (Note: ordinary stations refer to stations other than transfer stations, the same below).
[0091] ② Lotus West (N 220 )—>Science Museum(N -105 )
[0092] Shortest route: Lianhua West (N 220 )-Futian(N 221 )-Civic Center(N 222 )-Civic Center(N 412 )-Convention and Exhibition Center(N 413 )-Convention and Exhibition Center(N -108 )-Gangxia(N -107 )-Huaqiang Road(N -106 )-Science Museum(N -105 )
[0093] Shortest path distance: 62
[0094] Interpretation of the shortest path distance: The "2" in "62" means that the journey requires 2 transfers; the "6" means that the journey passes through 6 ordinary stations in total.
[0095] The present invention provides a system for solving the shortest path of a subway network node, the system comprising:
[0096] Data collection module, used to obtain station data and section data of the subway network;
[0097] A directed subway network model construction module is used to construct a completely directed subway network model G(N,A) based on the station data and the section data, with stations as directed nodes and sections as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively;
[0098] An initialization module, configured to initialize the parameters of the subway network model G(N,A) and obtain all OD trips based on the subway network model G(N,A);
[0099] The shortest path correction module is used to calculate the theoretical shortest path of the OD trip and correct the OD trip according to the set correction rules; wherein the correction rules specifically include:
[0100] Rule 1: When neither the starting station nor the ending station of a trip is a transfer node, then neither the starting station nor the ending station of the trip needs to be modified;
[0101] Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station;
[0102] Rule 3: When the final stop of the trip is transfer node D t When comparing each shortest OD t The line numbers of the last and second last node stations in the path, if the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second to last node station is the actual terminal station;
[0103] The output module is used to calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
[0104] The system further comprises a route planning module for passengers to plan travel routes based on the actual shortest path matrix of all OD trips and the shortest path target value finally obtained.
[0105] The system is used to implement the above-mentioned method for solving the shortest path of subway network nodes. In order to avoid redundancy, it will not be described here.
[0106] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
[0107] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0108] The present application is described with reference to the flow chart and / or block diagram of the method, device (system), and computer program product according to the embodiment of the present application. It should be understood that each flow process and / or box in the flow chart and / or block diagram and the combination of the flow process and / or box in the flow chart and / or block diagram can be realized by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processing machine or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for realizing the function specified in one flow chart flow or multiple flows and / or one box or multiple boxes of the block diagram.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device that implements the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram.
[0110] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will appreciate that other variations or modifications can be made based on the above description. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A method for solving the shortest path of subway network nodes. It is characterized in that include: S1: Obtain station data and section data of the subway network; S2: Based on the station data and the road section data, a completely directed subway network model G(N,A) is constructed with stations as directed nodes and road sections as directed arcs; wherein N and A represent directed nodes and directed arcs, respectively; S3: Initialize the parameters of the subway network model G(N,A), and obtain all OD trips based on the subway network model G(N,A); S4: Calculate the theoretical shortest path of the OD trip, and correct the OD trip according to the set correction rules; wherein the correction rules specifically include: Rule 1: When neither the starting station nor the terminal station of the trip is a transfer node, then the starting station and the terminal station of the trip do not need to be corrected; Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station; Rule 3: When the final stop of the trip is a transfer node D t When comparing each shortest OD t The line numbers of the penultimate node station and the penultimate node station in the path. If the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second-to-last node station is the actual terminal station; S5: Calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
2. The method for solving the shortest path of subway network nodes according to claim 1, It is characterized in that In step S3, initializing the parameters of the subway network model G(N,A) specifically includes: inputting an adjacent node matrix and setting arc weights, wherein the arc weights include arc weights between transfer nodes and arc weights between adjacent non-transfer nodes.
3. The method for solving the shortest path of subway network nodes according to claim 2, It is characterized in that The weight of the arcs between the transfer nodes is smaller than the weight of the arcs between the adjacent non-transfer nodes.
4. The method for solving the shortest path of subway network nodes according to claim 2, It is characterized in that The weights of arcs between the transfer nodes cannot be set to zero.
5. The method for solving the shortest path of a subway network node according to claim 3 or 4, It is characterized in that The weight of the arcs between the transfer nodes is set to 1, and the weight of the arcs between the adjacent non-transfer nodes is set to 10.
6. The method for solving the shortest path of subway network nodes according to claim 1, It is characterized in that In step S4, the Dijkstra algorithm or the Floyd algorithm is used to calculate the theoretical shortest path of the OD trip.
7. The method for solving the shortest path of subway network nodes according to claim 1, It is characterized in that The method also includes the passenger planning a travel route according to the actual shortest path matrix of all OD trips finally obtained and the shortest path target value.
8. A subway network node shortest path solution system, It is characterized in that include: Data collection module, used to obtain station data and section data of the subway network; A directed subway network model construction module is used to construct a completely directed subway network model G(N,A) based on the station data and the road section data, with the stations as directed nodes and the road sections as directed arcs; wherein N and A represent directed nodes and directed arcs respectively; An initialization module, used to initialize the parameters of the subway network model G(N,A), and obtain all OD trips based on the subway network model G(N,A); The shortest path correction module is used to calculate the theoretical shortest path of the OD trip and correct the OD trip according to the set correction rules; wherein the correction rules specifically include: Rule 1: When neither the starting station nor the terminal station of the trip is a transfer node, then the starting station and the terminal station of the trip do not need to be corrected; Rule 2: When the starting point of the trip is a transfer node O t When comparing each shortest O t D is the line number of the first node station and the second node station in the path. If the line numbers are the same, the transfer node O t It is the actual starting station. If the line number is different, the second node station is the actual starting station; Rule 3: When the final stop of the trip is a transfer node D t When comparing each shortest OD t The line numbers of the penultimate node station and the penultimate node station in the path. If the line numbers are the same, the transfer node D t It is the actual terminal station. If the line number is different, the second-to-last node station is the actual terminal station; The output module is used to calculate and record the actual shortest path matrix and shortest path target value of all OD trips.
9. The subway network node shortest path solving system according to claim 8, It is characterized in that The system also includes a path planning module, which is used for passengers to plan travel paths according to the actual shortest path matrix of all OD trips finally obtained and the shortest path target value.
10. A travel APP, It is characterized in that A method for solving the shortest path of a subway network node comprising the method described in any one of claims 1 to 8.
Citation Information
Patent Citations
Urban subway dynamic passenger flow distribution method constructed on the basis of time-space network
CN103530694A
Method for generating effective path set for urban rail transit passenger travel
CN110674974A
Travel accessibility calculation and display method based on graph theory under networked operation condition, computer equipment and storage medium
CN111368149A
Method for estimating passenger moving path in subway network
WO2015167169A1
Urban public transport passenger travel trajectory estimation method and system, terminal, and storage medium
WO2021243516A1
Cited By
Bus and subway connection passenger flow prediction method and device based on dynamic planning
CN120612810A
Subway network toughness evaluation method and device
CN122001689A
