Skip to content

add extra vector of storage inside QN models#140

Merged
dpo merged 1 commit intomainfrom
qn-store-extra-vector
Feb 19, 2026
Merged

add extra vector of storage inside QN models#140
dpo merged 1 commit intomainfrom
qn-store-extra-vector

Conversation

@dpo
Copy link
Member

@dpo dpo commented Feb 13, 2026

The objective of this change is to move the QN updates to a callback instead of having it performed in a generic manner by the solver. This will allow for customized QN updates.

The objective of this change is to move the QN updates to a callback
instead of having it performed in a generic manner by the solver.
This will allow for customized QN updates.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an extra vector field v to the LBFGSModel and LSR1Model structs to store gradient differences (yₖ = ∇fₖ₊₁ - ∇fₖ). This change lays the groundwork for moving quasi-Newton updates to callbacks instead of having them performed generically by the solver, enabling customized QN updates.

Changes:

  • Added v::S field to LBFGSModel and LSR1Model structs for storing gradient differences
  • Updated constructors to initialize the new vector field using similar(nlp.meta.x0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

Package name latest stable
FletcherPenaltySolver
JSOSolvers
JSOSuite
LLSModels
NLPModelsIpopt
NLPModelsKnitro
NLPModelsTest
PartiallySeparableNLPModels
Percival
QuadraticModels
RegularizedOptimization
RipQP

Copy link
Member

@tmigot tmigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dpo !
Should we also specialize the push! for these two operators ?

function Base.push!(nlp::QuasiNewtonModel, args...)

@dpo
Copy link
Member Author

dpo commented Feb 16, 2026

Do you mean that push!() would always push model.v? I think we would want to leave as much freedom as possible.

@dpo dpo requested a review from tmigot February 18, 2026 20:04
@tmigot
Copy link
Member

tmigot commented Feb 18, 2026

Sure, let's keep it as it is now. The rest looks good to me, thanks!

@dpo dpo merged commit bdd5a1c into main Feb 19, 2026
45 of 48 checks passed
@dpo dpo deleted the qn-store-extra-vector branch February 19, 2026 15:06
@dpo
Copy link
Member Author

dpo commented Feb 19, 2026

Thanks @tmigot and @MaxenceGollier !

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.

4 participants