-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
Description
Install the unstable version hosted in the develop branch.
pkg> add Metaheuristics#developOptimizers with default parameters
f, bounds, pareto_solutions = Metaheuristics.TestProblems.get_problem(:sphere);
optimize(f, bounds, ECA)Pass parameters and Options via as kargs...
optimize(f, bounds, ECA, N = 20, iterations = 10, seed = 1)is similar to
optimize(f, bounds, ECA(N = 20, options=Options(iterations = 10, seed = 1))Using the SearchSpaces module to define search spaces.
fn(x) = abs(sum(diff(x)))
space = boxconstraints(zeros(10), 100ones(10)) # float
optimize(fn, space, ECA)
# bounds
space = boxconstraints(zeros(10), 100ones(10), rigid = false) # float
optimize(fn, space, ECA)
space = boxconstraints(zeros(Int, 10), 100ones(Int, 10)) # integers
optimize(fn, space, ECA)
# discrete
space = BitArraySpace(10) # 10D array of booleans
optimize(fn, space, GA)
space = PermutationSpace(10) # 10-permutation
optimize(fn, space, GA)
Termination criteria based on convergence
Other performance improvements
Clear message errors (#65)
ff(x) = "abcd"
optimize(ff, [zeros(2) ones(2)] , ECA )output:
ERROR: Objective function should return either a numerical value or a Tuple depending on the problem.
Current output: abcd of type String
Examples at https://jmejia8.github.io/Metaheuristics.jl/stable/examples
Stacktrace:
[1] error(s::String)
Reactions are currently unavailable