Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further parking location fix update #65

Merged
merged 4 commits into from
Mar 13, 2024
Merged

Conversation

JoeJimFlood
Copy link

My previous fix 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, as prior to that fix vehicles were effectively teleporting from the parking location to the trip origin. However, this did not 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 changes the code to open the trip mode choice spec, look up what the auto modes are, 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.

@JoeJimFlood JoeJimFlood requested a review from dhensle February 21, 2024 01:02
for alternative in trip_mode_choice_nest["alternatives"]:
if alternative["name"] == auto_nest_name:
auto_modes = alternative["alternatives"]
break
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest you throw an assert statement / runtime error here to make sure the AUTO_MODE_NEST setting exists in the trip mode choice yaml. Also, I think we want the user to be able to specify None or something to allow them to skip having any auto modes. (There may be some weird transit or walk-only models someone thinks of.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at the configs for prototype_mtc and saw that that has a more complicated nesting structure that the code I wrote wouldn't work for. I went ahead and set it so that the user would need to specify a list in the parking location settings (along with an assertion error saying it's needed).

@dhensle dhensle requested a review from aletzdy February 21, 2024 01:15
@JoeJimFlood JoeJimFlood merged commit 8fa7202 into BayDAG_estimation Mar 13, 2024
11 of 13 checks passed
@JoeJimFlood JoeJimFlood deleted the parkloc_fix2 branch March 13, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants