Skip to content

Executing R2N twice in a row does not give the same answer #268

@MaxenceGollier

Description

@MaxenceGollier

MRE

using LinearAlgebra: length
using LinearAlgebra, Random
using ProximalOperators

using NLPModels
using  NLPModelsModifiers, RegularizedProblems, RegularizedOptimization, SolverCore


Random.seed!(0)
compound = 1
bpdn, _, _ = bpdn_model(compound)
λ = norm(grad(bpdn, zeros(bpdn.meta.nvar)), Inf) / 10

h = NormL0(λ)

reg_nlp = RegularizedNLPModel(LBFGSModel(bpdn), h)
solver = R2NSolver(reg_nlp)
stats = RegularizedExecutionStats(reg_nlp)

solve!(solver, reg_nlp, stats, σk = 1.0, atol = 1e-6, rtol = 1e-6)
println(stats.solver_specific[:sigma_cauchy])
solve!(solver, reg_nlp, stats, σk = 1.0, atol = 1e-6, rtol = 1e-6)
println(stats.solver_specific[:sigma_cauchy])

results in

2.220069341990324
3.242917504053576

This is due to the v0 entry not being reset to its original value at the start.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions