Skip to content

Commit

Permalink
drop unused columns for logsum calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
i-am-sijia committed Apr 17, 2024
1 parent 36bc00f commit 93031bd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions activitysim/core/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1935,6 +1935,20 @@ def _simple_simulate_logsums(
if skims is not None:
set_skim_wrapper_targets(choosers, skims)

# check if tracing is enabled and if we have trace targets
have_trace_targets = state.tracing.has_trace_targets(choosers)

# if tracing is not enabled, drop unused columns
if not have_trace_targets:
# drop unused variables in chooser table
choosers = util.drop_unused_chooser_columns(
choosers,
spec,
locals_d,
custom_chooser=None,
sharrow_enabled=state.settings.sharrow,
)

if nest_spec is None:
logsums = eval_mnl_logsums(
state,
Expand Down

0 comments on commit 93031bd

Please sign in to comment.