ActivitySim / activitysim

An Open Platform for Activity-Based Travel Modeling
https://activitysim.github.io
BSD 3-Clause "New" or "Revised" License
189 stars 96 forks source link

BayDAG Contribution #16: Parking Locations in Trip Matrices #840

Closed dhensle closed 2 months ago

dhensle commented 3 months ago

The current version of the code would overwrite the trip origin and destination with the parking location zone in write_trip_matrices. This PR changes that to leave trip origins and destinations unchanged and just has trip tables read from parking location for trips originating at a parking location.

This is done by adjusted the origin TAZ for trips following those that ended at a parking destination other than the trip destination so that the origin of the next trip was the zone where the vehicle was parked in in order to make traffic assignment more accurate. (This prevents vehicles from teleporting from the parking location to the trip origin). However, you also need to check to see if the subsequent trip was also made by auto, resulting in non-auto trips that being at the previous trip's parking location, which will have a slight impact on transit assignment. This pull request thus also requires an AUTO_MODES setting and only adjust the origin TAZ if the trip is made by an auto mode. It should be noted that there will still be "teleporting vehicles" if a person uses a parking location other than their destination and then goes on an atwork subtour using a non-auto mode, but that is expected to be less common and have only a minor impact on model results.

There are also a couple of additional lines so that the origin and destination TAZs reported in final_trips always match the origin and destination MAZs.

Required for SANDAG ABM3 -- yes.

Linking to original PRs https://github.com/SANDAG/activitysim/pull/64 and https://github.com/SANDAG/activitysim/pull/65. cc'ing original author @JoeJimFlood