Migrate MadNLPMOI to the MOI.Nonlinear layer stack - #639
Open
blegat wants to merge 2 commits into
Open
Conversation
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.
6 tasks
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.
Needs