-
Notifications
You must be signed in to change notification settings - Fork 2
Island removal algorithm - sequential implementation #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds a selectable sequential implementation for the island detection algorithm, allowing callers/configuration to choose between the existing parallel scan and a component-wise sequential scan (trading memory for less duplicated work).
Changes:
- Added
parallel_executionflag to island detection configuration and threaded it through graph construction. - Updated
island_detection_algorithmto support parallel vs sequential execution paths. - Updated example configuration to include
parallel_execution.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| rust/bambam-omf/src/graph/omf_graph.rs | Passes parallel_execution through to the island detection algorithm. |
| rust/bambam-omf/src/graph/component_algorithm.rs | Implements sequential component scan path and gates parallel behavior behind a flag. |
| rust/bambam-omf/src/app/network.rs | Extends island detection configuration with parallel_execution. |
| configuration/bambam-omf/travel-mode-filter.json | Adds parallel_execution to the sample config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@yamilbknsu I've opened a new pull request, #102, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: yamilbknsu <1139432+yamilbknsu@users.noreply.github.com>
Optimize midpoint computation in island detection BFS
Despite what the message in the commit might suggest, I implement a Sequential version of the island detection algorithm that increases memory requirements but reduced work duplication.
This time the algorithm ran instantly for the small study area and produced almost the same output. This version returns 2 more edges than the parallel one. My explanation for this is that those two edges didn't have enough outward connectivity (since I'm only using forward adjacency) but were still reachable from a larger component.