Skip to content

Commit f6a7301

Browse files
Merge pull request #888 from SciML/ChrisRackauckas-patch-1
Test if Metaheuristics tests simply need a higher iteration count for robustness
2 parents 46ac866 + f0940af commit f6a7301

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/OptimizationMetaheuristics/test/runtests.jl

+9-9
Original file line numberDiff line numberDiff line change
@@ -115,17 +115,17 @@ Random.seed!(42)
115115
"Metaheuristics.Algorithm{CCMO{NSGA2}} for sphere" => [
116116
1.6659983952552437, 4.731690734657798],
117117
"Metaheuristics.Algorithm{MOEAD_DE} for sphere" => [
118-
1.3118335977331483, 5.478715622895562],
118+
0.989671094714782, 6.418963025927054],
119119
"Metaheuristics.Algorithm{SMS_EMOA} for sphere" => [
120120
0.5003293369817386, 7.837151299208113],
121121
"Metaheuristics.Algorithm{NSGA2} for rastrigin" => [0.0, 12.0],
122122
"Metaheuristics.Algorithm{NSGA3} for rastrigin" => [
123-
9.754810555001253, 11.123569741993528],
123+
7.597191334401674, 8.53603819834027],
124124
"Metaheuristics.Algorithm{SPEA2} for rastrigin" => [0.0, 12.0],
125125
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rastrigin" => [
126126
2.600961284360525, 3.4282466721631755],
127127
"Metaheuristics.Algorithm{MOEAD_DE} for rastrigin" => [
128-
2.4963842982482607, 10.377445766099369],
128+
2.8812870528400936, 7.145617997943864],
129129
"Metaheuristics.Algorithm{SMS_EMOA} for rastrigin" => [0.0, 12.0],
130130
"Metaheuristics.Algorithm{NSGA2} for rosenbrock" => [
131131
17.500214034475118, 586.5039366722865],
@@ -136,19 +136,19 @@ Random.seed!(42)
136136
"Metaheuristics.Algorithm{CCMO{NSGA2}} for rosenbrock" => [
137137
2.600961284360525, 3.4282466721631755],
138138
"Metaheuristics.Algorithm{MOEAD_DE} for rosenbrock" => [
139-
12.969698120217537, 642.4135236259822],
139+
8.658481667869118, 644.4544222985385],
140140
"Metaheuristics.Algorithm{SMS_EMOA} for rosenbrock" => [
141141
61.6898556398449, 450.62433057243777],
142142
"Metaheuristics.Algorithm{NSGA2} for ackley" => [
143143
2.240787163704834, 5.990002878952371],
144144
"Metaheuristics.Algorithm{NSGA3} for ackley" => [
145-
3.408535107623966, 5.459538604033934],
145+
2.186720100012558, 6.125797156949968],
146146
"Metaheuristics.Algorithm{SPEA2} for ackley" => [
147147
4.440892098500626e-16, 6.593599079287213],
148148
"Metaheuristics.Algorithm{CCMO{NSGA2}} for ackley" => [
149149
2.600961284360525, 3.4282466721631755],
150150
"Metaheuristics.Algorithm{MOEAD_DE} for ackley" => [
151-
4.440892098500626e-16, 6.593599079287213],
151+
2.982885504039104, 5.052934325547806],
152152
"Metaheuristics.Algorithm{SMS_EMOA} for ackley" => [
153153
3.370770500897429, 5.510527199861947],
154154
"Metaheuristics.Algorithm{NSGA2} for dtlz2" => [
@@ -172,7 +172,7 @@ Random.seed!(42)
172172
"Metaheuristics.Algorithm{CCMO{NSGA2}} for schaffer_n2" => [
173173
3.632401400816196e-17, 4.9294679997494206e-17],
174174
"Metaheuristics.Algorithm{MOEAD_DE} for schaffer_n2" => [
175-
2.50317097527324, 0.17460592430221922],
175+
1.5886671796558842, 0.5469735282631156],
176176
"Metaheuristics.Algorithm{SMS_EMOA} for schaffer_n2" => [
177177
0.4978888767998813, 1.67543922644328]
178178
)
@@ -201,7 +201,7 @@ Random.seed!(42)
201201
options = Options(debug = false, iterations = 250)),
202202
SMS_EMOA()
203203
]
204-
204+
Random.seed!(42)
205205
# Run tests for each problem and algorithm
206206
for (prob_func, lb, ub) in problems
207207
prob_name = string(prob_func)
@@ -213,7 +213,7 @@ Random.seed!(42)
213213
if (alg_name == "Metaheuristics.Algorithm{CCMO{NSGA2}}")
214214
sol = solve(prob, alg)
215215
else
216-
sol = solve(prob, alg; maxiters = 100, use_initial = true)
216+
sol = solve(prob, alg; maxiters = 10000, use_initial = true)
217217
end
218218

219219
# Tests

0 commit comments

Comments
 (0)