From 9278021e6413d054a644bc0273aef3b36281e99f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 13 Apr 2024 17:44:39 -0400 Subject: [PATCH] :robot: Format .jl files (#271) Co-authored-by: d-monnet --- src/fomo.jl | 6 +++--- test/test_solvers.jl | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/fomo.jl b/src/fomo.jl index 0346ff01..51c876b5 100644 --- a/src/fomo.jl +++ b/src/fomo.jl @@ -300,7 +300,7 @@ function SolverCore.solve!( obj_mem = solver.o M = length(obj_mem) mem_ind = 0 - obj_mem[mem_ind+1] = stats.objective + obj_mem[mem_ind + 1] = stats.objective max_obj_mem = stats.objective grad!(nlp, x, ∇fk) @@ -392,8 +392,8 @@ function SolverCore.solve!( momentum .= ∇fk .* (oneT - β) .+ momentum .* β end set_objective!(stats, fck) - mem_ind = (mem_ind+1) % M - obj_mem[mem_ind+1] = stats.objective + mem_ind = (mem_ind + 1) % M + obj_mem[mem_ind + 1] = stats.objective max_obj_mem = maximum(obj_mem) grad!(nlp, x, ∇fk) diff --git a/test/test_solvers.jl b/test/test_solvers.jl index dff97532..dc82ed84 100644 --- a/test/test_solvers.jl +++ b/test/test_solvers.jl @@ -17,7 +17,10 @@ function tests() @testset "$name : nonmonotone configuration" for (name, solver) in [ ("R2", (nlp; kwargs...) -> R2(nlp, M = 2; kwargs...)), ("fomo_r2", (nlp; kwargs...) -> fomo(nlp, M = 2; kwargs...)), - ("fomo_tr", (nlp; kwargs...) -> fomo(nlp, M = 2, step_backend = JSOSolvers.tr_step(); kwargs...)), + ( + "fomo_tr", + (nlp; kwargs...) -> fomo(nlp, M = 2, step_backend = JSOSolvers.tr_step(); kwargs...), + ), ] unconstrained_nlp(solver) multiprecision_nlp(solver, :unc)