Metaheuristics is the module binding that OptimizationMetaheuristics
exports: a list with the parts of Metaheuristics.jl used with its
algorithms, reached as Metaheuristics$Options(...). It contains
Details
the algorithms (also exported on their own, see metaheuristics_single, metaheuristics_multi and metaheuristics_combinatorial) and
NSGA2(N, eta_cr, p_cr, eta_m, p_m), the NSGA2 of Metaheuristics.jl;Options(x_tol, f_tol, g_tol, h_tol, f_tol_rel, f_tol_abs, f_calls_limit, iterations, time_limit, store_convergence, parallel_evaluation, seed, ...)andInformation(f_optimum, x_optimum);the termination criteria
CheckConvergence(),RobustConvergence(),AbsoluteFunctionConvergence(),RelativeFunctionConvergence(),SmallStandardDeviation(),RelativeParameterConvergence()andTermination(checkall, checkany);optimize(f, bounds, method), which minimizesf(x)in the boxbounds(a matrix with the rowslbandub) and returns the final state, andboxconstraints(lb, ub);the readers of a state (or of a solution of
solve())minimizer,minimum,positions,fvals,nfes,pareto_front,get_non_dominated_solutions,termination_status_message, andnon_dominated_sort(the ranks of a population),gen_ref_dirs(m, H)andgen_weights(m, H)(the points of the simplex);the operators of
GA():RandomInBounds,RandomPermutation,RandomBinary,TournamentSelection,RouletteWheelSelection,BiasedSelection,SBX,UniformCrossover,BinomialCrossover,OrderCrossover,PolynomialMutation,BitFlipMutation,SlightMutation,InsertRandomMutation,GenerationalReplacement,ElitistReplacementandRankAndCrowding;the parts of the local search methods:
BestImproveSearch,FirstImproveSearch,TwoOptNeighborhood(k),GreedyRandomizedConstructor(candidates, instance, alpha, compute_cost),SequentialChangeandCyclicChange.
Examples
set.seed(1)
res <- Metaheuristics$optimize(function(x) sum(x^2), rbind(c(-1, -1), c(1, 1)),
ECA(options = Metaheuristics$Options(iterations = 50)))
Metaheuristics$minimum(res) < 1e-3
#> [1] TRUE
Metaheuristics$gen_ref_dirs(2, 4)
#> [[1]]
#> [1] 0 1
#>
#> [[2]]
#> [1] 0.25 0.75
#>
#> [[3]]
#> [1] 0.5 0.5
#>
#> [[4]]
#> [1] 0.75 0.25
#>
#> [[5]]
#> [1] 1 0
#>