Skip to content

Fix erroneous early solve termination - #2037

Merged
rapids-bot[bot] merged 1 commit into
mainfrom
early-termination-fix
Oct 2, 2026
Merged

rapids-bot[bot] merged 1 commit into
mainfrom
early-termination-fix

Conversation

@aliceb-nv

Copy link
Copy Markdown
Contributor

#2003 introduced an early termination checking path when solutions arrive to the B&B by checking against the dual bound.
However, for early heuristics that run before B&B begins its solve, the dual bound may in some cases be uninitialized, which can cause early termination even though the gap is still large.

This PR introduces a fix by initializing the numerical lower bound to inf before B&B solve starts.

Description

Issue

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

@aliceb-nv aliceb-nv added this to the 26.10 milestone Oct 2, 2026
@aliceb-nv aliceb-nv self-assigned this Oct 2, 2026
@aliceb-nv
aliceb-nv requested a review from a team as a code owner October 2, 2026 10:08
@aliceb-nv aliceb-nv added bug Something isn't working non-breaking Introduces a non-breaking change labels Oct 2, 2026
@copy-pr-bot

copy-pr-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@aliceb-nv

Copy link
Copy Markdown
Contributor Author

/ok to test 263179d

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: NVIDIA/cuopt/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 6912365d-aa99-4cf3-ac76-3620106de577

📥 Commits

Reviewing files that changed from the base of the PR and between a42e4ca and 263179d.

📒 Files selected for processing (1)
  • cpp/src/branch_and_bound/branch_and_bound.hpp

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.


📝 Walkthrough

Walkthrough

The branch-and-bound numerical lower bound now starts at positive infinity instead of an unspecified value.

Changes

Branch-and-bound initialization

Layer / File(s) Summary
Set the initial numerical lower bound
cpp/src/branch_and_bound/branch_and_bound.hpp
lower_bound_numerical_ now initializes to positive infinity.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: nguidotti

Merge Risk: ⚪ Minimal · up to 26317

The initialization does not create a premature-solve path; bound consumers handle the infinity sentinel. No actionable merge-blocking issue remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: preventing erroneous early solve termination caused by an uninitialized bound.
Description check ✅ Passed The description directly explains the uninitialized numerical lower bound and the fix implemented in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@Bubullzz Bubullzz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great catch !

@github-actions

github-actions Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

CI Test Summary

✅ All 32 test job(s) passed.

@nguidotti

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit 3e8720b into main Oct 2, 2026
187 of 189 checks passed
@nguidotti
nguidotti deleted the early-termination-fix branch October 2, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants