Skip to content

Migrate MadNLPMOI to the MOI.Nonlinear layer stack - #639

Open
blegat wants to merge 2 commits into
madsuite-org:masterfrom
blegat:bl/moi-layers
Open

Migrate MadNLPMOI to the MOI.Nonlinear layer stack#639
blegat wants to merge 2 commits into
madsuite-org:masterfrom
blegat:bl/moi-layers

Conversation

@blegat

@blegat blegat commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

blegat added 2 commits August 12, 2026 23:27
Delete the local QPBlockData copy (MOI_utils.jl) and the fused
evaluator methods on the Optimizer, and delegate them to a
MOI.Nonlinear.EvaluatorWithQuad/EvaluatorWithOracles stack assembled
over the existing storage in _setup_model. The row order
[qp, oracle, nlp] is unchanged.

- _VectorNonlinearOracleCache is deleted: the oracle scratch now lives
  in the MOI oracle layer, the LagrangeMultiplierStart values in a
  parallel oracle_dual_starts vector, and the write-only per-oracle
  timers are dropped.
- jprod_available/hprod_available come from the stack's
  features_available, which already accounts for the oracles; the
  Jacobian-transpose product used for the oracle duals is answered by
  the layer via materialized oracle Jacobians (this also fixes a bug
  where the fused transpose product called the nlp evaluator last with
  the full output vector, clobbering the qp contribution, because
  ReverseAD's transpose product overwrites its output).
- has_only_linear_constraints is decided from
  MOI.Nonlinear.constraint_linearity.
- Parameters are registered in qp_data.parameters when the constrained
  variable is added, as required by the dictionary-key parameter
  convention of MOI's QPBlockData.
- Setting MOI.ObjectiveSense now invalidates the solver, because the
  objective sink of the stack depends on the sense.
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.

1 participant