Skip to content

[WIP] Move tests to new JuMP nonlinear interface - #236

Draft
frapac wants to merge 1 commit into
mainfrom
fp/nljump
Draft

[WIP] Move tests to new JuMP nonlinear interface#236
frapac wants to merge 1 commit into
mainfrom
fp/nljump

Conversation

@frapac

@frapac frapac commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

We have one remaining issue: the MathOptNLSModel depends on the legacy nonlinear interface to formulate quadratic residuals which are not supported by default.

We should add this support explicitly if we do not want to break NLPModelsJuMP. This would require some non-trivial changes in MathOptNLSModel though.

@blegat

blegat commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

I have a plan to add NLS support with the new API, see 94a1327
The plan is to update MOI.Nonlinear to allow arrays (as done currently in ArrayDiff by copy-pasted much of MOI.Nonlinear and modifying it). Then, NLPModelsJuMP can just detect the expression sum((...).^2) and build an NLS model.
So my idea is that if the model fits, it creates a QuadraticModel (see #230), otherwise, if it detects that the objective is a LS, it creates an NLS model and otherwise it creates a generic NLP model.

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.

2 participants