Skip to content

Commit 6a3c88d

Browse files
authored
SANDAG abm3 v15.0.0 contributions (#934)
* Reapply "fixing disaggregate accessibility bug in zone sampler" This reverts commit de6d0ef. * blacken * update the proto disagg accessibility regress file due to fixing the zone sampler bug
1 parent 96e8f52 commit 6a3c88d

File tree

2 files changed

+4807
-4801
lines changed

2 files changed

+4807
-4801
lines changed

activitysim/abm/models/disaggregate_accessibility.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,12 @@ 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[
441+
taz_candidates.index.isin(maz_candidates.TAZ)
442+
]
443+
438444
# Calculate the remaining samples to collect
439445
n_samples_remaining = n_samples - len(maz_sample_idx)
440446
n_samples_remaining = (

0 commit comments

Comments
 (0)