use all TAZs when using sharrow #1027
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.