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:
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:
- Go to the
main branch
- Check out an older commit 6bfb5c3
- Run lighthouse
- 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
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:ageagep_xagep_yThe relationship between these fields is unclear.
ageandagep_xare similar, although not identical, whileagep_ydiffers substantially and contains missing values. We need to determine which field should be used as the authoritative age attribute.Using either
ageoragep_xresults in approximately 1,500 persons under age 5 being identified as college students. Under the current logic, these individuals are assignedptype = 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 underlyingptypederivation logic should be reviewed.To Reproduce
Steps to reproduce the behavior:
mainbranchExpected behavior
ptype) assignment should produce valid classifications consistent with expected age ranges.ptypeshould be moved from the preprocessing script intomodel\config\annotate_person.csvso 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