Use MOI.Nonlinear.ModelWithQuad - #863
Draft
blegat wants to merge 4 commits into
Draft
Conversation
blegat
commented
Aug 21, 2026
Owner
|
Hi @blegat, thanks for looking into this! The last commit fails with |
blegat
commented
Aug 21, 2026
blegat
commented
Aug 21, 2026
blegat
commented
Aug 21, 2026
Author
|
Should be fixed now |
Owner
|
@blegat could you rebase? I updated the self-hosted runners for the HSL tests. |
blegat
force-pushed
the
bl/model_with_quad
branch
from
August 21, 2026 14:30
c9a0d33 to
41af3e1
Compare
Author
|
Just rebased |
Delete the local copy of QPBlockData (MOI_utils.jl): the variables, the parameters, the affine and quadratic objective and constraints, and the inner nonlinear model are stored in a single model::MOI.Nonlinear.ModelWithQuad field that most of the MOI API forwards to, and everything is evaluated through a MOI.Nonlinear.EvaluatorWithQuad built in _setup_model. The inner evaluator is a new _OracleNLPEvaluator that stacks the VectorNonlinearOracle rows before the NLPBlock rows and extends the private MOI.Nonlinear._constraint_bounds, so the constraint bounds of the whole stack are assembled by the evaluator. Parameters follow the _PARAMETER_OFFSET convention of MOI.Nonlinear and their values are stored once, in the inner nonlinear model, aliased by the QP block, which removes the per-solve parameter sync. A uses_nlp_block flag tells the legacy MOI.NLPBlock API apart, because optimize! overwrites nlp_data; the NLPBlock is rebuilt on every setup unless that flag is set.
cvanaret
force-pushed
the
bl/model_with_quad
branch
from
August 25, 2026 08:10
41af3e1 to
e6d7159
Compare
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.
Proof of concept refactor after