-
Notifications
You must be signed in to change notification settings - Fork 113
Description
Describe the bug
Joint tour participants and the joint tour frequency and composition models look for a PNUM attribute in the persons table. If you do not have PNUM in your person's file, the model will crash.
To Reproduce
Run an ActivitySim model using the joint_tour_participants or joint_tour_frequency_composition models without PNUM in the input tables.
Expected behavior
There should not be a dependency on having PNUM in the input persons table. The user should be allow to name it something different (e.g. person_number, p_num, etc.) or omit it completely.
The Fix
joint_tour_frequency_composition model looks for PNUM == 1 to define a point person for the joint tour. Instead, we can just use the first person on the joint tour.
joint_tour_participants model uses PNUM to create a unique joint tour participant_id. Fix is to just create a PNUM column on the fly if none exist.