Fix GLOA convex affine cut slope - #4011
Open
bernalde wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3939.
Summary/Motivation:
GDPopt GLOA builds both of its affine cuts from a single
cut_bodyexpression computed from the MC++ concave slopes (ccSlope). The concave underestimator cut is correct, but the convex overestimator cut reuses those same concave slopes instead of the convex slopes (cvSlope). That produces an invalid upper cut, which can cut off feasible points and let GLOA terminate at a non-global solution.MindtPy's GOA affine-cut path already uses the convex slope for its upper cut, so this brings GLOA in line with the existing correct implementation.
This is a replacement for #3940, which GitHub would not allow me to reopen after it was closed. The prior review discussion and history remain available there.
Integration evidence from GDPlib (recorded on #3940): on the GDPlib
methanolGLOA benchmark, unpatched Pyomo6.10.0terminated after 1 iteration at objective-1743.4292381783366, while this branch ran 15 iterations and reached-1793.4292385308854, matching GDPlib's documented best-known objective-1793.4292381783to solver tolerance. This was the focused methanol GLOA case; I did not run the full GDPlib benchmark matrix.Changes proposed in this PR:
pyomo/contrib/gdpopt/gloa.py, so the convex overestimator cut usescvSlope(MC++subcv()) rather than reusing the concaveccSlope.test_gloa_affine_cut_uses_convex_slope_for_upper_cuttopyomo/contrib/gdpopt/tests/test_gdpopt.py, a solver-free regression covering the invalid-cut case from the issue.test_goa_affine_cut_uses_convex_slope_for_upper_cuttopyomo/contrib/mindtpy/tests/unit_test.py, documenting that MindtPy GOA already uses the convex slope for its upper cut.main:python -m pytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py65 passed, 19 skipped, 3 deselected in 39.87spython -m black --check pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py3 files would be left unchangedtypos --config ./.github/workflows/typos.tomlon the three changed filesAI-Use Disclosure
or
AI tools contributed to the development of this PR
Review process (select ONE):
Notes for reviewers (optional): This replacement PR carries over the implementation and tests from #3940 unchanged, then refreshes the branch against current
main. The replacement PR description and branch-refresh workflow were prepared with AI assistance and reviewed before posting. Reviewers may want to focus on the restructured trivial-cut handling: previously a singleis_potentially_variablecheck governed both cuts together, and this PR splits that into independent per-cut checks, so the trivially-FalseDeveloperErrorconditions are now evaluated separately for the concave lower cut and the convex upper cut.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: