1
- @params struct HyperoptAlg <: AbstractOptimizer
2
- sub_alg:: AbstractOptimizer
1
+ struct HyperoptAlg{S <: AbstractOptimizer } <: AbstractOptimizer
2
+ sub_alg:: S
3
3
end
4
4
5
5
"""
15
15
- `ctol`: infeasibility tolerance for accepting a solution as feasible
16
16
- `keep_all`: if true, all the solutions of the sub-problems will be saved
17
17
"""
18
- @params struct HyperoptOptions
19
- sub_options:: Any
20
- lb:: Any
21
- ub:: Any
22
- searchspace_size:: Integer
23
- iters:: Integer
24
- sampler:: Hyperopt.Sampler
25
- ctol:: Any
18
+ struct HyperoptOptions{S1, L, U, S2 <: Hyperopt.Sampler , C}
19
+ sub_options:: S1
20
+ lb:: L
21
+ ub:: U
22
+ searchspace_size:: Int
23
+ iters:: Int
24
+ sampler:: S2
25
+ ctol:: C
26
26
keep_all:: Bool
27
27
end
28
28
function HyperoptOptions (;
@@ -47,10 +47,10 @@ function HyperoptOptions(;
47
47
)
48
48
end
49
49
50
- @params struct HyperoptWorkspace <: Workspace
51
- sub_workspace:: Workspace
52
- x0:: AbstractVector
53
- options:: HyperoptOptions
50
+ struct HyperoptWorkspace{S <: Workspace , X <: AbstractVector , O <: HyperoptOptions } <: Workspace
51
+ sub_workspace:: S
52
+ x0:: X
53
+ options:: O
54
54
end
55
55
56
56
function Workspace (
@@ -78,11 +78,11 @@ When using multiple x0 in [`optimize`](@ref), return this result, including foll
78
78
- `results`: all the search results.
79
79
- `optimal_ind`: the index of the optimal solution in `results`.
80
80
"""
81
- @params struct HyperoptResult <: AbstractResult
82
- minimum:: Any
83
- minimizer:: Any
84
- results:: Any
85
- optimal_ind:: Any
81
+ struct HyperoptResult{M1, M2, R, O} <: AbstractResult
82
+ minimum:: M1
83
+ minimizer:: M2
84
+ results:: R
85
+ optimal_ind:: O
86
86
end
87
87
88
88
function optimize! (workspace:: HyperoptWorkspace )
0 commit comments