公交调度可视化调研2 | 青训营笔记
这是我参与「第五届青训营 」伴学笔记创作活动的第 10 天
(仅供自己参考,技术点请看字节整理的资料和相应官方技术文档)
这是前端项目系列里的第2篇《公交调度可视化调研2》
Application Domain
Planning a bus service involves long-term and short-term decisions to make. The long-term decisions include investment in infrastructure and line planning. The short-term decisions are scheduling problems, . The bus scheduling problem (BSP) assigns buses to the timetabled trips such that every trip is covered by a bus.
Considering different scenarios, the objective is commonly categorized into
- to minimize the operational cost based on bus usage
- to maximize the revenues
- to maximize satisfaction of passengers demand
- to minimize the time of finishing passengers demand
Use Cases
Scenario 1: how to plan and schedule bus services in a developing area
Scenario 2:Electric Vehicle Scheduling Problem (E-VSP)
What’s new: determine charging plan and charging infrastructure
the research hot topic in recent 10 years
Scenario 3: School Bus Scheduling Problem -- vehicle routing problem with time windows (VRPTW)
Objective: optimize bus schedules to serve all the given trips considering the school time windows.
Scenario 4:Bus Scheduling Problem in Emergency
Buses help transporting passengers in urban rail line interruption
Pipeline
Model
What we already knows (Parameters)
- static route network and the attributes of network(capacity per arc, arc costs...)
- Passenger Demand, represented as a an OD matrix
- how many buses we can schedule and the bus attributes
What we need to make decisions (Decision Variables)
Decision Variables
Solving the scheduling problem is to calculate the decision variables and optimize the objective.
-
flows per arc
- passenger flows
- frequency per route ?
-
number of bus to run in system
-
bus run on the route or not (binary)
Parameters
parameters (aka input values, attributes,constants)
- Bus
- Diesel Bus(油车)
- Electric bus
| Parameters | explanation | |
|---|---|---|
| number of bus | how many buses can be used to schedule | |
| velocity | the attribute of a bus | 平均时速25-50km/h |
| capacity | the attribute of a bus | 50人/车 |
| fuel consumption | the attribute of a bus | |
| cost per km | the operating cost per km, include labor cost, fuel cost, |
- Electric bus
- Passenger Demand
| id | Origin | Destin | Quant | Time |
|---|---|---|---|---|
| 1 | 1 | 4 | 15 | [07:50, 08:10] |
| 2 | 1 | 5 | 5 | [07:50, 08:10] |
| 3 | 2 | 5 | 10 | [08:30, 09:00] |
From a macro perspective, OD matrix is defined to describe the passenger demand.
Each row [x1,x2,x3,x4,x5] in an OD matrix means There are x2 passengers whose origin is the bus stop x3 and the destination is the bus stop x4 with an arrival time constraints x5, given such type of passengers the id x1. The time column is optimal.
From a micro perspective, each passenger's personal demand can be structured as a record of a demand table, similar to the OD matrix. However we do not take this kind of model into consideration due to its over complexity.
- Transport Network
| Parameters | explanation | |
|---|---|---|
| network graph G(V, A) | The node sets V represents the stop sets; the arc sets A represents the road sets in the transport network | |
| capacity per arc | the attribute of roads, how many lanes | 车道 |
| distance | the attribute of roads | |
| arc costs | such as expressway, need to pay for use |
Model: Multi-Commodity Flow(MCF)
Problem Formulation 1: My Formulation
举例:在总站有10辆车,有一个乘客的需求矩阵(OD matrix),有一个路网。我们希望(目标函数)
- minimal cost
- serve the passengers as soon as possible
我们要做出每辆车的运行决策:
对于,如果它的运行路线包括边,则,否则为0;
表示for bus p, how many passengers will be on board at stop i (Passenger Flows)
表示for bus p, how many passengers will be off board at stop i (Passenger Flows)
min cost:
subject to:
the number of passengers on the bus cannot exceed the bus capacity
the total numbers of passengers onboard at stop i equals to the demand at stop i
(参考www.youtube.com/watch?v=RqS…,但是这个数学模型too general, not specific)
Solution
Visualization
- develop a UI interface to visualize different schedule plans. Users (oriented to bus dispatcher and bus service planner) can adjust decision variables to compare the simulated schedule results
- visualize the solver solving process, assisting explaining the intermediate process.
Reference
[1] 2021 Electric bus planning & scheduling: A review of related problems and methodologies
[2] 2014 Enhancing metro network resilience via localized integration with bus services.
[3] 2016 Optimizing Bus Bridging Services in Response to Disruptions of Urban Transit Rail Networks.
[4] 2018 Electric bus fleet size and mix problem with optimization of charging infrastructure
[5] 2012 A school bus scheduling problem
Terms and Resources
deadhead layover
swiftly.zendesk.com/hc/en-us/ar…
数字孪生可视化demo
Sydney Trains Real-Time Digital Twin Platform
Transport Hub Simulation Model: Pedestrian and Traffic Simulation
线性规划灵敏度分析