[go: up one dir, main page]

CN111311002B - A bus travel planning method considering passengers' active transfer on the way - Google Patents

A bus travel planning method considering passengers' active transfer on the way Download PDF

Info

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
line
bus
transfer
starting
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.)
Expired - Fee Related
Application number
CN202010096480.1A
Other languages
Chinese (zh)
Other versions
CN111311002A (en
Inventor
丁建勋
赵振兴
郭宁
雍锐
齐傲
蔡智
夏宇凡
李祥琦
龙建成
石琴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei University of Technology
Original Assignee
Hefei University of Technology
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 Hefei University of Technology filed Critical Hefei University of Technology
Priority to CN202010096480.1A priority Critical patent/CN111311002B/en
Publication of CN111311002A publication Critical patent/CN111311002A/en
Application granted granted Critical
Publication of CN111311002B publication Critical patent/CN111311002B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/40Business processes related to the transportation industry

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明公开了一种考虑乘客在途主动换乘的公交出行规划方法,是根据乘客出行的出发站点和目的站点,结合实时公交信息,将时间作为虚拟节点获取乘客出行的原始公交网络,并基于此网络进行扩展,得到扩展后公交网络后,利用组合动态规划方法,考虑乘客在出发站点和中转站点的等待时间权重和站与站之间的行驶时间权重,以及公交车的拥挤程度权重,从而得到基于出行时间和公交车拥挤程度的出行方案。本发明能解决乘客在乘车途中的临时换乘问题,从而能满足乘客的换乘需求,很大程度上提高了乘客的时间利用效率。

Figure 202010096480

The invention discloses a bus travel planning method that considers the active transfer of passengers on the way. According to the departure station and destination station of the passenger travel, combined with real-time bus information, the time is used as a virtual node to obtain the original bus network of the passenger travel, and based on this After the network is expanded, and the expanded bus network is obtained, the combined dynamic programming method is used to consider the waiting time weight of passengers at the departure station and the transfer station, the travel time weight between stations, and the weight of the congestion degree of the bus, so as to obtain Travel plans based on travel time and bus congestion. The invention can solve the problem of temporary transfer of passengers on the way to the bus, so as to meet the transfer requirements of passengers, and greatly improve the time utilization efficiency of passengers.

Figure 202010096480

Description

一种考虑乘客在途主动换乘的公交出行规划方法A bus travel planning method considering passengers' active transfer on the way

技术领域technical field

本发明属公共交通领域,具体的说是一种考虑乘客在途主动换乘的公交出行规划方法。The invention belongs to the field of public transport, in particular to a bus travel planning method which considers the active transfer of passengers on the way.

背景技术Background technique

在公交网络比较成熟的城市,从出发点至目的地往往有多条线路,每条线路的总时间不一,乘客一般会选择时间最短的出行线路,但往往此线路公交车在乘人数很多,对乘客的乘车舒适性造成影响,因此乘客会选择换乘另一条线路的公交车。In a city with a relatively mature bus network, there are often multiple lines from the starting point to the destination, and the total time of each line is different. Passengers generally choose the travel route with the shortest time. However, there are often a lot of passengers on this line. The passenger's ride comfort is affected, so the passenger chooses to transfer to another bus route.

在现有的技术中,地图APP将会根据乘客此时的定位搜索附近含有到达目的站点的公交车的公交站点,规划出所有的出行线路,并将所有线路的出行时间从小到大排序,并标明具体的步行时间、乘车时间、等待时间等。In the existing technology, the map APP will search for nearby bus stops containing buses arriving at the destination station according to the passenger's current location, plan all travel routes, and sort the travel times of all routes from small to large, and Indicate the specific walking time, ride time, waiting time, etc.

在现有的技术中,公交地图系统在推荐出行路线时往往以步行时间最短、出行总时间最短作为推荐依据。In the prior art, when recommending a travel route, the bus map system often takes the shortest walking time and the shortest total travel time as the recommendation basis.

目前的公交出行路线规划存在以下不足:The current bus travel route planning has the following shortcomings:

出行路线方案的推荐依据太过单一,没有考虑乘客的乘车需求,特别是对于换乘乘客而言,没有考虑到乘客的真实需求,如:车上人数,公交车拥挤程度等等。The recommendation basis of the travel route plan is too single, and does not consider the passenger's riding needs, especially for transfer passengers, does not take into account the real needs of passengers, such as: the number of people in the car, the degree of bus congestion, and so on.

出行方案的选择太过唯一化,乘客选择的出行线路不可更改,不能够在途中灵活规划出行方案。The choice of travel plan is too unique, the travel route chosen by passengers cannot be changed, and travel plans cannot be flexibly planned on the way.

发明内容SUMMARY OF THE INVENTION

本发明是为了解决上述现有技术存在的不足之处,提出一种考虑乘客在途主动换乘的公交出行规划方法,以期能解决乘客在乘车途中的临时换乘问题,从而能满足乘客的换乘需求,最大程度上提高乘客的时间利用效率。In order to solve the above-mentioned shortcomings of the prior art, the present invention proposes a bus travel planning method that considers the active transfer of passengers on the way, in order to solve the problem of temporary transfer of passengers on the way, so as to meet the needs of passengers' transfer. To maximize the efficiency of passenger time utilization.

本发明为达到上述发明目的,采用如下技术方案:The present invention adopts the following technical scheme in order to achieve the above-mentioned purpose of the invention:

本发明一种考虑乘客在途主动换乘的公交出行规划方法的特点是按如下步骤进行:The characteristics of a bus trip planning method considering the active transfer of passengers on the road of the present invention are as follows:

步骤一、获取乘客出行的原始公交网络:Step 1. Obtain the original bus network for passengers to travel:

根据乘客出行的起始站点o和目的站点d,得到乘客出行的原始公交网络G=(V,A),其中V为站点集,且V={o,M,d};M为换乘站点集合,且M={M1,M2,…,Mk,…,MK},其中,Mk为第k个换乘站点,k=1,2,…,K,K为换乘站点的总数;A为原始公交网络G中的线路集合,且A={L,FL,AL},其中,L为所述起始站点o和目的站点d之间直达的线路集合,且L={l1,l2,…,ln,…,lN},ln为所述起始站点o和目的站点d之间的第n条直达线路,n=1,2,…,N,N为直达线路的总数;FL为从所述起始站点o到换乘站点集合M中各个换乘站点的线路集合,且FL={FL1,FL2,…,FLk,…,FLK},其中,FLk为从所述起始站点o到第k个换乘站点Mk的进站线路集,且

Figure GDA0003383814880000021
其中,
Figure GDA0003383814880000022
为从所述起始站点o到第k个换乘站点Mk的第i条进站线路,i=1,2,…,Ik,Ik为从所述起始站点o到第k个换乘站点Mk的进站线路总数;AL为从换乘站点集合M到目的站点d的出站线路集合,且AL={AL1,AL2,…,ALk,…,ALK},ALk为从所述第k个换乘站点Mk到目的站点d的出站线路集合,且
Figure GDA0003383814880000023
其中,
Figure GDA0003383814880000024
为从所述第k个换乘站点Mk到目的站点d的第j条出站线路,j=1,2,…,Jk,Jk为从k个换乘站点Mk到目的站点d的出站线路总数;According to the starting station o and destination station d of the passenger's trip, the original bus network G = (V, A) of the passenger's trip is obtained, where V is the station set, and V = {o, M, d}; M is the transfer station set, and M={M 1 ,M 2 ,…,M k ,…,M K }, where M k is the k-th transfer station, k=1,2,…,K, K is the transfer station A is the set of lines in the original bus network G, and A={L,FL,AL}, where L is the set of direct lines between the starting station o and the destination station d, and L={ l 1 ,l 2 ,...,l n ,...,l N }, l n is the nth direct line between the starting station o and the destination station d, n=1,2,...,N,N is the total number of direct lines; FL is the line set from the starting station o to each transfer station in the transfer station set M, and FL={FL 1 ,FL 2 ,...,FL k ,...,FL K } , where FL k is the set of inbound routes from the starting station o to the k-th transfer station M k , and
Figure GDA0003383814880000021
in,
Figure GDA0003383814880000022
is the i-th inbound line from the starting station o to the k-th transfer station M k , i=1, 2, . . . , I k , I k is the starting station o to the k-th station The total number of inbound lines of transfer station M k ; AL is the set of outbound lines from transfer station set M to destination station d, and AL={AL 1 ,AL 2 ,…,AL k ,…,AL K }, AL k is the set of outbound lines from the k-th transfer station M k to the destination station d, and
Figure GDA0003383814880000023
in,
Figure GDA0003383814880000024
is the j-th outbound line from the k-th transfer station M k to the destination station d, j=1, 2,...,J k , J k is the k-th transfer station M k to the destination station d The total number of outbound lines;

步骤二、基于原始公交网络G获取扩展公交网络:Step 2: Obtain the extended public transport network based on the original public transport network G:

2.1由所述站点集V得到扩展后的站点集V′={O,M′}:2.1 Obtain the expanded site set V′={O,M′} from the site set V:

步骤2.1.1将所述线路集合A中从起始站点o出发的第n条直达线路ln和所述从起始站点o到第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000025
对应的虚拟出发节点分别记为
Figure GDA0003383814880000026
Figure GDA0003383814880000027
从而将从起始站点o出发的所有直达线路以及从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点与所述起始站点o共同构成起始站点集O;Step 2.1.1 In the line set A, the n-th direct line ln starting from the starting station o and the i- th inbound line from the starting station o to the k -th transfer station Mk are divided into
Figure GDA0003383814880000025
The corresponding virtual departure nodes are respectively recorded as
Figure GDA0003383814880000026
and
Figure GDA0003383814880000027
Thereby, the virtual departure nodes corresponding to all direct lines from the starting station o and all inbound lines from the starting station o to all transfer stations together with the starting station o constitute the starting station set O;

步骤2.1.2将所述线路集合A中第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000028
对应的虚拟到达节点记为
Figure GDA0003383814880000029
从第k个换乘站点Mk到目的站点d的第j条出站线路
Figure GDA00033838148800000210
对应的虚拟出发节点记为
Figure GDA00033838148800000211
从而将从起始站点o到第k个换乘站点Mk的所有进站线路对应的虚拟到达节点以及从第k个换乘站点Mk到目的站点d的所有出站线路对应的虚拟出发节点构成第k个换乘站点集合Mk′;进而得到所有换乘站点集合M′={M′k|k=1,2,…,K};Step 2.1.2 Put the i-th incoming line of the k-th transfer station M k in the line set A
Figure GDA0003383814880000028
The corresponding virtual arrival node is denoted as
Figure GDA0003383814880000029
The jth outbound line from the kth transfer station Mk to the destination station d
Figure GDA00033838148800000210
The corresponding virtual departure node is recorded as
Figure GDA00033838148800000211
Thus, the virtual arrival nodes corresponding to all inbound lines from the starting station o to the kth transfer station Mk and the virtual departure nodes corresponding to all outbound lines from the kth transfer station Mk to the destination station d Constitute the kth transfer station set M k ′; and then obtain all transfer station sets M′={M′ k |k=1,2,…,K};

2.2构建新的线路集合A′,从而生成扩展公交网络G′=(V′,A′):2.2 Construct a new line set A' to generate an extended bus network G'=(V', A'):

定义

Figure GDA00033838148800000212
表示以起始站点o为起点,以第n条直达线路ln对应的虚拟出发节点
Figure GDA00033838148800000213
为终点的等待弧;definition
Figure GDA00033838148800000212
Indicates the virtual departure node corresponding to the nth direct line l n starting from the starting station o
Figure GDA00033838148800000213
is the waiting arc for the end point;

定义

Figure GDA0003383814880000031
表示以起始站点o为起点,以第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000032
对应的虚拟出发节点
Figure GDA0003383814880000033
为终点的等待弧;从而得到起始站点集O的等待弧集,记为
Figure GDA0003383814880000034
definition
Figure GDA0003383814880000031
Indicates the i-th inbound line starting from the starting station o and taking the k-th transfer station M k
Figure GDA0003383814880000032
Corresponding virtual departure node
Figure GDA0003383814880000033
is the waiting arc of the end point; thus the waiting arc set of the initial site set O is obtained, denoted as
Figure GDA0003383814880000034

定义

Figure GDA0003383814880000035
表示以第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000036
的虚拟到达节点
Figure GDA0003383814880000037
为起点,以第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000038
的虚拟出发节点
Figure GDA0003383814880000039
为终点的等待弧;从而得到第k个换乘站点集合Mk′的等待弧集,记为
Figure GDA00033838148800000310
进而得到所有换乘站点集合M′的等待弧集,记为
Figure GDA00033838148800000311
definition
Figure GDA0003383814880000035
Indicates the i-th inbound line at the k-th transfer station M k
Figure GDA0003383814880000036
virtual arrival node of
Figure GDA0003383814880000037
as the starting point, take the jth outbound line of the kth transfer station M k
Figure GDA0003383814880000038
virtual departure node
Figure GDA0003383814880000039
is the waiting arc of the end point; thus, the waiting arc set of the k-th transfer station set M k ′ is obtained, denoted as
Figure GDA00033838148800000310
Then, the waiting arc set of all transfer station set M' is obtained, denoted as
Figure GDA00033838148800000311

由起始站点集O的等待弧集WLO和所有换乘站点集合M′的等待弧集WLM构成总等待弧集WL,即WL={WLO,WLM};The total waiting arc set WL is composed of the waiting arc set WLO of the starting station set O and the waiting arc set WL M of all transfer station sets M′, namely WL={ WLO ,WL M };

定义

Figure GDA00033838148800000312
表示以第n条直达线路ln的虚拟出发节点
Figure GDA00033838148800000313
为起点,以目的站点d为终点的行驶弧,从而得到以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure GDA00033838148800000314
definition
Figure GDA00033838148800000312
represents the virtual departure node of the nth direct line l n
Figure GDA00033838148800000313
As the starting point and the destination station d as the end point, the travel arc set with the virtual departure nodes of all direct routes as the start point and the destination station d as the end point is obtained, which is recorded as
Figure GDA00033838148800000314

定义

Figure GDA00033838148800000315
表示以第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000316
的虚拟出发节点
Figure GDA00033838148800000317
为起点,以第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000318
的虚拟到达节点
Figure GDA00033838148800000319
为终点的行驶弧,从而得到以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集,记为
Figure GDA00033838148800000320
definition
Figure GDA00033838148800000315
Indicates the i-th inbound line at the k-th transfer station M k
Figure GDA00033838148800000316
virtual departure node
Figure GDA00033838148800000317
as the starting point, take the i-th inbound line of the k-th transfer station M k
Figure GDA00033838148800000318
virtual arrival node of
Figure GDA00033838148800000319
is the driving arc at the end point, so as to obtain the set of driving arcs starting from the virtual departure nodes of all inbound lines of all transfer stations and taking the virtual arrival nodes of all inbound lines of all transfer stations as the end point, denoted as
Figure GDA00033838148800000320

定义

Figure GDA00033838148800000321
表示以第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000322
的虚拟出发节点
Figure GDA00033838148800000323
为起点,以目的站点d为终点的行驶弧,从而得到以所有换乘站点的所有出站线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure GDA00033838148800000324
definition
Figure GDA00033838148800000321
represents the jth outbound line at the kth transfer station Mk
Figure GDA00033838148800000322
virtual departure node
Figure GDA00033838148800000323
As the starting point and the destination station d as the end point, the set of travel arcs with the virtual departure nodes of all outbound lines of all transfer stations as the start point and the destination station d as the end point is obtained, denoted as
Figure GDA00033838148800000324

由以所有直达线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集L′、以所有换乘站点的所有进站线路的虚拟出发节点为起点以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′、以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′构成总行驶弧集RL,即RL={L′,FL′,AL′};From the travel arc set L' starting from the virtual departure nodes of all direct lines and ending at the destination station d, starting from the virtual departure nodes of all inbound lines of all transfer stations, and taking all inbound lines of all transfer stations as the starting point The travel arc set FL′ with the virtual arrival node as the end point and the travel arc set AL′ with the virtual departure nodes of all outbound lines of all transfer stations as the starting point and the destination station d as the end point constitute the total travel arc set RL, that is, RL ={L',FL',AL'};

由总等待弧集WL和总行驶弧集RL构成新的线路集合,记为A′={WL,RL};A new line set is formed by the total waiting arc set WL and the total traveling arc set RL, denoted as A′={WL,RL};

步骤三、计算扩展公交网络上等待弧与行驶弧的权重:Step 3: Calculate the weights of waiting arcs and driving arcs on the extended bus network:

步骤3.1、设定乘客到达起始站点o的时刻为to,同时将实时公交信息和路况信息添加到扩展公交网络G′=(V′,A′)中;Step 3.1. Set the moment when the passenger arrives at the starting station o as t o , and at the same time add the real-time bus information and road condition information to the extended bus network G′=(V′, A′);

步骤3.2、将新的线路集合A′中的行驶弧和等待弧赋予相应的权重ω,从而得到赋权有向图G″=(V′,A′,ω),其中权重ω包括:

Figure GDA0003383814880000041
Figure GDA0003383814880000042
Step 3.2, assign the corresponding weight ω to the traveling arc and the waiting arc in the new line set A', so as to obtain the weighted directed graph G"=(V', A', ω), where the weight ω includes:
Figure GDA0003383814880000041
Figure GDA0003383814880000042

令起始站点集O的等待弧集WLO的权重

Figure GDA0003383814880000043
表示乘客乘坐第n条直达线路ln上在时刻to后最先到达起始站点o的公交车所需要等待的时间,即
Figure GDA0003383814880000044
其中,
Figure GDA0003383814880000045
表示在时刻to后第n条直达线路ln上的最先到达起始站点o的公交车到达起始站点o的时刻,如果在乘客到达起始站点o的时刻to后在第n条直达线路ln上不再有公交车,则令
Figure GDA0003383814880000046
Let the weight of the waiting arc set WLO of the starting site set O be
Figure GDA0003383814880000043
Represents the waiting time for passengers to take the bus on the nth direct line l n that first arrives at the starting station o after time t o , i.e.
Figure GDA0003383814880000044
in,
Figure GDA0003383814880000045
Represents the time at which the first bus on the nth direct line l n arrives at the starting station o after the time to If there are no more buses on the direct line l n , then let
Figure GDA0003383814880000046

令起始站点集O的等待弧集WLO的权重

Figure GDA0003383814880000047
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000048
上最先到达起始站点o的公交车所需要等待的时间,即
Figure GDA0003383814880000049
其中,
Figure GDA00033838148800000410
表示在时刻to后第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000411
上最先到达起始站点o的公交车到达o的时刻,如果时刻to后在第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000412
上不再有公交车,则令
Figure GDA00033838148800000413
Let the weight of the waiting arc set WLO of the starting site set O be
Figure GDA0003383814880000047
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure GDA0003383814880000048
The waiting time for the bus that first arrives at the starting station o, i.e.
Figure GDA0003383814880000049
in,
Figure GDA00033838148800000410
represents the i-th inbound line at the k-th transfer station M k after time t o
Figure GDA00033838148800000411
The time when the bus that first arrives at the starting station o arrives at o, if the ith incoming line at the kth transfer station Mk after time t o
Figure GDA00033838148800000412
If there is no longer a bus on the
Figure GDA00033838148800000413

令换乘站点集合M′的等待弧集WLM的权重

Figure GDA00033838148800000414
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000415
上的公交车到达Mk后,乘客乘坐第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000416
上最先到达Mk的公交车所需要等待的时间,即
Figure GDA00033838148800000417
其中,
Figure GDA00033838148800000418
为时刻to后最先到达起始站点o的公交车经过第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000419
到达第k个换乘站点Mk的时刻,
Figure GDA00033838148800000420
表示在时刻
Figure GDA00033838148800000421
之后在第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000422
上最先到达Mk时刻,如果时刻
Figure GDA00033838148800000423
后不再有到达第k个换乘站点Mk且经过第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000424
的公交车,则令
Figure GDA00033838148800000425
Let the weight of the waiting arc set WLM of the transfer station set M '
Figure GDA00033838148800000414
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure GDA00033838148800000415
After the bus on board arrives at Mk , the passenger takes the jth outbound line of the kth transfer station Mk
Figure GDA00033838148800000416
The waiting time for the bus that arrives at M k first, namely
Figure GDA00033838148800000417
in,
Figure GDA00033838148800000418
is the ith incoming line of the bus that first arrives at the starting station o after the time t o and passes through the k th transfer station M k
Figure GDA00033838148800000419
When arriving at the k-th transfer station M k ,
Figure GDA00033838148800000420
expressed at the moment
Figure GDA00033838148800000421
Then the j-th outbound line at the k-th transfer station M k
Figure GDA00033838148800000422
to arrive at time M k first, if the time
Figure GDA00033838148800000423
After that, there is no longer the jth outbound line that arrives at the kth transfer station Mk and passes through the kth transfer station Mk
Figure GDA00033838148800000424
bus, the order
Figure GDA00033838148800000425

令以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集L′的权重

Figure GDA0003383814880000051
表示乘客乘坐最先到达起始站点o的公交车在第n条直达线路ln上基于实时路况的行驶时间,即
Figure GDA0003383814880000052
其中,
Figure GDA0003383814880000053
为小汽车基于实时路况下经过第n条直达线路ln的行驶时间,μ为换算系数,且μ>1,
Figure GDA0003383814880000054
为第n条直达线路ln上的公交车站个数且不包括起始站点o和目的站点d,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set L′ starting from the virtual departure nodes of all direct routes and ending at the destination station d
Figure GDA0003383814880000051
Represents the travel time of passengers taking the bus that first arrives at the starting station o on the nth direct line l n based on real-time road conditions, namely
Figure GDA0003383814880000052
in,
Figure GDA0003383814880000053
is the travel time of the car through the nth direct line l n based on real-time road conditions, μ is the conversion factor, and μ>1,
Figure GDA0003383814880000054
is the number of bus stops on the nth direct line ln and does not include the starting station o and destination station d, and T is the average bus stop time at each station;

获取第n条直达线路ln上从起始站点o至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,记为Qn,所述公交车总数Q包含当前乘坐的车辆;Obtain the total number of buses between the starting station o and the destination station d on the nth direct line l n , and the total number of buses with the same bus line number as the passenger's current bus line number is recorded as Q n , the total number of buses Q Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA0003383814880000055
Get the real-time number of people on the qth bus
Figure GDA0003383814880000055

计算第n条直达线路ln上与乘客当前乘坐的公交线路编号相同的,从起始站点o至目的站点d之间的全部公交车在时刻

Figure GDA0003383814880000056
的平均人数且记为
Figure GDA0003383814880000057
Figure GDA0003383814880000058
从而得到影响舒适度的权重
Figure GDA0003383814880000059
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数;最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA00033838148800000510
Figure GDA00033838148800000511
其中α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;Calculate the time of all buses from the starting station o to the destination station d that have the same bus line number as the passenger's current bus line number on the nth direct line l n
Figure GDA0003383814880000056
the average number of people and recorded as
Figure GDA0003383814880000057
which is
Figure GDA0003383814880000058
so as to get the weight that affects the comfort
Figure GDA0003383814880000059
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient; finally, the comprehensive weight based on the travel time of the bus line currently taken by passengers and the degree of bus congestion is obtained.
Figure GDA00033838148800000510
and
Figure GDA00033838148800000511
where α is the degree of importance that passengers place on comfort, α∈[0,1]; when α is equal to 0, it means that passengers want to get the bus line with the shortest travel time; when α is equal to 1, it means that passengers want to get the bus line with the highest comfort level bus route; when α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;

令以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′的权重

Figure GDA00033838148800000512
表示乘客乘坐最先到达起始站点o的公交车在第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000513
上基于实时路况的行驶时间,即
Figure GDA00033838148800000514
其中,
Figure GDA00033838148800000515
为小汽车基于实时路况下经过第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000516
的行驶时间,μ为换算系数,且μ>1,
Figure GDA00033838148800000517
为第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800000518
上的公交车站个数且不包括起始站点o和第k个换乘站点Mk,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set FL′ starting from the virtual departure nodes of all inbound lines of all transfer stations and taking the virtual arrival nodes of all inbound lines of all transfer stations as the end point
Figure GDA00033838148800000512
Indicates that the passenger takes the bus that first arrives at the starting station o at the i-th inbound line at the k-th transfer station M k
Figure GDA00033838148800000513
The driving time based on real-time road conditions on the
Figure GDA00033838148800000514
in,
Figure GDA00033838148800000515
is the i-th inbound line of the car passing through the k-th transfer station M k based on real-time road conditions
Figure GDA00033838148800000516
The travel time of , μ is the conversion factor, and μ > 1,
Figure GDA00033838148800000517
is the i-th inbound line of the k-th transfer station M k
Figure GDA00033838148800000518
The number of bus stops on the bus and does not include the starting station o and the k-th transfer station M k , T is the average stop time of the bus at each station;

获取第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000061
上从起始站点o至第k个换乘站点Mk之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,所述公交车总数
Figure GDA0003383814880000062
包含当前乘坐的车辆;Get the i-th inbound line of the k-th transfer station M k
Figure GDA0003383814880000061
The total number of buses from the starting station o to the k -th transfer station Mk, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure GDA0003383814880000062
Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA0003383814880000063
Get the real-time number of people on the qth bus
Figure GDA0003383814880000063

计算经过第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000064
上与乘客当前乘坐的公交线路编号相同的,从起始站点o至第k个换乘站点Mk之间的全部公交车在时刻
Figure GDA0003383814880000065
的平均人数且记为
Figure GDA0003383814880000066
Figure GDA0003383814880000067
从而得出影响舒适度的权重
Figure GDA0003383814880000068
Figure GDA0003383814880000069
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数;最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA00033838148800000610
Figure GDA00033838148800000611
其中,α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;Calculate the i-th inbound line through the k-th transfer station M k
Figure GDA0003383814880000064
All buses from the starting station o to the k -th transfer station Mk with the same bus line number as the passenger's current bus line number are at the time
Figure GDA0003383814880000065
the average number of people and recorded as
Figure GDA0003383814880000066
which is
Figure GDA0003383814880000067
Thereby, the weights that affect the comfort level are obtained
Figure GDA0003383814880000068
and
Figure GDA0003383814880000069
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient; finally, the comprehensive weight based on the travel time of the bus line currently taken by passengers and the degree of bus congestion is obtained.
Figure GDA00033838148800000610
and
Figure GDA00033838148800000611
Among them, α is the passenger's degree of emphasis on comfort, α∈[0,1]; when α is equal to 0, it means that the passenger wants to get the bus line with the shortest travel time, and when α is equal to 1, it means that the passenger wants to get the highest level of comfort When α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;

令以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′的权重

Figure GDA00033838148800000612
表示乘客乘坐最先到达第k个换乘站点Mk的公交车在第j条出站线路
Figure GDA00033838148800000613
上基于实时路况的行驶时间,即
Figure GDA00033838148800000614
其中,
Figure GDA00033838148800000615
为小汽车基于实时路况下经过第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000616
的行驶时间,μ为换算系数,且μ>1,
Figure GDA00033838148800000617
为第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800000618
上的公交车站个数,且不包括第k个换乘站点Mk和目的站点d,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set AL' starting from the virtual departure nodes of all outbound lines of all transfer stations and ending at the destination station d
Figure GDA00033838148800000612
Indicates that the passenger takes the bus that first arrives at the k-th transfer station M k on the j-th outbound line
Figure GDA00033838148800000613
The driving time based on real-time road conditions on the
Figure GDA00033838148800000614
in,
Figure GDA00033838148800000615
is the jth outbound line of the car passing through the kth transfer station Mk based on real-time road conditions
Figure GDA00033838148800000616
The travel time of , μ is the conversion factor, and μ > 1,
Figure GDA00033838148800000617
is the jth outbound line of the kth transfer station Mk
Figure GDA00033838148800000618
The number of bus stops on the bus, excluding the k-th transfer station M k and the destination station d, T is the average bus stop time at each station;

获取第k个换乘站点Mk的第j条出站线路

Figure GDA00033838148800000619
上从第k个换乘站点Mk至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,所述公交车总数
Figure GDA00033838148800000620
包含当前乘坐的车辆;Get the jth outbound line of the kth transfer station M k
Figure GDA00033838148800000619
The total number of buses from the k-th transfer station Mk to the destination station d, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure GDA00033838148800000620
Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA00033838148800000621
Get the real-time number of people on the qth bus
Figure GDA00033838148800000621

计算经过第k个换乘站点Mk的第j条出站线路

Figure GDA0003383814880000071
上与乘客当前乘坐的公交线路编号相同的,从第k个换乘站点Mk至目的站点d的全部公交车在时刻
Figure GDA0003383814880000072
的平均人数且记为
Figure GDA0003383814880000073
Figure GDA0003383814880000074
由此得出影响舒适度的权重
Figure GDA0003383814880000075
Figure GDA0003383814880000076
其中k为公交车人数转换为影响程度的转换系数,c为调整系数,最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA0003383814880000077
Figure GDA0003383814880000078
其中α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;Calculate the jth outbound line through the kth transfer station Mk
Figure GDA0003383814880000071
All buses from the k-th transfer station M k to the destination station d have the same bus line number as the passenger's current bus line number at the time
Figure GDA0003383814880000072
the average number of people and recorded as
Figure GDA0003383814880000073
which is
Figure GDA0003383814880000074
This results in a weight that affects comfort
Figure GDA0003383814880000075
and
Figure GDA0003383814880000076
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient, and finally the comprehensive weight based on the travel time of the bus line currently taken by the passenger and the degree of bus congestion is obtained.
Figure GDA0003383814880000077
and
Figure GDA0003383814880000078
where α is the degree of importance that passengers place on comfort, α∈[0,1]; when α is equal to 0, it means that passengers want to get the bus line with the shortest travel time; when α is equal to 1, it means that passengers want to get the bus line with the highest comfort level bus route; when α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;

步骤四、使用组合动态规划算法在加载权重信息后的扩展公交网络图G″=(V′,A′,ω)中寻找从起始站点o至目的站点d的最优路径:Step 4: Use the combined dynamic programming algorithm to find the optimal path from the starting station o to the destination station d in the expanded public transport network graph G″=(V′, A′, ω) after loading the weight information:

步骤4.0、将赋权有向图G″=(V′,A′,ω)按照是否存在换乘线路分为直达线路网络和换乘线路网络以及混合线路网络,若赋权有向图G″=(V′,A′,ω)为直达线路网络,则执行步骤4.1和步骤4.3;若赋权有向图G″=(V′,A′,ω)为换乘线路网络,则执行步骤4.2和步骤4.3;若赋权有向图G″=(V′,A′,ω)为混合线路网络,则执行步骤4.1至步骤4.3;Step 4.0. Divide the weighted directed graph G"=(V', A', ω) into direct line network, transfer line network and mixed line network according to whether there is a transfer line. If the weighted directed graph G" =(V′,A′,ω) is the direct line network, then go to step 4.1 and step 4.3; if the weighted directed graph G″=(V′,A′,ω) is the transfer line network, then go to step 4.2 and step 4.3; if the weighted directed graph G″=(V′, A′, ω) is a mixed line network, then perform steps 4.1 to 4.3;

步骤4.1、直达线路网络的最优路径获取:Step 4.1. Obtain the optimal path of the direct line network:

步骤4.1.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;Step 4.1.1. Let a represent the current stage, let the state variable s a represent the possible node positions at the beginning of the current stage a, the decision variable u a represent the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, define the boundary condition f 1 (s 1 )=0;

当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o;

当a=2时,初始化sa为起始站点o出发的所有直达线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all direct routes from the starting station o;

当a=3时,初始化sa为目的站点d;When a=3, initialize s a as the destination site d;

步骤4.1.2、令n=1;Step 4.1.2, let n=1;

步骤4.1.3、计算

Figure GDA0003383814880000081
Step 4.1.3, calculation
Figure GDA0003383814880000081

步骤4.1.4、将n+1赋值给n,判断n>N是否成立,若成立,执行步骤4.1.5,否则,执行步骤4.1.3;Step 4.1.4, assign n+1 to n, and judge whether n>N is established, if so, go to step 4.1.5, otherwise, go to step 4.1.3;

步骤4.1.5、计算

Figure GDA0003383814880000082
令ln *
Figure GDA0003383814880000083
中最小元素对应状态变量的线路;Step 4.1.5, calculation
Figure GDA0003383814880000082
Let ln * be
Figure GDA0003383814880000083
The smallest element in the line corresponds to the state variable;

步骤4.2、换乘线路网络的最优路径获取:Step 4.2. Obtain the optimal path of the transfer line network:

步骤4.2.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;Step 4.2.1. Let a denote the current stage, let the state variable s a denote the possible node positions at the beginning of the current stage a, and the decision variable u a denote the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, define the boundary condition f 1 (s 1 )=0;

当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o;

当a=2时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all inbound lines from the starting station o to all transfer stations;

当a=3时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟到达节点;When a=3, the initialization s a is the virtual arrival node corresponding to all incoming lines from the starting station o to all transfer stations;

当a=4时,初始化sa为从所有换乘站点到目的站的所有出站线路所对应的虚拟出发节点;When a=4, initialize s a as the virtual departure node corresponding to all outbound lines from all transfer stations to the destination station;

当a=5时,初始化sa为目的站点d;When a=5, initialize s a as the destination site d;

步骤4.2.2、令k=1;Step 4.2.2, let k=1;

步骤4.2.3、令i=1;Step 4.2.3, let i=1;

步骤4.2.4、计算

Figure GDA0003383814880000084
Figure GDA0003383814880000085
Step 4.2.4, calculation
Figure GDA0003383814880000084
and
Figure GDA0003383814880000085

步骤4.2.5、将i+1赋值给i,判断i>Ik是否成立,若成立,则执行步骤4.2.6,否则,执行步骤4.2.4;Step 4.2.5, assign i+1 to i, and judge whether i>I k is established, if so, execute step 4.2.6, otherwise, execute step 4.2.4;

步骤4.2.6、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.7,否则,执行步骤4.2.3;Step 4.2.6, assign k+1 to k, and judge whether k>K is established, if so, go to step 4.2.7, otherwise, go to step 4.2.3;

步骤4.2.7、令k=1;Step 4.2.7, let k=1;

步骤4.2.8、令j=1;Step 4.2.8, let j=1;

步骤4.2.9、计算

Figure GDA0003383814880000091
Step 4.2.9, calculation
Figure GDA0003383814880000091

Figure GDA0003383814880000092
Figure GDA0003383814880000093
中最小元素对应状态变量的进站线路;make
Figure GDA0003383814880000092
for
Figure GDA0003383814880000093
The smallest element in the inbound line corresponds to the state variable;

步骤4.2.10、将j+1赋值给j,判断j>Jk是否成立,若成立,则执行步骤4.2.11,否则,执行步骤4.2.9;Step 4.2.10, assign j+1 to j, and judge whether j>J k is established, if so, go to step 4.2.11, otherwise, go to step 4.2.9;

步骤4.2.11、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.12,否则,执行步骤4.2.8;Step 4.2.11, assign k+1 to k, and judge whether k>K is established, if so, go to step 4.2.12, otherwise, go to step 4.2.8;

步骤4.2.12、计算

Figure GDA0003383814880000094
Step 4.2.12, calculation
Figure GDA0003383814880000094

Figure GDA0003383814880000095
Figure GDA0003383814880000096
中最小元素对应状态变量的出站线路;make
Figure GDA0003383814880000095
for
Figure GDA0003383814880000096
The smallest element in the outbound line corresponding to the state variable;

步骤4.3、综合比较直达线路与换乘线路的行程时间,从而得到赋权有向图G″=(V′,A′,ω)的最优路径:Step 4.3. Comprehensively compare the travel time of the direct line and the transfer line, so as to obtain the optimal path of the weighted directed graph G″=(V′,A′,ω):

若f3(d)≤f5(d)或赋权有向图G″=(V′,A′,ω)为直达线路网络时,选择直达线路,最优直达线路为从起始站点o乘坐直达线路ln *上的公交车至目的站点d,记为

Figure GDA0003383814880000097
If f 3 (d)≤f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is a direct line network, select a direct line, and the optimal direct line is from the starting station o Take the bus on the direct line l n * to the destination station d, denoted as
Figure GDA0003383814880000097

若f3(d)>f5(d)或赋权有向图G″=(V′,A′,ω)为换乘线路网络时,选择换乘线路,最优换乘线路为从起始站点o乘坐第k个换乘站点第i条进站线路

Figure GDA0003383814880000098
上的公交车至第k个换乘站点Mk换乘,然后乘坐第j条出站线路
Figure GDA0003383814880000099
上的公交车至目的站点d,记为
Figure GDA00033838148800000910
If f 3 (d)>f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is the transfer line network, select the transfer line, and the optimal transfer line is from Start station o take the i-th incoming line at the k-th transfer station
Figure GDA0003383814880000098
Take the bus on to the k-th transfer station M k to transfer, and then take the j-th outbound line
Figure GDA0003383814880000099
take the bus to the destination station d, denoted as
Figure GDA00033838148800000910

若f3(d)=f5(d)=+∞时,则最优线路为空,表明基于乘客到达起始站点o的时刻to出发,乘客无法赶上末班车,进而无法完成本次出行;If f 3 (d)=f 5 (d)=+∞, then the optimal route is empty, which means that based on the departure time t o when the passenger arrives at the starting station o, the passenger cannot catch the last train, and thus cannot complete the trip. ;

步骤五、获取乘客当前位置,判断当前位置是否到达新的站点,如果没有到达新的站点,则更新乘客当前位置后,重复执行步骤五,如果到达新的站点,则记新的站点为o′;Step 5: Obtain the current position of the passenger, and determine whether the current position has reached the new station. If it does not reach the new station, after updating the current position of the passenger, repeat step 5. If it reaches the new station, record the new station as o' ;

若新的站点o′不是目的站点d时,则将o′赋给乘客当前所在o,并执行步骤一;If the new station o' is not the destination station d, assign o' to the passenger's current location o, and execute step 1;

若新的站点o′是目的站点d时,则结束本次公交出行规划。If the new station o' is the destination station d, the current bus travel planning is ended.

与现有技术相比,本发明的有益效果在于:Compared with the prior art, the beneficial effects of the present invention are:

1.目前地图APP会根据乘客想要换乘车辆的实时位置,重新规划出行线路,按照出行时间长短来推荐出行方案,本发明进一步考虑了公交车的实时在乘人数,根据乘客之前所选择的出行方案和此时的位置,将乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度综合考虑得到综合权重,同样地,计算其他出行方案的综合权重,加载权重到扩展公交网络图中,利用组合动态规划算法计算各个出行方案的最优值,进而确定是否要进行换乘,若是,并得到基于乘客之前选择的出行方案的换乘方案,即在何站换乘,换乘什么线路,避免了乘客在乘车途中想要换乘却对换乘方案是否符合自己预期存在担忧,解决了乘客公共出行换乘难、换乘麻烦、换乘没有数据参考的问题,使得乘客能更人性化地使用公共交通出行。1. At present, the map APP will re-plan the travel route according to the real-time position of the vehicle that the passenger wants to transfer to, and recommend the travel plan according to the travel time. The travel plan and the current position, the travel time of the bus line currently taken by the passenger and the bus congestion degree are comprehensively considered to obtain the comprehensive weight. Similarly, the comprehensive weight of other travel plans is calculated, and the weight is loaded into the extended bus network diagram, using The combined dynamic programming algorithm calculates the optimal value of each travel plan, and then determines whether to transfer, if so, and obtains the transfer plan based on the travel plan previously selected by the passenger, that is, where to transfer, and what line to transfer to avoid It solves the problems of difficult, troublesome and no data reference for passengers to transfer in public travel, so that passengers can be more user-friendly. Use public transport to travel.

2.本发明根据不同乘客对舒适度的要求不同,增加了拥挤公交线路的权重,由此给予不同需求的乘客以不同的选择,解决了目前地图APP对不同的乘客需求而给予同样的推荐路线的问题,是一种另类的“定制公交”。通过对不同乘客需求的推荐线路不同,也部分缓解了高峰时期的公交压力。2. The present invention increases the weight of crowded bus lines according to the different requirements of different passengers for comfort, thereby giving passengers with different needs different choices, and solving the current map APP giving the same recommended route to different passenger needs. The problem is an alternative "custom bus". By recommending different routes for different passenger needs, the bus pressure during peak periods is also partially relieved.

3.本发明通过在乘客乘坐公交过程中实时位置的不断更新和道路信息的不断更新,在公交到达下一站点时,将此站点当做出行的新的起始站点,重新计算最优路径,并一直重复,直至到达目的站点,克服了现有地图APP中换乘线路固定化的问题,从而使的公交换乘具有了选择性,提高了乘客的可选择性。同时在前方线路发生交通事故时,能及时的反馈给乘客,大大提高了此类情况下乘坐公交的效率。通过选择性的换乘,也缓解了一部分的公交压力。3. The present invention uses the continuous updating of the real-time position and the continuous updating of the road information in the process of passengers taking the bus. When the bus arrives at the next station, the station is regarded as a new starting station for travel, and the optimal path is recalculated. It is repeated until the destination station is reached, which overcomes the problem of fixed transfer lines in the existing map APP, thus making the bus transfer more selective and improving the selectivity of passengers. At the same time, when a traffic accident occurs on the line ahead, it can timely feedback to the passengers, which greatly improves the efficiency of taking the bus in such cases. Through selective transfer, part of the bus pressure is also relieved.

附图说明Description of drawings

图1为本发明乘客出行原始路线网络图;Fig. 1 is the original route network diagram of passenger travel of the present invention;

图2为本发明获取乘客出行原始公交网络流程图;Fig. 2 is the flow chart of the present invention to obtain the original public transport network for passenger travel;

图3为本发明基于原始网络的扩展公交网络示意图;3 is a schematic diagram of an extended public transport network based on the original network of the present invention;

图4为本发明方法总流程图。Fig. 4 is the general flow chart of the method of the present invention.

具体实施方式Detailed ways

本实施例中,一种考虑乘客在途主动换乘的公交出行规划方法,是通过考虑不同乘客对舒适度的需求不同,重新计算公交线路的权重,并得到基于舒适度和公交行驶时间的综合最优线路,从而使不同需求的乘客有不同的公交乘坐方案,使用户出行方案更具有人性化,并在公交行驶过程中,不断更新最优的公交线路,为乘客在途中的换乘提供了可选择性,具体的说,如图4所示,是按如下步骤进行:In this embodiment, a bus travel planning method that considers the active transfer of passengers on the road is to recalculate the weight of the bus line by considering the different needs of different passengers for comfort, and obtain a comprehensive maximum based on comfort and bus travel time. Optimal routes, so that passengers with different needs have different bus ride plans, making user travel plans more humane, and in the process of bus driving, constantly updating the optimal bus routes, providing passengers with a possibility for transfer on the way. Selectivity, specifically, as shown in Figure 4, is performed as follows:

步骤一、获取乘客出行的原始公交网络:Step 1. Obtain the original bus network for passengers to travel:

根据乘客出行的起始站点o和目的站点d,得到乘客出行的原始公交网络G=(V,A),其中V为站点集,且V={o,M,d};M为换乘站点集合,且M={M1,M2,…,Mk,…,MK},其中,Mk为第k个换乘站点,k=1,2,…,K,K为换乘站点的总数;如图2所示,由用户输入的起始站点和目的站点,得到起始站点和目的站点间所有得直达线路和换乘线路集合,得到原始公交网络。A为原始公交网络G中的线路集合,且A={L,FL,AL},其中,L为起始站点o和目的站点d之间直达的线路集合,且L={l1,l2,…,ln,…,lN},ln为起始站点o和目的站点d之间的第n条直达线路,n=1,2,…,N,N为直达线路的总数;FL为从起始站点o到换乘站点集合M中各个换乘站点的线路集合,且FL={FL1,FL2,…,FLk,…,FLK},其中,FLk为从起始站点o到第k个换乘站点Mk的进站线路集,且

Figure GDA0003383814880000111
其中,
Figure GDA0003383814880000112
为从起始站点o到第k个换乘站点Mk的第i条进站线路,i=1,2,…,Ik,Ik为从起始站点o到第k个换乘站点Mk的进站线路总数;AL为从换乘站点集合M到目的站点d的出站线路集合,且AL={AL1,AL2,…,ALk,…,ALK},ALk为从第k个换乘站点Mk到目的站点d的出站线路集合,且
Figure GDA0003383814880000113
其中,
Figure GDA0003383814880000114
为从第k个换乘站点Mk到目的站点d的第j条出站线路,j=1,2,…,Jk,Jk为从k个换乘站点Mk到目的站点d的出站线路总数。如图1所示,即为获得的原始公交网络图。According to the starting station o and destination station d of the passenger's trip, the original bus network G = (V, A) of the passenger's trip is obtained, where V is the station set, and V = {o, M, d}; M is the transfer station set, and M={M 1 ,M 2 ,…,M k ,…,M K }, where M k is the k-th transfer station, k=1,2,…,K, K is the transfer station As shown in Figure 2, from the starting station and destination station input by the user, the set of all direct routes and transfer lines between the starting station and the destination station is obtained, and the original bus network is obtained. A is the line set in the original bus network G, and A={L,FL,AL}, where L is the direct line set between the starting station o and the destination station d, and L={l 1 ,l 2 ,...,l n ,...,l N }, l n is the nth direct line between the starting station o and the destination station d, n=1,2,...,N, N is the total number of direct lines; FL is the line set from the starting station o to each transfer station in the transfer station set M, and FL={FL 1 ,FL 2 ,...,FL k ,...,FL K }, where FL k is the starting point the set of inbound routes from station o to the k -th transfer station Mk, and
Figure GDA0003383814880000111
in,
Figure GDA0003383814880000112
is the i-th inbound line from the starting station o to the k-th transfer station M k , i=1,2,...,I k , I k is from the starting station o to the k-th transfer station M The total number of inbound lines of k ; AL is the set of outbound lines from the transfer station set M to the destination station d, and AL={AL 1 ,AL 2 ,...,AL k ,...,AL K }, AL k is the from The set of outbound routes from the k-th transfer station M k to the destination station d, and
Figure GDA0003383814880000113
in,
Figure GDA0003383814880000114
is the j-th outbound line from the k-th transfer station Mk to the destination station d, j =1,2,...,Jk, Jk is the outbound line from the k -th transfer station Mk to the destination station d The total number of station lines. As shown in Figure 1, it is the obtained original public transportation network map.

步骤二、基于原始公交网络G获取扩展公交网络:Step 2: Obtain the extended public transport network based on the original public transport network G:

2.1由站点集V得到扩展后的站点集V′={O,M′}:2.1 The expanded site set V′={O,M′} is obtained from the site set V:

步骤2.1.1将线路集合A中从起始站点o出发的第n条直达线路ln和从起始站点o到第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000115
对应的虚拟出发节点分别记为
Figure GDA0003383814880000116
Figure GDA0003383814880000117
设置该虚拟出发节点是为了方便后文中计算等待时间权重,从而将从起始站点o出发的所有直达线路以及从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点与起始站点o共同构成起始站点集O;Step 2.1.1 Combine the n-th direct line l n from the starting station o and the i-th inbound line from the starting station o to the k-th transfer station M k in the line set A
Figure GDA0003383814880000115
The corresponding virtual departure nodes are respectively recorded as
Figure GDA0003383814880000116
and
Figure GDA0003383814880000117
The virtual departure node is set to facilitate the calculation of the waiting time weight in the following text, so that the virtual departure nodes corresponding to all direct lines from the starting station o and all inbound lines from the starting station o to all transfer stations are the same as The starting sites o together constitute the starting site set O;

步骤2.1.2将线路集合A中第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000118
对应的虚拟到达节点记为
Figure GDA0003383814880000119
从第k个换乘站点Mk到目的站点d的第j条出站线路
Figure GDA00033838148800001110
对应的虚拟出发节点记为
Figure GDA00033838148800001111
由虚拟到达节点
Figure GDA00033838148800001112
和虚拟出发节点
Figure GDA00033838148800001113
可以构建新的网络,将换乘等待时间量化计算。从而将从起始站点o到第k个换乘站点Mk的所有进站线路对应的虚拟到达节点以及从第k个换乘站点Mk到目的站点d的所有出站线路对应的虚拟出发节点构成第k个换乘站点集合Mk′;进而得到所有换乘站点集合M′={M′k|k=1,2,…,K};Step 2.1.2 Put the i-th incoming line of the k-th transfer station M k in the line set A
Figure GDA0003383814880000118
The corresponding virtual arrival node is denoted as
Figure GDA0003383814880000119
The jth outbound line from the kth transfer station Mk to the destination station d
Figure GDA00033838148800001110
The corresponding virtual departure node is recorded as
Figure GDA00033838148800001111
Arrive node by virtual
Figure GDA00033838148800001112
and virtual departure node
Figure GDA00033838148800001113
A new network can be constructed to quantify the transfer waiting time. Thus, the virtual arrival nodes corresponding to all inbound lines from the starting station o to the kth transfer station Mk and the virtual departure nodes corresponding to all outbound lines from the kth transfer station Mk to the destination station d Constitute the kth transfer station set M k ′; and then obtain all transfer station sets M′={M′ k |k=1,2,…,K};

2.2构建新的线路集合A′,从而生成扩展公交网络G′=(V′,A′):2.2 Construct a new line set A' to generate an extended bus network G'=(V', A'):

定义

Figure GDA0003383814880000121
表示以起始站点o为起点,以第n条直达线路ln对应的虚拟出发节点
Figure GDA0003383814880000122
为终点的等待弧;definition
Figure GDA0003383814880000121
Indicates the virtual departure node corresponding to the nth direct line l n starting from the starting station o
Figure GDA0003383814880000122
is the waiting arc for the end point;

定义

Figure GDA0003383814880000123
表示以起始站点o为起点,以第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000124
对应的虚拟出发节点
Figure GDA0003383814880000125
为终点的等待弧;表示乘客等待公交到达起始站点o,从而得到起始站点集O的等待弧集,记为
Figure GDA0003383814880000126
definition
Figure GDA0003383814880000123
Indicates the i-th inbound line starting from the starting station o and taking the k-th transfer station M k
Figure GDA0003383814880000124
Corresponding virtual departure node
Figure GDA0003383814880000125
is the waiting arc of the end point; it means that passengers wait for the bus to arrive at the starting station o, so as to obtain the waiting arc set of the starting station set O, denoted as
Figure GDA0003383814880000126

定义

Figure GDA0003383814880000127
表示以第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000128
的虚拟到达节点
Figure GDA0003383814880000129
为起点,以第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800001210
的虚拟出发节点
Figure GDA00033838148800001211
为终点的等待弧;表示乘客到达虚拟到达节点
Figure GDA00033838148800001212
之后等待换乘公交到达虚拟出发节点
Figure GDA00033838148800001213
从而得到第k个换乘站点集合Mk′的等待弧集,记为
Figure GDA00033838148800001214
进而得到所有换乘站点集合M′的等待弧集,记为
Figure GDA00033838148800001215
definition
Figure GDA0003383814880000127
Indicates the i-th inbound line at the k-th transfer station M k
Figure GDA0003383814880000128
virtual arrival node of
Figure GDA0003383814880000129
as the starting point, take the jth outbound line of the kth transfer station M k
Figure GDA00033838148800001210
virtual departure node
Figure GDA00033838148800001211
is the waiting arc at the end point; indicates that the passenger arrives at the virtual arrival node
Figure GDA00033838148800001212
Then wait for the transfer bus to arrive at the virtual departure node
Figure GDA00033838148800001213
Thus, the waiting arc set of the k-th transfer station set M k ′ is obtained, denoted as
Figure GDA00033838148800001214
Then, the waiting arc set of all transfer station set M' is obtained, denoted as
Figure GDA00033838148800001215

由起始站点集O的等待弧集WLO和所有换乘站点集合M′的等待弧集WLM构成总等待弧集WL,即WL={WLO,WLM};The total waiting arc set WL is composed of the waiting arc set WLO of the starting station set O and the waiting arc set WL M of all transfer station sets M′, namely WL={ WLO ,WL M };

定义

Figure GDA00033838148800001216
表示以第n条直达线路ln的虚拟出发节点
Figure GDA00033838148800001217
为起点,以目的站点d为终点的行驶弧,即公交车从出发站点到目的站点的行驶过程,从而得到以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure GDA00033838148800001218
definition
Figure GDA00033838148800001216
represents the virtual departure node of the nth direct line l n
Figure GDA00033838148800001217
as the starting point and the destination station d as the destination point, that is, the driving process of the bus from the departure station to the destination station, so as to obtain the travel arc set starting from the virtual departure nodes of all direct routes and ending at the destination station d, marked as
Figure GDA00033838148800001218

定义

Figure GDA00033838148800001219
表示以第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800001220
的虚拟出发节点
Figure GDA00033838148800001221
为起点,以第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800001222
的虚拟到达节点
Figure GDA00033838148800001223
为终点的行驶弧,即公交车从出发站点到换乘站点的行驶过程,从而得到以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集,记为
Figure GDA00033838148800001224
definition
Figure GDA00033838148800001219
Indicates the i-th inbound line at the k-th transfer station M k
Figure GDA00033838148800001220
virtual departure node
Figure GDA00033838148800001221
as the starting point, take the i-th inbound line of the k-th transfer station M k
Figure GDA00033838148800001222
virtual arrival node of
Figure GDA00033838148800001223
is the driving arc of the end point, that is, the driving process of the bus from the departure station to the transfer station, so that the virtual departure nodes of all inbound lines of all transfer stations are taken as the starting point, and the distances of all inbound lines of all transfer stations are obtained. The set of travel arcs with the virtual arrival node as the end point, denoted as
Figure GDA00033838148800001224

定义

Figure GDA0003383814880000131
表示以第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000132
的虚拟出发节点
Figure GDA0003383814880000133
为起点,以目的站点d为终点的行驶弧,即公交车从出发站点到换乘站点的行驶过程,从而得到以所有换乘站点的所有出站线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure GDA0003383814880000134
definition
Figure GDA0003383814880000131
represents the jth outbound line at the kth transfer station Mk
Figure GDA0003383814880000132
virtual departure node
Figure GDA0003383814880000133
As the starting point, the driving arc with the destination station d as the end point is the driving process of the bus from the departure station to the transfer station, so as to obtain the virtual departure nodes of all outbound lines of all transfer stations as the starting point, and the destination station d. is the set of driving arcs at the end point, denoted as
Figure GDA0003383814880000134

由以所有直达线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集L′、以所有换乘站点的所有进站线路的虚拟出发节点为起点以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′、以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′构成总行驶弧集RL,即RL={L′,FL′,AL′};From the travel arc set L' starting from the virtual departure nodes of all direct lines and ending at the destination station d, starting from the virtual departure nodes of all inbound lines of all transfer stations, and taking all inbound lines of all transfer stations as the starting point The travel arc set FL′ with the virtual arrival node as the end point and the travel arc set AL′ with the virtual departure nodes of all outbound lines of all transfer stations as the starting point and the destination station d as the end point constitute the total travel arc set RL, that is, RL ={L',FL',AL'};

由总等待弧集WL和总行驶弧集RL构成新的线路集合,记为A′={WL,RL};A new line set is formed by the total waiting arc set WL and the total traveling arc set RL, denoted as A′={WL,RL};

步骤三、计算扩展公交网络上等待弧与行驶弧的权重:Step 3: Calculate the weights of waiting arcs and driving arcs on the extended bus network:

步骤3.1、设定乘客到达起始站点o的时刻为to,同时将实时公交信息和路况信息添加到扩展公交网络G′=(V′,A′)中;Step 3.1. Set the moment when the passenger arrives at the starting station o as t o , and at the same time add the real-time bus information and road condition information to the extended bus network G′=(V′, A′);

步骤3.2、将新的线路集合A′中的行驶弧和等待弧赋予相应的权重ω,从而得到赋权有向图G″=(V′,A′,ω),其中权重ω包括:

Figure GDA0003383814880000135
Figure GDA0003383814880000136
Step 3.2, assign the corresponding weight ω to the traveling arc and the waiting arc in the new line set A', so as to obtain the weighted directed graph G"=(V', A', ω), where the weight ω includes:
Figure GDA0003383814880000135
Figure GDA0003383814880000136

令起始站点集O的等待弧集WLO的权重

Figure GDA0003383814880000137
表示乘客乘坐第n条直达线路ln上在时刻to后最先到达起始站点o的公交车所需要等待的时间,即
Figure GDA0003383814880000138
其中,
Figure GDA0003383814880000139
表示在时刻to后第n条直达线路ln上的最先到达起始站点o的公交车到达起始站点o的时刻,如果在乘客到达起始站点o的时刻to后在第n条直达线路ln上不再有公交车,则令
Figure GDA00033838148800001310
Let the weight of the waiting arc set WLO of the starting site set O be
Figure GDA0003383814880000137
Represents the waiting time for passengers to take the bus on the nth direct line l n that first arrives at the starting station o after time t o , i.e.
Figure GDA0003383814880000138
in,
Figure GDA0003383814880000139
Represents the time at which the first bus on the nth direct line l n arrives at the starting station o after the time to If there are no more buses on the direct line l n , then let
Figure GDA00033838148800001310

令起始站点集O的等待弧集WLO的权重

Figure GDA00033838148800001311
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800001312
上最先到达起始站点o的公交车所需要等待的时间,即
Figure GDA00033838148800001313
其中,
Figure GDA00033838148800001314
表示在时刻to后第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800001315
上最先到达起始站点o的公交车到达o的时刻,如果时刻to后在第k个换乘站点Mk的第i条进站线路
Figure GDA00033838148800001316
上不再有公交车,则令
Figure GDA00033838148800001317
Let the weight of the waiting arc set WLO of the starting site set O be
Figure GDA00033838148800001311
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure GDA00033838148800001312
The waiting time for the bus that first arrives at the starting station o, i.e.
Figure GDA00033838148800001313
in,
Figure GDA00033838148800001314
represents the i-th inbound line at the k-th transfer station M k after time t o
Figure GDA00033838148800001315
The time when the bus that first arrives at the starting station o arrives at o, if the ith incoming line at the kth transfer station Mk after time t o
Figure GDA00033838148800001316
If there is no longer a bus on the
Figure GDA00033838148800001317

令换乘站点集合M′的等待弧集WLM的权重

Figure GDA0003383814880000141
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000142
上的公交车到达Mk后,乘客乘坐第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000143
上最先到达Mk的公交车所需要等待的时间,即
Figure GDA0003383814880000144
其中,
Figure GDA0003383814880000145
为时刻to后最先到达起始站点o的公交车经过第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000146
到达第k个换乘站点Mk的时刻,
Figure GDA0003383814880000147
表示在时刻
Figure GDA0003383814880000148
之后在第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000149
上最先到达Mk时刻,如果时刻
Figure GDA00033838148800001410
后不再有到达第k个换乘站点Mk且经过第k个换乘站点Mk的第j条出站线路
Figure GDA00033838148800001411
的公交车,则令
Figure GDA00033838148800001412
Let the weight of the waiting arc set WLM of the transfer station set M '
Figure GDA0003383814880000141
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure GDA0003383814880000142
After the bus on board arrives at Mk , the passenger takes the jth outbound line of the kth transfer station Mk
Figure GDA0003383814880000143
The waiting time for the bus that arrives at M k first, namely
Figure GDA0003383814880000144
in,
Figure GDA0003383814880000145
is the ith incoming line of the bus that first arrives at the starting station o after the time t o and passes through the k th transfer station M k
Figure GDA0003383814880000146
When arriving at the k-th transfer station M k ,
Figure GDA0003383814880000147
expressed at the moment
Figure GDA0003383814880000148
Then the j-th outbound line at the k-th transfer station M k
Figure GDA0003383814880000149
to arrive at time M k first, if the time
Figure GDA00033838148800001410
After that, there is no longer the jth outbound line that arrives at the kth transfer station Mk and passes through the kth transfer station Mk
Figure GDA00033838148800001411
bus, the order
Figure GDA00033838148800001412

令以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集L′的权重

Figure GDA00033838148800001413
表示乘客乘坐最先到达起始站点o的公交车在第n条直达线路ln上基于实时路况的行驶时间,即
Figure GDA00033838148800001414
其中,
Figure GDA00033838148800001415
为小汽车基于实时路况下经过第n条直达线路ln的行驶时间,μ为换算系数,且μ>1,
Figure GDA00033838148800001416
为第n条直达线路ln上的公交车站个数且不包括起始站点o和目的站点d,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set L′ starting from the virtual departure nodes of all direct routes and ending at the destination station d
Figure GDA00033838148800001413
Represents the travel time of passengers taking the bus that first arrives at the starting station o on the nth direct line l n based on real-time road conditions, namely
Figure GDA00033838148800001414
in,
Figure GDA00033838148800001415
is the travel time of the car through the nth direct line l n based on real-time road conditions, μ is the conversion factor, and μ>1,
Figure GDA00033838148800001416
is the number of bus stops on the nth direct line ln and does not include the starting station o and destination station d, and T is the average bus stop time at each station;

获取第n条直达线路ln上从起始站点o至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,记为

Figure GDA00033838148800001417
公交车总数
Figure GDA00033838148800001418
包含当前乘坐的车辆;Obtain the total number of buses between the starting station o and the destination station d on the nth direct line l n , and the total number of buses with the same bus line number as the passenger's current bus line number is recorded as
Figure GDA00033838148800001417
Total number of buses
Figure GDA00033838148800001418
Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA00033838148800001419
Get the real-time number of people on the qth bus
Figure GDA00033838148800001419

计算第n条直达线路ln上与乘客当前乘坐的公交线路编号相同的,从起始站点o至目的站点d之间的全部公交车在时刻

Figure GDA00033838148800001420
的平均人数且记为
Figure GDA00033838148800001421
Figure GDA00033838148800001422
由相同公交线路编号的公交车上人数的平均值,可以有效的预估线路ln的拥挤情况,从而反映出乘客当前乘坐的公交车的舒适情况,后文此类计算意义相同。从而得到影响舒适度的权重
Figure GDA00033838148800001423
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数;k和c通过大量数据拟合得到,后文中所有k和c与此步骤相同。最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA00033838148800001424
Figure GDA00033838148800001425
其中α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;Calculate the time of all buses from the starting station o to the destination station d that have the same bus line number as the passenger's current bus line number on the nth direct line l n
Figure GDA00033838148800001420
the average number of people and recorded as
Figure GDA00033838148800001421
which is
Figure GDA00033838148800001422
The average of the number of people on the bus with the same bus line number can effectively estimate the congestion situation of the line l n , thus reflecting the comfort of the bus that passengers are currently taking, and the following calculations have the same meaning. so as to get the weight that affects the comfort
Figure GDA00033838148800001423
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient; k and c are obtained by fitting a large amount of data, and all k and c in the following are the same as this step. Finally, a comprehensive weight based on the travel time of the bus line currently taken by the passenger and the degree of bus congestion is obtained.
Figure GDA00033838148800001424
and
Figure GDA00033838148800001425
where α is the degree of importance that passengers place on comfort, α∈[0,1]; when α is equal to 0, it means that passengers want to get the bus line with the shortest travel time; when α is equal to 1, it means that passengers want to get the bus line with the highest comfort level bus route; when α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;

令以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′的权重

Figure GDA0003383814880000151
表示乘客乘坐最先到达起始站点o的公交车在第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000152
上基于实时路况的行驶时间,即
Figure GDA0003383814880000153
其中,
Figure GDA0003383814880000154
为小汽车基于实时路况下经过第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000155
的行驶时间,μ为换算系数,且μ>1,
Figure GDA0003383814880000156
为第k个换乘站点Mk的第i条进站线路
Figure GDA0003383814880000157
上的公交车站个数且不包括起始站点o和第k个换乘站点Mk,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set FL′ starting from the virtual departure nodes of all inbound lines of all transfer stations and taking the virtual arrival nodes of all inbound lines of all transfer stations as the end point
Figure GDA0003383814880000151
Indicates that the passenger takes the bus that first arrives at the starting station o at the i-th inbound line at the k-th transfer station M k
Figure GDA0003383814880000152
The driving time based on real-time road conditions on the
Figure GDA0003383814880000153
in,
Figure GDA0003383814880000154
is the i-th inbound line of the car passing through the k-th transfer station M k based on real-time road conditions
Figure GDA0003383814880000155
The travel time of , μ is the conversion factor, and μ > 1,
Figure GDA0003383814880000156
is the i-th inbound line of the k-th transfer station M k
Figure GDA0003383814880000157
The number of bus stops on the bus and does not include the starting station o and the k-th transfer station M k , T is the average stop time of the bus at each station;

获取第k个换乘站点Mk的第i条进站线路

Figure GDA0003383814880000158
上从起始站点o至第k个换乘站点Mk之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,公交车总数
Figure GDA0003383814880000159
包含当前乘坐的车辆;Get the i-th inbound line of the k-th transfer station M k
Figure GDA0003383814880000158
The total number of buses from the starting station o to the k -th transfer station Mk, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure GDA0003383814880000159
Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA00033838148800001510
Get the real-time number of people on the qth bus
Figure GDA00033838148800001510

计算经过第k个换乘站点Mk的第i条进站线路

Figure GDA00033838148800001511
上与乘客当前乘坐的公交线路编号相同的,从起始站点o至第k个换乘站点Mk之间的全部公交车在时刻
Figure GDA00033838148800001512
的平均人数且记为
Figure GDA00033838148800001513
Figure GDA00033838148800001514
从而得出影响舒适度的权重
Figure GDA00033838148800001515
Figure GDA00033838148800001516
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数。最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA00033838148800001517
Figure GDA00033838148800001518
其中,α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;Calculate the i-th inbound line through the k-th transfer station M k
Figure GDA00033838148800001511
All buses from the starting station o to the k -th transfer station Mk with the same bus line number as the passenger's current bus line number are at the time
Figure GDA00033838148800001512
the average number of people and recorded as
Figure GDA00033838148800001513
which is
Figure GDA00033838148800001514
Thereby, the weights that affect the comfort level are obtained
Figure GDA00033838148800001515
and
Figure GDA00033838148800001516
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient. Finally, a comprehensive weight based on the travel time of the bus line currently taken by the passenger and the degree of bus congestion is obtained.
Figure GDA00033838148800001517
and
Figure GDA00033838148800001518
Among them, α is the passenger's degree of emphasis on comfort, α∈[0,1]; when α is equal to 0, it means that the passenger wants to get the bus line with the shortest travel time, and when α is equal to 1, it means that the passenger wants to get the highest level of comfort When α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;

令以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′的权重

Figure GDA0003383814880000161
表示乘客乘坐最先到达第k个换乘站点Mk的公交车在第j条出站线路
Figure GDA0003383814880000162
上基于实时路况的行驶时间,即
Figure GDA0003383814880000163
其中,
Figure GDA0003383814880000164
为小汽车基于实时路况下经过第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000165
的行驶时间,μ为换算系数,且μ>1,
Figure GDA0003383814880000166
为第k个换乘站点Mk的第j条出站线路
Figure GDA0003383814880000167
上的公交车站个数,且不包括第k个换乘站点Mk和目的站点d,T为公交车在每个车站的平均停靠时间;Let the weight of the travel arc set AL' starting from the virtual departure nodes of all outbound lines of all transfer stations and ending at the destination station d
Figure GDA0003383814880000161
Indicates that the passenger takes the bus that first arrives at the k-th transfer station M k on the j-th outbound line
Figure GDA0003383814880000162
The driving time based on real-time road conditions on the
Figure GDA0003383814880000163
in,
Figure GDA0003383814880000164
is the jth outbound line of the car passing through the kth transfer station Mk based on real-time road conditions
Figure GDA0003383814880000165
The travel time of , μ is the conversion factor, and μ > 1,
Figure GDA0003383814880000166
is the jth outbound line of the kth transfer station Mk
Figure GDA0003383814880000167
The number of bus stops on the bus, excluding the k-th transfer station M k and the destination station d, T is the average bus stop time at each station;

获取第k个换乘站点Mk的第j条出站线路

Figure GDA0003383814880000168
上从第k个换乘站点Mk至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,公交车总数
Figure GDA0003383814880000169
包含当前乘坐的车辆;Get the jth outbound line of the kth transfer station M k
Figure GDA0003383814880000168
The total number of buses from the k-th transfer station M k to the destination station d, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure GDA0003383814880000169
Include the current vehicle;

获取第q辆公交车上的实时人数

Figure GDA00033838148800001610
Get the real-time number of people on the qth bus
Figure GDA00033838148800001610

计算经过第k个换乘站点Mk的第j条出站线路

Figure GDA00033838148800001611
上与乘客当前乘坐的公交线路编号相同的,从第k个换乘站点Mk至目的站点d的全部公交车在时刻
Figure GDA00033838148800001612
的平均人数且记为
Figure GDA00033838148800001613
Figure GDA00033838148800001614
由此得出影响舒适度的权重
Figure GDA00033838148800001615
Figure GDA00033838148800001616
其中k为公交车人数转换为影响程度的转换系数,c为调整系数,最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure GDA00033838148800001617
Figure GDA00033838148800001618
其中α为乘客对舒适度的重视程度,α∈[0,1]。当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路。α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;得到扩展公交网络图,如图3所示。Calculate the jth outbound line through the kth transfer station Mk
Figure GDA00033838148800001611
All buses from the k-th transfer station M k to the destination station d have the same bus line number as the passenger's current bus line number at the time
Figure GDA00033838148800001612
the average number of people and recorded as
Figure GDA00033838148800001613
which is
Figure GDA00033838148800001614
This results in a weight that affects comfort
Figure GDA00033838148800001615
and
Figure GDA00033838148800001616
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient, and finally the comprehensive weight based on the travel time of the bus line currently taken by the passenger and the degree of bus congestion is obtained.
Figure GDA00033838148800001617
and
Figure GDA00033838148800001618
where α is the passenger's emphasis on comfort, α∈[0,1]. When α is equal to 0, it means that passengers want to get the bus line with the shortest travel time, and when α is equal to 1, it means that passengers want to get the bus line with the highest comfort level. When α∈(0,1), it represents the optimal bus route obtained by the passengers considering the travel time and comfort degree; the extended bus network diagram is obtained, as shown in Figure 3.

步骤四、使用组合动态规划算法在加载权重信息后的扩展公交网络图G″=(V′,A′,ω)中寻找从起始站点o至目的站点d的最优路径:Step 4: Use the combined dynamic programming algorithm to find the optimal path from the starting station o to the destination station d in the expanded public transport network graph G″=(V′, A′, ω) after loading the weight information:

步骤4.0、将赋权有向图G″=(V′,A′,ω)按照是否存在换乘线路分为直达线路网络和换乘线路网络以及混合线路网络,若赋权有向图G″=(V′,A′,ω)为直达线路网络,则执行步骤4.1和步骤4.3;若赋权有向图G″=(V′,A′,ω)为换乘线路网络,则执行步骤4.2和步骤4.3;若赋权有向图G″=(V′,A′,ω)为混合线路网络,则执行步骤4.1至步骤4.3;Step 4.0. Divide the weighted directed graph G"=(V', A', ω) into direct line network, transfer line network and mixed line network according to whether there is a transfer line. If the weighted directed graph G" =(V′,A′,ω) is the direct line network, then go to step 4.1 and step 4.3; if the weighted directed graph G″=(V′,A′,ω) is the transfer line network, then go to step 4.2 and step 4.3; if the weighted directed graph G″=(V′, A′, ω) is a mixed line network, then perform steps 4.1 to 4.3;

步骤4.1、直达线路网络的最优路径获取:Step 4.1. Obtain the optimal path of the direct line network:

步骤4.1.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;到达目的站点,方便循环计算。Step 4.1.1. Let a represent the current stage, let the state variable s a represent the possible node positions at the beginning of the current stage a, the decision variable u a represent the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, define the boundary condition f 1 (s 1 )=0; reach the destination site, which is convenient for loop calculation.

当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o;

当a=2时,初始化sa为起始站点o出发的所有直达线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all direct routes from the starting station o;

当a=3时,初始化sa为目的站点d;When a=3, initialize s a as the destination site d;

步骤4.1.2、令n=1;Step 4.1.2, let n=1;

步骤4.1.3、计算

Figure GDA0003383814880000171
Step 4.1.3, calculation
Figure GDA0003383814880000171

步骤4.1.4、将n+1赋值给n,判断n>N是否成立,若成立,执行步骤4.1.5,否则,执行步骤4.1.3;该步骤将所有直达线路的虚拟出发节点全部遍历。Step 4.1.4, assign n+1 to n, and judge whether n>N is established, if so, go to step 4.1.5, otherwise, go to step 4.1.3; this step traverses all virtual departure nodes of all direct routes.

步骤4.1.5、计算

Figure GDA0003383814880000172
令ln *
Figure GDA0003383814880000173
中最小元素对应状态变量的线路;Step 4.1.5, calculation
Figure GDA0003383814880000172
Let ln * be
Figure GDA0003383814880000173
The smallest element in the line corresponds to the state variable;

步骤4.2、换乘线路网络的最优路径获取:Step 4.2. Obtain the optimal path of the transfer line network:

步骤4.2.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;Step 4.2.1. Let a denote the current stage, let the state variable s a denote the possible node positions at the beginning of the current stage a, and the decision variable u a denote the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, define the boundary condition f 1 (s 1 )=0;

当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o;

当a=2时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all inbound lines from the starting station o to all transfer stations;

当a=3时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟到达节点;When a=3, the initialization s a is the virtual arrival node corresponding to all incoming lines from the starting station o to all transfer stations;

当a=4时,初始化sa为从所有换乘站点到目的站的所有出站线路所对应的虚拟出发节点;When a=4, initialize s a as the virtual departure node corresponding to all outbound lines from all transfer stations to the destination station;

当a=5时,初始化sa为目的站点d;When a=5, initialize s a as the destination site d;

步骤4.2.2、令k=1;Step 4.2.2, let k=1;

步骤4.2.3、令i=1;Step 4.2.3, let i=1;

步骤4.2.4、计算

Figure GDA0003383814880000181
Figure GDA0003383814880000182
Step 4.2.4, calculation
Figure GDA0003383814880000181
and
Figure GDA0003383814880000182

步骤4.2.5、将i+1赋值给i,判断i>Ik是否成立,若成立,则执行步骤4.2.6,否则,执行步骤4.2.4;该步骤将所有换乘线路中的起始站点集O中的虚拟出发节点全部遍历。Step 4.2.5. Assign i+1 to i, and judge whether i>I k is established. If so, execute step 4.2.6; otherwise, execute step 4.2.4; All virtual departure nodes in site set O are traversed.

步骤4.2.6、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.7,否则,执行步骤4.2.3;由步骤4.2.5和步骤4.2.6将所有换乘线路中起始站点集O中的虚拟出发节点和换乘站点集M'中虚拟到达节点全部遍历。Step 4.2.6. Assign k+1 to k, and judge whether k>K is established. If so, go to step 4.2.7. Otherwise, go to step 4.2.3; In the transfer line, the virtual departure node in the starting station set O and the virtual arrival node in the transfer station set M' are all traversed.

步骤4.2.7、令k=1;Step 4.2.7, let k=1;

步骤4.2.8、令j=1;Step 4.2.8, let j=1;

步骤4.2.9、计算

Figure GDA0003383814880000183
Step 4.2.9, calculation
Figure GDA0003383814880000183

Figure GDA0003383814880000184
Figure GDA0003383814880000185
中最小元素对应状态变量的进站线路;make
Figure GDA0003383814880000184
for
Figure GDA0003383814880000185
The smallest element in the inbound line corresponds to the state variable;

步骤4.2.10、将j+1赋值给j,判断j>Jk是否成立,若成立,则执行步骤4.2.11,否则,执行步骤4.2.9;Step 4.2.10, assign j+1 to j, and judge whether j>J k is established, if so, go to step 4.2.11, otherwise, go to step 4.2.9;

步骤4.2.11、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.12,否则,执行步骤4.2.8;由步骤4.2.10和步骤4.2.10将所有换乘线路中换乘站点集M'中虚拟出发节点全部遍历。Step 4.2.11. Assign k+1 to k, and judge whether k>K is established. If so, execute step 4.2.12; otherwise, execute step 4.2.8; All virtual departure nodes in the transfer station set M' in the transfer line are traversed.

步骤4.2.12、计算

Figure GDA0003383814880000186
Step 4.2.12, calculation
Figure GDA0003383814880000186

Figure GDA0003383814880000187
Figure GDA0003383814880000188
中最小元素对应状态变量的出站线路;make
Figure GDA0003383814880000187
for
Figure GDA0003383814880000188
The smallest element in the outbound line corresponding to the state variable;

步骤4.3、综合比较直达线路与换乘线路的行程时间,从而得到赋权有向图G″=(V′,A′,ω)的最优路径:Step 4.3. Comprehensively compare the travel time of the direct line and the transfer line, so as to obtain the optimal path of the weighted directed graph G″=(V′,A′,ω):

若f3(d)≤f5(d)或赋权有向图G″=(V′,A′,ω)为直达线路网络时,选择直达线路,最优直达线路为从起始站点o乘坐直达线路ln *上的公交车至目的站点d,记为

Figure GDA0003383814880000191
If f 3 (d)≤f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is a direct line network, select a direct line, and the optimal direct line is from the starting station o Take the bus on the direct line l n * to the destination station d, denoted as
Figure GDA0003383814880000191

若f3(d)>f5(d)或赋权有向图G″=(V′,A′,ω)为换乘线路网络时,选择换乘线路,最优换乘线路为从起始站点o乘坐第k个换乘站点第i条进站线路

Figure GDA0003383814880000192
上的公交车至第k个换乘站点Mk换乘,然后乘坐第j条出站线路
Figure GDA0003383814880000193
上的公交车至目的站点d,记为
Figure GDA0003383814880000194
If f 3 (d)>f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is the transfer line network, select the transfer line, and the optimal transfer line is from Start station o take the i-th incoming line at the k-th transfer station
Figure GDA0003383814880000192
Take the bus on to the k-th transfer station M k to transfer, and then take the j-th outbound line
Figure GDA0003383814880000193
take the bus to the destination station d, denoted as
Figure GDA0003383814880000194

若f3(d)=f5(d)=+∞时,则最优线路为空,表明基于乘客到达起始站点o的时刻to出发,乘客无法赶上末班车,进而无法完成本次出行;If f 3 (d)=f 5 (d)=+∞, then the optimal route is empty, which means that based on the departure time t o when the passenger arrives at the starting station o, the passenger cannot catch the last train, and thus cannot complete the trip. ;

步骤五、获取乘客当前位置,判断当前位置是否到达新的站点,如果没有到达新的站点,则更新乘客当前位置后,重复执行步骤五,如果到达新的站点,则记新的站点为o′;Step 5: Obtain the current position of the passenger, and determine whether the current position has reached the new station. If it does not reach the new station, after updating the current position of the passenger, repeat step 5. If it reaches the new station, record the new station as o' ;

若新的站点o′不是目的站点d时,则将o′赋给乘客当前所在o,并执行步骤一;由此不断循环,不断更新实时最优路径。If the new station o' is not the destination station d, then assign o' to the passenger's current location o, and perform step 1; thus loop continuously, and constantly update the real-time optimal path.

若新的站点o′是目的站点d时,则结束本次公交出行规划。If the new station o' is the destination station d, the current bus travel planning is ended.

Claims (1)

1.一种考虑乘客在途主动换乘的公交出行规划方法,其特征是按如下步骤进行:1. a bus travel planning method considering the active transfer of passengers on the way, it is characterized in that carrying out according to the following steps: 步骤一、获取乘客出行的原始公交网络:Step 1. Obtain the original bus network for passengers to travel: 根据乘客出行的起始站点o和目的站点d,得到乘客出行的原始公交网络G=(V,A),其中V为站点集,且V={o,M,d};M为换乘站点集合,且M={M1,M2,…,Mk,…,MK},其中,Mk为第k个换乘站点,k=1,2,…,K,K为换乘站点的总数;A为原始公交网络G中的线路集合,且A={L,FL,AL},其中,L为所述起始站点o和目的站点d之间直达的线路集合,且L={l1,l2,…,ln,…,lN},ln为所述起始站点o和目的站点d之间的第n条直达线路,n=1,2,…,N,N为直达线路的总数;FL为从所述起始站点o到换乘站点集合M中各个换乘站点的线路集合,且FL={FL1,FL2,…,FLk,…,FLK},其中,FLk为从所述起始站点o到第k个换乘站点Mk的进站线路集,且
Figure FDA0003383814870000011
其中,
Figure FDA0003383814870000012
为从所述起始站点o到第k个换乘站点Mk的第i条进站线路,i=1,2,…,Ik,Ik为从所述起始站点o到第k个换乘站点Mk的进站线路总数;AL为从换乘站点集合M到目的站点d的出站线路集合,且AL={AL1,AL2,…,ALk,…,ALK},ALk为从所述第k个换乘站点Mk到目的站点d的出站线路集合,且
Figure FDA0003383814870000013
其中,
Figure FDA0003383814870000014
为从所述第k个换乘站点Mk到目的站点d的第j条出站线路,j=1,2,…,Jk,Jk为从k个换乘站点Mk到目的站点d的出站线路总数;
According to the starting station o and destination station d of the passenger's trip, the original bus network G = (V, A) of the passenger's trip is obtained, where V is the station set, and V = {o, M, d}; M is the transfer station set, and M={M 1 ,M 2 ,…,M k ,…,M K }, where M k is the k-th transfer station, k=1,2,…,K, K is the transfer station A is the set of lines in the original bus network G, and A={L,FL,AL}, where L is the set of direct lines between the starting station o and the destination station d, and L={ l 1 ,l 2 ,...,l n ,...,l N }, l n is the nth direct line between the starting station o and the destination station d, n=1,2,...,N,N is the total number of direct lines; FL is the line set from the starting station o to each transfer station in the transfer station set M, and FL={FL 1 ,FL 2 ,...,FL k ,...,FL K } , where FL k is the set of inbound routes from the starting station o to the k-th transfer station M k , and
Figure FDA0003383814870000011
in,
Figure FDA0003383814870000012
is the i-th inbound line from the starting station o to the k-th transfer station M k , i=1, 2, . . . , I k , I k is the starting station o to the k-th station The total number of inbound lines of transfer station M k ; AL is the set of outbound lines from transfer station set M to destination station d, and AL={AL 1 ,AL 2 ,…,AL k ,…,AL K }, AL k is the set of outbound lines from the k-th transfer station M k to the destination station d, and
Figure FDA0003383814870000013
in,
Figure FDA0003383814870000014
is the j-th outbound line from the k-th transfer station M k to the destination station d, j=1, 2,...,J k , J k is the k-th transfer station M k to the destination station d The total number of outbound lines;
步骤二、基于原始公交网络G获取扩展公交网络:Step 2: Obtain the extended public transport network based on the original public transport network G: 2.1由所述站点集V得到扩展后的站点集V′={O,M′}:2.1 Obtain the expanded site set V′={O,M′} from the site set V: 步骤2.1.1将所述线路集合A中从起始站点o出发的第n条直达线路ln和所述从起始站点o到第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000015
对应的虚拟出发节点分别记为
Figure FDA0003383814870000016
Figure FDA0003383814870000017
从而将从起始站点o出发的所有直达线路以及从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点与所述起始站点o共同构成起始站点集O;
Step 2.1.1 In the line set A, the n-th direct line ln starting from the starting station o and the i- th inbound line from the starting station o to the k -th transfer station Mk are divided into
Figure FDA0003383814870000015
The corresponding virtual departure nodes are respectively recorded as
Figure FDA0003383814870000016
and
Figure FDA0003383814870000017
Thereby, the virtual departure nodes corresponding to all direct lines from the starting station o and all inbound lines from the starting station o to all transfer stations together with the starting station o constitute the starting station set O;
步骤2.1.2将所述线路集合A中第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000018
对应的虚拟到达节点记为
Figure FDA0003383814870000019
从第k个换乘站点Mk到目的站点d的第j条出站线路
Figure FDA00033838148700000110
对应的虚拟出发节点记为
Figure FDA00033838148700000111
从而将从起始站点o到第k个换乘站点Mk的所有进站线路对应的虚拟到达节点以及从第k个换乘站点Mk到目的站点d的所有出站线路对应的虚拟出发节点构成第k个换乘站点集合M′k;进而得到所有换乘站点集合M′={M′k|k=1,2,…,K};
Step 2.1.2 Put the i-th incoming line of the k-th transfer station M k in the line set A
Figure FDA0003383814870000018
The corresponding virtual arrival node is denoted as
Figure FDA0003383814870000019
The jth outbound line from the kth transfer station Mk to the destination station d
Figure FDA00033838148700000110
The corresponding virtual departure node is recorded as
Figure FDA00033838148700000111
Thus, the virtual arrival nodes corresponding to all inbound lines from the starting station o to the kth transfer station Mk and the virtual departure nodes corresponding to all outbound lines from the kth transfer station Mk to the destination station d form the k-th transfer station set M′ k ; and then obtain all transfer station sets M′={M′ k |k=1,2,…,K};
2.2构建新的线路集合A′,从而生成扩展公交网络G′=(V′,A′):2.2 Construct a new line set A' to generate an extended bus network G'=(V', A'): 定义
Figure FDA0003383814870000021
表示以起始站点o为起点,以第n条直达线路ln对应的虚拟出发节点
Figure FDA0003383814870000022
为终点的等待弧;
definition
Figure FDA0003383814870000021
Indicates the virtual departure node corresponding to the nth direct line l n starting from the starting station o
Figure FDA0003383814870000022
is the waiting arc for the end point;
定义
Figure FDA0003383814870000023
表示以起始站点o为起点,以第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000024
对应的虚拟出发节点
Figure FDA0003383814870000025
为终点的等待弧;从而得到起始站点集O的等待弧集,记为
Figure FDA0003383814870000026
definition
Figure FDA0003383814870000023
Indicates the i-th inbound line starting from the starting station o and taking the k-th transfer station M k
Figure FDA0003383814870000024
Corresponding virtual departure node
Figure FDA0003383814870000025
is the waiting arc of the end point; thus the waiting arc set of the initial site set O is obtained, denoted as
Figure FDA0003383814870000026
定义
Figure FDA0003383814870000027
表示以第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000028
的虚拟到达节点
Figure FDA0003383814870000029
为起点,以第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000210
的虚拟出发节点
Figure FDA00033838148700000211
为终点的等待弧;从而得到第k个换乘站点集合M′k的等待弧集,记为
Figure FDA00033838148700000212
进而得到所有换乘站点集合M′的等待弧集,记为
Figure FDA00033838148700000213
definition
Figure FDA0003383814870000027
Indicates the i-th inbound line at the k-th transfer station M k
Figure FDA0003383814870000028
virtual arrival node of
Figure FDA0003383814870000029
as the starting point, take the jth outbound line of the kth transfer station M k
Figure FDA00033838148700000210
virtual departure node
Figure FDA00033838148700000211
is the waiting arc of the end point; thus the waiting arc set of the k-th transfer station set M′ k is obtained, denoted as
Figure FDA00033838148700000212
Then, the waiting arc set of all transfer station set M' is obtained, denoted as
Figure FDA00033838148700000213
由起始站点集O的等待弧集WLO和所有换乘站点集合M′的等待弧集WLM构成总等待弧集WL,即WL={WLO,WLM};The total waiting arc set WL is composed of the waiting arc set WLO of the starting station set O and the waiting arc set WL M of all transfer station sets M′, namely WL={ WLO ,WL M }; 定义
Figure FDA00033838148700000214
表示以第n条直达线路ln的虚拟出发节点
Figure FDA00033838148700000215
为起点,以目的站点d为终点的行驶弧,从而得到以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure FDA00033838148700000216
definition
Figure FDA00033838148700000214
represents the virtual departure node of the nth direct line l n
Figure FDA00033838148700000215
As the starting point and the destination station d as the end point, the travel arc set with the virtual departure nodes of all direct routes as the start point and the destination station d as the end point is obtained, which is recorded as
Figure FDA00033838148700000216
定义
Figure FDA00033838148700000217
表示以第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000218
的虚拟出发节点
Figure FDA00033838148700000219
为起点,以第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000220
的虚拟到达节点
Figure FDA00033838148700000221
为终点的行驶弧,从而得到以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集,记为
Figure FDA00033838148700000222
definition
Figure FDA00033838148700000217
Indicates the i-th inbound line at the k-th transfer station M k
Figure FDA00033838148700000218
virtual departure node
Figure FDA00033838148700000219
as the starting point, take the i-th inbound line of the k-th transfer station M k
Figure FDA00033838148700000220
virtual arrival node of
Figure FDA00033838148700000221
is the driving arc at the end point, so as to obtain the set of driving arcs starting from the virtual departure nodes of all inbound lines of all transfer stations and taking the virtual arrival nodes of all inbound lines of all transfer stations as the end point, denoted as
Figure FDA00033838148700000222
定义
Figure FDA00033838148700000223
表示以第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000224
的虚拟出发节点
Figure FDA00033838148700000225
为起点,以目的站点d为终点的行驶弧,从而得到以所有换乘站点的所有出站线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集,记为
Figure FDA00033838148700000226
definition
Figure FDA00033838148700000223
represents the jth outbound line at the kth transfer station Mk
Figure FDA00033838148700000224
virtual departure node
Figure FDA00033838148700000225
As the starting point and the destination station d as the end point, the set of travel arcs with the virtual departure nodes of all outbound lines of all transfer stations as the start point and the destination station d as the end point is obtained, denoted as
Figure FDA00033838148700000226
由以所有直达线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集L′、以所有换乘站点的所有进站线路的虚拟出发节点为起点以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′、以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′构成总行驶弧集RL,即RL={L′,FL′,AL′};From the travel arc set L' starting from the virtual departure nodes of all direct lines and ending at the destination station d, starting from the virtual departure nodes of all inbound lines of all transfer stations, and taking all inbound lines of all transfer stations as the starting point The travel arc set FL′ with the virtual arrival node as the end point and the travel arc set AL′ with the virtual departure nodes of all outbound lines of all transfer stations as the starting point and the destination station d as the end point constitute the total travel arc set RL, that is, RL ={L',FL',AL'}; 由总等待弧集WL和总行驶弧集RL构成新的线路集合,记为A′={WL,RL};A new line set is formed by the total waiting arc set WL and the total traveling arc set RL, denoted as A′={WL,RL}; 步骤三、计算扩展公交网络上等待弧与行驶弧的权重:Step 3: Calculate the weights of waiting arcs and driving arcs on the extended bus network: 步骤3.1、设定乘客到达起始站点o的时刻为to,同时将实时公交信息和路况信息添加到扩展公交网络G′=(V′,A′)中;Step 3.1. Set the moment when the passenger arrives at the starting station o as t o , and at the same time add the real-time bus information and road condition information to the extended bus network G′=(V′, A′); 步骤3.2、将新的线路集合A′中的行驶弧和等待弧赋予相应的权重ω,从而得到赋权有向图G″=(V′,A′,ω),其中权重ω包括:
Figure FDA0003383814870000031
Figure FDA0003383814870000032
Step 3.2, assign the corresponding weight ω to the traveling arc and the waiting arc in the new line set A', so as to obtain the weighted directed graph G"=(V', A', ω), where the weight ω includes:
Figure FDA0003383814870000031
Figure FDA0003383814870000032
令起始站点集O的等待弧集WLO的权重
Figure FDA0003383814870000033
表示乘客乘坐第n条直达线路ln上在时刻to后最先到达起始站点o的公交车所需要等待的时间,即
Figure FDA0003383814870000034
其中,
Figure FDA0003383814870000035
表示在时刻to后第n条直达线路ln上的最先到达起始站点o的公交车到达起始站点o的时刻,如果在乘客到达起始站点o的时刻to后在第n条直达线路ln上不再有公交车,则令
Figure FDA0003383814870000036
Let the weight of the waiting arc set WLO of the starting site set O be
Figure FDA0003383814870000033
Represents the waiting time for passengers to take the bus on the nth direct line l n that first arrives at the starting station o after time t o , i.e.
Figure FDA0003383814870000034
in,
Figure FDA0003383814870000035
Represents the time at which the first bus on the nth direct line l n arrives at the starting station o after the time to If there are no more buses on the direct line l n , then let
Figure FDA0003383814870000036
令起始站点集O的等待弧集WLO的权重
Figure FDA0003383814870000037
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000038
上最先到达起始站点o的公交车所需要等待的时间,即
Figure FDA0003383814870000039
其中,
Figure FDA00033838148700000310
表示在时刻to后第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000311
上最先到达起始站点o的公交车到达o的时刻,如果时刻to后在第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000312
上不再有公交车,则令
Figure FDA00033838148700000313
Let the weight of the waiting arc set WLO of the starting site set O be
Figure FDA0003383814870000037
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure FDA0003383814870000038
The waiting time for the bus that first arrives at the starting station o, i.e.
Figure FDA0003383814870000039
in,
Figure FDA00033838148700000310
represents the i-th inbound line at the k-th transfer station M k after time t o
Figure FDA00033838148700000311
The time when the bus that first arrives at the starting station o arrives at o, if the ith incoming line at the kth transfer station Mk after time t o
Figure FDA00033838148700000312
If there is no longer a bus on the
Figure FDA00033838148700000313
令换乘站点集合M′的等待弧集WLM的权重
Figure FDA00033838148700000314
表示乘客乘坐第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000315
上的公交车到达Mk后,乘客乘坐第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000316
上最先到达Mk的公交车所需要等待的时间,即
Figure FDA00033838148700000317
其中,
Figure FDA00033838148700000318
为时刻to后最先到达起始站点o的公交车经过第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000319
到达第k个换乘站点Mk的时刻,
Figure FDA0003383814870000041
表示在时刻
Figure FDA0003383814870000042
之后在第k个换乘站点Mk的第j条出站线路
Figure FDA0003383814870000043
上最先到达Mk时刻,如果时刻
Figure FDA0003383814870000044
后不再有到达第k个换乘站点Mk且经过第k个换乘站点Mk的第j条出站线路
Figure FDA0003383814870000045
的公交车,则令
Figure FDA0003383814870000046
Let the weight of the waiting arc set WLM of the transfer station set M '
Figure FDA00033838148700000314
Indicates that the passenger takes the i-th inbound line of the k-th transfer station M k
Figure FDA00033838148700000315
After the bus on board arrives at Mk , the passenger takes the jth outbound line of the kth transfer station Mk
Figure FDA00033838148700000316
The waiting time for the first bus to arrive at M k , namely
Figure FDA00033838148700000317
in,
Figure FDA00033838148700000318
is the ith incoming line of the bus that first arrives at the starting station o after the time t o and passes through the kth transfer station Mk
Figure FDA00033838148700000319
When arriving at the k-th transfer station M k ,
Figure FDA0003383814870000041
expressed at the moment
Figure FDA0003383814870000042
Then the j-th outbound line at the k-th transfer station M k
Figure FDA0003383814870000043
to arrive at time M k first, if the time
Figure FDA0003383814870000044
After that, there is no longer the jth outbound line that arrives at the kth transfer station Mk and passes through the kth transfer station Mk
Figure FDA0003383814870000045
bus, the order
Figure FDA0003383814870000046
令以所有直达线路的虚拟出发节点为起点,以目的站点d为终点的行驶弧集L′的权重
Figure FDA0003383814870000047
表示乘客乘坐最先到达起始站点o的公交车在第n条直达线路ln上基于实时路况的行驶时间,即
Figure FDA0003383814870000048
其中,
Figure FDA0003383814870000049
为小汽车基于实时路况下经过第n条直达线路ln的行驶时间,μ为换算系数,且μ>1,
Figure FDA00033838148700000410
为第n条直达线路ln上的公交车站个数且不包括起始站点o和目的站点d,T为公交车在每个车站的平均停靠时间;
Let the weight of the travel arc set L′ starting from the virtual departure nodes of all direct routes and ending at the destination station d
Figure FDA0003383814870000047
Represents the travel time of passengers taking the bus that first arrives at the starting station o on the nth direct line l n based on real-time road conditions, namely
Figure FDA0003383814870000048
in,
Figure FDA0003383814870000049
is the travel time of the car through the nth direct line l n based on real-time road conditions, μ is the conversion factor, and μ>1,
Figure FDA00033838148700000410
is the number of bus stops on the nth direct line ln and does not include the starting station o and destination station d, and T is the average bus stop time at each station;
获取第n条直达线路ln上从起始站点o至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,记为Qn,所述公交车总数Q包含当前乘坐的车辆;Obtain the total number of buses between the starting station o and the destination station d on the nth direct line l n , and the total number of buses with the same bus line number as the passenger's current bus line number is recorded as Q n , the total number of buses Q Include the current vehicle; 获取第q辆公交车上的实时人数
Figure FDA00033838148700000411
Get the real-time number of people on the qth bus
Figure FDA00033838148700000411
计算第n条直达线路ln上与乘客当前乘坐的公交线路编号相同的,从起始站点o至目的站点d之间的全部公交车在时刻
Figure FDA00033838148700000412
的平均人数且记为
Figure FDA00033838148700000413
Figure FDA00033838148700000414
从而得到影响舒适度的权重
Figure FDA00033838148700000415
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数;最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure FDA00033838148700000416
Figure FDA00033838148700000417
其中α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;
Calculate the time of all buses from the starting station o to the destination station d that have the same bus line number as the passenger's current bus line number on the nth direct line l n
Figure FDA00033838148700000412
the average number of people and recorded as
Figure FDA00033838148700000413
which is
Figure FDA00033838148700000414
so as to get the weight that affects the comfort
Figure FDA00033838148700000415
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient; finally, the comprehensive weight based on the travel time of the bus line currently taken by passengers and the degree of bus congestion is obtained.
Figure FDA00033838148700000416
and
Figure FDA00033838148700000417
where α is the passenger's degree of emphasis on comfort, α∈[0,1]; when α is equal to 0, it means that the passenger wants to get the bus route with the shortest travel time; when α is equal to 1, it means that the passenger wants to get the bus line with the highest comfort level bus route; when α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;
令以所有换乘站点的所有进站线路的虚拟出发节点为起点,以所有换乘站点的所有进站线路的虚拟到达节点为终点的行驶弧集FL′的权重
Figure FDA00033838148700000418
表示乘客乘坐最先到达起始站点o的公交车在第k个换乘站点Mk的第i条进站线路
Figure FDA00033838148700000419
上基于实时路况的行驶时间,即
Figure FDA00033838148700000420
其中,
Figure FDA00033838148700000421
为小汽车基于实时路况下经过第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000051
的行驶时间,μ为换算系数,且μ>1,
Figure FDA0003383814870000052
为第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000053
上的公交车站个数且不包括起始站点o和第k个换乘站点Mk,T为公交车在每个车站的平均停靠时间;
Let the weight of the travel arc set FL′ starting from the virtual departure nodes of all inbound lines of all transfer stations and taking the virtual arrival nodes of all inbound lines of all transfer stations as the end point
Figure FDA00033838148700000418
Indicates that the passenger takes the bus that first arrives at the starting station o at the i-th inbound line at the k-th transfer station M k
Figure FDA00033838148700000419
The driving time based on real-time road conditions on the
Figure FDA00033838148700000420
in,
Figure FDA00033838148700000421
is the i-th inbound line of the car passing through the k-th transfer station M k based on real-time road conditions
Figure FDA0003383814870000051
The travel time of , μ is the conversion factor, and μ > 1,
Figure FDA0003383814870000052
is the i-th inbound line of the k-th transfer station M k
Figure FDA0003383814870000053
The number of bus stops on the bus and does not include the starting station o and the k-th transfer station M k , T is the average stop time of the bus at each station;
获取第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000054
上从起始站点o至第k个换乘站点Mk之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,所述公交车总数
Figure FDA0003383814870000055
包含当前乘坐的车辆;
Get the i-th inbound line of the k-th transfer station M k
Figure FDA0003383814870000054
The total number of buses from the starting station o to the k -th transfer station Mk, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure FDA0003383814870000055
Include the current vehicle;
获取第q辆公交车上的实时人数
Figure FDA0003383814870000056
Get the real-time number of people on the qth bus
Figure FDA0003383814870000056
计算经过第k个换乘站点Mk的第i条进站线路
Figure FDA0003383814870000057
上与乘客当前乘坐的公交线路编号相同的,从起始站点o至第k个换乘站点Mk之间的全部公交车在时刻
Figure FDA0003383814870000058
的平均人数且记为
Figure FDA0003383814870000059
Figure FDA00033838148700000510
从而得出影响舒适度的权重
Figure FDA00033838148700000511
Figure FDA00033838148700000512
其中,k为公交车人数转换为影响程度的转换系数,c为调整系数;最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure FDA00033838148700000513
Figure FDA00033838148700000514
其中,α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;
Calculate the i-th inbound line through the k-th transfer station M k
Figure FDA0003383814870000057
All buses from the starting station o to the k -th transfer station Mk with the same bus line number as the passenger's current bus line number are at the time
Figure FDA0003383814870000058
the average number of people and recorded as
Figure FDA0003383814870000059
which is
Figure FDA00033838148700000510
Thereby, the weights that affect the comfort level are obtained
Figure FDA00033838148700000511
and
Figure FDA00033838148700000512
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient; finally, the comprehensive weight based on the travel time of the bus line currently taken by passengers and the degree of bus congestion is obtained
Figure FDA00033838148700000513
and
Figure FDA00033838148700000514
Among them, α is the degree of importance that passengers place on comfort, α∈[0,1]; when α is equal to 0, it means that passengers want to get the bus line with the shortest travel time, and when α is equal to 1, it means that passengers want to get the highest level of comfort When α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;
令以所有换乘站点的所有出站线路的虚拟出发节点为起点以目的站点d为终点的行驶弧集AL′的权重
Figure FDA00033838148700000515
表示乘客乘坐最先到达第k个换乘站点Mk的公交车在第j条出站线路
Figure FDA00033838148700000516
上基于实时路况的行驶时间,即
Figure FDA00033838148700000517
其中,
Figure FDA00033838148700000518
为小汽车基于实时路况下经过第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000519
的行驶时间,μ为换算系数,且μ>1,
Figure FDA00033838148700000520
为第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000521
上的公交车站个数,且不包括第k个换乘站点Mk和目的站点d,T为公交车在每个车站的平均停靠时间;
Let the weight of the travel arc set AL' starting from the virtual departure nodes of all outbound lines of all transfer stations and ending at the destination station d
Figure FDA00033838148700000515
Indicates that the passenger takes the bus that first arrives at the k-th transfer station M k on the j-th outbound line
Figure FDA00033838148700000516
The driving time based on real-time road conditions on the
Figure FDA00033838148700000517
in,
Figure FDA00033838148700000518
is the jth outbound line of the car passing through the kth transfer station Mk based on real-time road conditions
Figure FDA00033838148700000519
The travel time of , μ is the conversion factor, and μ > 1,
Figure FDA00033838148700000520
is the jth outbound line of the kth transfer station Mk
Figure FDA00033838148700000521
The number of bus stops on the bus, excluding the k-th transfer station M k and the destination station d, T is the average bus stop time at each station;
获取第k个换乘站点Mk的第j条出站线路
Figure FDA00033838148700000522
上从第k个换乘站点Mk至目的站点d之间的公交车辆,且与乘客当前乘坐的公交线路编号相同的公交车总数,所述公交车总数
Figure FDA00033838148700000523
包含当前乘坐的车辆;
Get the jth outbound line of the kth transfer station M k
Figure FDA00033838148700000522
The total number of buses from the k-th transfer station Mk to the destination station d, and the total number of buses with the same bus line number as the passenger's current bus line number, the total number of buses
Figure FDA00033838148700000523
Include the current vehicle;
获取第q辆公交车上的实时人数
Figure FDA0003383814870000061
Get the real-time number of people on the qth bus
Figure FDA0003383814870000061
计算经过第k个换乘站点Mk的第j条出站线路
Figure FDA0003383814870000062
上与乘客当前乘坐的公交线路编号相同的,从第k个换乘站点Mk至目的站点d的全部公交车在时刻
Figure FDA0003383814870000063
的平均人数且记为
Figure FDA0003383814870000064
Figure FDA0003383814870000065
由此得出影响舒适度的权重
Figure FDA0003383814870000066
Figure FDA0003383814870000067
其中k为公交车人数转换为影响程度的转换系数,c为调整系数,最终得到基于乘客当前乘坐的公交线路的行驶时间和公交车拥挤程度的综合权重
Figure FDA0003383814870000068
Figure FDA0003383814870000069
其中α为乘客对舒适度的重视程度,α∈[0,1];当α等于0时,表示乘客希望得到最短出行时间的公交线路,当α等于1时,表示乘客希望得到舒适度最高的公交线路;α∈(0,1)时,表示乘客综合考虑出行时间和舒适度得到的最优公交线路;
Calculate the jth outbound line through the kth transfer station Mk
Figure FDA0003383814870000062
All buses from the k-th transfer station M k to the destination station d have the same bus line number as the passenger's current bus line number at the time
Figure FDA0003383814870000063
the average number of people and recorded as
Figure FDA0003383814870000064
which is
Figure FDA0003383814870000065
This results in a weight that affects comfort
Figure FDA0003383814870000066
and
Figure FDA0003383814870000067
Among them, k is the conversion coefficient of the number of buses converted into the degree of influence, and c is the adjustment coefficient, and finally the comprehensive weight based on the travel time of the bus line currently taken by the passenger and the degree of bus congestion is obtained.
Figure FDA0003383814870000068
and
Figure FDA0003383814870000069
where α is the passenger's degree of emphasis on comfort, α∈[0,1]; when α is equal to 0, it means that the passenger wants to get the bus route with the shortest travel time; when α is equal to 1, it means that the passenger wants to get the bus line with the highest comfort level bus route; when α∈(0,1), it represents the optimal bus route obtained by passengers considering travel time and comfort;
步骤四、使用组合动态规划算法在加载权重信息后的扩展公交网络图G″=(V′,A′,ω)中寻找从起始站点o至目的站点d的最优路径:Step 4: Use the combined dynamic programming algorithm to find the optimal path from the starting station o to the destination station d in the expanded public transport network graph G″=(V′, A′, ω) after loading the weight information: 步骤4.0、将赋权有向图G″=(V′,A′,ω)按照是否存在换乘线路分为直达线路网络和换乘线路网络以及混合线路网络,若赋权有向图G″=(V′,A′,ω)为直达线路网络,则执行步骤4.1和步骤4.3;若赋权有向图G″=(V′,A′,ω)为换乘线路网络,则执行步骤4.2和步骤4.3;若赋权有向图G″=(V′,A′,ω)为混合线路网络,则执行步骤4.1至步骤4.3;Step 4.0. Divide the weighted directed graph G"=(V', A', ω) into direct line network, transfer line network and mixed line network according to whether there is a transfer line. If the weighted directed graph G" =(V′,A′,ω) is the direct line network, then go to step 4.1 and step 4.3; if the weighted directed graph G″=(V′,A′,ω) is the transfer line network, then go to step 4.2 and step 4.3; if the weighted directed graph G″=(V′, A′, ω) is a mixed line network, then perform steps 4.1 to 4.3; 步骤4.1、直达线路网络的最优路径获取:Step 4.1. Obtain the optimal path of the direct line network: 步骤4.1.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;Step 4.1.1. Let a represent the current stage, let the state variable s a represent the possible node positions at the beginning of the current stage a, the decision variable u a represent the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, define the boundary condition f 1 (s 1 )=0; 当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o; 当a=2时,初始化sa为起始站点o出发的所有直达线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all direct routes from the starting station o; 当a=3时,初始化sa为目的站点d;When a=3, initialize s a as the destination site d; 步骤4.1.2、令n=1;Step 4.1.2, let n=1; 步骤4.1.3、计算
Figure FDA0003383814870000075
Step 4.1.3, calculation
Figure FDA0003383814870000075
步骤4.1.4、将n+1赋值给n,判断n>N是否成立,若成立,执行步骤4.1.5,否则,执行步骤4.1.3;Step 4.1.4, assign n+1 to n, and judge whether n>N is established, if so, go to step 4.1.5, otherwise, go to step 4.1.3; 步骤4.1.5、计算
Figure FDA0003383814870000071
令ln *
Figure FDA0003383814870000072
中最小元素对应状态变量的线路;
Step 4.1.5, calculation
Figure FDA0003383814870000071
Let ln * be
Figure FDA0003383814870000072
The smallest element in the line corresponds to the state variable;
步骤4.2、换乘线路网络的最优路径获取:Step 4.2. Obtain the optimal path of the transfer line network: 步骤4.2.1、令a表示当前阶段,令状态变量sa表示当前阶段a之初可能的节点位置,决策变量ua表示当前阶段a之初可能选择的弧,定义指标函数Va(s1,u1,…sa-1,ua-1,sa)为当前阶段a之前选择的所有公交线路对应的等待弧和行驶弧的权重之和,令最优值函数fa(sa)=min{Va(s1,u1,…sa-1,ua-1,sa)},定义边界条件f1(s1)=0;Step 4.2.1. Let a represent the current stage, let the state variable s a represent the possible node positions at the beginning of the current stage a, the decision variable u a represent the arcs that may be selected at the beginning of the current stage a, and define the indicator function V a (s 1 ,u 1 ,…s a-1 ,u a-1 ,s a ) is the sum of the weights of waiting arcs and travel arcs corresponding to all bus lines selected before the current stage a, let the optimal value function f a (s a )=min{V a (s 1 , u 1 ,...s a-1 ,u a-1 ,s a )}, defining the boundary condition f 1 (s 1 )=0; 当a=1时,初始化sa为起始站点o;When a=1, initialize s a as the starting site o; 当a=2时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟出发节点;When a=2, initialize s a as the virtual departure node corresponding to all inbound lines from the starting station o to all transfer stations; 当a=3时,初始化sa为从起始站点o到所有换乘站点的所有进站线路所对应的虚拟到达节点;When a=3, initialize s a as the virtual arrival node corresponding to all incoming lines from the starting station o to all transfer stations; 当a=4时,初始化sa为从所有换乘站点到目的站的所有出站线路所对应的虚拟出发节点;When a=4, initialize s a as the virtual departure node corresponding to all outbound lines from all transfer stations to the destination station; 当a=5时,初始化sa为目的站点d;When a=5, initialize s a as the destination site d; 步骤4.2.2、令k=1;Step 4.2.2, let k=1; 步骤4.2.3、令i=1;Step 4.2.3, let i=1; 步骤4.2.4、计算
Figure FDA0003383814870000073
Figure FDA0003383814870000074
Step 4.2.4, calculation
Figure FDA0003383814870000073
and
Figure FDA0003383814870000074
步骤4.2.5、将i+1赋值给i,判断i>Ik是否成立,若成立,则执行步骤4.2.6,否则,执行步骤4.2.4;Step 4.2.5, assign i+1 to i, and judge whether i>I k is established, if so, execute step 4.2.6, otherwise, execute step 4.2.4; 步骤4.2.6、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.7,否则,执行步骤4.2.3;Step 4.2.6, assign k+1 to k, and judge whether k>K is established, if so, go to step 4.2.7, otherwise, go to step 4.2.3; 步骤4.2.7、令k=1;Step 4.2.7, let k=1; 步骤4.2.8、令j=1;Step 4.2.8, let j=1; 步骤4.2.9、计算
Figure FDA0003383814870000081
Step 4.2.9, calculation
Figure FDA0003383814870000081
Figure FDA0003383814870000082
Figure FDA0003383814870000083
中最小元素对应状态变量的进站线路;
make
Figure FDA0003383814870000082
for
Figure FDA0003383814870000083
The smallest element in the inbound line corresponds to the state variable;
步骤4.2.10、将j+1赋值给j,判断j>Jk是否成立,若成立,则执行步骤4.2.11,否则,执行步骤4.2.9;Step 4.2.10, assign j+1 to j, and judge whether j>J k is true, if true, go to step 4.2.11, otherwise, go to step 4.2.9; 步骤4.2.11、将k+1赋值给k,判断k>K是否成立,若成立,则执行步骤4.2.12,否则,执行步骤4.2.8;Step 4.2.11, assign k+1 to k, and judge whether k>K is established, if so, go to step 4.2.12, otherwise, go to step 4.2.8; 步骤4.2.12、计算
Figure FDA0003383814870000084
Step 4.2.12, calculation
Figure FDA0003383814870000084
Figure FDA0003383814870000085
Figure FDA0003383814870000086
中最小元素对应状态变量的出站线路;
make
Figure FDA0003383814870000085
for
Figure FDA0003383814870000086
The smallest element in the outbound line corresponding to the state variable;
步骤4.3、综合比较直达线路与换乘线路的行程时间,从而得到赋权有向图G″=(V′,A′,ω)的最优路径:Step 4.3. Comprehensively compare the travel time of the direct line and the transfer line, so as to obtain the optimal path of the weighted directed graph G″=(V′,A′,ω): 若f3(d)≤f5(d)或赋权有向图G″=(V′,A′,ω)为直达线路网络时,选择直达线路,最优直达线路为从起始站点o乘坐直达线路ln *上的公交车至目的站点d,记为
Figure FDA0003383814870000087
If f 3 (d)≤f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is a direct line network, select a direct line, and the optimal direct line is from the starting station o Take the bus on the direct line l n * to the destination station d, denoted as
Figure FDA0003383814870000087
若f3(d)>f5(d)或赋权有向图G″=(V′,A′,ω)为换乘线路网络时,选择换乘线路,最优换乘线路为从起始站点o乘坐第k个换乘站点第i条进站线路
Figure FDA0003383814870000088
上的公交车至第k个换乘站点Mk换乘,然后乘坐第j条出站线路
Figure FDA0003383814870000089
上的公交车至目的站点d,记为
Figure FDA00033838148700000810
If f 3 (d)>f 5 (d) or the weighted directed graph G″=(V′,A′,ω) is the transfer line network, select the transfer line, and the optimal transfer line is from Start station o take the i-th incoming line at the k-th transfer station
Figure FDA0003383814870000088
Take the bus on to the k-th transfer station M k to transfer, and then take the j-th outbound line
Figure FDA0003383814870000089
take the bus to the destination station d, denoted as
Figure FDA00033838148700000810
若f3(d)=f5(d)=+∞时,则最优线路为空,表明基于乘客到达起始站点o的时刻to出发,乘客无法赶上末班车,进而无法完成本次出行;If f 3 (d)=f 5 (d)=+∞, then the optimal route is empty, indicating that based on the departure of the passenger at the time t o of the starting station o, the passenger cannot catch the last train and thus cannot complete the trip. ; 步骤五、获取乘客当前位置,判断当前位置是否到达新的站点,如果没有到达新的站点,则更新乘客当前位置后,重复执行步骤五,如果到达新的站点,则记新的站点为o′;Step 5: Obtain the current position of the passenger, and determine whether the current position has reached the new station. If it does not reach the new station, after updating the current position of the passenger, repeat step 5. If it reaches the new station, record the new station as o' ; 若新的站点o′不是目的站点d时,则将o′赋给乘客当前所在o,并执行步骤一;If the new station o' is not the destination station d, assign o' to the passenger's current location o, and execute step 1; 若新的站点o′是目的站点d时,则结束本次公交出行规划。If the new station o' is the destination station d, the current bus travel planning is ended.
CN202010096480.1A 2020-02-17 2020-02-17 A bus travel planning method considering passengers' active transfer on the way Expired - Fee Related CN111311002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010096480.1A CN111311002B (en) 2020-02-17 2020-02-17 A bus travel planning method considering passengers' active transfer on the way

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010096480.1A CN111311002B (en) 2020-02-17 2020-02-17 A bus travel planning method considering passengers' active transfer on the way

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 Expired - Fee Related CN111311002B (en) 2020-02-17 2020-02-17 A bus travel planning method considering passengers' active transfer on the way

Country Status (1)

Country Link
CN (1) CN111311002B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
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
CN118031995B (en) * 2024-03-28 2025-10-03 厦门金龙联合汽车工业有限公司 Multi-objective path planning method for intelligent public transportation system
CN118822064B (en) * 2024-07-01 2025-12-12 中铁第四勘察设计院集团有限公司 Passenger route planning methods, devices, equipment and storage media
CN120013149B (en) * 2025-01-17 2025-12-26 四川大学 A method and device for determining the station dwell time of public transport vehicles in transfer scenarios.
CN119761609B (en) * 2025-03-06 2025-07-15 浙江飞猪网络技术有限公司 Travel scheme recommendation method, travel scheme recommendation system, travel server and travel scheme recommendation program

Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8494771B2 (en) * 2011-09-07 2013-07-23 Microsoft Corporation Journey planning in public transportation networks
AU2018279041A1 (en) * 2017-06-21 2019-01-31 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for route planning

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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) A bus travel planning method considering passengers' active transfer on the way
CN105205557B (en) A design method of urban conventional bus network
CN109447340B (en) Method for optimizing customized bus route with shortest reliability
CN107194128B (en) Multi-mode public transport network design method based on central radiation type network framework
CN107330547A (en) A kind of city bus dynamic dispatching optimization method and system
CN105513400A (en) Method for dynamically planning travel route
CN109612488B (en) Big data micro-service-based mixed travel mode path planning system and method
CN111127936B (en) A dynamic vehicle scheduling and route planning method for shared buses
CN106504516A (en) A Multi-form Bus Dynamic Scheduling Method Based on Bus Station Informatization
CN107564269A (en) A kind of half flexible bus dispatching method based on willingness to pay
CN103942948A (en) Method for generating urban bus route network based on segmented splicing
CN112729324A (en) Electric vehicle charging guidance and path planning method based on mutual-help travel system
CN107092986B (en) Selection method of bus passenger travel route based on station and collinear operation
CN109816979A (en) A recommended method for bus routes considering bus arrival frequency and ride comfort
CN109308574A (en) A real-time response method for semi-flexible bus scheduling on the Internet
CN112183891B (en) A complex network-based method for recommending express stations at major bus stations
CN107101645A (en) A kind of paths planning method and path planning apparatus
CN108960539A (en) A kind of demand response formula feeder bus sytem method for optimizing route
CN105513406B (en) A kind of dynamic public transit system and method
CN110414750A (en) A real-time charging station selection method for electric vehicles based on deep reinforcement learning
CN113538886A (en) A real-time responsive customized bus hierarchical scheduling method
CN103241268A (en) Subway departure time optimizing method for reducing transfer time of tunnel transfer stations
CN118031995B (en) Multi-objective path planning method for intelligent public transportation system
CN106895846A (en) A kind of paths planning method and path planning apparatus
CN108830401B (en) Optimal rate calculation method for dynamic congestion charging based on cellular transport model

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20220211