activitysim icon indicating copy to clipboard operation
activitysim copied to clipboard

Possible inconsistency in school escorting

Open jpn-- opened this issue 2 years ago • 1 comments
trafficstars

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

jpn-- avatar Oct 30 '23 20:10 jpn--

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.

dhensle avatar Oct 30 '23 20:10 dhensle

Fixed with v1.3 release.

dhensle avatar Oct 01 '24 19:10 dhensle