Skip to content

Commit

Permalink
fixing disaggregate accessibility bug in zone sampler
Browse files Browse the repository at this point in the history
  • Loading branch information
aletzdy committed Mar 19, 2024
1 parent f969542 commit 627e286
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions activitysim/abm/models/disaggregate_accessibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ 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 627e286

Please sign in to comment.