CN105374003A - Bus route transfer method - Google Patents

Bus route transfer method Download PDF

Info

Publication number
CN105374003A
CN105374003A CN201410430729.2A CN201410430729A CN105374003A CN 105374003 A CN105374003 A CN 105374003A CN 201410430729 A CN201410430729 A CN 201410430729A CN 105374003 A CN105374003 A CN 105374003A
Authority
CN
China
Prior art keywords
transfer
station
transfer matrix
matrix
website
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.)
Pending
Application number
CN201410430729.2A
Other languages
Chinese (zh)
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.)
Wuhan University of Science and Engineering WUSE
Wuhan University of Science and Technology WHUST
Original Assignee
Wuhan University of Science and Engineering WUSE
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 Wuhan University of Science and Engineering WUSE filed Critical Wuhan University of Science and Engineering WUSE
Priority to CN201410430729.2A priority Critical patent/CN105374003A/en
Publication of CN105374003A publication Critical patent/CN105374003A/en
Pending legal-status Critical Current

Links

Abstract

The invention provides a bus route transfer method. According to the technical scheme of the invention, an optimal bus route method is selected based on the principle of minimum transfer frequency as a primary condition, and minimum station number as a secondary condition between bus stations. According to the method, firstly, bus stations are adopted as nodes, and bus routes are adopted as edges. If a common route exists between two bus stations, the two bus stations are connected. In this way, a connected directed graph is constructed. Secondly, based on the graph theory, the network transfer is analyzed and a transfer matrix is constructed. Thirdly, based on the transfer matrix, the number of bus stations at the same transfer frequency is calculated. The result of the experimental analysis shows that, the above method is short in running time and small in occupied storage space.

Description

A kind of public bus network transfer method
Technical field
The invention belongs to and relate to traffic information field, be mainly used in and transmit public bus network transfer defining method in Public Traveling information service platform.
Background technology
Public transport plays a part more and more important in modern metropolitan cities, is the primary selection that people go on a journey.But along with the quickening of urbanization process, public transport radius expands further, transfer becomes the public and to ride the factor of overriding concern.Therefore be necessary to set up a public bus network transfer plan efficiently.
At present, public transportation enquiry system mainly adopts the method for Dijkstra, utilizes distance to raise the efficiency to reduce region of search from plane, but in calculating distance process, adds computing cost.In addition, the prerequisite of Dijkstra method is that passenger considers to change trains or buses at any bus platform, and in fact such riding scheme is without any meaning.The present invention sets about from analysis public traffic network characteristic, establishes the sensible matrix of public traffic network of website, and devises more reasonably transfer route method on its basis: number of transfer is minimum is the most important condition, and number of standing is minimum is secondary conditions.
Summary of the invention
The present invention is intended to overcome prior art defect, and object is to provide a kind of method that can improve Public Transport Transfer efficiency.With the optimum riding route method of " number of transfer is minimum for the most important condition, and number of standing is minimum is secondary conditions " between station.First the method obtains the Transfer Matrix between station, station, then calculates the number through website according to Transfer Matrix.
For achieving the above object, the technical solution used in the present invention direction is as follows:
1) slave site is started with, and structure connected digraph, is namely considered as public bus network " limit ", if there is common circuit to be just connected in two bus stations.Therefrom choose trip scheme of riding to number of transfer, optimum that website number is relevant;
2) ensureing that the website of process under the prerequisite that number of transfer is identical is minimum.
Specifically, the technical solution used in the present invention is:
The first step, set up Transfer Matrix and obtain least bus change number of times
Website is considered as " node ", circuit is considered as on " limit ", if there is common circuit to be just connected in two websites, structure connected digraph, is designated as G (V, E), and in formula, V, E are node set and the limit set of G respectively.Then utilize Graph Theory to analyze network transfer, set up Transfer Matrix H=(h mn), m, n in formula belong to V, h mnfor the least bus change number of times from node m to node n.
Initial Transfer Matrix is set up to Fig. 1.Can go directly between two websites m, n if any, then h mn=1, otherwise h mn=0.So just can obtain initial Transfer Matrix H 0(6 × 6).As shown in Figure 2.
Suppose that public traffic network has q website.In conjunction with the reality of public traffic network digraph, the method that can obtain Transfer Matrix (q × q) is as follows:
1. initial Transfer Matrix H 0: first input all websites, can go directly between two websites m, n if any, then h mn=1, otherwise h mn=0 (m, n=1,2 ..., q).So just can obtain initial Transfer Matrix H 0.
2. a Transfer Matrix H 1: initial Transfer Matrix H 0if in h mn=1 remains unchanged.For H 0in arbitrary h mn=0, if existence k (k=1,2 ..., q), make h mk=1 and h kn=1, then h mn=2; Otherwise remain unchanged.To H 0in all h mncarry out above-mentioned computing, just can obtain a Transfer Matrix H 1.If H 1in all h mn≠ 0, then stop, otherwise continue next step;
3. secondary Transfer Matrix H 2: a Transfer Matrix H 1in h mnif 1≤h mn≤ 2 remain unchanged.For H 1in arbitrary h mn=0, if there is a k, make h mk=2 and h kn=1, then h mn=3; Otherwise remain unchanged.To H 1in all h mncarry out above-mentioned computing, just can obtain secondary Transfer Matrix H 2.If H 2in all h mn≠ 0 or H 2=H 1, then stop, otherwise continue next step;
4. n Transfer Matrix H n: suppose to obtain n-1 Transfer Matrix H n-1, H n-1in h mnif 1≤h mn≤ n-1 then remains unchanged.If H n-1in arbitrary h mn=0, if there is a k, make h mn=n and h kn=1, then h mn=n+1; Otherwise h mn=0 remains unchanged.To H nin all h mncarry out above-mentioned computing, just can obtain n Transfer Matrix H n.If H nin all h mn≠ 0 or H n=H n-1, then stop, otherwise continue next step.
For the ease of understanding number of transfer, it should be noted that: two websites corresponding to 0 expression can not be communicated with, and non-zero element subtracts number of transfer actual between 1 expression two website.
Fig. 3 is the final Transfer Matrix obtained according to method.That is the public traffic network of Fig. 1 representative just can obtain final Transfer Matrix through cubic matrix computing.After solving number of transfer problem, method is below exactly the problem solving station number under the condition that number of transfer is equal.
The minimum method of station number under the equal condition of second step, number of transfer
For Fig. 3,
To any two website m and n, select all circuits through website m and website n respectively, all line set wherein through website m are designated as Lm, and all line set through website n are designated as Ln.
(1) through train method
If h mn=1, now represent has through train from m to n.To any L i∈ Lm ∩ Ln, if now m, the n position in this circuit is respectively i m, i n, then the website of process is C nm=| i n-i m|.Such L ithere is r bar, then add up r C nm.
(2) once method is changed to
If h mn=2, now must turn a train and just can reach home.To arbitrary k ∈ 1,2 ..., q} ∧ (k ≠ m) ∧ (k ≠ n), if there is such k, makes h mk=1 and h kn=1, so find out simultaneously through the line set L of website m, k mk(r1 bar), simultaneously through the line set L of site k, n kn(r2 bar).R is calculated respectively according to through train method 1station number C between bar website m, k km, r 2station number C between bar site k, n nk.
Master station's number C between m, n nm=C nk+ C km, statistics C nmvalue (maximum number is r 1× r 2).
(3) the secondary transfer method of n (n >=2)
If h mn=n+1, now must turn n train and just can reach home.To arbitrary k ∈ 1,2 ..., q} ∧ (k ≠ m) ∧ (k ≠ n), if there is such k, makes h mk=n and h kn=1 (h mk=1 and h kn=n is similar), so find out simultaneously through the line set L of website m, k mk(r1 bar), simultaneously through the line set L of site k, n kn(r2 bar).R is calculated according to n-1 transfer method 1station number C between bar website m, k km, calculate r according to through train method 2station number C between bar site k, n nk.
Master station's number C between m, n nm=C nk+ C km, statistics C nmvalue (maximum number is r 1× r 2).H can be calculated with method mk=1 and h knmaster station's number C between m, n during=n nm, add up several C nmvalue.
Under the prerequisite that number of transfer is identical, obtain set C nmin minimum N number of, then the N kind line combination that this N number of result is corresponding is the shorter circuit of station number.
Accompanying drawing explanation
Fig. 1 is a simple public traffic network figure in the first step of the present invention;
Fig. 2 is initial Transfer Matrix figure in the first step of the present invention;
Fig. 3 is three Transfer Matrix figure in the first step of the present invention;
Fig. 4 is route searching figure working time of three kinds of public transport methods in effect analysis of the present invention;
Fig. 5 is that in effect analysis of the present invention, two kinds of Public Traffic Network Models take Storage Space Digraph.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described, the restriction not to its protection domain.
The minimum method of station number under the equal condition of second step, number of transfer
To any two website x and y, select all circuits through website x and website y respectively, all line set wherein through website x are designated as Mx, and all line set through website y are designated as My.
1 through train method
If Mx ∩ is My ≠ Φ, then now represent the through train from x to y.To any Li ∈ Mx ∩ My, if
1.Li ∈ Mo (Mo represents the set of one-way road), now x, the y position in this circuit is respectively ix, iy.There are following two kinds of situations:
(1) as ix > iy, although then illustrate that this circuit is directly connected to x and y, traffic direction is reverse, and this circuit is unworkable;
(2) as ix < iy, then ci=iy-ix is calculated.
2.Li ∈ Md (Md represents the set of two ways), then calculate ci=|iy-ix|.
, then there is the following two kinds situation in 3.Li ∈ Ms (Ms represents toroidal set):
(1) as ix > iy, then ci=iy+p-ix (wherein p is website number total on Li circuit) is calculated;
(2) as ix < iy, then ci=iy-ix. is calculated
Obtain least stations number cm=min{c1, c2 ..., therefore Lm is best circuit by bus, and obtains secondary two good circuit selections for reference similarly.
2 once change to method
If Mx ∩ My=is Φ, at this moment must change trains or buses just can reach home, to arbitrary Li ∈ Mx, Lj ∈ My, if H2 (i, j)=1, then can row line be Li+Lj.
Suppose that total r kind can row line, row line can get first common site z of Li and Lj to above-mentioned, then now be equivalent to there is through train Li from x to z, from z to y, have through train Lj, obtaining website number respectively according to through train method is ci and cj, represent the master station's number of once changing trains or buses to arrive forwarding Lj from Li to Cs, then have Cs=ci+cj, (s=1,2,3 ..., r)
From C1, C2 ..., select minimum three in Cr}, namely three kinds of corresponding with it circuits recommend three kinds of best routes of user.
3 twice transfer method
If once changing to methods and results is Φ, then now at least to turn two trains just can reach home, to arbitrary Li ∈ Mx, Lj ∈ My, if H2 is (i, j)=2, from H2, try to achieve k, make H2 (i, k)=1 and H2 (k, j)=1, then circuit Li+Lk+Lj be one can the combination of row line.
Suppose the combination having r kind such, similarly once to transfer to, obtain first intersection point e of Li and Lk, first intersection point f of Lk and Lj.So just be equivalent to there is through train Li from x to e, from e to f, have through train Lk, from f to y, have through train Lj.
Li is obtained, corresponding website number ci in Lk, Lj circuit, ck, cj according to turning once transfer method.
According to Cs=ci+ck+cj (s=1,2 ... r) calculate secondary to change trains or buses the website number that various feasible line combination will pass through, obtain { C1, C2, ..., three minimum in Cr}, then the circuit that when three kinds of feasible line combinations that these three results are corresponding are transfers twice, distance is shorter.
Measures compare, analysis
The search that this method will be converted into the search of website circuit, thus several thousand even process of up to ten thousand data are optimized for the process to a hundreds of data, substantially reduce operation time.Moreover, and more the search request (circuit) of passenger is met.Through inspection input Origin And Destination, acquired results must be by the path of origin-to-destination.Under the qualifications of number of times of changing trains or buses, greatly reduce the operand solving best route.In addition, because public bus network seldom changes, in the process of the project implementation, Transfer Matrix can be stored as a static table public for all inquiry codes, the plenty of time being used for generating Transfer Matrix so just can save, and the real-time of system is significantly improved.If there is the situation of public bus network variation, only need to regenerate a static Transfer Matrix.
Secondly, model be also applied to the multiple vehicles and routing problems.As considered bus and subway line simultaneously, due to the corresponding multiple bus station of same subway station, then subway line can be considered as a bus line be communicated with, only need represent automobile and subway line when data processing respectively with " L " and " T " prefix, application this method can obtain optimal route equally and select.
Experimental situation: the notebook of WindowsXP operating system, Duo 2 double-core (2.0G) CPU, 4G internal memory.
1) comparative analysis working time
Fig. 4 is that Dijkstra method, the A* method of improvement and Public Transport Transfer method three kinds of methods are to route searching result working time of certain public traffic network (500 bar public transport line, 3000 bus stations).The distance of 5 experiment starting points and terminal is more and more longer, namely passes through about 1/5 of road network, 2/5,3/5,4/5 and whole road net respectively.
Conclusion:
1. latter two method has a clear superiority in time compared with Dijkstra method.
2. when the scope of starting point and terminal passing through network becomes large, first two method operationally between above to increase obviously, and Public Transport Transfer method is steady for working time.
2) storage space comparative analysis is taken
Set up digraph with public bus network for " node " and be that " node " is set up digraph two kinds of Public Traffic Network Models and taken the contrast of storage space as shown in Figure 5 with bus station.
Conclusion: with public bus network for " node " sets up digraph than to set up storage space shared by digraph obviously few a lot of for " node " with bus station.

Claims (3)

1. a public bus network transfer method, it is characterized in that obtaining the Transfer Matrix between station, station, then calculate the number through website according to Transfer Matrix, the step of the method comprises:
The first step, set up Transfer Matrix and obtain least bus change number of times
Website is considered as " node ", circuit is considered as on " limit ", if there is common circuit to be just connected in two websites, structure connected digraph, then utilize Graph Theory to analyze network transfer, set up Transfer Matrix, the point in matrix is the least bus change number of times that slave site arrives website;
The minimum method of station number under the equal condition of second step, number of transfer
(1) through train method
Two stand on same circuit, every station number between both statistics;
(2) once method is changed to
Have a through-station and the starting point provided, terminal respectively on different circuits, add up the station number of through-station and starting point, through-station and terminal according to through train method respectively, and obtain both and, minimum value is that the best once changes to method;
(3) the secondary transfer method of n (n >=2)
N time transfer method can by once transfer and n-1 transfer recurrence are carried out.
2. a kind of public bus network transfer method according to claim 1, is characterized in that, the method for Transfer Matrix (q × q) is as follows:
1. initial Transfer Matrix H 0: first input all websites, can go directly between two websites m, n if any, then h mn=1, otherwise h mn=0 (m, n=1,2 ..., q);
2. a Transfer Matrix H 1: initial Transfer Matrix H 0if in h mn=1 remains unchanged; For H 0in arbitrary h mn=0, if existence k (k=1,2 ..., q), make h mk=1 and h kn=1, then h mn=2; Otherwise remain unchanged; To H 0in all h mncarry out above-mentioned computing, just can obtain a Transfer Matrix H 1; If H 1in all h mn≠ 0, then stop, otherwise continue next step;
3. secondary Transfer Matrix H 2: a Transfer Matrix H 1in h mnif 1≤h mn≤ 2 remain unchanged; For H 1in arbitrary h mn=0, if there is a k, make h mk=2 and h kn=1, then h mn=3; Otherwise remain unchanged; To H 1in all h mncarry out above-mentioned computing, just can obtain secondary Transfer Matrix H 2; If H 2in all h mn≠ 0 or H 2=H 1, then stop, otherwise continue next step;
4. n Transfer Matrix H n: suppose to obtain n-1 Transfer Matrix H n-1, H n-1in h mnif 1≤h mn≤ n-1 then remains unchanged; If H n-1in arbitrary h mn=0, if there is a k, make h mn=n and h kn=1, then h mn=n+1; Otherwise h mn=0 remains unchanged; To H nin all h mncarry out above-mentioned computing, just can obtain n Transfer Matrix H n; If H nin all h mn≠ 0 or H n=H n-1, then stop, otherwise continue next step.
3. a kind of public bus network transfer method according to claim 1, is characterized in that, n transfer method, to arbitrary k ∈ 1,2 ..., q} ∧ (k ≠ m) ∧ (k ≠ n), if there is such k, makes h mk=n and h kn=1 (h mk=1 and h kn=n is similar), so find out simultaneously through the line set L of website m, k mk(r1 bar), simultaneously through the line set L of site k, n kn(r2 bar); R is calculated according to n-1 transfer method 1station number C between bar website m, k km, calculate r according to through train method 2station number C between bar site k, n nk;
Master station's number C between m, n nm=C nk+ C km, statistics C nmvalue (maximum number is r 1× r 2); H can be calculated with method mk=1 and h knmaster station's number C between m, n during=n nm, add up several C nmvalue;
Under the prerequisite that number of transfer is identical, obtain set C nmin minimum N number of, then the N kind line combination that this N number of result is corresponding is the shorter circuit of station number.
CN201410430729.2A 2014-08-25 2014-08-25 Bus route transfer method Pending CN105374003A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410430729.2A CN105374003A (en) 2014-08-25 2014-08-25 Bus route transfer method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410430729.2A CN105374003A (en) 2014-08-25 2014-08-25 Bus route transfer method

Publications (1)

Publication Number Publication Date
CN105374003A true CN105374003A (en) 2016-03-02

Family

ID=55376178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410430729.2A Pending CN105374003A (en) 2014-08-25 2014-08-25 Bus route transfer method

Country Status (1)

Country Link
CN (1) CN105374003A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506777A (en) * 2020-03-13 2020-08-07 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and storage medium
CN112365028A (en) * 2020-10-19 2021-02-12 浙江众合科技股份有限公司 Subway line network routing algorithm and subway clearing system based on characteristic transfer path

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李俊等: "基于最小换乘模型的公交查询系统的设计与实现", 《武汉理工大学学报(交通科学与工程版)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111506777A (en) * 2020-03-13 2020-08-07 阿里巴巴集团控股有限公司 Data processing method and device, electronic equipment and storage medium
CN111506777B (en) * 2020-03-13 2023-04-28 阿里巴巴集团控股有限公司 Data processing method, device, electronic equipment and storage medium
CN112365028A (en) * 2020-10-19 2021-02-12 浙江众合科技股份有限公司 Subway line network routing algorithm and subway clearing system based on characteristic transfer path
CN112365028B (en) * 2020-10-19 2022-07-08 浙江众合科技股份有限公司 Subway line network route finding method and subway clearing system based on characteristic transfer route

Similar Documents

Publication Publication Date Title
Zhang et al. Networked characteristics of the urban rail transit networks
US8799038B2 (en) Dynamic taxi-sharing system and sharing method thereof
De Bona et al. Analysis of public bus transportation of a Brazilian city based on the theory of complex networks using the P-space
CN101187996B (en) A quick bus line selection algorithm based on self-adapted backbone network
CN105844362B (en) Urban traffic comprehensive trip decision-making device
CN103530694B (en) The city underground dynamic bus traveler assignment method built based on time-space network
CN101650705A (en) Method and device for constructing bus transfer network
US9074904B1 (en) Method for solving carpool matching problem and carpool server using the same
CN103942948A (en) Method for generating urban bus route network based on segmented splicing
JP2013511095A5 (en)
CN104217086A (en) Urban public transport network optimization method
CN112381472B (en) Subway connection bus route optimization method and device and storage medium
CN106017490A (en) Map display method, navigation server and navigation system
CN107092986A (en) The bus passenger travel route choice method based on website and collinearly run
CN103413433A (en) Traffic-jam bus transferring method based on passenger flow volume information
CN105070039A (en) Carpool method based on path management
Shang et al. Human mobility prediction and unobstructed route planning in public transport networks
Karimi et al. Reducing traffic congestion and increasing sustainability in special urban areas through one-way traffic reconfiguration
CN102982395A (en) Rapid bus transfer method based on space node clustering method
CN105374003A (en) Bus route transfer method
CN101807348A (en) Dynamic network navigation system and method
CN104268190A (en) Bus route search method and device
Lin et al. A cloud computing framework for real-time carpooling services
Sadanandan et al. A smart transportation system facilitating on-demand bus and route allocation
CN104899654B (en) It is a kind of to be used to alleviate the crowded routing resource of track traffic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160302

WD01 Invention patent application deemed withdrawn after publication