CN111311002B - Bus trip planning method considering active transfer of passengers in transit - Google Patents
Bus trip planning method considering active transfer of passengers in transit Download PDFInfo
- Publication number
- CN111311002B CN111311002B CN202010096480.1A CN202010096480A CN111311002B CN 111311002 B CN111311002 B CN 111311002B CN 202010096480 A CN202010096480 A CN 202010096480A CN 111311002 B CN111311002 B CN 111311002B
- Authority
- CN
- China
- Prior art keywords
- station
- bus
- transfer
- starting
- route
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 239000000126 substance Substances 0.000 claims description 24
- 238000006243 chemical reaction Methods 0.000 claims description 18
- SAZUGELZHZOXHB-UHFFFAOYSA-N acecarbromal Chemical compound CCC(Br)(CC)C(=O)NC(=O)NC(C)=O SAZUGELZHZOXHB-UHFFFAOYSA-N 0.000 claims description 9
- 230000000977 initiatory effect Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 206010039203 Road traffic accident Diseases 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
- G06Q10/047—Optimisation of routes or paths, e.g. travelling salesman problem
-
- G06Q50/40—
Abstract
The invention discloses a bus trip planning method considering active transfer of passengers in transit, which is characterized in that according to a departure station and a destination station of the passengers in trip, real-time bus information is combined, time is used as a virtual node to obtain an original bus network for the passengers to trip, the original bus network is expanded on the basis of the original bus network, after the expanded bus network is obtained, a combined dynamic planning method is utilized, the waiting time weight of the passengers at the departure station and a transfer station, the running time weight between the stations and the crowding degree weight of a bus are considered, and therefore a trip scheme based on the trip time and the crowding degree of the bus is obtained. The invention can solve the temporary transfer problem of passengers in the riding process, thereby meeting the transfer requirements of the passengers and greatly improving the time utilization efficiency of the passengers.
Description
Technical Field
The invention belongs to the field of public transportation, and particularly relates to a bus trip planning method considering active transfer of passengers in the way.
Background
In a city with a mature bus network, a plurality of routes are always arranged from a departure point to a destination, the total time of each route is different, and a passenger generally selects a travel route with the shortest time.
In the prior art, a map APP searches for nearby bus stops containing buses arriving at a destination stop according to the current positioning of a passenger, plans all travel routes, orders travel times of all routes from small to large, and indicates specific walking time, riding time, waiting time and the like.
In the prior art, the bus map system usually takes the shortest walking time and the shortest total travel time as a recommendation basis when recommending a travel route.
The current bus travel route planning has the following defects:
the recommendation of the travel route scheme is too single, the riding requirements of passengers are not considered, and particularly for the transfer passengers, the real requirements of the passengers are not considered, such as: the number of people on the bus, the degree of bus congestion, etc.
The selection of the trip scheme is too unique, the trip route selected by the passenger can not be changed, and the trip scheme can not be flexibly planned on the way.
Disclosure of Invention
The invention aims to solve the defects of the prior art, and provides a bus trip planning method considering active transfer of passengers on the way so as to solve the problem of temporary transfer of the passengers on the way, thereby meeting the transfer requirements of the passengers and improving the time utilization efficiency of the passengers to the greatest extent.
In order to achieve the purpose, the invention adopts the following technical scheme:
the invention relates to a bus trip planning method considering active transfer of passengers in the way, which is characterized by comprising the following steps of:
step one, obtaining an original public transportation network of passenger travel:
obtaining an original public transportation network G (V, A) of the passenger trip according to an initial station o and a destination station d of the passenger trip, wherein V is a station set, and V is { o, M, d }; m is a set of transfer stations, and M ═ M1,M2,…,Mk,…,MKIn which M iskK is the kth transfer station, K is 1,2, …, and K is the total number of transfer stations; a is a set of lines in the original public transportation network G, and a ═ { L, FL, AL }, where L is a set of lines that go straight between the origin station o and the destination station d, and L ═ L1,l2,…,ln,…,lN},lnN is the nth direct line between the starting station o and the destination station d, wherein N is 1,2, …, and N is the total number of the direct lines; FL is a line set from the origination station o to each transfer station in the transfer station set M, and FL { FL ═ FL1,FL2,…,FLk,…,FLKIn which FL iskFrom the starting station o to the k-th transfer station MkA line set of inbound lines of, andwherein the content of the first and second substances,from the starting station o to the k-th transfer station MkI is 1,2, …, Ik,IkFrom the starting station o to the k-th transfer station MkTotal number of inbound lines; AL is the outbound line set from transfer site set M to destination site d, and AL ═ AL1,AL2,…,ALk,…,ALK},ALkTo move from the k-th transfer station MkA set of outbound routes to destination site d, andwherein the content of the first and second substances,to move from the k-th transfer station MkJ-th outbound route to destination d, J ═ 1,2, …, Jk,JkTo transfer from k transfer stations MkThe total number of outbound routes to destination site d;
step two, acquiring an extended public transportation network based on the original public transportation network G:
2.1, obtaining an expanded site set V '═ O, M' }:
step 2.1.1 of obtaining the nth direct line l from the starting station o in the line set AnAnd said from the initiating station o to the k-th transfer station MkThe ith inbound route ofThe corresponding virtual departure nodes are respectively recorded asAndtherefore, all direct routes from the starting station O and virtual outbound nodes corresponding to all inbound routes from the starting station O to all transfer stations form a starting station set O together with the starting station O;
step 2.1.2 transfer station M of k in the line set AkThe ith inbound route ofThe corresponding virtual arriving node is marked asFrom the kth transfer station MkJ-th outbound route to destination site dThe corresponding virtual departure node is marked asSo that it will go from the origin station o to the k-th transfer station MkAnd the k-th transfer station MkThe virtual departure nodes corresponding to all outbound lines to the destination site d form a k-th transfer site set Mk'; further, all transfer site sets M '{ M'k|k=1,2,…,K};
2.2, constructing a new line set a ', so as to generate an extended public transport network G' ═ V ', a':
definition ofIndicating that starting from the start site o, the nth direct line lnCorresponding virtual departure nodeA waiting arc being a terminal point;
definition ofIndicating that starting from the starting station o, the k-th transfer station MkThe ith inbound route ofCorresponding virtual departure nodeA waiting arc being a terminal point; thus, a waiting arc set of the starting station point set O is obtained and recorded as
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual reach node ofStarting from the kth transfer station MkJ th outbound line ofVirtual departure nodeA waiting arc being a terminal point; thereby obtaining a k-th transfer site set Mk' waiting arc set, noteFurther obtain the waiting arc set of all the transfer station sets M', and record as
Set of waiting arcs WL from set of start stations OOAnd a waiting arc set WL of all transfer station sets MMForm a total waiting arc set WL, i.e. WL ═ WLO,WLM};
Definition ofRepresents the n-th direct line lnVirtual departure nodeTaking the target site d as a starting point and a running arc with the target site d as an end point, thereby obtaining a running arc set with virtual starting nodes of all direct lines as starting points and the target site d as an end point, and recording the running arc set as a starting point
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual departure nodeStarting from the kth transfer station MkThe ith inbound route ofVirtual reach node ofThe traveling arc is taken as the terminal, so that a traveling arc set taking the virtual departure nodes of all the inbound lines of all the transfer stations as the starting points and the virtual arrival nodes of all the inbound lines of all the transfer stations as the terminal points is obtained and recorded as
Definition ofIndicating that at the k-th transfer station MkJ th outbound line ofVirtual departure nodeThe travel arcs with the destination station d as the end point are taken as the starting points, so that a travel arc set with the destination station d as the end point and the virtual starting nodes of all outbound routes of all transfer stations as the starting points is obtained and recorded as
A total driving arc set RL is formed by a driving arc set L 'taking virtual starting nodes of all direct lines as a starting point and a destination station d as an end point, a driving arc set FL' taking virtual starting nodes of all inbound lines of all transfer stations as a starting point and virtual arrival nodes of all inbound lines of all transfer stations as an end point, and a driving arc set AL 'taking virtual starting nodes of all outbound lines of all transfer stations as a starting point and the destination station d as an end point, wherein RL is { L', FL ', AL' };
forming a new line set by a total waiting arc set WL and a total driving arc set RL, and recording as A' ═ { WL, RL };
step three, calculating the weight of the waiting arc and the driving arc on the expanded public transportation network:
step 3.1, setting the time t for the passenger to arrive at the initial station ooMeanwhile, adding the real-time public traffic information and the road condition information into the expanded public traffic network G ' ═ V ', A ';
step 3.2, assigning the driving arc and the waiting arc in the new route set a ' to corresponding weights ω, thereby obtaining a weighted directed graph G ═ (V ', a ', ω), wherein the weights ω include:
make the waiting arc set WL of the start station set OOWeight of (2)Indicating passengers taking the nth direct line lnAt time toThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toLast nth direct line lnIf the bus which first reaches the starting station o at the time t when the passenger reaches the starting station ooThen on the nth through line lnWhen there is no bus, then order
Make the waiting arc set WL of the start station set OOWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toThe last k transfer station MkThe ith inbound route ofThe time when the bus which reaches the starting stop o first reaches o, if the time toThen at the k-th transfer station MkThe ith inbound route ofWhen there is no bus, then order
Make the waiting arc set WL of the transfer station set MMWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofBus arrival MkThereafter, the passenger takes the k-th transfer station MkJ th outbound line ofUp to M firstkThe bus in question, i.e. the time required to waitWherein the content of the first and second substances,at a time toThe bus which reaches the initial station o first passes through the kth transfer station MkThe ith inbound route ofTo the kth transfer station MkAt the time of the day,is shown at the moment of timeThen at the k-th transfer station MkJ th outbound line ofUp to M firstkTime of day, ifThen no longer reaches the k-th transfer station MkAnd passes through the kth transfer station MkJ th outbound line ofThe bus of
The weight of the running arc set L' taking the virtual starting nodes of all the direct lines as the starting points and the destination station d as the end pointThe passengers take the bus which firstly arrives at the starting station o on the nth direct line lnBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the nth direct line l for the car based on real-time road conditionsnMu is a conversion coefficient, and mu > 1,for the nth through line lnThe number of the bus stations does not include the starting station o and the destination station d, and T is the average stop time of the bus at each station;
obtaining the nth direct line lnThe total number of the buses from the starting station o to the destination station d and the number of the buses is the same as the number of the bus route taken by the passenger at present and is marked as QnThe total number Q of the buses comprises the current bus;
Calculating the nth through line lnAll buses between the starting station o and the destination station d have the same bus route number as the current bus route number taken by the passengerAnd is recorded asNamely, it isThereby obtaining a weight that affects comfortWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient; finally, comprehensive weight based on the running time of the bus route taken by the passenger currently and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
the weights of the travel arc sets FL' taking the virtual departure nodes of all the inbound lines of all the transfer stations as the starting points and the virtual arrival nodes of all the inbound lines of all the transfer stations as the ending pointsThe passenger takes the bus which firstly reaches the starting station o at the k-th transfer station MkThe ith inbound route ofBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskThe ith inbound route ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkThe ith inbound route ofNumber of bus stations and does not include the starting station o and the kth transfer station MkT is the average stop time of the bus at each station;
obtaining the kth transfer station MkThe ith inbound route ofFrom the starting station o to the k-th transfer station MkThe total number of buses is the same as the number of the bus route taken by the passenger currently, and the total number of buses isA vehicle containing a current ride;
Calculating the k-th transfer station MkThe ith inbound route ofThe number of the bus route is the same as that of the bus route taken by the passenger currently, from the starting station o to the k-th transfer station MkAll buses in between at the momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient; finally, comprehensive weight based on the running time of the bus route taken by the passenger currently and the congestion degree of the bus is obtainedAnd isWherein alpha is the importance degree of passengers to the comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
weighting of a travel arc set AL' starting from virtual departure nodes of all outbound routes of all transfer stations and ending at a destination station dIndicating that the passenger takes the first time to arrive at the k-th transfer station MkThe bus in the jth outbound routeBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskJ th outbound line ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkJ th outbound line ofNumber of bus stations and does not include the kth transfer station MkAnd a destination station d, T is the average stop time of the bus at each station;
obtaining the kth transfer station MkJ th outbound line ofUp from the kth transfer station MkThe total number of buses to the buses between the destination stations d and the bus line number which is the same as the bus line number currently taken by the passenger, wherein the total number of the buses isA vehicle containing a current ride;
Calculating the k-th transfer station MkJ th outbound line ofThe number of the bus route on the bus is the same as that of the bus route currently taken by the passenger, and the k-th transfer station MkAll buses to destination station d at that momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers into the influence degree, c is an adjustment coefficient, and finally, the comprehensive weight based on the running time of the bus route taken by the passengers and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
step four, searching an optimal path from the starting station o to the destination station d in the expanded public transportation network graph G ″ (V ', A', omega) after the weight information is loaded by using a combined dynamic programming algorithm:
step 4.0, dividing the weighted directed graph G ═ V ', a', ω) into a direct line network, a transfer line network and a hybrid line network according to whether transfer lines exist, and executing step 4.1 and step 4.3 if the weighted directed graph G ═ V ', a', ω) is the direct line network; if the weighted directed graph G ″ (V ', a', ω) is the transfer line network, step 4.2 and step 4.3 are performed; if the weighted directed graph G ″ (V ', a', ω) is the hybrid line network, performing step 4.1 to step 4.3;
step 4.1, obtaining the optimal path of the direct line network:
step 4.1.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is used as an optimal value function fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1)=0;
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all direct lines departing from the starting station o;
when a is 3, s is initializedaDestination site d;
step 4.1.2, enabling n to be 1;
Step 4.1.4, assigning N +1 to N, judging whether N is greater than N, if so, executing step 4.1.5, otherwise, executing step 4.1.3;
step 4.1.5, calculateLet ln *Is composed ofThe minimum element in the state variable is corresponding to a line of the state variable;
step 4.2, obtaining the optimal path of the transfer line network:
step 4.2.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is used as an optimal value function fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1)=0;
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 3, s is initializedaVirtual arrival nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 4, s is initializedaThe virtual departure nodes corresponding to all outbound lines from all transfer stations to the destination station;
when a is 5, s is initializedaDestination site d;
step 4.2.2, enabling k to be 1;
step 4.2.3, changing i to 1;
step 4.2.5, assigning I +1 to I, and judging that I is larger than IkIf so, go to step 4.2.6, otherwise go to step 4.2.4;
step 4.2.6, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.7, otherwise, executing step 4.2.3;
step 4.2.7, making k equal to 1;
step 4.2.8, changing j to 1;
Order toIs composed ofThe minimum element in the station is corresponding to the inbound line of the state variable;
step 4.2.10, J +1 is assigned to J, and J is judged to be larger than JkIf so, performing step 4.2.11, otherwise, performing step 4.2.9;
step 4.2.11, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.12, otherwise, executing step 4.2.8;
Order toIs composed ofThe minimum element in the state variable is corresponding to an outbound line of the state variable;
and 4.3, comprehensively comparing the travel time of the direct line and the transfer line, so as to obtain an optimal path of the weighted directed graph G ″ (V ', a', ω):
if f3(d)≤f5(d) Or when the weighted directed graph G ″ (V ', a', ω) is a direct line network, selecting a direct line, and the optimal direct line is a direct line l taken from the start station on *Get the bus to the destination station d, record as
If f3(d)>f5(d) Or when the weighted directed graph G ″ (V ', A', omega) is the transfer line network, the transfer line is selected, and the optimal transfer line is the ith inbound line from the start station o to the kth transfer stationBus to kth transfer station MkTransfer, then take the jth outbound routeGet the bus to the destination station d, record as
If f3(d)=f5(d) At + ∞, the optimal route is empty, indicating the time t at which the passenger arrives at the origin station ooWhen the passenger leaves, the passenger cannot catch up with the last bus, and the trip cannot be completed;
step five, acquiring the current position of the passenger, judging whether the current position reaches a new station, if not, updating the current position of the passenger, then repeatedly executing the step five, and if so, recording the new station as o';
if the new station o 'is not the destination station d, assigning o' to the current position o of the passenger, and executing the step one;
and if the new station o' is the destination station d, ending the bus trip planning.
Compared with the prior art, the invention has the beneficial effects that:
1. at present, a map APP plans a trip route again according to the real-time position of a vehicle which a passenger wants to transfer, and recommends a trip scheme according to the length of trip time, the invention further considers the number of passengers in the bus in real time, comprehensively considers the travel time of the bus route taken by the passenger currently and the congestion degree of the bus according to the trip scheme selected by the passenger before and the position at the moment to obtain a comprehensive weight, similarly, calculates the comprehensive weight of other trip schemes, loads the weight into an extended bus network diagram, calculates the optimal value of each trip scheme by using a combined dynamic programming algorithm to further determine whether to transfer, if so, obtains the transfer scheme based on the trip scheme selected by the passenger before, namely transfers at which station and what route to transfer, and avoids the situation that the passenger wants to transfer and whether the transfer scheme accords with the expected worry of the passenger on the taking route, the problems that the passengers are difficult to transfer and troublesome to transfer in public trips and no data reference is caused in the transfer are solved, so that the passengers can use public transport to travel more humanizedly.
2. According to the invention, the weight of the crowded bus route is increased according to different requirements of different passengers on comfort, so that the passengers with different requirements can select different routes, the problem that the same recommended route is given to different passenger requirements by the current map APP is solved, and the map is an alternative 'customized bus'. The bus pressure during peak periods is also partially relieved by the different recommended routes for different passenger demands.
3. According to the invention, through the continuous updating of the real-time position and the continuous updating of the road information in the process of taking the bus by the passenger, when the bus arrives at the next stop, the stop is taken as a new starting stop for going out, the optimal path is recalculated and repeated until the stop arrives at the destination stop, and the problem of immobilization of the transfer route in the existing map APP is solved, so that the bus transfer has selectivity, and the selectivity of the passenger is improved. Meanwhile, when a traffic accident happens on the front line, the traffic accident can be timely fed back to passengers, and the efficiency of taking the bus under the condition is greatly improved. And part of the bus pressure is relieved through selective transfer.
Drawings
FIG. 1 is a diagram of an original route network for passengers traveling according to the present invention;
FIG. 2 is a flow chart of the method for acquiring an original bus network for passenger travel according to the invention;
FIG. 3 is a schematic diagram of an extended public transportation network based on an original network according to the present invention;
FIG. 4 is a general flow chart of the method of the present invention.
Detailed Description
In this embodiment, a bus trip planning method considering active transfer of passengers in transit is to recalculate the weight of a bus route by considering different demands of different passengers on comfort levels, and obtain a comprehensive optimal route based on the comfort levels and the bus travel time, so that the passengers with different demands have different bus taking schemes, and the user trip scheme is more humanized, and in the bus travel process, the optimal bus route is continuously updated, so that selectivity is provided for the transfer of the passengers in transit, and specifically, as shown in fig. 4, the method is performed according to the following steps:
step one, obtaining an original public transportation network of passenger travel:
obtaining an original public transportation network G (V, A) of the passenger trip according to an initial station o and a destination station d of the passenger trip, wherein V is a station set, and V is { o, M, d }; m is a set of transfer stations, and M ═ M1,M2,…,Mk,…,MKIn which M iskK is the kth transfer station, K is 1,2, …, and K is the total number of transfer stations; as shown in fig. 2, all the direct routes and transfer route sets between the starting station and the destination station are obtained from the starting station and the destination station input by the user, and the original public transportation network is obtained. A is the set of lines in the original public transportation network G, and a ═ { L, FL, AL }, where L is the set of lines that go straight between the origin station o and the destination station d, and L ═ L1,l2,…,ln,…,lN},lnN is the nth direct line between the starting station o and the destination station d, wherein N is 1,2, …, and N is the total number of the direct lines; FL is a line set from the origination station o to each transfer station in the transfer station set M, and FL { FL ═ FL1,FL2,…,FLk,…,FLKIn which FL iskFrom the starting station o to the k-th transfer station MkA line set of inbound lines of, andwherein the content of the first and second substances,from the starting station o to the k-th transfer station MkI is 1,2, …, Ik,IkFrom the starting station o to the k-th transfer station MkTotal number of inbound lines; AL is the outbound line set from transfer site set M to destination site d, and AL ═ AL1,AL2,…,ALk,…,ALK},ALkTo transfer from the kth transfer station MkA set of outbound routes to destination site d, andwherein the content of the first and second substances,to transfer from the kth transfer station MkJ-th outbound route to destination d, J ═ 1,2, …, Jk,JkTo transfer from k transfer stations MkTotal number of outbound routes to destination site d. As shown in fig. 1, which is the obtained original public transportation network diagram.
Step two, acquiring an extended public transportation network based on the original public transportation network G:
2.1, the expanded site set V 'is obtained from the site set V as { O, M':
step 2.1.1 direct line l from the start site o in the line set AnAnd from the starting station o to the k-th transfer station MkThe ith inbound route ofThe corresponding virtual departure nodes are respectively recorded asAndthe virtual departure node is set to facilitate calculation of latency weights in the future so that all direct lines from the origin site o will be sentThe virtual outbound nodes corresponding to all inbound lines from the starting station O to all transfer stations and the starting station O jointly form a starting station set O;
step 2.1.2 transfer station M of k in line set AkThe ith inbound route ofThe corresponding virtual arriving node is marked asFrom the kth transfer station MkJ-th outbound route to destination site dThe corresponding virtual departure node is marked asFrom a virtual to a nodeAnd virtual departure nodeA new network can be constructed, and transfer waiting time is quantitatively calculated. So that it will go from the origin station o to the k-th transfer station MkAnd the k-th transfer station MkThe virtual departure nodes corresponding to all outbound lines to the destination site d form a k-th transfer site set Mk'; further, all transfer site sets M '{ M'k|k=1,2,…,K};
2.2, constructing a new line set a ', so as to generate an extended public transport network G' ═ V ', a':
definition ofIndicating that starting from the start site o, the nth direct line lnCorresponding virtual departure nodeA waiting arc being a terminal point;
definition ofIndicating that starting from the starting station o, the k-th transfer station MkThe ith inbound route ofCorresponding virtual departure nodeA waiting arc being a terminal point; the waiting arc set representing that the passengers wait for the bus to arrive at the starting station O so as to obtain the starting station set O is recorded
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual reach node ofStarting from the kth transfer station MkJ th outbound line ofVirtual departure nodeA waiting arc being a terminal point; representing passengers arriving at a virtual arrival nodeThen waiting for the transfer bus to arrive at the virtual busStarting nodeThereby obtaining a k-th transfer site set Mk' waiting arc set, noteFurther obtain the waiting arc set of all the transfer station sets M', and record as
Set of waiting arcs WL from set of start stations OOAnd a waiting arc set WL of all transfer station sets MMForm a total waiting arc set WL, i.e. WL ═ WLO,WLM};
Definition ofRepresents the n-th direct line lnVirtual departure nodeAs a starting point, a driving arc with the destination station d as an end point, that is, a driving process of the bus from the departure station to the destination station, is obtained, and a driving arc set with the virtual departure nodes of all the direct lines as the starting point and the destination station d as the end point is recorded as
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual departure nodeStarting from the kth transfer stationPoint MkThe ith inbound route ofVirtual reach node ofThe driving arc which is the terminal point, namely the driving process of the bus from the departure station to the transfer station, thereby obtaining a driving arc set which takes the virtual departure nodes of all the inbound lines of all the transfer stations as the starting point and the virtual arrival nodes of all the inbound lines of all the transfer stations as the terminal point, and recording as the driving arc set
Definition ofIndicating that at the k-th transfer station MkJ th outbound line ofVirtual departure nodeAs a starting point, a travel arc with the destination station d as an end point, that is, a travel process of the bus from the departure station to the transfer station, is obtained, and a travel arc set with the destination station d as an end point and virtual departure nodes of all outbound routes of all transfer stations as a starting point is recorded as
A total driving arc set RL is formed by a driving arc set L 'taking virtual starting nodes of all direct lines as a starting point and a destination station d as an end point, a driving arc set FL' taking virtual starting nodes of all inbound lines of all transfer stations as a starting point and virtual arrival nodes of all inbound lines of all transfer stations as an end point, and a driving arc set AL 'taking virtual starting nodes of all outbound lines of all transfer stations as a starting point and the destination station d as an end point, wherein RL is { L', FL ', AL' };
forming a new line set by a total waiting arc set WL and a total driving arc set RL, and recording as A' ═ { WL, RL };
step three, calculating the weight of the waiting arc and the driving arc on the expanded public transportation network:
step 3.1, setting the time t for the passenger to arrive at the initial station ooMeanwhile, adding the real-time public traffic information and the road condition information into the expanded public traffic network G ' ═ V ', A ';
step 3.2, assigning the driving arc and the waiting arc in the new route set a ' to corresponding weights ω, thereby obtaining a weighted directed graph G ═ (V ', a ', ω), wherein the weights ω include:
make the waiting arc set WL of the start station set OOWeight of (2)Indicating passengers taking the nth direct line lnAt time toThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toLast nth direct line lnIf the bus which first reaches the starting station o at the time t when the passenger reaches the starting station ooThen on the nth through line lnWhen there is no bus, then order
Wait for initiating site set OArc set WLOWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toThe last k transfer station MkThe ith inbound route ofThe time when the bus which reaches the starting stop o first reaches o, if the time toThen at the k-th transfer station MkThe ith inbound route ofWhen there is no bus, then order
Make the waiting arc set WL of the transfer station set MMWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofBus arrival MkThereafter, the passenger takes the k-th transfer station MkJ th outbound line ofThe upper first reachesMkThe bus in question, i.e. the time required to waitWherein the content of the first and second substances,at a time toThe bus which reaches the initial station o first passes through the kth transfer station MkThe ith inbound route ofTo the kth transfer station MkAt the time of the day,is shown at the moment of timeThen at the k-th transfer station MkJ th outbound line ofUp to M firstkTime of day, ifThen no longer reaches the k-th transfer station MkAnd passes through the kth transfer station MkJ th outbound line ofThe bus of
The weight of the running arc set L' taking the virtual starting nodes of all the direct lines as the starting points and the destination station d as the end pointThe passengers take the bus which firstly arrives at the starting station o on the nth direct line lnBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the nth direct line l for the car based on real-time road conditionsnMu is a conversion coefficient, and mu > 1,for the nth through line lnThe number of the bus stations does not include the starting station o and the destination station d, and T is the average stop time of the bus at each station;
obtaining the nth direct line lnThe total number of the buses from the starting station o to the destination station d, which is the same as the number of the bus route taken by the passenger currently, is recorded asTotal number of busesA vehicle containing a current ride;
Calculating the nth through line lnAll buses between the starting station o and the destination station d have the same bus route number as the current bus route number taken by the passengerAnd is recorded asNamely, it isThe average number of people on the buses numbered by the same bus line can effectively estimate the line lnSo as to reflect the comfort of the bus in which the passenger is currently riding, and such calculation is the same hereafter. Thereby obtaining a weight that affects comfortWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient; k and c are obtained by fitting a large number of data, and all k and c are the same as this step hereinafter. Finally, comprehensive weight based on the running time of the bus route taken by the passenger currently and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
the weights of the travel arc sets FL' taking the virtual departure nodes of all the inbound lines of all the transfer stations as the starting points and the virtual arrival nodes of all the inbound lines of all the transfer stations as the ending pointsThe passenger takes the bus which firstly reaches the starting station o at the k-th transfer station MkThe ith inbound route ofBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskThe ith inbound route ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkThe ith inbound route ofNumber of bus stations and does not include the starting station o and the kth transfer station MkT is the average stop time of the bus at each station;
obtaining the kth transfer station MkThe ith inbound route ofFrom the starting station o to the k-th transfer station MkThe total number of buses and the total number of buses with the same serial number as the bus route taken by the passenger currentlyA vehicle containing a current ride;
Calculating the k-th transfer station MkThe ith inbound route ofThe number of the bus route is the same as that of the bus route taken by the passenger currently, from the starting station o to the k-th transfer station MkAll buses in between at the momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient. Finally, comprehensive weight based on the running time of the bus route taken by the passenger currently and the congestion degree of the bus is obtainedAnd isWherein alpha is the importance degree of passengers to the comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
weighting of a travel arc set AL' starting from virtual departure nodes of all outbound routes of all transfer stations and ending at a destination station dIndicating that the passenger takes the first time to arrive at the k-th transfer station MkThe bus in the jth outbound routeBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskJ th outbound line ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkJ th outbound line ofNumber of bus stations and does not include the kth transfer station MkAnd a destination station d, T is the average stop time of the bus at each station;
obtaining the kth transfer station MkJ th outbound line ofUp from the kth transfer station MkThe total number of buses to the buses between the destination stations d and the number of the buses with the same number as the current bus route taken by the passenger, and the total number of the busesA vehicle containing a current ride;
Calculating the k-th transfer station MkJ th outbound line ofOn the bus line with the same number as the current passenger, from the firstk transfer stations MkAll buses to destination station d at that momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers into the influence degree, c is an adjustment coefficient, and finally, the comprehensive weight based on the running time of the bus route taken by the passengers and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to [0,1 ]]. When alpha is equal to 0, the bus line with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus line with the highest comfort level is expected to be obtained by the passenger. When alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented; an expanded public transportation network diagram is obtained, as shown in fig. 3.
Step four, searching an optimal path from the starting station o to the destination station d in the expanded public transportation network graph G ″ (V ', A', omega) after the weight information is loaded by using a combined dynamic programming algorithm:
step 4.0, dividing the weighted directed graph G ═ V ', a', ω) into a direct line network, a transfer line network and a hybrid line network according to whether transfer lines exist, and executing step 4.1 and step 4.3 if the weighted directed graph G ═ V ', a', ω) is the direct line network; if the weighted directed graph G ″ (V ', a', ω) is the transfer line network, step 4.2 and step 4.3 are performed; if the weighted directed graph G ″ (V ', a', ω) is the hybrid line network, performing step 4.1 to step 4.3;
step 4.1, obtaining the optimal path of the direct line network:
step 4.1.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is used as an optimal value function fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1) 0; and the target site is reached, and the circular calculation is convenient.
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all direct lines departing from the starting station o;
when a is 3, s is initializedaDestination site d;
step 4.1.2, enabling n to be 1;
Step 4.1.4, assigning N +1 to N, judging whether N is greater than N, if so, executing step 4.1.5, otherwise, executing step 4.1.3; this step traverses all virtual departure nodes of all direct lines.
Step 4.1.5, calculateLet ln *Is composed ofThe minimum element in the state variable is corresponding to a line of the state variable;
step 4.2, obtaining the optimal path of the transfer line network:
step 4.2.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is used as an optimal value function fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1)=0;
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 3, s is initializedaVirtual arrival nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 4, s is initializedaThe virtual departure nodes corresponding to all outbound lines from all transfer stations to the destination station;
when a is 5, s is initializedaDestination site d;
step 4.2.2, enabling k to be 1;
step 4.2.3, changing i to 1;
step 4.2.5, assigning I +1 to I, and judging that I is larger than IkIf so, go to step 4.2.6, otherwise go to step 4.2.4; this step traverses all the virtual departure nodes in the starting set of stations O in all the transfer routes.
Step 4.2.6, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.7, otherwise, executing step 4.2.3; all the virtual departure nodes in the start site set O and the virtual arrival nodes in the transfer site set M' in all the transfer routes are traversed by step 4.2.5 and step 4.2.6.
Step 4.2.7, making k equal to 1;
step 4.2.8, changing j to 1;
Order toIs composed ofThe minimum element in the station is corresponding to the inbound line of the state variable;
step 4.2.10, J +1 is assigned to J, and J is judged to be larger than JkIf so, performing step 4.2.11, otherwise, performing step 4.2.9;
step 4.2.11, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.12, otherwise, executing step 4.2.8; all virtual departure nodes in the transfer site set M' in all transfer lanes are traversed by step 4.2.10 and step 4.2.10.
Order toIs composed ofThe minimum element in the state variable is corresponding to an outbound line of the state variable;
and 4.3, comprehensively comparing the travel time of the direct line and the transfer line, so as to obtain an optimal path of the weighted directed graph G ″ (V ', a', ω):
if f3(d)≤f5(d) Or when the weighted directed graph G ″ (V ', a', ω) is a direct line network, selecting a direct line, and the optimal direct line is a direct line l taken from the start station on *Get the bus to the destination station d, record as
If f3(d)>f5(d) Or when the weighted directed graph G ″ (V ', A', omega) is the transfer line network, the transfer line is selected, and the optimal transfer line is the ith inbound line from the start station o to the kth transfer stationBus to kth transfer station MkTransfer, then take the jth outbound routeGet the bus to the destination station d, record as
If f3(d)=f5(d) At + ∞, the optimal route is empty, indicating the time t at which the passenger arrives at the origin station ooWhen the passenger leaves, the passenger cannot catch up with the last bus, and the trip cannot be completed;
step five, acquiring the current position of the passenger, judging whether the current position reaches a new station, if not, updating the current position of the passenger, then repeatedly executing the step five, and if so, recording the new station as o';
if the new station o 'is not the destination station d, assigning o' to the current position o of the passenger, and executing the step one; therefore, the real-time optimal path is continuously circulated and updated.
And if the new station o' is the destination station d, ending the bus trip planning.
Claims (1)
1. A bus trip planning method considering active transfer of passengers in the way is characterized by comprising the following steps:
step one, obtaining an original public transportation network of passenger travel:
obtaining an original public transportation network G (V, A) of the passenger trip according to an initial station o and a destination station d of the passenger trip, wherein V is a station set, and V is { o, M, d }; m is a set of transfer stations, and M ═ M1,M2,…,Mk,…,MKIn which M iskK is the kth transfer station, K is 1,2, …, and K is the total number of transfer stations; a is a set of lines in the original public transportation network G, and a ═ { L, FL, AL }, where L is a set of lines that go straight between the origin station o and the destination station d, and L ═ L1,l2,…,ln,…,lN},lnN is the nth direct line between the starting station o and the destination station d, wherein N is 1,2, …, and N is the total number of the direct lines; FL is a line set from the origination station o to each transfer station in the transfer station set M, and FL { FL ═ FL1,FL2,…,FLk,…,FLKIn which FL iskFrom the starting station o to the k-th transfer station MkA line set of inbound lines of, andwherein the content of the first and second substances,from the starting station o to the k-th transfer station MkI is 1,2, …, Ik,IkFrom the starting station o to the k-th transfer station MkTotal number of inbound lines; AL being slave transfer stationSet M to destination d, and AL ═ AL1,AL2,…,ALk,…,ALK},ALkTo move from the k-th transfer station MkA set of outbound routes to destination site d, andwherein the content of the first and second substances,to move from the k-th transfer station MkJ-th outbound route to destination d, J ═ 1,2, …, Jk,JkTo transfer from k transfer stations MkThe total number of outbound routes to destination site d;
step two, acquiring an extended public transportation network based on the original public transportation network G:
2.1, obtaining an expanded site set V '═ O, M' }:
step 2.1.1 of obtaining the nth direct line l from the starting station o in the line set AnAnd said from the initiating station o to the k-th transfer station MkThe ith inbound route ofThe corresponding virtual departure nodes are respectively recorded asAndtherefore, all direct routes from the starting station O and virtual outbound nodes corresponding to all inbound routes from the starting station O to all transfer stations form a starting station set O together with the starting station O;
step 2.1.2 transfer station M of k in the line set AkThe ith inbound route ofThe corresponding virtual arriving node is marked asFrom the kth transfer station MkJ-th outbound route to destination site dThe corresponding virtual departure node is marked asSo that it will go from the origin station o to the k-th transfer station MkAnd the k-th transfer station MkThe virtual departure nodes corresponding to all outbound lines to the destination site d form a kth transfer site set M'k(ii) a Further, all transfer site sets M '{ M'k|k=1,2,…,K};
2.2, constructing a new line set a ', so as to generate an extended public transport network G' ═ V ', a':
definition ofIndicating that starting from the start site o, the nth direct line lnCorresponding virtual departure nodeA waiting arc being a terminal point;
definition ofIndicating that starting from the starting station o, the k-th transfer station MkThe ith inbound route ofCorresponding virtual departure nodeA waiting arc being a terminal point; thus, a waiting arc set of the starting station point set O is obtained and recorded as
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual reach node ofStarting from the kth transfer station MkJ th outbound line ofVirtual departure nodeA waiting arc being a terminal point; thereby obtaining a k < th > transfer site set M'kWaiting arc set ofFurther obtain the waiting arc set of all the transfer station sets M', and record as
Set of waiting arcs WL from set of start stations OOAnd a waiting arc set WL of all transfer station sets MMForm a total waiting arc set WL, i.e. WL ═ WLO,WLM};
Definition ofRepresents the n-th direct line lnVirtual departure nodeTaking the target site d as a starting point and a running arc with the target site d as an end point, thereby obtaining a running arc set with virtual starting nodes of all direct lines as starting points and the target site d as an end point, and recording the running arc set as a starting point
Definition ofIndicating that at the k-th transfer station MkThe ith inbound route ofVirtual departure nodeStarting from the kth transfer station MkThe ith inbound route ofVirtual reach node ofThe traveling arc is taken as the terminal, so that a traveling arc set taking the virtual departure nodes of all the inbound lines of all the transfer stations as the starting points and the virtual arrival nodes of all the inbound lines of all the transfer stations as the terminal points is obtained and recorded as
Definition ofIs expressed ask transfer stations MkJ th outbound line ofVirtual departure nodeThe travel arcs with the destination station d as the end point are taken as the starting points, so that a travel arc set with the destination station d as the end point and the virtual starting nodes of all outbound routes of all transfer stations as the starting points is obtained and recorded as
A total driving arc set RL is formed by a driving arc set L 'taking virtual starting nodes of all direct lines as a starting point and a destination station d as an end point, a driving arc set FL' taking virtual starting nodes of all inbound lines of all transfer stations as a starting point and virtual arrival nodes of all inbound lines of all transfer stations as an end point, and a driving arc set AL 'taking virtual starting nodes of all outbound lines of all transfer stations as a starting point and the destination station d as an end point, wherein RL is { L', FL ', AL' };
forming a new line set by a total waiting arc set WL and a total driving arc set RL, and recording as A' ═ { WL, RL };
step three, calculating the weight of the waiting arc and the driving arc on the expanded public transportation network:
step 3.1, setting the time t for the passenger to arrive at the initial station ooMeanwhile, adding the real-time public traffic information and the road condition information into the expanded public traffic network G ' ═ V ', A ';
step 3.2, assigning the driving arc and the waiting arc in the new route set a ' to corresponding weights ω, thereby obtaining a weighted directed graph G ═ (V ', a ', ω), wherein the weights ω include:
make the waiting arc set WL of the start station set OOWeight of (2)Indicating passengers taking the nth direct line lnAt time toThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toLast nth direct line lnIf the bus which first reaches the starting station o at the time t when the passenger reaches the starting station ooThen on the nth through line lnWhen there is no bus, then order
Make the waiting arc set WL of the start station set OOWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofThe time required for the bus which reaches the starting station o first, i.e.Wherein the content of the first and second substances,is shown at time toThe last k transfer station MkThe ith inbound route ofThe time when the bus which reaches the starting stop o first reaches o, if the time toThen at the k-th transfer station MkThe ith inbound route ofWhen there is no bus, then order
Make the waiting arc set WL of the transfer station set MMWeight of (2)Indicating passengers to take the k-th transfer station MkThe ith inbound route ofBus arrival MkThereafter, the passenger takes the k-th transfer station MkJ th outbound line ofUp to M firstkThe bus in question, i.e. the time required to waitWherein the content of the first and second substances,at a time toThe bus which reaches the initial station o first passes through the kth transfer station MkThe ith inbound route ofTo the kth transfer station MkAt the time of the day,is shown at the moment of timeThen at the k-th transfer station MkJ th outbound line ofUp to M firstkTime of day, ifThen no longer reaches the k-th transfer station MkAnd passes through the kth transfer station MkJ th outbound line ofThe bus of
The weight of the running arc set L' taking the virtual starting nodes of all the direct lines as the starting points and the destination station d as the end pointThe passengers take the bus which firstly arrives at the starting station o on the nth direct line lnBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the nth direct line l for the car based on real-time road conditionsnMu is a conversion coefficient, and mu > 1,for the nth through line lnThe number of the bus stations does not include the starting station o and the destination station d, and T is the average stop time of the bus at each station;
obtaining the nth direct line lnThe total number of the buses from the starting station o to the destination station d and the number of the buses is the same as the number of the bus route taken by the passenger at present and is marked as QnThe total number Q of the buses comprises the current bus;
Calculating the nth through line lnAll buses between the starting station o and the destination station d have the same bus route number as the current bus route number taken by the passengerAnd is recorded asNamely, it isThereby obtaining a weight that affects comfortWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient; finally, comprehensive weight based on the running time of the bus route taken by the passenger currently and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to[0,1](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
the weights of the travel arc sets FL' taking the virtual departure nodes of all the inbound lines of all the transfer stations as the starting points and the virtual arrival nodes of all the inbound lines of all the transfer stations as the ending pointsThe passenger takes the bus which firstly reaches the starting station o at the k-th transfer station MkThe ith inbound route ofBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskThe ith inbound route ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkThe ith inbound route ofNumber of bus stations and does not include the starting station o and the kth transfer station MkT is the average stop time of the bus at each station;
obtaining the kth transfer siteMkThe ith inbound route ofFrom the starting station o to the k-th transfer station MkThe total number of buses is the same as the number of the bus route taken by the passenger currently, and the total number of buses isA vehicle containing a current ride;
Calculating the k-th transfer station MkThe ith inbound route ofThe number of the bus route is the same as that of the bus route taken by the passenger currently, from the starting station o to the k-th transfer station MkAll buses in between at the momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers in the bus into the influence degree, and c is an adjustment coefficient; the final result is based on the current riding of the passengerComprehensive weight of travel time of bus route and bus crowding degreeAnd isWherein alpha is the importance degree of passengers to the comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
weighting of a travel arc set AL' starting from virtual departure nodes of all outbound routes of all transfer stations and ending at a destination station dIndicating that the passenger takes the first time to arrive at the k-th transfer station MkThe bus in the jth outbound routeBased on the time of travel of the real-time road conditions, i.e.Wherein the content of the first and second substances,passing through the kth transfer station M for the car based on real-time road conditionskJ th outbound line ofMu is a conversion coefficient, and mu > 1,for the k transfer station MkThe j th line ofStation lineNumber of bus stations and does not include the kth transfer station MkAnd a destination station d, T is the average stop time of the bus at each station;
obtaining the kth transfer station MkJ th outbound line ofUp from the kth transfer station MkThe total number of buses to the buses between the destination stations d and the bus line number which is the same as the bus line number currently taken by the passenger, wherein the total number of the buses isA vehicle containing a current ride;
Calculating the k-th transfer station MkJ th outbound line ofThe number of the bus route on the bus is the same as that of the bus route currently taken by the passenger, and the k-th transfer station MkAll buses to destination station d at that momentAnd is recorded asNamely, it isThereby deriving a weight that affects comfortAnd isWherein k is a conversion coefficient for converting the number of the passengers into the influence degree, c is an adjustment coefficient, and finally, the comprehensive weight based on the running time of the bus route taken by the passengers and the congestion degree of the bus is obtainedAnd isWherein alpha is the degree of importance of passengers to comfort, and alpha belongs to [0,1 ]](ii) a When alpha is equal to 0, the bus route with the shortest travel time is expected to be obtained by the passenger, and when alpha is equal to 1, the bus route with the highest comfort level is expected to be obtained by the passenger; when alpha belongs to (0,1), the optimal bus route obtained by comprehensively considering the travel time and the comfort level of the passenger is represented;
step four, searching an optimal path from the starting station o to the destination station d in the expanded public transportation network graph G ″ (V ', A', omega) after the weight information is loaded by using a combined dynamic programming algorithm:
step 4.0, dividing the weighted directed graph G ═ V ', a', ω) into a direct line network, a transfer line network and a hybrid line network according to whether transfer lines exist, and executing step 4.1 and step 4.3 if the weighted directed graph G ═ V ', a', ω) is the direct line network; if the weighted directed graph G ″ (V ', a', ω) is the transfer line network, step 4.2 and step 4.3 are performed; if the weighted directed graph G ″ (V ', a', ω) is the hybrid line network, performing step 4.1 to step 4.3;
step 4.1, obtaining the optimal path of the direct line network:
step 4.1.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is used as an optimal value function fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1)=0;
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all direct lines departing from the starting station o;
when a is 3, s is initializedaDestination site d;
step 4.1.2, enabling n to be 1;
Step 4.1.4, assigning N +1 to N, judging whether N is greater than N, if so, executing step 4.1.5, otherwise, executing step 4.1.3;
step 4.1.5, calculateLet ln *Is composed ofThe minimum element in the state variable is corresponding to a line of the state variable;
step 4.2, obtaining the optimal path of the transfer line network:
step 4.2.1, let a denote the current stage, let the state variable saRepresenting the initial possible node position of the current stage a, decision variable uaAn arc representing the initial possible selection of the current phase a, defining an index function Va(s1,u1,…sa-1,ua-1,sa) The weight sum of the waiting arcs and the driving arcs corresponding to all the bus routes selected before the current stage a is set as the optimal valueFunction fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa) Define boundary condition f1(s1)=0;
When a is 1, s is initializedaIs the starting site o;
when a is 2, s is initializedaVirtual departure nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 3, s is initializedaVirtual arrival nodes corresponding to all inbound lines from the starting station o to all transfer stations;
when a is 4, s is initializedaThe virtual departure nodes corresponding to all outbound lines from all transfer stations to the destination station;
when a is 5, s is initializedaDestination site d;
step 4.2.2, enabling k to be 1;
step 4.2.3, changing i to 1;
step 4.2.5, assigning I +1 to I, and judging that I is larger than IkIf so, go to step 4.2.6, otherwise go to step 4.2.4;
step 4.2.6, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.7, otherwise, executing step 4.2.3;
step 4.2.7, making k equal to 1;
step 4.2.8, changing j to 1;
Order toIs composed ofThe minimum element in the station is corresponding to the inbound line of the state variable;
step 4.2.10, J +1 is assigned to J, and J is judged to be larger than JkIf so, performing step 4.2.11, otherwise, performing step 4.2.9;
step 4.2.11, assigning K +1 to K, judging whether K is greater than K, if so, executing step 4.2.12, otherwise, executing step 4.2.8;
Order toIs composed ofThe minimum element in the state variable is corresponding to an outbound line of the state variable;
and 4.3, comprehensively comparing the travel time of the direct line and the transfer line, so as to obtain an optimal path of the weighted directed graph G ″ (V ', a', ω):
if f3(d)≤f5(d) Or when the weighted directed graph G ″ (V ', a', ω) is a direct line network, selecting a direct line, and the optimal direct line is a direct line l taken from the start station on *Get the bus to the destination station d, record as
If f3(d)>f5(d) Or when the weighted directed graph G ″ (V ', A', omega) is the transfer line network, the transfer line is selected, and the optimal transfer line is the ith inbound line from the start station o to the kth transfer stationBus to kth transfer station MkTransfer, then take the jth outbound routeGet the bus to the destination station d, record as
If f3(d)=f5(d) At + ∞, the optimal route is empty, indicating the time t at which the passenger arrives at the origin station ooWhen the passenger leaves, the passenger cannot catch up with the last bus, and the trip cannot be completed;
step five, acquiring the current position of the passenger, judging whether the current position reaches a new station, if not, updating the current position of the passenger, then repeatedly executing the step five, and if so, recording the new station as o';
if the new station o 'is not the destination station d, assigning o' to the current position o of the passenger, and executing the step one;
and if the new station o' is the destination station d, ending the bus trip planning.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010096480.1A CN111311002B (en) | 2020-02-17 | 2020-02-17 | Bus trip planning method considering active transfer of passengers in transit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010096480.1A CN111311002B (en) | 2020-02-17 | 2020-02-17 | Bus trip planning method considering active transfer of passengers in transit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111311002A CN111311002A (en) | 2020-06-19 |
CN111311002B true CN111311002B (en) | 2022-02-11 |
Family
ID=71147134
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010096480.1A Active CN111311002B (en) | 2020-02-17 | 2020-02-17 | Bus trip planning method considering active transfer of passengers in transit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111311002B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112131437B (en) * | 2020-11-25 | 2021-03-05 | 深圳市城市交通规划设计研究中心股份有限公司 | Multi-mode traffic network construction method and device based on graph database |
CN113053156B (en) * | 2021-03-31 | 2022-09-02 | 华录智达科技股份有限公司 | Intelligent bus station addressing method based on bus radius method |
CN114275014B (en) * | 2021-12-20 | 2023-07-28 | 佳都科技集团股份有限公司 | Subway congestion degree relieving method and device, server and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107545322A (en) * | 2017-07-28 | 2018-01-05 | 东北大学 | A kind of method for alleviating public traffic network time delay based on reduction congestion weight |
CN108197724A (en) * | 2017-12-02 | 2018-06-22 | 山东大学 | Efficiency weight calculation and public transport scheme performance estimating method in public transport complex network |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8494771B2 (en) * | 2011-09-07 | 2013-07-23 | Microsoft Corporation | Journey planning in public transportation networks |
EP3455590A4 (en) * | 2017-06-21 | 2019-07-24 | Beijing Didi Infinity Technology And Development Co., Ltd. | Systems and methods for route planning |
-
2020
- 2020-02-17 CN CN202010096480.1A patent/CN111311002B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107545322A (en) * | 2017-07-28 | 2018-01-05 | 东北大学 | A kind of method for alleviating public traffic network time delay based on reduction congestion weight |
CN108197724A (en) * | 2017-12-02 | 2018-06-22 | 山东大学 | Efficiency weight calculation and public transport scheme performance estimating method in public transport complex network |
Non-Patent Citations (3)
Title |
---|
公交出行路径蚂蚁算法;李文勇 等;《交通运输工程学报》;20041231;全文 * |
基于居民出行行为的城市多级公交线网时空协调优化理论与方法;高健;《中国优秀博硕士学位论文全文数据库(博士)工程科技Ⅱ辑》;20140715;全文 * |
基于改进K最短路算法的公交线网优化研究;丁建勋 等;《合肥工业大学学报(自然科学版)》;20191031;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN111311002A (en) | 2020-06-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111311002B (en) | Bus trip planning method considering active transfer of passengers in transit | |
CN108981736B (en) | Electric vehicle charging path optimization method based on user travel rule | |
CN110648022B (en) | Community public transportation network and departure frequency synchronous optimization method of connection subways considering full coverage of stations | |
Cats et al. | Effect of real-time transit information on dynamic path choice of passengers | |
CN109753694B (en) | Method for designing medium and small city public transportation network based on whole-process travel sensing time | |
CN109612488B (en) | Big data micro-service-based mixed travel mode path planning system and method | |
CN105513400A (en) | Method for dynamically planning travel route | |
CN110599760B (en) | Travel behavior simulation method under multi-mode traffic network | |
CN111667086B (en) | Vehicle ride-sharing path optimizing method and system | |
CN107092986B (en) | Bus passenger travel path selection method based on stations and collinear operation | |
CN112561249B (en) | Real-time demand-oriented city customized bus scheduling method | |
CN111724076A (en) | Regional multi-type rail transit passenger flow dynamic distribution method under operation interruption condition | |
CN115547052A (en) | Dynamic demand response electric bus dispatching method for improving self-adaptive large-field algorithm | |
CN112562377A (en) | Passenger vehicle real-time scheduling method based on random opportunity constraint | |
CN112729324A (en) | Electric vehicle charging guidance and path planning method based on mutual-help travel system | |
CN111882915A (en) | On-demand bus route planning method adopting composite algorithm and interactive model | |
CN113538886A (en) | Real-time response type customized bus hierarchical scheduling method | |
CN108806235B (en) | Intelligent public transportation scheduling method for on-demand service | |
CN113408859B (en) | Urban rail transit line passenger flow and train matching method considering passenger flow management and control measures | |
CN115222156A (en) | Automobile charging scheduling method considering user demand response based on time-sharing dual road network | |
CN111882107A (en) | Driver and passenger matching method based on automatic driving shared taxi system | |
CN111275970B (en) | Optimal route planning method considering real-time bus information | |
CN113379159A (en) | Taxi driver passenger-searching route recommendation method based on gray model and Markov decision process | |
CN113096429A (en) | Elastic bus area flexibility line generation method based on bus dispatching station distribution | |
CN115675584A (en) | Urban area line driving scheme optimization method for urban rail transit |
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 |