CN112365028B - Subway line network route finding method and subway clearing system based on characteristic transfer route - Google Patents

Subway line network route finding method and subway clearing system based on characteristic transfer route Download PDF

Info

Publication number
CN112365028B
CN112365028B CN202011117669.0A CN202011117669A CN112365028B CN 112365028 B CN112365028 B CN 112365028B CN 202011117669 A CN202011117669 A CN 202011117669A CN 112365028 B CN112365028 B CN 112365028B
Authority
CN
China
Prior art keywords
transfer
characteristic
transfer path
station
line network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011117669.0A
Other languages
Chinese (zh)
Other versions
CN112365028A (en
Inventor
姜富强
马天明
徐哲民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Unittec Co Ltd
Original Assignee
Unittec Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Unittec Co Ltd filed Critical Unittec Co Ltd
Priority to CN202011117669.0A priority Critical patent/CN112365028B/en
Publication of CN112365028A publication Critical patent/CN112365028A/en
Application granted granted Critical
Publication of CN112365028B publication Critical patent/CN112365028B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • G06Q50/40

Abstract

The invention discloses a subway line network routing method based on a characteristic transfer path, which comprises the following steps: s1: calculating all characteristic transfer paths with the transfer times of 1 for each transfer station; s2: calculating a characteristic transfer path with the transfer times of k '+ 1 according to the characteristic transfer path with the transfer times of k'; s3: expanding all characteristic transfer paths outwards from a starting point and outwards from an end point, wherein in the expanding process, no transfer is allowed to occur, so that all effective paths with the number of times of changing cars not more than K in a line network are generated; s4: the calculation result is supplemented with 0 transfer paths. The invention also provides a subway clearing and separating system, wherein the line passenger flow distribution module calculates the passenger flow distribution of the subway line network according to the calculation results of the subway line network routing module and the passenger in-and-out station transaction calculation module. Compared with the prior art, the invention reduces the time complexity.

Description

Subway line network route finding method and subway clearing system based on characteristic transfer route
Technical Field
The invention relates to the technical field of rail transit, in particular to a subway line network routing algorithm.
Background
The subway line network routing algorithm is used for finding all riding paths in a subway line network diagram, wherein the transfer times between any two stations do not exceed K.
Scenario of algorithm application:
and the subway clearing system calculates the passenger flow distribution of the network according to the calculation result of the algorithm and the station-in and station-out transaction generated by the passenger, and distributes the income among the line operators.
The algorithm involves the symbols:
g: according to the directed graph constructed by the subway line network, a station is a vertex in G, and an ascending road section and a descending road section are directed edges in G.
N: the number of all stations in the net graph, i.e., the number of vertices in G, will increase as the net expands.
V: one vertex in G.
< V1, V2, … Vn >: one riding path of the passengers passes through the stations V1, V2, … Vn and the like in sequence.
{ V1, V2, … Vn }: a set of stations.
K: the maximum number of transfers for a passenger trip is a predefined fixed number, which can usually be 5.
Mse: the set of all possible ride paths from Vs to Ve.
And nX: the average number of transfer stations per line in the net depends on the number of transfer stations per line design, and as the net expansion does not vary much, the estimation can be 10, usually not more than 15.
nV: the average station number of each line is not changed greatly along with the extension of the line network.
nL: the number of lines in a net will increase as the net expands.
The existing algorithm is as follows:
for a bituple (Vs, Ve) formed by each pair of vertexes in the G, taking Vs as a starting point, repeatedly calling a depth-first traversal algorithm until all paths capable of reaching Ve are found, and the specific steps are as follows:
setting Mse as an empty set.
Call DFS _ ACC (< Vs >);
DFS _ ACC is defined as follows:
FUNCTION DFS_ACC(Path0)
BEGIN
if the number of transfers in Path0 exceeds K, return is made directly.
Record Vc as the last vertex in Path 0.
The set of all adjacent stations recording Vc is { Vs1, Vs2, … Vsn }
FOR Vsi in{Vs1,Vs2,…Vsn}:
If Vsi has not occurred at Path0
All stations in Path0 are used, and Vsi is added to form a new Path, which is marked as Path 1.
If Vsi ═ Ve, Path1 is added to Mse.
Otherwise, DFS _ ACC is recursively called (Path1)
END
The time complexity of the existing algorithm is very high, and the simple analysis is as follows:
first, the DFS _ ACC method is called once for each pair of stations, for a total of N × N (N-1) calls.
Then, when DFS _ ACC is executed, if Vc is a two-line transfer station, it will typically generate 3 DFS _ ACC calls. If Vc is a non-transfer station, a DFS _ ACC call is generated. Thus, the maximum number of (3nX × nL + (nV-nX) × nL) DFS _ ACC calls are generated. Although filtering is performed according to Path0, K during traversal, this does not affect the complexity of the computation.
Thus, the temporal complexity of the existing algorithms is N x (N-1) × (3nX × nL + (nV-nX) × nL).
Disclosure of Invention
The technical problem to be solved by the invention is to provide a subway line network routing algorithm based on a characteristic transfer path, so that the time complexity is reduced.
In order to solve the technical problems, the invention adopts the following technical scheme: the subway line network routing algorithm based on the characteristic transfer path is characterized in that for a path P which is < V1, V2, … Va, Vx1, … Vxk, Vb and … Vn >, the station which undergoes k transfers is assumed to be Vx1, the station which undergoes the first transfer is Vxk, the station before Vx1 is Va, the station after Vxk is Vb, the path < Va, Vx1, … Vxk, Vb > is called as the characteristic transfer path of VxP, if either the station 1 or Vxk is a terminal station, Va or Vb does not appear in the characteristic transfer path, and the subway line network routing algorithm based on the characteristic transfer path comprises the following steps:
s1: calculating all characteristic transfer paths with the transfer times of 1 for each transfer station;
s2: calculating a characteristic transfer path with the transfer times of k '+ 1 according to the characteristic transfer path with the transfer times of k';
s3: expanding all characteristic transfer paths outwards from a starting point and outwards from an end point, wherein in the expanding process, any transfer is not allowed to occur, so that all effective paths with the number of car changing times not more than K in a net are generated;
s4: the calculation result is supplemented with 0 transfer paths.
Preferably, the implementation method of step S2 is: starting from the last station of the characteristic transfer path of K', searching forward to the next transfer, and finding out all the characteristic transfer paths with the transfer times of K.
Preferably, the implementation method of step S4 is: for all station duplets (Vs, Ve), wherein Vs and Ve belong to all stations passing through the line L in sequence between Vs and Ve, a transfer path of 0 times from Vs to Ve is formed.
The invention also provides a subway clearing and separating system which comprises a subway line network routing module based on the characteristic transfer path, a passenger in-and-out station transaction calculation module and a line passenger flow distribution module, wherein the subway line network routing module based on the characteristic transfer path adopts a subway line network routing algorithm based on the characteristic transfer path to calculate, and the line passenger flow distribution module calculates the passenger flow distribution of the line network according to the calculation results of the subway line network routing module and the passenger in-and-out station transaction calculation module.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the subway line network routing algorithm based on the characteristic transfer path.
The present invention also provides a medium storing a computer program that, when executed by a processor, enables a subway line network routing algorithm based on feature transfer paths.
The invention defines the characteristic transfer path, runs the subway line network routing algorithm based on the characteristic transfer path, and can quickly find all riding paths in the subway line network diagram, wherein the transfer times between any stations do not exceed K.
The following detailed description will explain the present invention and its advantages.
Drawings
The invention is further described with reference to the accompanying drawings and the detailed description below:
fig. 1 is an illustration of a subway line.
Detailed Description
The technical solutions of the embodiments of the present invention are explained and illustrated below, but the following embodiments are only preferred embodiments of the present invention, and not all of them. Based on the embodiments in the implementation, other embodiments obtained by those skilled in the art without any creative effort belong to the protection scope of the present invention.
Example one
The subway line network routing algorithm based on the characteristic transfer path comprises the following steps:
characteristic transfer path: for a path P ═ V1, V2, … Va, Vx1, … Vxk, Vb, … Vn >, assuming that it has undergone k transfers, the station at the first transfer is Vx1, the station at the last transfer is Vxk, the station before Vx1 is Va, and the station after Vxk is Vb, the path P < Va, Vx1, … Vxk, Vb > P is called a characteristic transfer path. Va or Vb will also not appear in the feature transfer path if Vx1 or Vxk is a terminal.
The specific algorithm is as follows:
the first step is as follows: all characteristic transfer paths with a transfer number of 1 are calculated for each transfer station. For example, in fig. 1, the characteristic transfer path of the transfer station Vx1 for which the number of transfers is 1 is eight: < V14, Vx1, V22>,
<V14,Vx1,V23>,<V15,Vx1,V22>,<V15,Vx1,V23>,<V22,Vx1,V14>,
<V22,Vx1,V15>,<V23,Vx1,V14>,<V23,Vx1,V15>。
the second step is that: and calculating the characteristic transfer path with the transfer times of k '+ 1 according to the characteristic transfer path with the transfer times of k'. The method is that the last station of the characteristic transfer path of k' is started, and the next transfer is searched forward. The iteration mode is that firstly, k' is 1, and a characteristic transfer path with the transfer times of 2 is calculated according to the characteristic transfer path with the transfer times of 1; then, taking k' as 2, and calculating a characteristic transfer path with the transfer times of 3 according to the characteristic transfer path with the transfer times of 2; and iterating until the characteristic transfer path with the transfer times of K is calculated.
The third step: and expanding all characteristic transfer paths outwards from the starting point and outwards from the end point, wherein in the expanding process, any transfer is not allowed to occur, so that all effective paths with the number of car changing times not more than K in the net are generated.
And fourthly, supplementing 0 times of transfer paths into the calculation result. The method comprises the following steps: for all station duplets (Vs, Ve), where Vs and Ve belong to all stations passing between Vs and Ve in sequence on the line L, a transfer path of 0 times from Vs to Ve is formed.
The algorithm has the advantage of low time complexity. Assuming that all nets are quadratic transfers, the following estimates are made:
the complexity analysis of the first and second steps is as follows:
the number of characteristic transfer paths with the transfer number of 1 is nL 8 nX
The number of characteristic transfer paths with the transfer times of 2 is maximum nL 8 nX (nX-1) 2
The number of characteristic transfer paths with the transfer number of 3 is at most nL 8 nX (nX-1) 2
According to the geometric series summation formula, the number of characteristic transfer paths with the transfer times not exceeding K times is maximum nL 8 nX (1-qK)/(1-q), wherein q is (nX-1) 2. Where nX, K are fixed values, the above summation can therefore be abbreviated as d × nL, where d ═ 8 × nX (1-qK)/(1-q) is a fixed value.
The complexity analysis of the third step is as follows:
the third step performs d × nL cycles with a maximum of 2 calculations (nV) per cycle, and thus a total of 2 calculations (nV) are performed. Each calculation is a simple extension, and occupies a constant time.
The complexity analysis of the fourth step is as follows:
the fourth step is to loop through all the routes, find the station pairs in each route, and perform nL nV (nV-1) times of calculation.
Therefore, the maximum number of calculations for this algorithm is d × nL + d × nL (nV)2+ nL × nV (nV-1), the algorithm complexity is C × nL (nV)2, and C is a constant. The polynomial complexity is obviously superior to the exponential complexity of the original technical scheme.
Example two
The subway clearing and classifying system comprises a subway line network routing module based on a characteristic transfer path, a passenger in-and-out station transaction calculating module and a line passenger flow distribution module, wherein the subway line network routing module based on the characteristic transfer path adopts a subway line network routing algorithm based on the characteristic transfer path to calculate, and the line passenger flow distribution module calculates the passenger flow distribution of a line network according to the calculation results of the subway line network routing module and the passenger in-and-out station transaction calculating module.
The above calculation method for calculating the passenger flow distribution of the wire network may refer to the prior art, and is not described herein again.
EXAMPLE III
An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing a feature transfer path-based metro network routing algorithm as in embodiment one when executing the computer program.
The electronic devices in the embodiments of the present invention may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), and the like, and fixed terminals such as desktop computers and the like.
The electronic device may include a processing means (e.g., a central processing unit) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) or a program loaded from a storage means into a Random Access Memory (RAM). In the RAM, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device, the ROM, and the RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
A computer program, carried on a computer readable medium, comprising program code for performing an algorithm. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means, or installed from a storage means, or installed from a ROM. The computer program, when executed by a processing device, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable medium or any combination of the two.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
While the invention has been described with reference to specific embodiments, it will be understood by those skilled in the art that the invention is not limited thereto, and may be embodied in other forms without departing from the spirit or essential characteristics thereof. Any modification which does not depart from the functional and structural principles of the present invention is intended to be included within the scope of the claims.

Claims (5)

1. A subway line network routing method based on a characteristic transfer path is characterized in that for a path P = < V1, V2, … Va, Vx1, … Vxk, Vb, … Vn >, the station subjected to k transfers is assumed to be Vx1, the station subjected to the last transfer is Vxk, the station before Vx1 is Va, and the station after Vxk is Vb, the path < Va, Vx1, … Vxk, Vb > is called as the characteristic transfer path of VxP, and if either the station 1 or Vxk is a terminal station, the Va or Vxvb does not appear in the characteristic transfer path, and the subway line network routing method based on the characteristic transfer path comprises the following steps:
s1: calculating all characteristic transfer paths with the transfer times of 1 for each transfer station;
s2: calculating a characteristic transfer path with the transfer times of k '+ 1 according to the characteristic transfer path with the transfer times of k';
s3: expanding all characteristic transfer paths outwards from a starting point and outwards from an end point, wherein in the expanding process, any transfer is not allowed to occur, so that all effective paths with the number of car changing times not more than K in a net are generated;
s4: supplementing 0 transfer path to the calculation result;
the implementation method of the step S2 is as follows: starting from the last station of the characteristic transfer path of K', searching forward to the next transfer, and finding out all the characteristic transfer paths with the transfer times of K.
2. The method according to claim 1, wherein the method comprises: the implementation method of the step S4 is as follows: for all station duplets (Vs, Ve), where Vs and Ve belong to all stations passing between Vs and Ve in sequence on the line L, a transfer path of 0 times from Vs to Ve is formed.
3. Clear system of dividing of subway, its characterized in that: the system comprises a subway line network routing module based on a characteristic transfer path, a passenger in-and-out station transaction calculation module and a line passenger flow distribution module, wherein the subway line network routing module based on the characteristic transfer path adopts the subway line network routing method based on the characteristic transfer path of any one of claims 1 to 2 to calculate, and the line passenger flow distribution module calculates the passenger flow distribution of a line network according to the calculation results of the subway line network routing module and the passenger in-and-out station transaction calculation module.
4. An electronic device, characterized in that: comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the feature transfer path-based subway line network routing method according to any one of claims 1 to 2 when executing the computer program.
5. A medium storing a computer program, wherein the computer program, when executed by a processor, is capable of implementing the method for feature transfer path-based metro network routing according to any one of claims 1 to 2.
CN202011117669.0A 2020-10-19 2020-10-19 Subway line network route finding method and subway clearing system based on characteristic transfer route Active CN112365028B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011117669.0A CN112365028B (en) 2020-10-19 2020-10-19 Subway line network route finding method and subway clearing system based on characteristic transfer route

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011117669.0A CN112365028B (en) 2020-10-19 2020-10-19 Subway line network route finding method and subway clearing system based on characteristic transfer route

Publications (2)

Publication Number Publication Date
CN112365028A CN112365028A (en) 2021-02-12
CN112365028B true CN112365028B (en) 2022-07-08

Family

ID=74506907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011117669.0A Active CN112365028B (en) 2020-10-19 2020-10-19 Subway line network route finding method and subway clearing system based on characteristic transfer route

Country Status (1)

Country Link
CN (1) CN112365028B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187996A (en) * 2007-10-08 2008-05-28 常飞 A quick bus line selection algorithm based on self-adapted backbone network
CN101614551A (en) * 2009-07-21 2009-12-30 中国科学院地理科学与资源研究所 Sneakernet method for building up and device, method for searching path and device
CN105374003A (en) * 2014-08-25 2016-03-02 武汉科技大学 Bus route transfer method
CN108182193A (en) * 2017-11-15 2018-06-19 北京通途永久科技有限公司 A kind of method of quick-searching Public Transport Transfer scheme
WO2020107966A1 (en) * 2018-11-30 2020-06-04 深圳春沐源控股有限公司 Information pushing method and device, server, and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101650705A (en) * 2009-07-30 2010-02-17 北京四维图新科技股份有限公司 Method and device for constructing bus transfer network
CN102306243A (en) * 2011-07-27 2012-01-04 高新现代智能系统股份有限公司 Method for sorting transfer passenger flow in rail traffic

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101187996A (en) * 2007-10-08 2008-05-28 常飞 A quick bus line selection algorithm based on self-adapted backbone network
CN101614551A (en) * 2009-07-21 2009-12-30 中国科学院地理科学与资源研究所 Sneakernet method for building up and device, method for searching path and device
CN105374003A (en) * 2014-08-25 2016-03-02 武汉科技大学 Bus route transfer method
CN108182193A (en) * 2017-11-15 2018-06-19 北京通途永久科技有限公司 A kind of method of quick-searching Public Transport Transfer scheme
WO2020107966A1 (en) * 2018-11-30 2020-06-04 深圳春沐源控股有限公司 Information pushing method and device, server, and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种公交换乘路线智能选择的新方法;陈丽佳等;《测绘科学》;20091120(第06期);全文 *
基于矩阵分析的公共交通网络最优路径算法;何迪等;《西南交通大学学报》;20070615(第03期);全文 *

