README.md

DEoptimPIC

DEoptimPIC provides some interesting tools and benchmark functions to test three different versions of the differential evolution algorithm. The Differential evolution algorithm is a nature inspired algorithm used for solving global optimization problems. Often it is also used for solving not complex constrained optimization problems. This package proposes the following DE versions:

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("FilippoPic/DEoptimPIC")

Example

This is a basic example which shows you how to solve a common problem:

library(DEoptimPIC)
l <- -500
u <- 500
n <- 10
NP <- 40
n_gen <- 400
f <- 0.9
CR <- 0.4
#to perform a standard DE run with strategy DE/rand/1
d <- DEbase(schwefel,l,u,n,NP,n_gen,f,CR,strategy = 1)

Now you can see the best value found by the algorithm:

d$f_best
#> [1] 0.003388758

Or see the convergence plot:

plot(d$f,type='l', col = 2)

plot(log(d$f),type='l',col=2)



FilippoPic/DEoptimPIC documentation built on Feb. 14, 2022, 5:12 a.m.