Skip to content

Commit b5fc928

Browse files
committed
use more methods
1 parent fa18162 commit b5fc928

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

examples/constrained_15points.jl

+12
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ result = bboptimize(penalized_points15; SearchRange = (0.0, 1.0), NumDimensions
4242
MaxTime = MaxMinutes * 60, Method = :dxnes)
4343
best_dxnes = best_candidate(result)
4444

45+
# Run the default (Adaptive DE) method for same amount of time on penalized function
46+
result = bboptimize(penalized_points15; SearchRange = (0.0, 1.0), NumDimensions = Dims,
47+
MaxTime = MaxMinutes * 60)
48+
best_de_pen = best_candidate(result)
49+
50+
# But DE need no penalization since it respects search range bounds:
51+
result = bboptimize(points15; SearchRange = (0.0, 1.0), NumDimensions = Dims,
52+
MaxTime = MaxMinutes * 60)
53+
best_de = best_candidate(result)
54+
4555
# Run several methods several times:
4656
BlackBoxOptim.repeated_bboptimize(2, prob, Dims, [
4757
:generating_set_search,
@@ -52,3 +62,5 @@ BlackBoxOptim.repeated_bboptimize(2, prob, Dims, [
5262

5363
println("xNES points15 fitness = ", points15(best_xnes))
5464
println("dxNES points15 fitness = ", points15(best_dxnes))
65+
println("Adaptive DE (default, penalized) points15 fitness = ", points15(best_de_pen))
66+
println("Adaptive DE (default) points15 fitness = ", points15(best_de))

0 commit comments

Comments
 (0)