diff --git a/src/LMTR_alg.jl b/src/LMTR_alg.jl index 6e778d90..449e7034 100644 --- a/src/LMTR_alg.jl +++ b/src/LMTR_alg.jl @@ -296,6 +296,7 @@ function LMTR( set_residuals!(stats, zero(eltype(xk)), ξ1 ≥ 0 ? sqrt(ξ1) : ξ1) set_iter!(stats, k) set_time!(stats, elapsed_time) + set_solver_specific!(stats, :radius, Δk) set_solver_specific!(stats, :Fhist, Fobj_hist[1:k]) set_solver_specific!(stats, :Hhist, Hobj_hist[1:k]) set_solver_specific!(stats, :NonSmooth, h) diff --git a/src/LM_alg.jl b/src/LM_alg.jl index c44a9041..d63df0db 100644 --- a/src/LM_alg.jl +++ b/src/LM_alg.jl @@ -290,6 +290,7 @@ function LM( set_residuals!(stats, zero(eltype(xk)), ξ1 ≥ 0 ? sqrt_ξ1_νInv : ξ1) set_iter!(stats, k) set_time!(stats, elapsed_time) + set_solver_specific!(stats, :sigma, σk) set_solver_specific!(stats, :Fhist, Fobj_hist[1:k]) set_solver_specific!(stats, :Hhist, Hobj_hist[1:k]) set_solver_specific!(stats, :NonSmooth, h) diff --git a/src/R2DH.jl b/src/R2DH.jl index 99eddba2..fa392655 100644 --- a/src/R2DH.jl +++ b/src/R2DH.jl @@ -61,6 +61,7 @@ function R2DH( set_residuals!(stats, zero(eltype(xk)), sqrt_ξ_νInv) set_iter!(stats, k) set_time!(stats, outdict[:elapsed_time]) + set_solver_specific!(stats, :sigma, outdict[:sigma]) set_solver_specific!(stats, :Fhist, outdict[:Fhist]) set_solver_specific!(stats, :Hhist, outdict[:Hhist]) set_solver_specific!(stats, :Time_hist, outdict[:Time_hist]) @@ -313,6 +314,7 @@ function R2DH( :hk => hk, :sqrt_ξ_νInv => sqrt_ξ_νInv, :elapsed_time => elapsed_time, + :sigma => σk ) return xk, k, outdict diff --git a/src/R2N.jl b/src/R2N.jl index 8a2d6c17..66d3370f 100644 --- a/src/R2N.jl +++ b/src/R2N.jl @@ -288,6 +288,7 @@ function R2N( set_residuals!(stats, zero(eltype(xk)), sqrt_ξ1_νInv) set_iter!(stats, k) set_time!(stats, elapsed_time) + set_solver_specific!(stats, :sigma, σk) set_solver_specific!(stats, :Fhist, Fobj_hist[1:k]) set_solver_specific!(stats, :Hhist, Hobj_hist[1:k]) set_solver_specific!(stats, :NonSmooth, h) diff --git a/src/R2_alg.jl b/src/R2_alg.jl index 89d1918e..0cea37e8 100644 --- a/src/R2_alg.jl +++ b/src/R2_alg.jl @@ -410,6 +410,7 @@ function SolverCore.solve!( set_objective!(stats, fk + hk) set_solver_specific!(stats, :smooth_obj, fk) set_solver_specific!(stats, :nonsmooth_obj, hk) + set_solver_specific!(stats, :sigma, σk) φk(d) = dot(∇fk, d) mk(d)::T = φk(d) + ψ(d)::T @@ -498,6 +499,7 @@ function SolverCore.solve!( set_objective!(stats, fk + hk) set_solver_specific!(stats, :smooth_obj, fk) set_solver_specific!(stats, :nonsmooth_obj, hk) + set_solver_specific!(stats, :sigma, σk) set_iter!(stats, stats.iter + 1) set_time!(stats, time() - start_time) diff --git a/src/TRDH_alg.jl b/src/TRDH_alg.jl index 2eaac3b0..df7f41df 100644 --- a/src/TRDH_alg.jl +++ b/src/TRDH_alg.jl @@ -75,6 +75,7 @@ function TRDH( set_residuals!(stats, zero(eltype(xk)), sqrt_ξ_νInv) set_iter!(stats, k) set_time!(stats, outdict[:elapsed_time]) + set_solver_specific!(stats, :radius, outdict[:radius]) set_solver_specific!(stats, :Fhist, outdict[:Fhist]) set_solver_specific!(stats, :Hhist, outdict[:Hhist]) set_solver_specific!(stats, :NonSmooth, outdict[:NonSmooth]) @@ -362,6 +363,7 @@ function TRDH( :hk => hk, :sqrt_ξ_νInv => sqrt_ξ_νInv, :elapsed_time => elapsed_time, + :radius => Δk, ) return xk, k, outdict diff --git a/src/TR_alg.jl b/src/TR_alg.jl index cd12aa0c..cf16c827 100644 --- a/src/TR_alg.jl +++ b/src/TR_alg.jl @@ -285,6 +285,7 @@ function TR( set_residuals!(stats, zero(eltype(xk)), sqrt_ξ1_νInv) set_iter!(stats, k) set_time!(stats, elapsed_time) + set_solver_specific!(stats, :radius, Δk) set_solver_specific!(stats, :Fhist, Fobj_hist[1:k]) set_solver_specific!(stats, :Hhist, Hobj_hist[1:k]) set_solver_specific!(stats, :NonSmooth, h) diff --git a/src/utils.jl b/src/utils.jl index 7e7baa2d..991b8537 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -111,5 +111,7 @@ function RegularizedExecutionStats(reg_nlp::AbstractRegularizedNLPModel{T, V}) w stats = GenericExecutionStats(reg_nlp.model, solver_specific = Dict{Symbol, T}()) set_solver_specific!(stats, :smooth_obj, T(Inf)) set_solver_specific!(stats, :nonsmooth_obj, T(Inf)) + set_solver_specific!(stats, :sigma, T(Inf)) + set_solver_specific!(stats, :radius, T(Inf)) return stats end