JuliaSmoothOptimizers / NLPModels.jl

Data Structures for Optimization Models
Other
172 stars 35 forks source link

`get` error with NLSModels #415

Open tmigot opened 2 years ago

tmigot commented 2 years ago

The definition of the getter https://github.com/JuliaSmoothOptimizers/NLPModels.jl/blob/main/src/nls/tools.jl is overloading the classical getter. So, we get:

julia> using NLPModels, NLPModelsTest

julia> nlp = LLS();

julia> (nlp.meta.nnzh, nlp.nls_meta.nnzh)
(2, 0)

julia> get_nnzh(nlp)
0

julia> nlp = NLSLC();

julia> (nlp.meta.nnzh, nlp.nls_meta.nnzh)
(120, 15)

julia> get_nnzh(nlp)
15

This is the error here https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/pull/60

dpo commented 2 years ago

What's NLSLC?

tmigot commented 2 years ago

These are test problems from NLPModelsTest.jl https://github.com/JuliaSmoothOptimizers/NLPModelsTest.jl/tree/main/src/nls/problems