-
Notifications
You must be signed in to change notification settings - Fork 106
Add message when optimal solution is found during presolve #623
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?
Add message when optimal solution is found during presolve #623
Conversation
rg20
left a comment
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.
Move the logic of checking if presolver found solution to presolve caller or presolve function itself.
Move the 'Optimal solution found during presolve' message to the presolve function itself (third_party_presolve.cpp) where we can accurately detect when presolve finds the optimal solution. This ensures the message only appears when presolve actually found the solution, not when the problem is empty for other reasons. Removed the message from generic empty problem checks in: - cpp/src/mip/solve.cu (run_mip function) - cpp/src/mip/solver.cu (run_solver function - both locations)
|
/ok to test 527cd60 |
|
@adityasinghz Is this meant for 25.12 release or 26.02. If it is meant for 25.12, may I request you to close this PR and use branch release/25.12 branch as your base and create a PR? And also choose merge branch to be 25.12. |
|
Hi @rgsl888prabhu, Thank you for the question. This is a user experience improvement (adding a log message when optimal solution is found during presolve), so I'm flexible on which release it targets. Option 1: If this should go into 25.12: Option 2: If this can wait for 26.02: Thanks! |
|
Lets move it to 26.2 since 25.12 is close to code freeze. |
📝 WalkthroughWalkthroughAfter presolve reductions are logged, the presolve routine now checks whether the problem has been reduced to zero rows and zero columns and logs "Optimal solution found during presolve" if so. Also updated header copyright year range. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)**/*.{cu,cuh,cpp,hpp,h}📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
Files:
**/*.{cpp,hpp,h}📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
Files:
**/*.{cu,cpp,hpp,h}📄 CodeRabbit inference engine (.github/.coderabbit_review_guide.md)
Files:
🧠 Learnings (17)📓 Common learnings📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-11-25T10:20:49.822ZApplied to files:
📚 Learning: 2025-12-04T04:11:12.640ZApplied to files:
📚 Learning: 2025-12-04T20:09:09.264ZApplied to files:
🔇 Additional comments (1)
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. Comment |
|
Hi @rgsl888prabhu I'll keep the current PR targeting Thanks! |
|
🔔 Hi @anandhkb, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you! If this is an "epic" issue, then please add the "epic" label to this issue. |
1 similar comment
|
🔔 Hi @anandhkb, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you! If this is an "epic" issue, then please add the "epic" label to this issue. |
|
Hi @rg20 @rgsl888prabhu , I have one additional request. If there is any task you would like to assign to me, please feel free to do so. I reviewed the issues section, but I am not certain whether the listed issues pertain to the current version or to upcoming releases. Thank You! |
That would be awesome @adityasinghz, which part of library are you interested in? Please check the milestones in issues, normally they should highlight if they are slated for this release, and you can also ping if you are interested in any new issues/features or want to work on a other issues not meant for this release. We can always discuss and accommodate if feasible. |
|
🔔 Hi @anandhkb, this pull request has had no activity for 7 days. Please update or let us know if it can be closed. Thank you! If this is an "epic" issue, then please add the "epic" label to this issue. |
|
Hi @rg20 @rgsl888prabhu , Thank you for the opportunity! I'm interested in contributing where I can. Libraries I'm familiar with:
What I'm looking for:
I've checked the issues with milestones. If you have any tasks in the MIP/Dual Simplex libraries that you think would be a good fit, I'd appreciate the guidance. Otherwise, I can browse the issues and ask about specific ones before starting. Thanks again! |
|
/ok to test 17a7c33 |
|
/ok to test 5ba6418 |
@rgsl888prabhu, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 1d85420 |
Description
Added an explicit log message "Optimal solution found during presolve" that is displayed when the problem is fully reduced during presolve (i.e., when the problem is reduced to 0 constraints, 0 variables, and 0 nonzeros). This provides clear feedback to users that the optimal solution was discovered during presolve rather than through the main solving process.
Changes Made:
cpp/src/mip/solve.cu: Added log message whenproblem.emptyis true before running the MIP solvercpp/src/mip/solver.cu: Added log message in two locations:context.problem_ptr->emptyis true before running presolvecontext.problem_ptr->emptybecomes true after running presolveExample Output:
Before this change, when the optimal solution was found during presolve, users would see:
After this change, users will now see:
Issue #524
Checklist
I am familiar with the Contributing Guidelines.
Testing
Documentation
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.