Skip to content

Rjf/gtfs final fixes#159

Merged
robfitzgerald merged 16 commits into
mainfrom
rjf/gtfs-final-fixes
Jul 13, 2026
Merged

Rjf/gtfs final fixes#159
robfitzgerald merged 16 commits into
mainfrom
rjf/gtfs-final-fixes

Conversation

@robfitzgerald

@robfitzgerald robfitzgerald commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

this PR contains the final set of fixes applied while working toward a successful run of BAMBAM for GTFS-Flex access modeling, which includes the change set from #158 which was cancelled after discovering it was missing a required fix present in this PR.

GTFS-Flex run fixes

  • make negate key on destination filter optional for simplicity
  • DestinationFilter comes from both config and query for mode-specific filtering
  • fix bounds checking errors in multimodal_state_ops
  • improved logging + error reporting during OMF import
  • remove now-unnecessary allocation when calling state_model.contains_key and provide error context in multimodal_traversal_ops

simplify OMF Places mapping

these mappings can be quite long - there are over 2000 OvertureMaps categories total - and so expressing that directly within a bambam config file is noisy. this PR allows the user to alternatively define a CSV source for category mapping:

[plugin.output_plugins.model.models.opportunity_source.places_activity_mapping]
places_mapping_input_file = "mapping.csv"
places_category_column = "omf_label"
mep_category_column = "mep_labels"
mep_category_separator = "-"  # sep to use when more than one MEP label is produced
testing
  1. unpack and copy these files into the base of the bambam repo:

omf-csv-test-assets.zip

overture-to-mep.csv
test_denver_omf.toml
  1. run bambam:
% cargo build -r --manifest-path rust/Cargo.toml
% RUST_LOG=info ./rust/target/release/bambam -c test_denver_omf.toml -q query/denver_extent.json
  1. a JSON and CSV output should appear with no errors logged to console or into the file contents, and the opportunities counted for each grid cell/mode/timebin come from OvertureMaps categories mapped to MEP categories as defined in teh overture-to-mep.csv file instance.

@robfitzgerald
robfitzgerald marked this pull request as ready for review July 13, 2026 14:43
@robfitzgerald

Copy link
Copy Markdown
Collaborator Author

@admrtin this PR is ready for review. as in #158 i think my main goal for a review is for you to run the test described above. there's a note describing additional fixes. i haven't gone so far as to create new tests of the code changes and i'm ok with that choice for the most part, except for maybe the code that had the out-of-index error fixes. let me know what you think.

@admrtin admrtin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests for the PR passed with no errors and I received the test-denver-result.csv and test-denver-result.json files. I'm good with merging this, and if we feel the need to add unit tests for the out-of-index error fixing later, we can.

Screenshot 2026-07-13 at 10 05 59 AM

@robfitzgerald
robfitzgerald merged commit 2a94d77 into main Jul 13, 2026
1 check passed
@robfitzgerald
robfitzgerald deleted the rjf/gtfs-final-fixes branch July 13, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants