You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Disaggregate accessibility crashes due to no allowed MAZs.
This came up while SANDAG tried testing a new scenario with modified data. The crash happens here when we are attempting to sample candidate MAZs, and the reason the crash is happening is that the maz_candidate df is empty.
After we sample the maz indices, we remove those mazs from the maz_candiate df so we do not resample them. This process does not happen for the taz_candiate df (removing TAZs associated with those MAZs, which makes sense, since a TAZ might have multiple MAZ in it), but we end up with a case where we sample a TAZ at line 391 of the code (with the taz sample universe not reflecting the narrowing sample universe according to the mazs), and there is no MAZ remaining in the maz_candiate df associated with that TAZ, resulting in an empty maz_candidate df.
To Reproduce
Reproducibility is hard here -- need to get (un)lucky in the sampling.
Expected behavior
To fix, we can simply filter the taz_candiates so that it only contains TAZs associated with remaining maz_candidates. This way, we always make sure we have an MAZ list to sample from.
The text was updated successfully, but these errors were encountered:
Describe the bug
Disaggregate accessibility crashes due to no allowed MAZs.
This came up while SANDAG tried testing a new scenario with modified data. The crash happens here when we are attempting to sample candidate MAZs, and the reason the crash is happening is that the maz_candidate df is empty.
The process here is to first sample a TAZ and then pick an MAZ from it. Now the reason maz_candidate ends up being empty, despite the length check, appears to be the discrepancy between the taz_candidate df and the resulting taz_sample_idx, and the mazs that remain in the maz_candidates df after we filter it based on taz_sample_idx.
After we sample the maz indices, we remove those mazs from the maz_candiate df so we do not resample them. This process does not happen for the taz_candiate df (removing TAZs associated with those MAZs, which makes sense, since a TAZ might have multiple MAZ in it), but we end up with a case where we sample a TAZ at line 391 of the code (with the taz sample universe not reflecting the narrowing sample universe according to the mazs), and there is no MAZ remaining in the maz_candiate df associated with that TAZ, resulting in an empty maz_candidate df.
To Reproduce
Reproducibility is hard here -- need to get (un)lucky in the sampling.
Expected behavior
To fix, we can simply filter the taz_candiates so that it only contains TAZs associated with remaining maz_candidates. This way, we always make sure we have an MAZ list to sample from.
The text was updated successfully, but these errors were encountered: