Skip to content

PNUM person variable hard-coded in ActivitySim #951

@dhensle

Description

@dhensle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working/bug f

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions