Skip to content

Commit 078a3e9

Browse files
committed
Reapply "fixing disaggregate accessibility bug in zone sampler"
This reverts commit de6d0ef.
1 parent de6d0ef commit 078a3e9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

activitysim/abm/models/disaggregate_accessibility.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ def zone_sampler(self):
435435
maz_candidates = maz_candidates[
436436
~maz_candidates.MAZ.isin(maz_sample_idx)
437437
]
438+
439+
# Need to make sure we sample from TAZs that still exist in the maz_candidates
440+
taz_candidates = taz_candidates[taz_candidates.index.isin(maz_candidates.TAZ)]
441+
438442
# Calculate the remaining samples to collect
439443
n_samples_remaining = n_samples - len(maz_sample_idx)
440444
n_samples_remaining = (

0 commit comments

Comments
 (0)