ABM3 Intra-Household AV Allocation and Taxi/TNC Routing Models#366
ABM3 Intra-Household AV Allocation and Taxi/TNC Routing Models#366
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?
|
|
||
| class TaxiTNCSettings(BaseModel): | ||
| """ | ||
| Taxi / TNC route choice settings |
There was a problem hiding this comment.
Lines 14–66 appear to duplicate the settings in taxi_tnc_routing_settings.yaml. Could you remove the redundant entries? I also noticed that single_tnc_modes doesn’t match the value in the YAML file.
There was a problem hiding this comment.
I would like to keep the non-required settings here with their defaults. They generally need to be here for the pydantic model to validate the yaml file on read. I did update them to match the yaml file though -- thanks for catching that.
There was a problem hiding this comment.
I would like to keep the non-required settings here with their defaults. They generally need to be here for the pydantic model to validate the yaml file on read. I did update them to match the yaml file though -- thanks for catching that.
Thanks for updating the single_tnc_modes setting. I also noticed the parameters of 'pair_batch_size', 'max_vehicle_occupancy', and 'max_wait_time' are not in the yaml file.
src/asim/scripts/taxi_tnc_routing/TNC_summaries_and_comparison.ipynb
Outdated
Show resolved
Hide resolved
| index=True, | ||
| ) | ||
| pooled_trips.to_csv( | ||
| os.path.join(self.settings.output_dir, "output_tnc_pooled_trips.csv"), |
There was a problem hiding this comment.
I didn’t notice the pooled trips output referenced in the TNC summaries. Is it already captured in output_tnc_vehicle_trips?
There was a problem hiding this comment.
This output table is a useful table to evaluate the pooling algorithm output and debugging of the pooling algorithm. The output_tnc_vehicle_trips are the individual vehicle trips whereas this file specifically lists the trips that are pooled to eachother.
You have a suggestion for a more descriptive name I should use?
|
Were the demand matrix files produced using the updated model as well? i.e. TNCVehicleTrips_[time_period].omx and emptyAVTrips.omx |
…for repositioning
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! |
Draft PR of initial code implementation of both the intra-household AV allocation and taxi/TNC routing models.
Mode detailed description of code changes forthcoming.