GDPopt rewrite!
Fixes
Summary/Motivation:
This is a rewrite of GDPopt with the goal of improving extensibility and maintainability.
Changes proposed in this PR:
- Removes gdpbb--it has been deprecated since 5.6.9
- Centralizes common functionality between the GDPopt algorithms in one class, but has each algorithm implement its own main loop and other unique methods (usually cut generation).
- Stores algorithm state (bounds, timing info, etc) on the GDPoptSolver class in lieu of the former `GDPoptSolveData' object.
- Moves some util functions to
mindtpyas a result, as gdpopt no longer uses them
- Moves some util functions to
- Significantly changes the behavior of
tee=Truesimilarly to recent changes in mindtpy: simplifies output at theINFOlevel to log bounds by iteration, with some info before and after the solve. The old detailed output (and more) is now at theDEBUGlevel. - Makes the function to initialize NLP subproblems a callback. The default is still the former behavior of using the solution originally in the model passed to the solver.
- Deprecates the 'strategy' argument in favor of 'algorithm'
NOTE: The changes to LBB are fairly minimal--just divorcing it from the solve_data object. But otherwise it is largely exempt from this rewrite.
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:
- I agree my contributions are submitted under the BSD license.
- I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.
Excellent work!
Codecov Report
Merging #2406 (bd67602) into main (bd950f6) will increase coverage by
0.33%. The diff coverage is87.84%.
@@ Coverage Diff @@
## main #2406 +/- ##
==========================================
+ Coverage 85.72% 86.06% +0.33%
==========================================
Files 711 713 +2
Lines 78487 78851 +364
==========================================
+ Hits 67285 67863 +578
+ Misses 11202 10988 -214
| Flag | Coverage Δ | |
|---|---|---|
| linux | 83.44% <86.28%> (+0.32%) |
:arrow_up: |
| osx | 73.57% <65.27%> (+0.12%) |
:arrow_up: |
| other | 83.63% <86.28%> (+0.32%) |
:arrow_up: |
| win | 80.59% <81.93%> (+0.37%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| examples/gdp/eight_process/eight_proc_logical.py | 91.13% <0.00%> (ø) |
|
| examples/gdp/nine_process/small_process.py | 41.50% <0.00%> (ø) |
|
| examples/gdp/small_lit/ex_633_trespalacios.py | 70.58% <0.00%> (ø) |
|
| examples/gdp/small_lit/nonconvex_HEN.py | 67.56% <0.00%> (ø) |
|
| pyomo/environ/__init__.py | 82.35% <ø> (ø) |
|
| pyomo/contrib/gdpopt/solve_subproblem.py | 73.48% <73.48%> (ø) |
|
| pyomo/contrib/mindtpy/util.py | 86.50% <74.65%> (-4.24%) |
:arrow_down: |
| pyomo/contrib/gdpopt/branch_and_bound.py | 75.96% <75.00%> (+3.48%) |
:arrow_up: |
| pyomo/contrib/gdpopt/solve_discrete_problem.py | 78.82% <78.82%> (ø) |
|
| pyomo/contrib/gdpopt/config_options.py | 93.93% <84.61%> (-6.07%) |
:arrow_down: |
| ... and 28 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@jsiirola , this is (finally) ready for you to look at!
This might sound not too relevant, but recently in a review, I was asked to refer to the master problem as the main problem. This is something that has already been implemented in the GitHub branches and that we included in MindtPy. Since you are relabeling things, we can put this there as well.
OK, I'm confused what's going on with Jenkins, but this is passing everything else and is ready for you @jsiirola