Skip to content

Bug 馃悰: Ambiguous UrbanSim Age fields and Conflicting Person Type Definitions#4

Description

@i-am-sijia

Describe the bug
During the initial Lighthouse implementation, synthetic population outputs from UrbanSim were transformed into ActivitySim inputs. While deriving the ptype (person type) attribute, we found three age-related fields in the UrbanSim output:

  • age
  • agep_x
  • agep_y

The relationship between these fields is unclear. age and agep_x are similar, although not identical, while agep_y differs substantially and contains missing values. We need to determine which field should be used as the authoritative age attribute.

Using either age or agep_x results in approximately 1,500 persons under age 5 being identified as college students. Under the current logic, these individuals are assigned ptype = 3 (university student), which causes the model to crash during trip purpose generation because the MTC example model does not include observed trip purpose distributions or prodoginsts for that population segment.

As a temporary workaround, these persons are assigned ptype = 8 (preschool student), but the underlying ptype derivation logic should be reviewed.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the main branch
  2. Check out an older commit 6bfb5c3
  3. Run lighthouse
  4. Observe the model crash in trip purpose

Expected behavior

  • The correct age attribute should be identified and documented.
  • Person type (ptype) assignment should produce valid classifications consistent with expected age ranges.
  • The logic that derives ptype should be moved from the preprocessing script into model\config\annotate_person.csv so that it is maintained within the Lighthouse model specifications and is easier to track and modify.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Commit: a0180e3
Current script that converts UrbanSim outputs to ActivitySim: https://github.com/wsp-sag/lighthouse/blob/process_inputs/notebooks/convert_urbansim_to_activitysim.ipynb

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions