Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new NLPModelMeta constructor #471

Merged

Conversation

MaxenceGollier
Copy link
Contributor

We discussed this in #469

Added a function allowing to copy a NLPModelMeta but with the allowance to change some fields.
For example, if one wants to modify the number of nonzero entries of the Hessian of some nlp, (this can be the case when one wants to use a diagonal Quasi-Newton approximation of the Hessian for example), one can write

meta = NLPModelMeta(nlp.meta, nnzh = nlp.meta.nvar)

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.

Can you also document this new constructor here:

NLPModelMeta(nvar; kwargs...)

and add unit tests?

src/nlp/meta.jl Outdated Show resolved Hide resolved
src/nlp/meta.jl Outdated Show resolved Hide resolved
@tmigot tmigot changed the title Add NLPModelMeta Constructor Add new NLPModelMeta constructor Jul 25, 2024
src/nlp/meta.jl Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jul 29, 2024

Package name latest stable
ADNLPModels.jl
AmplNLReader.jl
CUTEst.jl
CaNNOLeS.jl
DCISolver.jl
FletcherPenaltySolver.jl
JSOSolvers.jl
LLSModels.jl
NLPModelsIpopt.jl
NLPModelsJuMP.jl
NLPModelsModifiers.jl
NLPModelsTest.jl
PDENLPModels.jl
Percival.jl
QuadraticModels.jl
SolverBenchmark.jl
SolverCore.jl
SolverTest.jl
SolverTools.jl

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.

Looks good to me, thanks @MaxenceGollier

@tmigot tmigot linked an issue Jul 29, 2024 that may be closed by this pull request
@tmigot tmigot merged commit 6ebae68 into JuliaSmoothOptimizers:main Jul 29, 2024
48 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update an NLPModelMeta
2 participants