Skip to content

Commit

Permalink
Skip nesting coefficient evaluation when evaluating logsums using MNL…
Browse files Browse the repository at this point in the history
… models (#909)

* Update logsums.py to only evaluate nesting coefficients if the logsums are being calculated with a nested logit model

* Black abm\models\util\logsums.py
  • Loading branch information
JoeJimFlood authored Dec 12, 2024
1 parent 82a896e commit 46feabe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion activitysim/abm/models/util/logsums.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def compute_location_choice_logsums(
)

nest_spec = config.get_logit_model_settings(logsum_settings)
nest_spec = simulate.eval_nest_coefficients(nest_spec, coefficients, trace_label)
if nest_spec is not None: # nest_spec is None for MNL
nest_spec = simulate.eval_nest_coefficients(
nest_spec, coefficients, trace_label
)

locals_dict = {}
# model_constants can appear in expressions
Expand Down

0 comments on commit 46feabe

Please sign in to comment.