Skip to content

Fix GLOA convex affine cut slope#3940

Open
bernalde wants to merge 1 commit into
Pyomo:mainfrom
SECQUOIA:fix/issue-3939-gloa-cv-slope
Open

Fix GLOA convex affine cut slope#3940
bernalde wants to merge 1 commit into
Pyomo:mainfrom
SECQUOIA:fix/issue-3939-gloa-cv-slope

Conversation

@bernalde
Copy link
Copy Markdown
Contributor

Summary

  • Fix GDPopt GLOA affine cut generation so convex upper cuts use MC++ subcv() slopes instead of reusing the concave subcc() slopes.
  • Preserve trivial-cut handling while allowing concave and convex affine cuts to be generated independently.
  • Add solver-free MC++ regression tests for GDPopt GLOA and MindtPy GOA affine cuts using the bilinear equality from the issue.

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_cut
    • Result: 2 passed in 0.89s
  • 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
    • Note: Black emitted its Python 3.13 / Python 3.14 safety-check warning, but exited successfully.
  • pytest -q pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py
    • Result: 64 passed, 19 skipped, 3 deselected in 38.64s
  • git diff --check -- pyomo/contrib/gdpopt/gloa.py pyomo/contrib/gdpopt/tests/test_gdpopt.py pyomo/contrib/mindtpy/tests/unit_test.py
    • Result: passed

Notes

  • Full repository pytest was not run locally; the edited GDPopt and MindtPy test modules were run.

Closes #3939

Copy link
Copy Markdown
Contributor Author

@bernalde bernalde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
  • 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
  • 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
  • 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

@bernalde
Copy link
Copy Markdown
Contributor Author

Integration check against GDPlib methanol:

I tested this branch against the focused GDPlib methanol GLOA benchmark path that is being tracked in SECQUOIA/gdplib#70.

Baseline with GDPlib's current Pixi environment, Pyomo 6.10.0:

  • command: /home/bernalde/.pixi/bin/pixi run gdplib-benchmark run --instances methanol --strategies gdpopt.gloa --timelimit 60 --solver-profile gams-baron --run-id issue70_methanol_gloa_final_verify
  • termination: optimal
  • iterations: 1
  • objective: -1743.4292381783366

With this PR loaded via PYTHONPATH=/tmp/pyomo-pr3940, Pyomo reports 6.10.1.dev0:

  • command: PYTHONPATH=/tmp/pyomo-pr3940 /home/bernalde/.pixi/bin/pixi run gdplib-benchmark run --instances methanol --strategies gdpopt.gloa --timelimit 60 --solver-profile gams-baron --run-id issue70_methanol_gloa_pyomo3940 --no-summary
  • termination: optimal
  • iterations: 15
  • objective: -1793.4292385308854

The patched result matches GDPlib's documented methanol best-known objective -1793.4292381783 to solver tolerance. This is good integration evidence that the convex affine cut slope fix addresses the methanol GLOA non-global termination observed in GDPlib. I did not run the full GDPlib PR58 benchmark matrix; this was the focused methanol GLOA case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GDPopt GLOA convex affine cuts use concave MC++ slopes

1 participant