You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the no-discrete short-circuit path, MindtPy currently does two things that are worth revisiting:
It recomputes structural information in model_is_valid() by walking polynomial degree over every constraint and the objective, even though the utility block setup has already classified constraints into linear and nonlinear lists.
It routes any continuous non-LP model to the NLP solver without considering whether the selected MIP solver can directly handle a continuous QP or QCP.
This issue tracks a follow-up refactor separate from #3861, which should stay focused on returning consistent results and loading primal values in the existing short-circuit path.
Reuse the structure information already built during utility-block setup instead of re-walking polynomial degree in the short-circuit check.
Concretely:
reuse the preclassified linear/nonlinear constraint lists that are already built for the working model
cache or reuse the objective degree once where needed
keep existing quadratic_strategy semantics unchanged unless a separate design decision explicitly changes them
2. Evaluate capability-aware routing for continuous QP/QCP models
Refine the no-discrete short-circuit path so that continuous QP/QCP models can use the selected MIP solver when that solver explicitly supports the required quadratic structure.
Concretely:
prefer the selected mip_solver for continuous QP models only when its interface explicitly supports quadratic objectives
prefer the selected mip_solver for continuous QCP models only when its interface explicitly supports quadratic constraints
otherwise continue routing to the configured nlp_solver
preserve current behavior for plain LP and general NLP models unless the new routing rules apply
Non-goals
Do not implement a blanket "try MIP and fall back to NLP on any failure" policy.
Do not treat infeasible, unbounded, time-limit, or solver-error outcomes from the MIP solver as a signal to silently retry with the NLP solver.
Do not add a new public config option unless the implementation proves it is necessary.
Test plan
Add targeted short-circuit tests for:
continuous QP models where a quadratic-capable MIP solver should be preferred
continuous QCP models only for solver interfaces that explicitly support quadratic constraints
unsupported quadratic cases that should remain on the NLP path
failure cases proving infeasible, error, or time-limit results are not silently converted into a fallback solve
Acceptance criteria
The short-circuit path no longer duplicates the full constraint degree walk already done during utility-block setup.
Continuous QP/QCP routing depends on explicit solver capability, not just degree classification.
Existing quadratic_strategy behavior remains unchanged unless intentionally revised in the follow-up implementation.
Summary
In the no-discrete short-circuit path, MindtPy currently does two things that are worth revisiting:
model_is_valid()by walking polynomial degree over every constraint and the objective, even though the utility block setup has already classified constraints into linear and nonlinear lists.This issue tracks a follow-up refactor separate from #3861, which should stay focused on returning consistent results and loading primal values in the existing short-circuit path.
Related: #3861
Proposed work
1. Remove duplicate structure checks
Reuse the structure information already built during utility-block setup instead of re-walking polynomial degree in the short-circuit check.
Concretely:
quadratic_strategysemantics unchanged unless a separate design decision explicitly changes them2. Evaluate capability-aware routing for continuous QP/QCP models
Refine the no-discrete short-circuit path so that continuous QP/QCP models can use the selected MIP solver when that solver explicitly supports the required quadratic structure.
Concretely:
mip_solverfor continuous QP models only when its interface explicitly supports quadratic objectivesmip_solverfor continuous QCP models only when its interface explicitly supports quadratic constraintsnlp_solverNon-goals
Test plan
Add targeted short-circuit tests for:
Acceptance criteria
quadratic_strategybehavior remains unchanged unless intentionally revised in the follow-up implementation.