Add LBB relaxed NLP node solver - #4012
Open
bernalde wants to merge 1 commit into
Open
Conversation
This was referenced Aug 15, 2026
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 #3945.
Summary/Motivation:
GDPopt LBB routes every transformed node subproblem through
minlp_solver(orlocal_minlp_solverfor optional local screening), even at nodes where every discrete variable has already been fixed by branching. Those nodes are continuous NLPs, so sending them to a MINLP solver is unnecessary and forces users to have a MINLP solver configured for work a continuous NLP solver could do.This adds an explicit, opt-in solver role for that case rather than changing the default dispatch, so existing LBB configurations keep their current global-bounding behavior.
This is a replacement for #3946, which GitHub would not allow me to reopen after it was closed. The prior discussion and history remain available there.
Changes proposed in this PR:
relaxed_nlp_solverandrelaxed_nlp_solver_argsonGDP_LBB_Solver.CONFIGinpyomo/contrib/gdpopt/branch_and_bound.py, for transformed node subproblems with no unfixed discrete variables._get_rnGDP_subproblem_solver(), which reuses GDPopt's existingdetect_unfixed_discrete_vars()helper to choose between the relaxed NLP solver and the mixed-integer node solver, and logs which one it picked.relaxed_nlp_solveris unset: such nodes continue to go tominlp_solver/local_minlp_solver.reslimtime-limit handling into_apply_rnGDP_subproblem_time_limit()so it applies to whichever subsolver is dispatched.pyomo/contrib/mindtpy/algorithm_base_class.pyto test for no unfixed discrete variables rather than an empty discrete variable list, and update the surrounding docstring.TestGDPoptLBBNodeSolverDispatchinpyomo/contrib/gdpopt/tests/test_LBB.pyand a MindtPy GOA fixed-discrete routing regression inpyomo/contrib/mindtpy/tests/test_mindtpy_no_discrete.py.main:python -m pytest -q pyomo/contrib/gdpopt/tests/ pyomo/contrib/mindtpy/tests/test_mindtpy_no_discrete.py108 passed, 35 skipped, 5 deselected in 196.51spython -m black --check pyomo/contrib/gdpopt/branch_and_bound.py pyomo/contrib/gdpopt/tests/test_LBB.py pyomo/contrib/mindtpy/algorithm_base_class.py pyomo/contrib/mindtpy/tests/test_mindtpy_no_discrete.py4 files would be left unchangedtypos --config ./.github/workflows/typos.tomlon the four 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 #3946 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.Three things I would like focused feedback on, since this PR is larger than the other GDPopt fixes I have open:
relaxed_nlp_solverdefaults toNonespecifically so that nonconvex nodes keep their current global-bounding behavior. Please confirm that opt-in default is the semantics you want, rather than defaulting to the existingnlp_solver.reslimlogic into_apply_rnGDP_subproblem_time_limit()means the local node screening path now also gets a GAMS time limit applied; previously that path passedlocal_minlp_solver_argsthrough untouched. I believe that is the correct behavior, but it is a behavior change beyond the strict dispatch fix and should be a deliberate decision.len(discrete_variable_list) == 0becoming "no unfixed discrete variables") alters when MindtPy short-circuits to a direct solve. It is needed for consistency with the LBB dispatch rule, but it touches MindtPy rather than GDPopt, so it may warrant a separate reviewer.Related: this PR touches
pyomo/contrib/gdpopt/tests/test_LBB.pynear the same imports as #4010 (replacement for #3942, already approved by @emma58). The runtime changes are independent and do not overlap. I recommend merging #4010 first; I will then rebase this branch and resolve the small test-file conflict.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: