From c6f5b5603b2125f2a5d420637a0e5a2cf37135ed Mon Sep 17 00:00:00 2001 From: Joe Flood Date: Thu, 7 Nov 2024 12:03:46 -0800 Subject: [PATCH] Update logsums.py to only evaluate nesting coefficients if the logsums are being calculated with a nested logit model --- activitysim/abm/models/util/logsums.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activitysim/abm/models/util/logsums.py b/activitysim/abm/models/util/logsums.py index a13b34344..cb173f994 100644 --- a/activitysim/abm/models/util/logsums.py +++ b/activitysim/abm/models/util/logsums.py @@ -167,7 +167,8 @@ 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