A method for generating effective path sets for urban rail transit passengers
By numbering the rail transit network and dividing it into unit intervals, constructing an effective path search model, and using the improved Floyd algorithm to generate a valid path set of OD pairs for the entire network, the problem of incomplete passenger travel path records in urban rail transit is solved, and detailed transfer relationship records and accurate passenger flow predictions are achieved.
Patent Information
- Application Number
- CN201910799646.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-28
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2039-08-28
AI Technical Summary
Existing technologies are unable to effectively record passenger travel paths in urban rail transit, resulting in difficulties in passenger flow forecasting and operational management, and a lack of detailed descriptions of transfer relationships.
By numbering the rail transit network and dividing it into unit intervals, a topological structure and an effective path search model are constructed. The improved Floyd algorithm is used to generate a valid path set of OD pairs for the entire network, and the stations and transfer relationships passed by the path are recorded in detail.
The generated effective path set facilitates passenger flow allocation and cross-sectional passenger flow estimation, solves the problem of inconvenient path set generation in the existing technology, can record transfer relationships in detail, and improves the accuracy of passenger flow prediction.
Smart Images

Figure CN110674974B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of urban rail transit statistics, and specifically refers to a method for generating an effective path set for urban rail transit passengers. Background Art
[0002] With the accelerated pace of urban rail transit construction, the network is expanding in scale, its structure is becoming increasingly sophisticated, and the degree of network coupling is increasing. Most rail transit passengers travel across multiple lines, meaning that most trips involve transfers. my country's rail transit infrastructure employs a "seamless transfer" operating model. "Seamless transfer" means that passengers transfer within transfer stations without having to swipe their card through turnstiles. Therefore, ticket information only records the passenger's entry and exit points, not their specific travel routes. Furthermore, due to the development of the rail transit network, multiple accessible routes exist between the same origin and destination. However, not all routes are chosen. People tend to choose the routes with the highest travel utility, and those routes that are consistently chosen are called "effective routes." The differences in passenger perceptions of travel routes, the cost differences, and the diversity of route choices make it difficult to understand passenger travel routes. Only by scientifically and rationally understanding passenger route selection behavior can we accurately grasp passenger travel patterns and determine travel routes, providing a basis and support for future urban rail transit passenger flow forecasting, operational organization and management, and ticket settlement between different operators.
[0003] Previous research on feasible path sets for urban rail transit has mostly focused on improving algorithms, ignoring the inherent characteristics of urban rail transit networks and causing significant inconvenience in subsequent solutions. Furthermore, previous studies have often focused on generating feasible path sets without considering their ease of use. For example, the lack of a description of transfer relationships prevents passenger flow forecasts from directly generating transfer volumes at transfer stations in all directions from the path set.
[0004] Based on the above technical problems, the present invention designs a method for generating an effective path set for urban rail transit passengers. Summary of the Invention
[0005] In order to overcome the deficiencies of the prior art, the present invention provides a method for generating an effective path set for urban rail transit passengers.
[0006] In order to achieve the above-mentioned object, the present invention adopts the following technical solution: a method for generating an effective path set for urban rail transit passengers, comprising the following steps:
[0007] Step S1: Data definition: number the operating lines and stations in the rail transit network and define unit intervals. The unit interval refers to the smallest continuous interval into which each operating line in the rail transit network can be divided;
[0008] Step S2: constructing a topology structure: constructing a topology structure of the urban rail transit network;
[0009] Step S3: Model construction: determine the effective path assumption premise and build a full-network effective path search model;
[0010] Step S4: Search and output: Search and output the valid path set of OD pairs in the entire network. The OD pair refers to the start point and end point pair of the valid path.
[0011] Furthermore, the step S1 includes the following steps:
[0012] S101: Numbering of lines in the rail transit network: When there are no branches on an operating rail transit line, refer to the operating line number and use two digits, two letters, or a combination of two digits and letters to represent the line number; when there are branches on an operating line, in order to distinguish them from the main line, use a number different from the main line and other lines in the network to represent the branch line, and the numbering principle still uses two digits, two letters, or a combination of two digits and letters;
[0013] S102: Numbering each station in the rail transit network: Each station is numbered with four digits. Stations are divided into ordinary stations and transfer stations. Ordinary stations only pass through one operating line in the rail transit network, while transfer stations pass through several operating lines in the rail transit network. The first two digits of the ordinary station number are the line number of the station, and the last two digits are the rank of the station within the line. Transfer stations have different numbers, and the number of their numbers corresponds to the number of operating lines they pass through in the rail transit network. Different operating lines use different numbers, and the numbering method of each number is the same as that of ordinary stations.
[0014] S103: defining the unit section: defining the unit section as a section between two adjacent stations or a transfer virtual section within a transfer station where passengers transfer.
[0015] Furthermore, in step S2, the network topology is represented as: G=<V,E,T> , where G is the directed graph of the urban rail transit network, V represents the set of stations in the entire network, a general station corresponds to a node in the topological graph, the number of nodes of a transfer station in the topological graph is the number of lines it is on, E represents the set of unit intervals between stations, and T represents the set of transfer virtual intervals;
[0016] The station set is represented as: In the formula represents the station with sequence number i in the topology graph and site number a in the entire network; the set of unit intervals between stations is expressed as: In the formula Represents the unit interval of the direction from station a to station b, where a and b are stations numbered a and b in the station numbering principle, and i and j are the node numbers corresponding to stations a and b in the topology graph;
[0017] The transfer virtual interval set is expressed as: In the formula represents the virtual transfer interval, where i and j are the serial numbers of a transfer station on line m and line n in the topology diagram, and a and b are the numbers of the transfer station on line m and line n in the station numbering principle. The meaning of is the virtual interval for passengers to transfer from line m to line n;
[0018] The inter-station unit interval Used to record the travel cost of the unit interval between stations, the transfer virtual interval Used to record the travel cost of the transfer virtual interval; the travel cost of the unit interval between stations and the travel cost of the transfer virtual interval are both recorded with the unit interval number or mileage per unit interval Or the unit interval running time express:
[0019]
[0020] Where: α, β, γ are 0 or 1; and, when α = 1, β = γ = 0; when β = 1, α = γ = 0; when γ = 1, α = β = 0; dimensionless, The dimension is km, The dimension is min.
[0021] Furthermore, in step S3, the valid path premise is assumed to be: if the starting station and the terminal station of an OD pair belong to the same route, there is only one valid path, that is, the passenger only travels on this route.
[0022] Furthermore, in step S3, the whole network effective path search model C is constructed. OD represents the set of travel costs required for all paths between OD pairs, represents the travel cost required for the k-th effective path, then the k-th effective path must meet the following conditions:
[0023] Formula 1:
[0024] Formula 2:
[0025] Formula 1 expresses that the travel cost of the kth path between an OD pair is the sum of the travel costs of each "unit interval between stations" and "transfer virtual interval" it passes through; Formula 2 stipulates that the travel cost of each valid path of an OD pair is the minimum value among the travel cost set of all reachable paths between the OD pair.
[0026] Furthermore, the effective path travel cost of the OD pair is the minimum value among all the reachable path travel costs between the OD pair. Therefore, the adjacency matrix of the line network travel cost is constructed corresponding to the network topology structure:
[0027]
[0028] Where: Matrix A is used to record the cost values of all directed line segments connecting adjacent nodes in the topology diagram in the actual network. The row or column number in the matrix A corresponds to the node number of each station in the topology diagram. The element a ij Indicates the cost value from node i to node j.
[0029] Furthermore, the element a in the adjacency matrix A ij The value is obtained as follows:
[0030]
[0031] Furthermore, according to and According to the value of , three different full-network adjacency matrices will be constructed. In each adjacency matrix, the path with the minimum travel cost between the OD pairs will be searched. The paths searched by the three adjacency matrices are all valid paths for the OD pairs.
[0032] Furthermore, the step S4 includes: inputting the network lines, site names and corresponding numbers and the node numbers corresponding to each site in the network topology diagram, specifically including the following steps:
[0033] Step S401: Name the three constructed adjacency matrices A1, A2, and A3 respectively;
[0034] Step S402: corresponding to matrices A1, A2, and A3, define three matrices P1, P2, and P3 of the same dimensions, respectively used to store node information passed by valid paths under adjacency matrices A1, A2, and A3;
[0035] Step S403: Initialization, record i=1, and record the number of nodes in the entire network as m;
[0036] Step S404: determine whether i is greater than m, if i>m, then end, otherwise, record j=1;
[0037] Step S405: Determine whether j is equal to i. If j=i, then j=j+1 and jump to step S406; otherwise, jump directly to step S406;
[0038] Step S406: In the case of the current OD pair, the starting point of the OD pair is i and the end point is j. Use the first two digits of the site number to determine whether node i and node j belong to the same line. If so, jump to step S407; otherwise, jump to step S408.
[0039] Step S407: There is only one valid path between the OD pair, that is, a path from the starting station to the end station along the line, and the station numbers passed by the path are output in order; j = j + 1, determine whether j is greater than m, if j > m, then i = i + 1 and jump to step S404, otherwise jump to step S405;
[0040] Step S408: Use the improved Floyd algorithm to update matrices A1, A2, A3 and corresponding matrices P1, P2, P3, and search for valid paths for the OD pair based on matrices P1, P2, P3, and output the site numbers passed by these valid paths in sequence; j = j + 1, determine whether j is greater than m, if j>m, then i = i + 1 and jump to step S404, otherwise jump to step S405.
[0041] Furthermore, step S408 includes: in the case of each OD pair in the entire network, traversing the remaining stations in the network as intermediate nodes of the starting and ending stations; when the total travel cost when the path passes through the node is less than the original travel cost, the travel cost of the OD pair is updated to the travel cost when passing through the node, and the corresponding element in the path matrix is updated to the node; when the total travel cost when the path passes through the node is equal to the original travel cost, the travel cost of the OD pair remains unchanged, and the corresponding element in the path matrix adds the node; when the total travel cost when the path passes through the node is greater than the original travel cost, the adjacency matrix and the path matrix remain unchanged.
[0042] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0043] 1) The present invention numbers the lines and stations in the rail transit network and divides the lines into continuous "unit intervals", thereby ordering the entire network and facilitating the search for effective paths;
[0044] 2) The present invention improves upon the shortest path method and solves the problem that the shortest path method can only search for one valid path for one OD;
[0045] 3) The effective path search method designed by the present invention can generate a set of effective paths between OD pairs in the entire network, without the need to search for effective paths for different OD pairs separately;
[0046] 4) The present invention combines the characteristics of urban rail transit itself, and the final generated valid path set records in detail all the stations passed by the path and the transfer relationships involved, which is convenient for subsequent passenger flow allocation and cross-sectional passenger flow estimation research. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of the present invention;
[0048] Figure 2 The numbering of stations in the urban rail transit network involved in the present invention;
[0049] Figure 3 The urban rail transit network topology diagram involved in the present invention;
[0050] Figure 4 The node sequence number representing the stations in the entire network in the network topology diagram involved in the present invention;
[0051] Figure 5 It is a part of the first adjacency matrix constructed in the effective path search model involved in the present invention;
[0052] Figure 6 It is a part of the second adjacency matrix constructed in the effective path search model involved in the present invention;
[0053] Figure 7 It is a part of the third adjacency matrix constructed in the effective path search model involved in the present invention;
[0054] Figure 8 This is a flow chart of the effective path search involved in the present invention;
[0055] Figure 9 This is a flow chart of the improved Floyd algorithm involved in the present invention;
[0056] Figure 10 These are some of the results of generating the effective travel path set for urban rail transit passengers involved in the present invention. DETAILED DESCRIPTION
[0057] The present invention is further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, modifications of various equivalent forms of the present invention made by those skilled in the art all fall within the scope defined by the claims attached to this application.
[0058] In order to verify the effectiveness of the solution of the present invention, the Guangzhou Metro network in 2015 is taken as an example to generate a valid path set for passenger travel across the entire network.
[0059] Figure 1 This is a flow chart of the method for generating an effective path set for urban rail transit passengers designed by the present invention, as shown in FIG. Figure 1 As shown, this embodiment provides a method for generating an effective path set for urban rail transit passengers, including: step S1, numbering the lines and stations in the rail transit network and defining the "unit interval"; step S2, constructing the topological structure of the urban rail transit network; step S3, determining the effective path hypothesis premise and constructing an effective path search model for the entire network; step S4, searching for the effective path set of OD pairs in the entire network and outputting it; thus, the generation of an effective path set for urban rail transit passengers is achieved.
[0060] In this embodiment, the line number is:
[0061] In the case of no branches on the operating line, the operating line number is referred to and represented by two digits, two letters, or a combination of two digits and letters; in the case of branches on the operating line, in order to distinguish them from the main line, the branches are represented by numbers different from the main line and other lines in the network. The numbering principle is still to use two digits, two letters, or a combination of two digits and letters. The numbering situation of various Guangzhou Metro lines in 2015 is shown in Table 1.
[0062] Table 1 Guangzhou Metro line numbers in 2015
[0063]
[0064] In this embodiment, the station number is:
[0065] Each station number is four digits long. The first two digits are the line number of the station, and the last two digits are the station's ranking within the line. A general station can be uniquely identified by just one station number. Transfer stations in the network are more special than general stations. The number of transfer stations is determined by the number of lines they are on. Different lines use different numbers, and each number is still based on the numbering principle of general stations. The station numbers of Guangzhou Metro in 2015 are as follows: Figure 2 shown.
[0066] In this embodiment, the line mesh unit interval is defined as follows:
[0067] Each line in the network can be divided into continuous minimum intervals, which are called unit intervals. Unit intervals are divided into two types: the section between two adjacent stations and the virtual transfer interval within the transfer station where passengers transfer.
[0068] Figure 3 This is the urban rail transit network topology diagram involved in the present invention. In order to simplify the expression, only the transfer station nodes are displayed in the topology diagram.
[0069] In this embodiment, the network topology is expressed as: G=<V,E,T> Where: G is the directed graph of the urban rail transit network, V represents the set of stations in the entire network, a general station corresponds to a node in the topology graph, the number of nodes of a transfer station in the topology graph is the number of lines it is on, E represents the set of unit intervals between stations, and T represents the set of transfer virtual intervals.
[0070] Figure 4 This is the serial number of the station nodes in the entire network in the network topology diagram involved in the present invention.
[0071] In this embodiment, the station set is represented as: Where: represents the station with the serial number i and the site number a in the topology graph; the set of unit intervals between stations is expressed as: Where: represents the unit interval from station a to station b, where a and b are stations numbered a and b in the station numbering principle, respectively, and i and j are the node numbers corresponding to stations a and b in the topology graph; the transfer virtual interval set is expressed as: Where: represents the virtual transfer interval, where i and j are the serial numbers of a transfer station on line m and line n in the topology diagram, and a and b are the numbers of the transfer station on line m and line n in the station numbering principle. The meaning is the virtual section where passengers transfer from line m to line n.
[0072] In this embodiment, the inter-station unit interval Used to record the travel cost of the unit interval between the stations; the transfer virtual interval Used to record the travel cost of the transfer virtual interval; the travel costs of both are recorded in units of intervals. or mileage per unit interval Or the unit interval running time express:
[0073]
[0074] Where: α, β, γ are 0 or 1; and, when α = 1, β = γ = 0; when β = 1, α = γ = 0; when γ = 1, α = β = 0; dimensionless, The dimension is km, The dimension is min.
[0075] In this embodiment, the valid path premise is assumed as follows: if the starting station and the terminal station of a certain OD pair belong to the same route, there is only one valid path, that is, the passenger only travels on this route.
[0076] In this embodiment, the whole network effective path search model is constructed, that is, C OD represents the set of travel costs required for all paths between OD pairs, represents the travel cost required for the k-th effective path, then the k-th effective path must meet the following conditions:
[0077] Formula 1:
[0078] Formula 2:
[0079] Formula 1 expresses that the travel cost of the kth path between a certain OD pair is the sum of the travel costs of each "unit interval between stations" and "transfer virtual interval" it passes through; Formula 2 stipulates that the travel cost of each valid path of a certain OD pair is the minimum value of the travel cost set of all reachable paths between the OD pair.
[0080] In this embodiment, the effective path travel cost of a certain OD pair is the minimum value among the set of travel costs of all reachable paths between the OD pair. Therefore, an adjacency matrix of line network travel costs is constructed corresponding to the network topology structure:
[0081]
[0082] Where: Matrix A is used to record the cost values of all directed line segments connecting adjacent nodes in the topology diagram in the actual network. The row (column) numbers in matrix A correspond to the node numbers of each station in the topology diagram, and the element a ij Indicates the cost value from node i to node j.
[0083] In this embodiment, the element a in the adjacency matrix A ij The value is obtained as follows:
[0084]
[0085] Figure 5 is part of the first adjacency matrix constructed when α=1, β=γ=0;
[0086] Figure 6 is part of the second adjacency matrix constructed when β = 1, α = γ = 0;
[0087] Figure 7 is part of the third adjacency matrix constructed when γ=1,α=β=0.
[0088] In this embodiment, according to and According to the value of , three different full-network adjacency matrices will be constructed. In each adjacency matrix, the path with the minimum travel cost between a certain OD pair will be searched. The paths searched by the three adjacency matrices are all valid paths for the OD pair.
[0089] Figure 8 This is a flow chart of the effective path search involved in the present invention. Figure 9 This is a flow chart of the improved Floyd algorithm involved in the present invention. In this embodiment, the step of searching for a valid path set of OD pairs in the entire network includes: inputting the entire network lines, site names and corresponding numbers, and the node sequence numbers corresponding to each site in the network topology diagram; and
[0090] Step S401, naming the three constructed adjacency matrices A1, A2, and A3 respectively;
[0091] Step S402: corresponding to matrices A1, A2, and A3, define three matrices P1, P2, and P3 of the same dimensions, respectively used to store node information passed by valid paths under adjacency matrices A1, A2, and A3;
[0092] Step S403, initialization, record i=1, record the number of nodes in the entire network as m;
[0093] Step S404, determine whether i is greater than m, if i>m, end, otherwise record j=1;
[0094] Step S405, determine whether j is equal to i, if j = i, then j = j + 1 and jump to step S406, otherwise jump directly to step S406;
[0095] Step S406: In the case of the current OD pair (i.e., starting point Vi and end point Vj), use the first two digits of the site number to determine whether node i and node j belong to the same route. If so, jump to step S407; otherwise, jump to step S408.
[0096] Step S407: There is only one valid path between the OD pair, that is, a path from the starting station to the end station along the line, and the station numbers passed by the path are output in order; j = j + 1, determine whether j is greater than m, if j > m, then i = i + 1 and jump to step S404, otherwise jump to step S405;
[0097] Step S408: Use the improved Floyd algorithm to update matrices A1, A2, A3 and corresponding matrices P1, P2, P3, and search for valid paths for the OD pair based on matrices P1, P2, P3, and output the site numbers passed by these valid paths in sequence; j = j + 1, determine whether j is greater than m, if j > m, then i = i + 1 and jump to step S404, otherwise jump to step S405.
[0098] In this embodiment, the improved Floyd algorithm is used to update matrices A1, A2, A3 and corresponding matrices P1, P2, P3, and the steps include: for each OD pair in the entire network, traversing the remaining stations in the network as intermediate nodes of the starting and ending stations; when the total travel cost when the path passes through the node is less than the original travel cost, the travel cost of the OD pair is updated to the travel cost when passing through the node, and the corresponding element in the path matrix is updated to the node; when the total travel cost when the path passes through the node is equal to the original travel cost, the travel cost of the OD pair remains unchanged, and the corresponding element in the path matrix is added with the node; when the total travel cost when the path passes through the node is greater than the original travel cost, the adjacency matrix and the path matrix remain unchanged.
[0099] Figure 10 A partial result graph is generated for the effective travel path of urban rail transit passengers involved in the present invention.
[0100] In summary, the present invention takes into account the different factors influencing passenger travel path selection and constructs different adjacency matrices to search for a valid path for a certain OD pair. The improved Floyd algorithm is used to avoid the shortcoming of the shortest path method that can only search for a single shortest path. The effective path search method designed by the present invention can generate a set of valid paths between OD pairs in the entire network and can record in detail all the stations and transfer relationships passed by the effective path, facilitating subsequent passenger flow allocation and cross-sectional passenger flow estimation research.
[0101] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
[0102] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.
Claims
1. A method for generating an effective path set for urban rail transit passengers, characterized by: The steps include: Step S1: Data definition: number the operating lines and stations in the rail transit network and define unit intervals; The step S1 includes the following steps: S101: Numbering of operating lines in the rail transit network: When there are no branches on an operating rail transit line, refer to the operating line number and use two digits, two letters, or a combination of two digits and letters to represent the line number; when there are branches on an operating line, in order to distinguish them from the main line, use a number different from the main line and other lines in the network to represent the branch line, and the numbering principle still uses two digits, two letters, or a combination of two digits and letters; S102: Numbering each station in the rail transit network: Each station is numbered with four digits. Stations are divided into ordinary stations and transfer stations. Ordinary stations only pass through one operating line in the rail transit network, while transfer stations pass through several operating lines in the rail transit network. The first two digits of the ordinary station number are the line number of the station, and the last two digits are the rank of the station within the line. Transfer stations have different numbers, and the number of their numbers corresponds to the number of operating lines they pass through in the rail transit network. Different operating lines use different numbers, and the numbering method of each number is the same as that of ordinary stations. S103: defining the unit section: defining the unit section as a section between two adjacent stations or a transfer virtual section within a transfer station where passengers transfer; Step S2: constructing a topological structure: constructing a topological structure of the urban rail transit network; In step S2, the network topology is represented as: G=<V,E,T> , where G is the directed graph of the urban rail transit network, V represents the set of stations in the entire network, a general station corresponds to a node in the topological graph, the number of nodes of a transfer station in the topological graph is the number of lines it is on, E represents the set of unit intervals between stations, and T represents the set of transfer virtual intervals; The station set is represented as: In the formula represents the station with sequence number i in the topology graph and site number a in the entire network; the set of unit intervals between stations is expressed as: In the formula Represents the unit interval of the direction from station a to station b, where a and b are stations numbered a and b in the station numbering principle, and i and j are the node numbers corresponding to stations a and b in the topology graph; The transfer virtual interval set is expressed as: In the formula represents the virtual transfer interval, where i and j are the serial numbers of a transfer station on line m and line n in the topology diagram, and a and b are the numbers of the transfer station on line m and line n in the station numbering principle. The meaning of is the virtual interval for passengers to transfer from line m to line n; The inter-station unit interval Used to record the travel cost of the unit interval between stations, the transfer virtual interval Used to record the travel cost of the transfer virtual interval; the travel cost of the unit interval between stations and the travel cost of the transfer virtual interval are both recorded with the unit interval number or mileage per unit interval Or the unit interval running time express: Where: α, β, γ are 0 or 1; and, when α = 1, β = γ = 0; when β = 1, α = γ = 0; when γ = 1, α = β = 0; dimensionless, The dimension is km, The dimension is min; Step S3: Model construction: determine the effective path assumption premise and build a full-network effective path search model; In step S3, the valid path premise is assumed to be: if the starting station and the terminal station of an OD pair belong to the same route, there is only one valid path, that is, the passenger only travels on this route; In step S3, the whole network effective path search model C is constructed. OD represents the set of travel costs required for all paths between OD pairs, represents the travel cost required for the k-th effective path, then the k-th effective path must meet the following conditions: Formula 1: Formula 2: Formula 1 states that the travel cost of the kth path between an OD pair is the sum of the travel costs of the unit intervals and transfer virtual intervals between the stations it passes through. Formula 2 stipulates that the travel cost of each effective path of an OD pair is the minimum value among the travel costs of all reachable paths between the OD pair. The effective path travel cost of the OD pair is the minimum value among all the reachable path travel costs between the OD pair. Therefore, the adjacency matrix of the line network travel cost is constructed according to the network topology structure: Where: Matrix A is used to record the cost values of all directed line segments connecting adjacent nodes in the topology diagram in the actual network. The row or column number in the matrix A corresponds to the node number of each station in the topology diagram. The element a ij Represents the cost value from node i to node j; The element a in the adjacency matrix A ij The value is obtained as follows: according to and Based on the value of , three different full-network adjacency matrices will be constructed. In each adjacency matrix, the path with the minimum travel cost between the OD pairs will be searched. The paths searched by the three adjacency matrices are all valid paths for the OD pairs. Step S4: Search and output: Search and output the valid path set of OD pairs in the entire network, where the OD pairs refer to the start and end point pairs of the valid paths; The step S4 includes: inputting the network lines, site names and corresponding numbers and the node numbers corresponding to each site in the network topology diagram, specifically including the following steps: Step S401: naming the three constructed adjacency matrices A1, A2, and A3 respectively; Step S402: corresponding to matrices A1, A2, and A3, define three matrices P1, P2, and P3 of the same dimensions, respectively used to store node information passed by valid paths under adjacency matrices A1, A2, and A3; Step S403: Initialization, record i=1, and record the number of nodes in the entire network as m; Step S404: determine whether i is greater than m, if i>m, then end, otherwise, record j=1; Step S405: Determine whether j is equal to i. If j=i, then j=j+1 and jump to step S406; otherwise, jump directly to step S406; Step S406: In the case of the current OD pair, the starting point of the OD pair is i and the end point is j. Use the first two digits of the site number to determine whether node i and node j belong to the same line. If so, jump to step S407; otherwise, jump to step S408. Step S407: There is only one valid path between the OD pair, that is, a path from the starting station to the end station along the line, and the station numbers passed by the path are output in order; j = j + 1, determine whether j is greater than m, if j > m, then i = i + 1 and jump to step S404, otherwise jump to step S405; Step S408: Use the improved Floyd algorithm to update matrices A1, A2, A3 and corresponding matrices P1, P2, P3. Valid paths for the OD pair are searched based on matrices P1, P2, P3, and the station numbers passed through by these valid paths are output in order. If j = j + 1, determine whether j is greater than m. If j > m, then i = i + 1 and jump to step S404. Otherwise, jump to step S405. The step S408 includes: in the case of each OD pair in the entire network, traversing the remaining stations in the network as intermediate nodes of the starting and ending stations; when the total travel cost when the path passes through the node is less than the original travel cost, the travel cost of the OD pair is updated to the travel cost when passing through the node, and the corresponding element in the path matrix updates the node; when the total travel cost when the path passes through the node is equal to the original travel cost, the travel cost of the OD pair remains unchanged, and the corresponding element in the path matrix adds the node; when the total travel cost when the path passes through the node is greater than the original travel cost, the adjacency matrix and the path matrix remain unchanged.
Citation Information
Patent Citations
Urban rail transit effective path searching system
CN109635064A