From 09f73edf2b22c2e7160e559109bcd1882ad44467 Mon Sep 17 00:00:00 2001 From: David Hensle Date: Tue, 23 Apr 2024 09:39:47 -0700 Subject: [PATCH] allow skims in trip mode choice annotate --- activitysim/abm/models/trip_mode_choice.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activitysim/abm/models/trip_mode_choice.py b/activitysim/abm/models/trip_mode_choice.py index e3e530fb7..b3dd0e7f4 100644 --- a/activitysim/abm/models/trip_mode_choice.py +++ b/activitysim/abm/models/trip_mode_choice.py @@ -371,6 +371,12 @@ def trip_mode_choice( state.add_table("trips", trips_df) if model_settings.annotate_trips: + # need to update locals_dict to access skims that are the same .shape as trips table + locals_dict = {} + locals_dict.update(constants) + simulate.set_skim_wrapper_targets(trips_merged, skims) + locals_dict.update(skims) + locals_dict["timeframe"] = "trip" annotate.annotate_trips(state, model_settings, trace_label, locals_dict) if state.settings.trace_hh_id: