activitysim
activitysim copied to clipboard
warn or filter for non-canonical tour types during survey prep for estimation
trafficstars
When running infer.py to prep survey data for estimation, there is a maximum number of tours by purpose implicitly defined in the tour_frequency module, which is called by infer.py to patch tour IDs.
Any person with more tours (by purpose) than the canonical value will crash the script. If data pre-cleaning should be handled outside of activitysim, the definition should be documented and/or flexible. Alternatively, infer.py could impose a structure on the survey data directly by deleting tour or person records in some systematic way. I'm happy to add that to infer.py if there is consensus on how these outlier tours should be managed.