Skip to content

[Nonlinear] support copy_to into ModelWithQuad and ModelWithOracles - #3157

Merged
blegat merged 3 commits into
masterfrom
bl/nonlinear_copy_to
Nov 27, 2026
Merged

blegat merged 3 commits into
masterfrom
bl/nonlinear_copy_to

Conversation

@blegat

@blegat blegat commented Nov 27, 2026

Copy link
Copy Markdown
Member

This allows NLPModelsJuMP to use copy_to with a ModelFilter

Nonlinear.Model accepts its constraints and objective incrementally, the
variables being owned by the outer layer, so it supports the incremental
interface. ModelWithQuad and ModelWithOracles keep forwarding the trait to
their inner model since they forward add_constraint to it. Add MOI.empty!
for ModelWithQuad, needed by default_copy_to, and define MOI.copy_to for
both layers. This lets Nonlinear.model(backend) be filled with MOI.copy_to
and the bounds be queried back with MOI.Utilities.variable_bounds.
@blegat
blegat force-pushed the bl/nonlinear_copy_to branch from 276f1c7 to b635baf Compare November 27, 2026 09:24
@blegat
blegat merged commit 5e191e8 into master Nov 27, 2026
31 checks passed
@blegat
blegat deleted the bl/nonlinear_copy_to branch November 27, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant