Move OA selection to mip-nlp solver#320
Conversation
|
A review highlighted:
Notes (not blocking) Can you take a look and let me know when you think this is ready to merge? |
|
Commits pushed:
Main changes:
Tests run:
Comments intentionally not addressed:
Remaining risks or follow-up:
|
|
@jkitchin One deeper design question from #319 that I think is worth settling before we build further on this API: should discopt treat disjunctive solvers as a separate axis from MIP/MINLP solvers? My current mental model is:
This PR chooses the reformulation path for the deprecated alias: |
|
Agreed on the two-axis split — that's the contract we'll build on, and I've merged this PR since it's correct and unblocks the API.
The native axis already lives on Two decisions we'll treat as the agreed contract for follow-ups:
Captured both in #323 so they aren't lost. Thanks for pushing on the design here. Generated by Claude Code |
Summary
Closes #319.
This moves OA selection toward the solver-family API described in the issue:
solver="mip-nlp"as a first-class MINLP decomposition selectormip_nlp_method/mip_nlp_optionsmip_nlp_method="oa"and"ecp"through the existing OA implementationgdp_method="oa"as a deprecation-warning compatibility aliasgdp_methodto describe GDP reformulation choices for the new routeThe broader MindtPy-style methods (
goa,roa,fp,lp_nlp_bb) are reserved by name and raiseNotImplementedErroruntil they are implemented.Validation
PYTHONPATH=python python -m ruff check python/discopt/solvers/mip_nlp.py python/discopt/solver.py python/discopt/modeling/core.py python/tests/test_mip_nlp.py python/tests/test_oa.pyPYTHONPATH=python pytest python/tests/test_mip_nlp.py python/tests/test_oa.py -qNote: local commit hooks were skipped because
pre-commitis not installed in this environment; the targeted Ruff and pytest checks above pass.