diff --git a/activitysim/abm/models/disaggregate_accessibility.py b/activitysim/abm/models/disaggregate_accessibility.py index ab4f9acef7..d5cff9e406 100644 --- a/activitysim/abm/models/disaggregate_accessibility.py +++ b/activitysim/abm/models/disaggregate_accessibility.py @@ -415,6 +415,12 @@ def zone_sampler(self): maz_candidates = maz_candidates[ ~maz_candidates.MAZ.isin(maz_sample_idx) ] + + # Need to make sure we sample from TAZs that still exist in the maz_candidates + taz_candidates = taz_candidates[ + taz_candidates.index.isin(maz_candidates.TAZ) + ] + # Calculate the remaining samples to collect n_samples_remaining = n_samples - len(maz_sample_idx) n_samples_remaining = (