Uh oh!
There was an error while loading. Please reload this page.
use all TAZs when using sharrow - #1027
Conversation
jpn--
commented
Dec 24, 2025
In writing a unit tests for this PR, I discovered a second problem: for two zone systems, the |
This pull request updates the trip destination model to improve compatibility with the "sharrow" mode by ensuring that all TAZs (Traffic Analysis Zones) are represented in aggregated data structures, even if some TAZs have no associated MAZs (Micro Analysis Zones). This change helps align the model's alternatives with TAZ-based skim matrices, which is particularly important when using the sharrow framework.
Sharrow compatibility and TAZ completeness:
aggregate_size_term_matrixto accept an optionalall_tazsparameter, ensuring that the resulting TAZ size term matrix includes all TAZs, filling in zeros for any TAZs without MAZs.destination_presampleto pass the complete set of TAZs toaggregate_size_term_matrixwhen sharrow is enabled, guaranteeing all TAZs are present in the matrix.alternativesDataFrame indestination_presampleis reindexed to include all TAZs with zero fill when sharrow is active, so that the alternatives vector aligns with the TAZ skim structure.Closes#1022.