Also Published As

Publication number Publication date
CN112365028A (en) 2021-02-12

Similar Documents

Publication Publication Date Title
CN107038478B (en) Road condition prediction method and device, computer equipment and readable medium
CN111951269B (en) Image processing method and related equipment
US11297076B2 (en) Apparatus for detecting in-vehicle external data intrusion by comparing multiple information entropy and operating method thereof
CN110598763A (en) Image identification method and device and terminal equipment
CN111275437A (en) Parallel chain consensus method, device and storage medium
CN112737798B (en) Host resource allocation method and device, scheduling server and storage medium
CN112365028B (en) Subway line network route finding method and subway clearing system based on characteristic transfer route
CN111221827B (en) Database table connection method and device based on graphic processor, computer equipment and storage medium
CN113590857A (en) Key value matching method and device, readable medium and electronic equipment
CN112907628A (en) Video target tracking method and device, storage medium and electronic equipment
CN117061349A (en) Vehicle-mounted cloud service deployment method, system, electronic equipment and storage medium
CN111739343A (en) Vehicle accident risk early warning method, device, medium and electronic equipment
CN113905066B (en) Networking method of Internet of things, networking device of Internet of things and electronic equipment
CN113792170B (en) Graph data dividing method and device and computer equipment
CN113449062B (en) Track processing method, track processing device, electronic equipment and storage medium
CN114049539B (en) Collaborative target identification method, system and device based on decorrelation binary network
CN115346099A (en) Image convolution method, chip, equipment and medium based on accelerator chip
CN113569704B (en) Segmentation point judging method, system, storage medium and electronic equipment
CN115629883A (en) Resource prediction method, resource prediction device, computer equipment and storage medium
CN115146478A (en) Running condition construction method and device based on optimization algorithm and related equipment
CN113722554A (en) Data classification method and device and computing equipment
CN115828079B (en) Method and device for maximum pooling operation
CN107492062B (en) Compression method and system for passenger travel matrix
CN114089927B (en) Path planning preprocessing data compression method
CN113569706B (en) Video scene segmentation point judging method, system, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant