Fix GLOA convex affine cut slope#3940
Conversation
bernalde
left a comment
There was a problem hiding this comment.
No blocking code issues found in the PR diff.
The GDPopt GLOA change correctly separates the concave and convex affine cut bodies so the convex upper cut uses subcv(). The added GDPopt regression covers the reported invalid-cut case, and the added MindtPy GOA regression documents that the MindtPy affine-cut path already uses the convex slope for the upper cut.
I am leaving this as a comment rather than an approval because CI is not green yet. The current win/3.13 failure appears unrelated to this PR: the job failed in Download and install extensions before tests ran, after three gjh download attempts from netlib.org timed out with [WinError 10060]. Several checks are also still pending, including Jenkins inspection.
Tests run locally:
python -m pytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py::TestGDPoptUnit::test_gloa_affine_cut_uses_convex_slope_for_upper_cut pyomo/contrib/mindtpy/tests/unit_test.py::UnitTestMindtPy::test_goa_affine_cut_uses_convex_slope_for_upper_cut- Result:
2 passed in 0.86s
- Result:
python -m black --check --diff pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py- Result: passed;
3 files would be left unchanged
- Result: passed;
python -m pytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py- Result:
64 passed, 19 skipped, 3 deselected in 34.57s
- Result:
git diff --check origin/main...HEAD -- pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py- Result: passed
|
Integration check against GDPlib methanol: I tested this branch against the focused GDPlib Baseline with GDPlib's current Pixi environment, Pyomo
With this PR loaded via
The patched result matches GDPlib's documented methanol best-known objective |
Summary
subcv()slopes instead of reusing the concavesubcc()slopes.Tests run
pytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py::TestGDPoptUnit::test_gloa_affine_cut_uses_convex_slope_for_upper_cut pyomo/contrib/mindtpy/tests/unit_test.py::UnitTestMindtPy::test_goa_affine_cut_uses_convex_slope_for_upper_cut2 passed in 0.89spython -m black --check --diff pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py3 files would be left unchangedpytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py64 passed, 19 skipped, 3 deselected in 38.64sgit diff --check -- pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.pyNotes
Closes #3939