@@ -9,7 +9,7 @@ fsum_abs_and_sq(x) = (sum(abs, x), sum(abs2, x))
9
9
@test fitness_scheme (p) == MinimizingFitnessScheme
10
10
@test numobjectives (p) == 1
11
11
@test numdims (p) == 1
12
- @test search_space (p) == symmetric_search_space (1 , (- 1.0 , 1.0 ))
12
+ @test search_space (p) == RectSearchSpace (1 , (- 1.0 , 1.0 ))
13
13
14
14
@test fitness ([0.0 ], p) == 0.0
15
15
@test fitness ([1.2 ], p) == 1.2
22
22
@test fitness_scheme (p) == MinimizingFitnessScheme
23
23
@test numobjectives (p) == 1
24
24
@test numdims (p) == 3
25
- @test search_space (p) == symmetric_search_space (3 , (- 1.0 , 1.0 ))
25
+ @test search_space (p) == RectSearchSpace (3 , (- 1.0 , 1.0 ))
26
26
27
27
@test fitness ([0.0 , 1.0 , 2.0 ], p) == 3.0
28
28
@test fitness ([- 1.0 , 1.0 , 2.0 ], p) == 4.0
29
29
end
30
30
31
31
@testset " 1-dimensional, multi-objective sumabs_sumsq" begin
32
- ss = symmetric_search_space (1 )
32
+ ss = RectSearchSpace (1 )
33
33
p = FunctionBasedProblem (fsum_abs_and_sq, " sumabs_sumsq" ,
34
34
ParetoFitnessScheme {2} (), ss, (0.0 , 0.0 ))
35
35
73
73
@test BlackBoxOptim. orig_problem (sp) === p
74
74
@test numobjectives (sp) == 1
75
75
@test numdims (sp) == 1
76
- @test search_space (sp) == symmetric_search_space (1 , (- 1.0 , 1.0 ))
76
+ @test search_space (sp) == RectSearchSpace (1 , (- 1.0 , 1.0 ))
77
77
xs = sp. xshift
78
78
@test xs == [0.5 ]
79
79
@test sp. fitshift == 0.0
84
84
end
85
85
86
86
@testset " Shifted and biased 2-dim" begin
87
- ss = symmetric_search_space (2 , (- 0.5 , 1.0 ))
87
+ ss = RectSearchSpace (2 , (- 0.5 , 1.0 ))
88
88
p = minimization_problem (fsabs, " sumabs" , (- 0.5 , 1.0 ), 2 , 0.0 )
89
89
sp = BlackBoxOptim. ShiftedAndBiasedProblem (p; fitshift = 1.3 )
90
90
93
93
@test numdims (sp) == 2
94
94
@test sp. xshift == [0.0 , 0.0 ]
95
95
@test sp. fitshift == 1.3
96
- @test search_space (sp) == symmetric_search_space (2 , (- 0.5 , 1.0 ))
96
+ @test search_space (sp) == RectSearchSpace (2 , (- 0.5 , 1.0 ))
97
97
98
98
xs = sp. xshift
99
99
@test fitness ([0.0 , 1.0 ], sp) == 1.0 + 1.3
0 commit comments