Skip to content

Commit

Permalink
remove tazs from sampling if no maz available
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensle committed Mar 19, 2024
1 parent 94c4db8 commit 1587d6e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activitysim/abm/models/disaggregate_accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit 1587d6e

Please sign in to comment.