-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
the slow test suite is now up-to-date again
- Loading branch information
1 parent
dcbffe1
commit d249ab8
Showing
4 changed files
with
92 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,42 @@ | ||
include("common.jl") | ||
|
||
facts("Optimize single objective problems in 5, 10, and 30 dimensions with DE") do | ||
simple_problems = ["Sphere", "Schwefel2.22", "Schwefel2.22"] | ||
for problem in simple_problems | ||
context(problem) do | ||
p = BlackBoxOptim.example_problems[problem] | ||
@testset "Optimize single objective problems in 5, 10, and 30 dimensions with DE" begin | ||
simple_problems = ["Sphere", "Schwefel2.22", "Schwefel2.22"] | ||
@testset "Simple problem $pr" for pr in simple_problems | ||
p = BlackBoxOptim.example_problems[pr] | ||
|
||
@fact fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin) < 0.01 --> true | ||
@fact fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin_radiuslimited) < 0.01 --> true | ||
@test fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin) < 0.01 | ||
@test fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin_radiuslimited) < 0.01 | ||
|
||
@fact fitness_for_opt(p, 10, 20, 1e4, :de_rand_1_bin) < 0.01 --> true | ||
@fact fitness_for_opt(p, 10, 20, 1e4, :de_rand_1_bin_radiuslimited) < 0.01 --> true | ||
@test fitness_for_opt(p, 10, 20, 1e4, :de_rand_1_bin) < 0.01 | ||
@test fitness_for_opt(p, 10, 20, 1e4, :de_rand_1_bin_radiuslimited) < 0.01 | ||
|
||
@fact fitness_for_opt(p, 30, 25, 3e4, :de_rand_1_bin) < 0.01 --> true | ||
@fact fitness_for_opt(p, 30, 25, 3e4, :de_rand_1_bin_radiuslimited) < 0.01 --> true | ||
@test fitness_for_opt(p, 30, 25, 3e4, :de_rand_1_bin) < 0.01 | ||
@test fitness_for_opt(p, 30, 25, 3e4, :de_rand_1_bin_radiuslimited) < 0.01 | ||
end | ||
|
||
@testset "Schwefel1.2" begin | ||
problem = "Schwefel1.2" | ||
p = BlackBoxOptim.example_problems[problem] | ||
@test fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin_radiuslimited) < 0.01 | ||
@test fitness_for_opt(p, 10, 50, 5e4, :de_rand_1_bin_radiuslimited) < 0.01 | ||
|
||
#DE/rand/1/bin seems to have troubles... | ||
@test fitness_for_opt(p, 30, 50, 2e5, :de_rand_1_bin_radiuslimited) < 10.0 | ||
@test fitness_for_opt(p, 30, 50, 2e5, :adaptive_de_rand_1_bin) < 10.0 | ||
@test fitness_for_opt(p, 30, 50, 2e5, :adaptive_de_rand_1_bin_radiuslimited) < 10.0 | ||
end | ||
|
||
@testset "Rosenbrock" begin | ||
problem = "Rosenbrock" | ||
p = BlackBoxOptim.example_problems[problem] | ||
@test fitness_for_opt(p, 5, 20, 1e4, :de_rand_1_bin_radiuslimited) < 100.0 | ||
@test fitness_for_opt(p, 10, 20, 5e4, :de_rand_1_bin_radiuslimited) < 100.0 | ||
@test fitness_for_opt(p, 30, 40, 2e5, :de_rand_1_bin_radiuslimited) < 100.0 | ||
|
||
@test fitness_for_opt(p, 30, 40, 2e5, :adaptive_de_rand_1_bin) < 100.0 | ||
@test fitness_for_opt(p, 30, 40, 2e5, :adaptive_de_rand_1_bin_radiuslimited) < 100.0 | ||
|
||
@test fitness_for_opt(p, 50, 40, 3e5, :adaptive_de_rand_1_bin_radiuslimited) < 100.0 | ||
end | ||
end | ||
|
||
context("Schwefel1.2") do | ||
problem = "Schwefel1.2" | ||
p = BlackBoxOptim.example_problems[problem] | ||
@fact fitness_for_opt(p, 5, 20, 5e3, :de_rand_1_bin_radiuslimited) < 0.01 --> true | ||
@fact fitness_for_opt(p, 10, 50, 5e4, :de_rand_1_bin_radiuslimited) < 0.01 --> true | ||
|
||
#DE/rand/1/bin seems to have troubles... | ||
@fact fitness_for_opt(p, 30, 50, 2e5, :de_rand_1_bin_radiuslimited) < 10.0 --> true | ||
@fact fitness_for_opt(p, 30, 50, 2e5, :adaptive_de_rand_1_bin) < 10.0 --> true | ||
@fact fitness_for_opt(p, 30, 50, 2e5, :adaptive_de_rand_1_bin_radiuslimited) < 10.0 --> true | ||
end | ||
|
||
context("Rosenbrock") do | ||
problem = "Rosenbrock" | ||
p = BlackBoxOptim.example_problems[problem] | ||
@fact fitness_for_opt(p, 5, 20, 1e4, :de_rand_1_bin_radiuslimited) < 100.0 --> true | ||
@fact fitness_for_opt(p, 10, 20, 5e4, :de_rand_1_bin_radiuslimited) < 100.0 --> true | ||
@fact fitness_for_opt(p, 30, 40, 2e5, :de_rand_1_bin_radiuslimited) < 100.0 --> true | ||
|
||
@fact fitness_for_opt(p, 30, 40, 2e5, :adaptive_de_rand_1_bin) < 100.0 --> true | ||
@fact fitness_for_opt(p, 30, 40, 2e5, :adaptive_de_rand_1_bin_radiuslimited) < 100.0 --> true | ||
|
||
@fact fitness_for_opt(p, 50, 40, 3e5, :adaptive_de_rand_1_bin_radiuslimited) < 100.0 --> true | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters