Routing: Fix vector lifetimes in breaks unit test - #1854
Open
vitor1001 wants to merge 1 commit into
Open
Conversation
In vehicle_breaks.non_uniform_breaks, device_uvector instances v_e, v_l, and v_d were allocated inside the loop and destroyed at the end of each iteration, leaving dangling device pointers registered in data_model.add_break_dimension(). Store them in outer vectors so their lifetimes persist across solve().
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughChangesNon-uniform breaks test
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The non-uniform breaks test now keeps its device buffers alive for solver execution, preventing dangling registered pointers. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
rg20
approved these changes
Sep 10, 2026
Contributor
|
/ok to test 1f46d42 |
CI Test Summary27 failed · 4 passed · 0 skipped
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In vehicle_breaks.non_uniform_breaks, device_uvector instances v_e, v_l, and v_d were allocated inside the loop and destroyed at the end of each iteration, leaving dangling device pointers registered in data_model.add_break_dimension(). Store them in outer vectors so their lifetimes persist across solve().
Full disclosure: generated with the help of Gemini AI.
Description
Issue
Checklist