From 27fba901283b1756d90b34278df0ec714aa36800 Mon Sep 17 00:00:00 2001 From: Brice Nichols Date: Wed, 15 Feb 2023 14:39:29 -0800 Subject: [PATCH] Selecting choices from joint tour participant ID column explicitly; In estimation mode, the index of survey_participants_df does not reflect participant_id (when tested using real survey data). This change uses the ID column directly to select the choice set rather than relying on the index. --- activitysim/abm/models/joint_tour_participation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activitysim/abm/models/joint_tour_participation.py b/activitysim/abm/models/joint_tour_participation.py index 939d9fedd..4b905c2c9 100644 --- a/activitysim/abm/models/joint_tour_participation.py +++ b/activitysim/abm/models/joint_tour_participation.py @@ -369,7 +369,7 @@ def joint_tour_participation(tours, persons_merged, chunk_size, trace_hh_id): # its value depends on whether the candidate's 'participant_id' is in the joint_tour_participant index survey_participants_df = estimator.get_survey_table("joint_tour_participants") participate = pd.Series( - choices.index.isin(survey_participants_df.index.values), index=choices.index + choices.index.isin(survey_participants_df.participant_id), index=choices.index ) # but estimation software wants to know the choices value (alternative index)