Skip to content

Commit

Permalink
🤖 Format .jl files
Browse files Browse the repository at this point in the history
  • Loading branch information
dpo committed Dec 14, 2024
1 parent 63c5e2b commit a23734d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/R2_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function R2(
η2 = options.η2,
ν = options.ν,
γ = options.γ;
kwargs_dict...
kwargs_dict...,
)
end

Expand Down Expand Up @@ -229,7 +229,7 @@ function R2(
η2 = options.η2,
ν = options.ν,
γ = options.γ;
kwargs...
kwargs...,
)
outdict = Dict(
:Fhist => stats.solver_specific[:Fhist],
Expand Down Expand Up @@ -272,7 +272,7 @@ function R2(
η2 = options.η2,
ν = options.ν,
γ = options.γ;
kwargs...
kwargs...,
)
outdict = Dict(
:Fhist => stats.solver_specific[:Fhist],
Expand All @@ -293,12 +293,14 @@ function R2(reg_nlp::AbstractRegularizedNLPModel; kwargs...)
max_iter = pop!(kwargs_dict, :max_iter, 10000)
solver = R2Solver(reg_nlp, max_iter = max_iter)
stats = GenericExecutionStats(reg_nlp.model)
cb = pop!(kwargs_dict, :callback,
cb = pop!(
kwargs_dict,
:callback,
(nlp, solver, stats) -> begin
solver.Fobj_hist[stats.iter + 1] = stats.solver_specific[:smooth_obj]
solver.Hobj_hist[stats.iter + 1] = stats.solver_specific[:nonsmooth_obj]
solver.Complex_hist[stats.iter + 1] += 1
end
end,
)
solve!(solver, reg_nlp, stats; callback = cb, max_iter = max_iter, kwargs...)
set_solver_specific!(stats, :Fhist, solver.Fobj_hist[1:(stats.iter + 1)])
Expand Down

0 comments on commit a23734d

Please sign in to comment.