-
Notifications
You must be signed in to change notification settings - Fork 104
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. |
📝 WalkthroughWalkthroughA conditional check was added in the presolve routine to detect when presolve reduces the problem to zero rows and zero columns and to log "Optimal solution found during presolve" in that case. 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
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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. |
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.