activitysim
activitysim copied to clipboard
Possible inconsistency in school escorting
Describe the bug
The PERSON_WEIGHT setting if provided in school_escorting.yaml is incorrectly applied as both the person weight and the gender weight.
Expected behavior Gender weight should be its own setting.
Details In the code here we have:
persontype_weight = model_settings.get("PERSON_WEIGHT", 100)
gender_weight = model_settings.get("PERSON_WEIGHT", 10)
age_weight = model_settings.get("AGE_WEIGHT", 1)
That middle one is clearly meant to be “GENDER_WEIGHT”. I’m going to fix it in our configs task PR.
In the test school_escorting.yaml, none of these weights are set in the settings file, so we’re getting the default values of 100/10/1. Therefore when I fix it nothing in our test or consortium maintained examples will appear to change or break because of the fix. But if there’s somebody’s implementation out there that’s using “PERSON_WEIGHT” or “GENDER_WEIGHT”, the fix may change results.
cc: @dhensle @i-am-sijia
Hey @jpn--, thanks for pointing this out. This was already fixed in the latest BayDAG improvements, but extracting to its own issue here is fine with me.
Fixed with v1.3 release.