MyNixOS website logo
Description

Evolutionary Minimizer for R.

A C++ implementation of the following evolutionary algorithms: Bat Algorithm (Yang, 2010 <doi:10.1007/978-3-642-12538-6_6>), Cuckoo Search (Yang, 2009 <doi:10.1109/nabic.2009.5393690>), Genetic Algorithms (Holland, 1992, ISBN:978-0262581110), Gravitational Search Algorithm (Rashedi et al., 2009 <doi:10.1016/j.ins.2009.03.004>), Grey Wolf Optimization (Mirjalili et al., 2014 <doi:10.1016/j.advengsoft.2013.12.007>), Harmony Search (Geem et al., 2001 <doi:10.1177/003754970107600201>), Improved Harmony Search (Mahdavi et al., 2007 <doi:10.1016/j.amc.2006.11.033>), Moth-flame Optimization (Mirjalili, 2015 <doi:10.1016/j.knosys.2015.07.006>), Particle Swarm Optimization (Kennedy et al., 2001 ISBN:1558605959), Simulated Annealing (Kirkpatrick et al., 1983 <doi:10.1126/science.220.4598.671>), Whale Optimization Algorithm (Mirjalili and Lewis, 2016 <doi:10.1016/j.advengsoft.2016.01.008>). 'EmiR' can be used not only for unconstrained optimization problems, but also in presence of inequality constrains, and variables restricted to be integers.

EmiR: Evolutionary minimizer for R

Classical minimization methods, like gradient descent or quasi-Newton techniques,have been proved to struggle in dealing with optimization problems with a high-dimensional search space or subject to complex nonlinear constraints. In last decade, the interest on metaheuristic nature inspired algorithms has been growing steadily, due to their flexibility and effectiveness. EmiR is a package for R which implements several methauristic algorithms for optimization problems:

  • Artificial Bee Colony Algorithm;
  • Bat Algorithm;
  • Cuckoo Search;
  • Genetic Algorithm;
  • Gravitationl Search Algorithm;
  • Grey Wolf Optimization;
  • Harmony Search;
  • Improved Harmony Search;
  • Moth-flame Optimization;
  • Particle Swarm Optimization;
  • Simulated Annealing;
  • Whale Optimization Algorithm.

Unlike other available tools, EmiR can be used not only for unconstrained problems, but also for problems subjected to inequality constraints and for integer or mixed-integer problems.

How to cite

If you use EmiR, please cite the following work:

Pagano, D. and Sostero, L., «EmiR: Evolutionary Minimization for R», SoftwareX 18, 101083 (2022), doi: 10.1016/j.softx.2022.101083.

Example of usage

miele_cantrell <- function(x) {
  x1 <- x[1]
  x2 <- x[2]
  x3 <- x[3]
  x4 <- x[4]
  value <- (exp(-x1) - x2)^4 + 100*(x2 - x3)^6 + (tan(x3 - x4))^4 + x1^8
  return(value)
}

p1 <- parameter("x1", -2, 2, FALSE)
p2 <- parameter("x2", -2, 2, FALSE)
p3 <- parameter("x3", -2, 2, FALSE)
p4 <- parameter("x4", -2, 2, FALSE)

conf_algo <- config_bat(iterations = 200, population_size = 100)
results <- minimize(algorithm_id = "BAT", 
                    obj_func = miele_cantrell, 
                    parameters = list(p1, p2, p3, p4),
                    config = conf_algo)
print(results)
Metadata

Version

1.0.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows