Metaheuristics.jl

High performance metaheuristics for optimization purely coded in Julia.
Author jmejia8
Popularity
11 Stars
Updated Last
1 Year Ago
Started In
October 2017

Metaheuristics

High performance metaheuristics for optimization purely coded in Julia.

Build Status Coverage Status Doc

Installation

Open the Julia (Julia 1.1 or Later) REPL and press ] to open the Pkg prompt. To add this package, use the add command:

pkg> add Metaheuristics

Or, equivalently, via the Pkg API:

julia> import Pkg; Pkg.add("Metaheuristics")

Algorithms

  • ECA: Evolutionary Centers Algorithm
  • DE: Differential Evolution
  • PSO: Particle Swarm Optimization
  • ABC: Artificial Bee Colony
  • MOEA/D-DE: Multi-objective Evolutionary Algorithm based on Decomposition
  • GSA: Gravitational Search Algorithm
  • SA: Simulated Annealing
  • WOA: Whale Optimization Algorithm
  • NSGA-II: A fast and elitist multi-objective genetic algorithm: NSGA-II
  • NSGA-III: Evolutionary Many-Objective Optimization Algorithm Using Reference-Point-Based Nondominated Sorting Approach

Quick Start

Assume you want to solve the following minimization problem.

Rastrigin Surface

Minimize:

Eq

where Eq, i.e., Eq for Eq. D is the dimension number, assume D=10.

Solution

Firstly, import the Metaheuristics package:

using Metaheuristics

Code the objective function:

f(x) = 10length(x) + sum( x.^2 - 10cos.(2π*x)  )

Instantiate the bounds, note that bounds should be a $2\times 10$ Matrix where the first row corresponds to the lower bounds whilst the second row corresponds to the upper bounds.

D = 10
bounds = [-5ones(D) 5ones(D)]'

Approximate the optimum using the function optimize.

result = optimize(f, bounds)

Optimize returns a State datatype which contains some information about the approximation. For instance, you may use mainly two functions to obtain such approximation.

@show minimum(result)
@show minimizer(result)

Contributing

Please, be free to send me your PR, issue or any comment about this package for Julia.

Used By Packages

No packages found.