Skip to content

Commit be5d093

Browse files
aletzdyi-am-sijia
authored andcommitted
fixing disaggregate accessibility bug in zone sampler
1 parent c59dc4c commit be5d093

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)