Skip to content

add extra vector of storage inside QN models#140

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

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

Conversation

@dpo

@dpo dpo commented Feb 13, 2026

Copy link
Copy Markdown
Member

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.

Copilot AI left a comment

Copy link
Copy Markdown

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
Copy Markdown
Contributor
Package name latest stable
FletcherPenaltySolver
JSOSolvers
JSOSuite
LLSModels
NLPModelsIpopt
NLPModelsKnitro
NLPModelsTest
PartiallySeparableNLPModels
Percival
QuadraticModels
RegularizedOptimization
RipQP

@tmigot tmigot left a comment

Copy link
Copy Markdown
Member

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

dpo commented Feb 16, 2026

Copy link
Copy Markdown
Member Author

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

tmigot commented Feb 18, 2026

Copy link
Copy Markdown
Member

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

dpo commented Feb 19, 2026

Copy link
Copy Markdown
Member Author

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