Skip to content

Conversation

@asiripanich
Copy link
Contributor

This PR fixes two related issues in the joint-tour code paths:

joint_tour_participation.py (8f13299)

Problem: In estimation mode, the code could re-assign participant_num rather than using the original survey participant_num, which could change the identity of the tour leader (ActivitySim treats participant_num == 1 as the tour leader). This broke association of the joint tour with the correct person.

Fix: When running in estimation mode, we now merge participant_num from the survey's joint_tour_participants table by participant_id so the original participant numbering (and the tour leader) is preserved.

joint_tour_frequency.py (2e7629e)

Problem: The code assumed a PNUM column existed; where PNUM was missing, code could fail or behave unpredictably.

Fix: If PNUM is missing, the code now selects the first person in the household to act as the PNUM (keeps behavior deterministic and prevents failures).

cc: @dhensle

@asiripanich
Copy link
Contributor Author

Related to #951 .

@jpn-- jpn-- merged commit 7401f5a into ActivitySim:main Nov 12, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants