Skip to content

[BUG] Fix variable fixing for initial solutions - #1580

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
nguidotti:fix-initial-solution
Jul 16, 2026
Merged

[BUG] Fix variable fixing for initial solutions#1580
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
nguidotti:fix-initial-solution

Conversation

@nguidotti

@nguidotti nguidotti commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

When feeding initial solutions to the population, the diversity manager was fixing the variables on a default constructed problem. If the problem has free variables, it means that it was fixed to an infinity bound.

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

…variables. added a guard to check if the variables are fixed to infinite or NaN bounds.

Signed-off-by: Nicolas L. Guidotti <nguidotti@nvidia.com>
@nguidotti nguidotti added this to the 26.08 milestone Jul 16, 2026
@nguidotti nguidotti self-assigned this Jul 16, 2026
@nguidotti
nguidotti requested a review from a team as a code owner July 16, 2026 13:12
@nguidotti
nguidotti requested review from akifcorduk and rg20 July 16, 2026 13:12
@nguidotti nguidotti added bug Something isn't working non-breaking Introduces a non-breaking change mip labels Jul 16, 2026
@nguidotti
nguidotti requested review from aliceb-nv and removed request for rg20 July 16, 2026 13:13
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

MIP heuristic solution assignments are now seeded before completion LP processing, and fixed-variable assignments are checked for finite values before constraint updates.

Changes

MIP assignment handling

Layer / File(s) Summary
Seed assignments before completion LP
cpp/src/mip_heuristics/diversity/diversity_manager.cu
Copies the provided initial assignment into sol.assignment before LP setup and removes the later duplicate copy.
Validate fixed assignments
cpp/src/mip_heuristics/problem/problem.cu
Adds a GPU-side finite-value assertion for assignments used to fix variables.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: improvement

Suggested reviewers: rg20, akifcorduk

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title is concise and accurately describes the main fix for initial solution variable fixing.
Description check ✅ Passed The description matches the change by explaining the initial-solution fixing issue and the new guard for non-finite bounds.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@nguidotti nguidotti changed the title Fix population seeding for problems with free variables Fix fixing variables on a default constructed problem Jul 16, 2026
@nguidotti nguidotti changed the title Fix fixing variables on a default constructed problem [BUG] Fix variable fixing for initial solutions Jul 16, 2026
Comment thread cpp/src/mip_heuristics/diversity/diversity_manager.cu Outdated
Comment thread cpp/src/mip_heuristics/diversity/diversity_manager.cu
…e fixing, take the one that is feasible. Otherwise, keep the original one.

Signed-off-by: Nicolas L. Guidotti <nguidotti@nvidia.com>
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown

CI Test Summary

✅ All 31 test job(s) passed.

@nguidotti

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 88b2e02 into NVIDIA:main Jul 16, 2026
91 checks passed
@nguidotti
nguidotti deleted the fix-initial-solution branch July 16, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants