-
Notifications
You must be signed in to change notification settings - Fork 518
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
fix scip results processing #3023
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3023 +/- ##
==========================================
+ Coverage 85.31% 87.87% +2.56%
==========================================
Files 763 769 +6
Lines 89308 89520 +212
==========================================
+ Hits 76191 78670 +2479
+ Misses 13117 10850 -2267
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
results.problem.lower_bound = results.solver.primal_bound | ||
else: | ||
results.problem.upper_bound = results.solver.primal_bound | ||
except AttributeError: |
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.
@michaelbynum would you mind adding a short comment here explaining why this is needed or when you would end up here? Is this from a difference in solver versions?
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.
Done. Sorry - I was in a hurry yesterday.
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.
Sorry, I only added comments to the PR. Now, I've added comments to the code.
@michaelbynum - Jenkins failures are not related. Our build environment was the problem. I have fixed it and flagged this for re-test. |
Summary
With SCIP 8.0.3, the results processing is currently broken:
Outputs:
To correct this, I changed the bit of code that parses the solver message to be more flexible by checking if specific strings are in the message instead of checking if they are equal. In this case, Pyomo is looking for "optimal solution found", but the message is just "optimal solution".
The other problem is the SCIP log is parsed to get the primal bound. However, the log parsing does not work properly if SCIP solves the problem in the preprocessing phase. To fix this, I added a try/except and simply leave the primal bound empty if the log is not parsed correctly.
Legal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: