-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I am trying to benchmark solvers on a Diagonal Quasi-Newton Model. I get two issues:
- I get
type DiagonalQNModel has no field counters
- When giving a Quasi-Newton Model to Ipopt, I get
MethodError : no method matching hess_structure!(::NLPModelsModifiers.DiagonalQNModel{...},...)
Here is an example
using BenchmarkTools, Dates, LinearAlgebra, JLD2
using Percival, NLPModels, NLPModelsIpopt, SolverBenchmark, SolverCore, NLPModelsModifiers
using OptimizationProblems, ADNLPModels, OptimizationProblems.ADNLPProblems
meta = OptimizationProblems.meta
problem_names = meta[(meta.has_equalities_only.==1).&(meta.has_bounds.==0).&(meta.has_fixed_variables.==0).&(meta.variable_nvar.==0), :name]
problem_list = (SpectralGradientModel(eval(Meta.parse(name))(), σ=1.0) for name in problem_names)
solvers = Dict(
:ipopt =>
nlp -> ipopt(
nlp,
),
:percival =>
nlp -> percival(
nlp,
),
)
stats = bmark_solvers(solvers, problem_list)
There is no reason for not having a hess_structure!
method at least for the DiagonalQNModel type because it is trivial. I can also add the counters as a field of the different structures if you think it is appropriate.
Metadata
Metadata
Assignees
Labels
No labels