Skip to content

Commit

Permalink
protect columns in all simulate
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed May 13, 2024
1 parent 1cb48c7 commit 28fdbb6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions activitysim/core/configuration/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def subcomponent_settings(self, subcomponent: str) -> ComputeSettings:
use_numexpr=self.use_numexpr,
use_numba=self.use_numba,
drop_unused_columns=self.drop_unused_columns,
protect_columns=self.protect_columns,
)


Expand Down
3 changes: 2 additions & 1 deletion activitysim/core/interaction_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def _interaction_sample(
locals_d,
custom_chooser=None,
sharrow_enabled=sharrow_enabled,
additional_columns=compute_settings.protect_columns,
)

alternatives = util.drop_unused_columns(
Expand All @@ -265,7 +266,7 @@ def _interaction_sample(
locals_d,
custom_chooser=None,
sharrow_enabled=sharrow_enabled,
additional_columns=["tdd", "origin_destination"],
additional_columns=compute_settings.protect_columns,
)

if sharrow_enabled:
Expand Down
3 changes: 2 additions & 1 deletion activitysim/core/interaction_sample_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def _interaction_sample_simulate(
locals_d,
custom_chooser=None,
sharrow_enabled=sharrow_enabled,
additional_columns=compute_settings.protect_columns,
)

alternatives = util.drop_unused_columns(
Expand All @@ -166,7 +167,7 @@ def _interaction_sample_simulate(
locals_d,
custom_chooser=None,
sharrow_enabled=sharrow_enabled,
additional_columns=["tdd", "origin_destination"],
additional_columns=compute_settings.protect_columns,
)

interaction_df = alternatives.join(choosers, how="left", rsuffix="_chooser")
Expand Down
1 change: 1 addition & 0 deletions activitysim/core/interaction_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ def _interaction_simulate(
locals_d,
custom_chooser=None,
sharrow_enabled=sharrow_enabled,
additional_columns=compute_settings.protect_columns,
)

if (
Expand Down
1 change: 1 addition & 0 deletions activitysim/core/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,7 @@ def _simple_simulate_logsums(
locals_d,
custom_chooser=None,
sharrow_enabled=state.settings.sharrow,
additional_columns=compute_settings.protect_columns,
)

if nest_spec is None:
Expand Down

0 comments on commit 28fdbb6

Please sign in to comment.