ABM3 Intra-Household AV Allocation and Taxi/TNC Routing Models#366
ABM3 Intra-Household AV Allocation and Taxi/TNC Routing Models#366dhensle wants to merge 59 commits into
Conversation
…nto ABM3_AV_TNC_routing
…ching repositioning
JiaXu1024
left a comment
There was a problem hiding this comment.
The AV allocation model is not directly integrated with the main ActivitySim model pipeline. Could you update the config file to include it in the workflow?
There was a problem hiding this comment.
Pull request overview
This pull request implements two new routing models for ActivitySim's ABM3 demand modeling framework: an intra-household autonomous vehicle (AV) allocation model and a taxi/TNC fleet routing model. These models simulate vehicle dispatching and repositioning decisions for both household-owned AVs and for-hire vehicles.
Changes:
- Adds AV routing model to allocate household AVs to driving trips and reposition vehicles between trips
- Implements taxi/TNC routing model with trip pooling, vehicle dispatching, and refueling logic
- Creates matrix builder utility to aggregate vehicle trips into OMX matrices for traffic assignment
Reviewed changes
Copilot reviewed 21 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/asim/extensions/av_routing.py | Core AV routing logic for matching household AVs to trips and repositioning decisions |
| src/asim/extensions/init.py | Registers new av_routing extension module |
| src/asim/scripts/taxi_tnc_routing/taxi_tnc_routing.py | Main taxi/TNC fleet simulation with pooling and dispatching |
| src/asim/scripts/taxi_tnc_routing/tnc_av_matrix_builder.py | Utility to aggregate vehicle trips into OMX matrices by time period and occupancy |
| src/asim/scripts/taxi_tnc_routing/taxi_tnc_routing_settings.yaml | Configuration file for taxi/TNC routing parameters |
| src/asim/scripts/taxi_tnc_routing/create_test_taxi_tnc_routing_scenario.py | Test data generator for taxi/TNC routing model |
| src/asim/configs/resident/settings.yaml | Adds av_routing model to pipeline and av_vehicle_trips to output tables |
| src/asim/configs/resident/settings_mp.yaml | Adds av_routing to multiprocessing pipeline configuration |
| src/asim/configs/resident/av_routing.yaml | Configuration for AV routing model specifications and coefficients |
| src/asim/configs/resident/av_trip_matching.csv | Utility specification for AV trip matching model |
| src/asim/configs/resident/av_trip_matching_coefficients.csv | Coefficients for AV trip matching utilities |
| src/asim/configs/resident/av_trip_matching_preprocessor.csv | Preprocessor for AV trip matching variables |
| src/asim/configs/resident/av_repositioning.csv | Utility specification for AV repositioning model |
| src/asim/configs/resident/av_repositioning_coefficients.csv | Coefficients for AV repositioning utilities |
| src/asim/configs/resident/av_repositioning_preprocessor.csv | Preprocessor for AV repositioning variables |
| src/asim/configs/resident/parking_location_choice_annotate_trips_preprocessor.csv | Updates parking eligibility to exclude AV-serviced trips |
| src/asim/configs/common/constants.yaml | Adds AV routing constants (max duration, parking cost) |
| docs/design/demand/av-routing.md | Documentation for AV routing model design and configuration |
| docs/design/demand/taxi-tnc-routing.md | Documentation for taxi/TNC routing model design and outputs |
| docs/design/demand/resident.md | Updates resident model documentation to reference AV routing |
| mkdocs.yml | Adds new documentation pages to navigation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Yes, these are being created by the tnc_av_matrix_builder.py file. (It was not yet committed when you made this comment, but is there now!) |
|
@JiaXu1024 I believe I have addressed all of the comments here. We are doing a final integration test and will of course fix any issues that arise from that, but I believe this is functionally complete! |
…for each iteration
…including the parent directory name when the basename is generic
Overview
This PR implements both the intra-household AV allocation and taxi/TNC routing models for the ABM3 system.
Implementation Details
Testing Results & Model Performance
The TNC routing model has been tested and validated with the following performance metrics:
TNC Trip Statistics
Service Quality Metrics
Vehicle Efficiency Metrics
VMT Analysis
For runtime improvements, here is a quick comparison from Iteration 3 (100% sample). In total, the
This translates to a total runtime savings of roughly 90–100 minutes for the AV/TNC routing components across all three iterations.
Below shows the summary comparing between new Python algorithm and old Java algorithm:

The new Python algorithm shows significantly improved fleet efficiency but with trade-offs in service quality:
Key Improvements ✓
Performance Trade-offs⚠️
The new python algorithm does not have significant impact to mode share and regional VMT, as shown in the figure below from Model Comparison Report:

The new Python algorithm also fixes the bug in Java program (below was from RSG developing work):
