Skip to content

Commit 9e03221

Browse files
Update runtests.jl
Redundant parameters removed, HighOrderDescent name update.
1 parent 8e451e1 commit 9e03221

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/OptimizationODE/test/runtests.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ using LinearAlgebra
2020
f_autodiff = OptimizationFunction(f, ADTypes.AutoForwardDiff())
2121
prob_auto = OptimizationProblem(f_autodiff, x0, p)
2222

23-
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), PRKChebyshevDescent())
24-
sol = solve(prob_auto, opt; η=0.01,dt=0.01, tmax=1000, maxiters=50_000)
23+
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), HighOrderDescent())
24+
sol = solve(prob_auto, opt; dt=0.01, maxiters=50_000)
2525
@test sol.u [0.0, 0.0] atol=1e-2
2626
@test sol.objective 0.0 atol=1e-2
2727
@test sol.retcode == ReturnCode.Success
@@ -30,8 +30,8 @@ using LinearAlgebra
3030
f_manual = OptimizationFunction(f, SciMLBase.NoAD(); grad=g!)
3131
prob_manual = OptimizationProblem(f_manual, x0)
3232

33-
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), PRKChebyshevDescent())
34-
sol = solve(prob_manual, opt; η=0.01,dt=0.01, tmax=1000, maxiters=50_000)
33+
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), HighOrderDescent())
34+
sol = solve(prob_manual, opt; dt=0.01, maxiters=50_000)
3535
@test sol.u [0.0, 0.0] atol=1e-2
3636
@test sol.objective 0.0 atol=1e-2
3737
@test sol.retcode == ReturnCode.Success
@@ -40,8 +40,8 @@ using LinearAlgebra
4040
f_fail = OptimizationFunction(f, SciMLBase.NoAD())
4141
prob_fail = OptimizationProblem(f_fail, x0)
4242

43-
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), PRKChebyshevDescent())
44-
@test_throws ErrorException solve(prob_fail, opt; η=0.01,dt=0.001, tmax=10_000.0, maxiters=20_000)
43+
for opt in (ODEGradientDescent(), RKChebyshevDescent(), RKAccelerated(), HighOrderDescent())
44+
@test_throws ErrorException solve(prob_fail, opt; dt=0.001, maxiters=20_000)
4545
end
4646

4747
end

0 commit comments

Comments
 (0)