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

protect_columns for all simulations (choosers, alts, simple simulate, interaction simulate, etc) #871

Merged
merged 4 commits into from
May 21, 2024

Conversation

i-am-sijia
Copy link
Contributor

@i-am-sijia i-am-sijia commented May 14, 2024

This PR includes the following fixes:

  • Add protect_columns to all core simulate functions. protect_columns is a setting under compute_settings that can be used to protect specific columns from being dropped. But it was not fully implemented for all core simulate functions.
  • Protecting special columns in the ALT table from being dropped was done previously by hardcoding them in source code, like in simulate_sample.py:
    additional_columns=["tdd", "origin_destination"],
    This is ok (and efficient) for tdd since it’s a generic variable, but less so for origin_destination since it’s a variable only relevant to the SANDAG xborder model. Furthermore, this crashes the ARC trip scheduling choice model. This PR moves the non-generic columns from source code to implementation-specific settings.
  • Set up comupte_settings in trip_scheduling_choice.py
  • Add protect_columns in parking_location_choice.py

@i-am-sijia i-am-sijia marked this pull request as ready for review May 15, 2024 20:14

compute_settings:
protect_columns:
- origin_destination
Copy link
Contributor

Choose a reason for hiding this comment

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

This PR will break the sandag model that's not in the test system... are we keeping track of these breaking changes anywhere? I think there have been a few of these since we started the Phase 8 work and I don't want them to get lost...

@jpn-- jpn-- merged commit f31bfe5 into ActivitySim:main May 21, 2024
17 checks passed
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