Skip to content

Use MOI.Nonlinear.ModelWithQuad - #863

Draft
blegat wants to merge 4 commits into
cvanaret:mainfrom
blegat:bl/model_with_quad
Draft

Use MOI.Nonlinear.ModelWithQuad#863
blegat wants to merge 4 commits into
cvanaret:mainfrom
blegat:bl/model_with_quad

Conversation

@blegat

@blegat blegat commented Aug 19, 2026

Copy link
Copy Markdown

Comment thread .github/workflows/julia-tests-hsl.yml Outdated
@blegat blegat changed the title Use MOI.Nonlinear.ModelWithQuad instead of a QPBlockData copy Use MOI.Nonlinear.ModelWithQuad Aug 21, 2026
@cvanaret

Copy link
Copy Markdown
Owner

Hi @blegat, thanks for looking into this! The last commit fails with Did not find rev bl/model_with_quad in repository.

@cvanaret cvanaret added the julia label Aug 21, 2026
Comment thread .github/workflows/julia-tests-jll.yml Outdated
Comment thread .github/workflows/julia-tests-ubuntu.yml Outdated
Comment thread .github/workflows/julia-tests-unosolver.yml Outdated
@blegat

blegat commented Aug 21, 2026

Copy link
Copy Markdown
Author

Should be fixed now

@cvanaret

Copy link
Copy Markdown
Owner

@blegat could you rebase? I updated the self-hosted runners for the HSL tests.

@blegat
blegat force-pushed the bl/model_with_quad branch from c9a0d33 to 41af3e1 Compare August 21, 2026 14:30
@blegat

blegat commented Aug 21, 2026

Copy link
Copy Markdown
Author

Just rebased

blegat added 4 commits August 25, 2026 10:10
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.
Co-authored-by: Benoît Legat <benoit.legat@gmail.com>
@cvanaret
cvanaret force-pushed the bl/model_with_quad branch from 41af3e1 to e6d7159 Compare August 25, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants