-
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
Mindtpy rewrite #2887
Mindtpy rewrite #2887
Conversation
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.
Good PR @ZedongPeng I put several comments there. Some of them are really minor, others are considerable. I'm not quite following why the mip and nlp solve files are gone.
There are some open TODOs which should be addressed now.
Finally, I'm concerned about the effect on performance. While this PR is in review, can you submit the runs in Euler to see that there are not making much difference?
@@ -17,7 +17,8 @@ | |||
from pyomo.contrib.mindtpy.tests.feasibility_pump1 import Feasibility_Pump1 | |||
from pyomo.contrib.mindtpy.tests.feasibility_pump2 import Feasibility_Pump2 | |||
|
|||
required_solvers = ('ipopt', 'glpk', 'cplex') | |||
required_solvers = ('ipopt', 'cplex') | |||
# TODO: 'appsi_highs' will fail here. |
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.
Why does it fail? It breaks or just does not converge?
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.
I thinks this is related to a bug inside appsi_solver
. I just submitted an issue #2888.
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.
Add the issue # in a comment and let's not wait for that to be solved to merge this PR
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.
#2888 was closed yesterday, so you should verify that this works now and remove the 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.
+1 on this; does this work now?
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.
appsi_highs
still does not work well with MindtPy
, more specifically the feasibility pump method.
Here is the related issue #2951
@bernalde No problem. I'll run the benchmarks on Euler.
|
Thank you for the clarification! The tests seem to be running well, and once you address the comments in my review, this should be ready for revision and merging. I would like to have the performance results by then just to be sure that we are not merging anything that makes us way slower. Feel free to report on those here. |
No problem. Since this PR includes the |
Note: test failures on Jenkins are collection failures on Python 3.11:
exception:
...both appear to be because an APPSI solver is not available. |
We need to address all the open comments and manage the test failures when APPSI is not available, as reported on Jenkins @ZedongPeng |
In MINLP3_simple.py, if
pyomo/pyomo/contrib/mindtpy/tests/MINLP3_simple.py Lines 65 to 74 in c569b78
|
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.
This looks pretty good; I found a few places where the docstrings aren't correct.
@@ -17,7 +17,8 @@ | |||
from pyomo.contrib.mindtpy.tests.feasibility_pump1 import Feasibility_Pump1 | |||
from pyomo.contrib.mindtpy.tests.feasibility_pump2 import Feasibility_Pump2 | |||
|
|||
required_solvers = ('ipopt', 'glpk', 'cplex') | |||
required_solvers = ('ipopt', 'cplex') | |||
# TODO: 'appsi_highs' will fail here. |
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.
+1 on this; does this work now?
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.
@ZedongPeng, it looks like there are a couple changes you missed, but otherwise this looks good.
"APPSI-CPLEX cannot get duals for mixed-integer problems" | ||
"mip_solver will be changed to CPLEX." |
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.
I'm still confused about this logging message: What duals are you getting for a MIP and why do you have to change to cplex?
@ZedongPeng - the osx doctest failure looks like a spurious one (something took a fraction of a second longer than expected), so feel free to ignore it. |
@ZedongPeng - Jenkins failure is also not your fault. Something is wrong with the machine. I'll go fix it. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2887 +/- ##
==========================================
+ Coverage 87.84% 88.09% +0.24%
==========================================
Files 770 768 -2
Lines 89665 89211 -454
==========================================
- Hits 78764 78587 -177
+ Misses 10901 10624 -277
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Summary/Motivation:
This Pull Request completes several tasks left in MindtPy rewrite TODO list (#2709).
Changes proposed in this PR:
appsi_highs
and set it as the default MIP solver. Support more milp solver in mindtpy #2874available()
andlicense_is_valid()
check for subsolvers. (Related issue)setatter
Mindtpy rewrite #2654 (comment)reduce_level_coef
and activateuse_bb_tree_incumbent
by default.appsi_solver
to improve the performance of MindtPy.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: