NCDEoptim {DEoptimR} | R Documentation |
Bound-Constrained and Nonlinear Constrained Multimodal Optimization via Differential Evolution
Description
A bespoke implementation of the ‘NCDE’ (neighborhood based crowding DE) algorithm by Qu et al. (2012) doi:10.1109/TEVC.2011.2161873, assisted with the dynamic archive mechanism of Epitropakis et al. (2013) doi:10.1109/CEC.2013.6557556.
Usage
NCDEoptim(lower, upper, fn,
constr = NULL, meq = 0, eps = 1e-5,
crit = 1e-5, niche_radius = NULL, archive_size = 100,
reinit_if_solu_in_arch = TRUE,
NP = 100, Fl = 0.1, Fu = 1, CRl = 0, CRu = 1.1,
nbngbrsl = NP/20, nbngbrsu = NP/5,
tau_F = 0.1, tau_CR = 0.1, tau_pF = 0.1,
tau_nbngbrs = 0.1,
jitter_factor = 0.001,
maxiter = 2000,
add_to_init_pop = NULL,
trace = FALSE, triter = 1,
...)
Arguments
lower , upper |
numeric vectors, the lower and upper bounds of the
search space (box constraints); must be finite
( |
fn |
a |
constr |
a vector |
meq |
an integer, the first |
eps |
the maximal admissible constraint violation for
equality constraints. A numeric vector of small positive tolerance values
with length |
crit |
a numeric, the acceptance threshold on the archive strategy. If
|
niche_radius |
a numeric, the absolute tolerance used to decide whether
the solution |
archive_size |
an integer, the maximum number of solutions that
can be kept in the archive; entries above this limit are discarded.
Default is |
reinit_if_solu_in_arch |
a logical, if |
NP |
an integer, the population size. Defaults to |
Fl |
a numeric, the minimum value that the
scaling factor |
Fu |
a numeric, the maximum value that the
scaling factor |
CRl |
a numeric, the minimum value to be used for the
crossover constant |
CRu |
a numeric, the maximum value to be used for the
crossover constant |
nbngbrsl |
an integer, the lower limit for the
neighborhood size |
nbngbrsu |
an integer, the upper limit for the
neighborhood size |
tau_F |
a numeric, the probability that the
scaling factor |
tau_CR |
a numeric, the probability that the
crossover constant |
tau_pF |
a numeric, the probability that the
mutation probability |
tau_nbngbrs |
a numeric, the probability that the
neighborhood size |
jitter_factor |
a numeric, the tuning constant for jitter.
If |
maxiter |
an integer, the maximum number of iterations allowed which is
the stopping condition. Default is |
add_to_init_pop |
numeric vector of length |
trace |
a logical, determines whether or not to monitor the
iteration process. Default is |
triter |
an integer, trace output is printed at every
|
... |
additional arguments passed to |
Details
This implementation differs mainly from the original ‘NCDE’ algorithm
of Qu et al. (2012) by employing the archiving procedure proposed
in Epitropakis et al. (2013) and the adaptive ‘jDE’ strategy
instead of canonical Diferential Evolution. The key reason for archiving
good solutions during the search process is to prevent them from being lost
during evolution. Constraints are tackled through the
\varepsilon
-constrained method as proposed
in Poole and Allen (2019). The ‘jDE’ and
\varepsilon
-constrained mechanisms are applied in the same way
as in JDEoptim
, but with synchronous mode of
population update. In contrast, the reinitialization in the current
population triggered by already found solutions is done asynchronously.
Each line of trace output follows the format of:
iteration : < value of niche radius > population>> ( value of best solution ) best solution { index of violated constraints } archive>> [ number of solutions found ] ( value of best solution ) best solution
Value
A list with the following components:
solution_arch |
a |
objective_arch |
the values of |
solution_pop |
a |
objective_pop |
the values of |
iter |
the number of iterations used. |
and if there are general constraints present:
constr_value_arch |
a |
constr_value_pop |
a |
Note
This function is in an experimental stage.
Author(s)
Eduardo L. T. Conceicao mail@eduardoconceicao.org
References
Epitropakis, M. G., Li, X. and Burke, E. K. (2013) A dynamic archive niching differential evolution algorithm for multimodal optimization; in 2013 IEEE Congress on Evolutionary Computation (CEC). IEEE, pp. 79–86. doi:10.1109/CEC.2013.6557556.
Poole, D. J. and Allen, C. B. (2019) Constrained niching using differential evolution. Swarm and Evolutionary Computation 44, 74–100. doi:10.1016/j.swevo.2018.11.004.
Qu, B. Y., Suganthan, P. N. and Liang, J. J. (2012) Differential evolution with neighborhood mutation for multimodal optimization. IEEE Transactions on Evolutionary Computation 16, 601–614. doi:10.1109/TEVC.2011.2161873.
Examples
# NOTE: Examples were excluded from testing
# to reduce package check time.
# Use a preset seed so test values are reproducible.
set.seed(1234)
# Warning: the examples are run using a very small number of
# iterations to decrease execution time.
# Bound-constrained optimization
# Vincent function
#
# f(x) = -mean(sin(10*log(x)))
#
# 0.25 <= xi <= 10, i = {1, 2, ..., n}
# The function has 6^n global minima without local minima.
NCDEoptim(c(0.25, 0.25), c(10, 10),
function(x) -mean(sin(10*log(x))),
niche_radius = 0.2,
maxiter = 200, trace = TRUE, triter = 20)
# Nonlinear constrained optimization
# Function F10 of Poole and Allen (2019)
#
# f(x) = -sin(5*pi*x)^6 + 1
# subject to:
# g(x) = -cos(10*pi*x) <= 0
#
# 0 <= x <= 1
# The 10 global optima are
# (x1*, ..., x10*; f*) = ((2*(1:10) - 1)/20; 0.875).
NCDEoptim(0, 1,
function(x) -sin(5*pi*x)^6 + 1,
function(x) -cos(10*pi*x),
niche_radius = 0.05,
maxiter = 200, trace = TRUE, triter = 20)