Title: | Single and Multi-Objective Optimization Test Functions |
---|---|
Description: | Provides generators for a high number of both single- and multi- objective test functions which are frequently used for the benchmarking of (numerical) optimization algorithms. Moreover, it offers a set of convenient functions to generate, plot and work with objective functions. |
Authors: | Jakob Bossek [aut, cre] , Pascal Kerschke [ctb] , Lennart Schäpermeier [ctb] |
Maintainer: | Jakob Bossek <[email protected]> |
License: | BSD_2_clause + file LICENSE |
Version: | 1.7.0 |
Built: | 2024-11-10 04:00:02 UTC |
Source: | https://github.com/jakobbossek/smoof |
The smoof R package provides generators for huge set of single- and multi-objective test functions, which are frequently used in the literature to benchmark optimization algorithms. Moreover the package provides methods to create arbitrary objective functions in an object-orientated manner, extract their parameters sets and visualize them graphically.
Given a set of criteria with each
being an
objective-function, the goal in Global Optimization (GO) is to find the best
solution
. The set
is termed the set of
feasible solutions. In the case of only a single objective function
,
- which we want to restrict ourselves in this brief description - the goal is to
minimize the objective, i. e.,
Sometimes we may be interested in maximizing the objective function value, but
since , we do not have to tackle
this separately.
To compare the robustness of optimization algorithms and to investigate their behaviour
in different contexts, a common approach in the literature is to use artificial
benchmarking functions, which are mostly deterministic, easy to evaluate and given
by a closed mathematical formula.
A recent survey by Jamil and Yang lists 175 single-objective benchmarking functions
in total for global optimization [1]. The smoof package offers implementations
of a subset of these functions beside some other functions as well as
generators for large benchmarking sets like the noiseless BBOB2009 function set [2]
or functions based on the multiple peaks model 2 [3].
Almost all continuous smoof function check the input before evaluating the function
by default. It checks whether the numeric vector has the expected length, there
are no missing values and all values are finite. Not that currently box constraints
are not checked though. Evaluating a function millions of times can be slowed
down by these checks significantly. Set the option “smoof.check_input_before_evaluation”
to FALSE
to deactivate those checks.
[1] Momin Jamil and Xin-She Yang, A literature survey of benchmark functions for global optimization problems, Int. Journal of Mathematical Modelling and Numerical Optimisation, Vol. 4, No. 2, pp. 150-194 (2013). [2] Hansen, N., Finck, S., Ros, R. and Auger, A. Real-Parameter Black-Box Optimization Benchmarking 2009: Noiseless Functions Definitions. Technical report RR-6829. INRIA, 2009. [3] Simon Wessing, The Multiple Peaks Model 2, Algorithm Engineering Report TR15-2-001, TU Dortmund University, 2015.
This is a counting wrapper for a smoof_function
, i.e., the returned function
first checks whether the given argument is a vector or matrix, saves the
number of function evaluations of the wrapped function to compute the function
values and finally passes down the argument to the wrapped smoof_function
.
addCountingWrapper(fn)
addCountingWrapper(fn)
fn |
[ |
[smoof_counting_function
]
The function that includes the counting feature.
getNumberOfEvaluations
, resetEvaluationCounter
fn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L) fn = addCountingWrapper(fn) # We get a value of 0 since the function has not been called yet print(getNumberOfEvaluations(fn)) # Now call the function 10 times consecutively for (i in seq(10L)) { fn(runif(2)) } print(getNumberOfEvaluations(fn)) # Here we pass a (2x5) matrix to the function with each column representing # one input vector x = matrix(runif(10), ncol = 5L) fn(x) print(getNumberOfEvaluations(fn))
fn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L) fn = addCountingWrapper(fn) # We get a value of 0 since the function has not been called yet print(getNumberOfEvaluations(fn)) # Now call the function 10 times consecutively for (i in seq(10L)) { fn(runif(2)) } print(getNumberOfEvaluations(fn)) # Here we pass a (2x5) matrix to the function with each column representing # one input vector x = matrix(runif(10), ncol = 5L) fn(x) print(getNumberOfEvaluations(fn))
Often it is desired and useful to store the optimization path, i.e., the evaluated function values and/or the parameters. Not all optimization algorithms offer such a trace. This wrapper makes a smoof function handle x/y-values itself.
addLoggingWrapper(fn, logg.x = FALSE, logg.y = TRUE, size = 100L)
addLoggingWrapper(fn, logg.x = FALSE, logg.y = TRUE, size = 100L)
fn |
[ |
logg.x |
[ |
logg.y |
[ |
size |
[ |
[smoof_logging_function
]
The function with an added logging capability.
Logging values, in particular logging x-values, will substantially slow down the evaluation of the function.
# We first build the smoof function and apply the logging wrapper to it fn = makeSphereFunction(dimensions = 2L) fn = addLoggingWrapper(fn, logg.x = TRUE) # We now apply an optimization algorithm to it and the logging wrapper keeps # track of the evaluated points. res = optim(fn, par = c(1, 1), method = "Nelder-Mead") # Extract the logged values log.res = getLoggedValues(fn) print(log.res$pars) print(log.res$obj.vals) log.res = getLoggedValues(fn, compact = TRUE) print(log.res)
# We first build the smoof function and apply the logging wrapper to it fn = makeSphereFunction(dimensions = 2L) fn = addLoggingWrapper(fn, logg.x = TRUE) # We now apply an optimization algorithm to it and the logging wrapper keeps # track of the evaluated points. res = optim(fn, par = c(1, 1), method = "Nelder-Mead") # Extract the logged values log.res = getLoggedValues(fn) print(log.res$pars) print(log.res$obj.vals) log.res = getLoggedValues(fn, compact = TRUE) print(log.res)
This function expects a smoof function and returns a ggplot object depicting
the function landscape. The output depends highly on the decision space of the
smoof function or more technically on the ParamSet
of the function. The following distinctions regarding the parameter types are
made. In case of a single numeric parameter a simple line plot is drawn. For
two numeric parameters or a single numeric vector parameter of length 2 either a
contour plot or a heatmap (or a combination of both depending on the choice
of additional parameters) is depicted. If there are both up to two numeric
and at least one discrete vector parameter, ggplot faceting is used to
generate subplots of the above-mentioned types for all combinations of discrete
parameters.
## S3 method for class 'smoof_function' autoplot( object, ..., show.optimum = FALSE, main = getName(x), render.levels = FALSE, render.contours = TRUE, log.scale = FALSE, length.out = 50L )
## S3 method for class 'smoof_function' autoplot( object, ..., show.optimum = FALSE, main = getName(x), render.levels = FALSE, render.contours = TRUE, log.scale = FALSE, length.out = 50L )
object |
[ |
... |
[any] |
show.optimum |
[ |
main |
[ |
render.levels |
[ |
render.contours |
[ |
log.scale |
[ |
length.out |
[ |
[ggplot
]
Keep in mind, that the plots for mixed parameter spaces may be very large and computationally expensive if the number of possible discrete parameter values is large. I.e., if we have d discrete parameter with each n_1, n_2, ..., n_d possible values we end up with n_1 x n_2 x ... x n_d subplots.
library(ggplot2) # Simple 2D contour plot with activated heatmap for the Himmelblau function fn = makeHimmelblauFunction() print(autoplot(fn)) print(autoplot(fn, render.levels = TRUE, render.contours = FALSE)) print(autoplot(fn, show.optimum = TRUE)) # Now we create 4D function with a mixed decision space (two numeric, one discrete, # and one logical parameter) fn.mixed = makeSingleObjectiveFunction( name = "4d SOO function", fn = function(x) { if (x$disc1 == "a") { (x$x1^2 + x$x2^2) + 10 * as.numeric(x$logic) } else { x$x1 + x$x2 - 10 * as.numeric(x$logic) } }, has.simple.signature = FALSE, par.set = makeParamSet( makeNumericParam("x1", lower = -5, upper = 5), makeNumericParam("x2", lower = -3, upper = 3), makeDiscreteParam("disc1", values = c("a", "b")), makeLogicalParam("logic") ) ) pl = autoplot(fn.mixed) print(pl) # Since autoplot returns a ggplot object we can modify it, e.g., add a title # or hide the legend pl + ggtitle("My fancy function") + theme(legend.position = "none")
library(ggplot2) # Simple 2D contour plot with activated heatmap for the Himmelblau function fn = makeHimmelblauFunction() print(autoplot(fn)) print(autoplot(fn, render.levels = TRUE, render.contours = FALSE)) print(autoplot(fn, show.optimum = TRUE)) # Now we create 4D function with a mixed decision space (two numeric, one discrete, # and one logical parameter) fn.mixed = makeSingleObjectiveFunction( name = "4d SOO function", fn = function(x) { if (x$disc1 == "a") { (x$x1^2 + x$x2^2) + 10 * as.numeric(x$logic) } else { x$x1 + x$x2 - 10 * as.numeric(x$logic) } }, has.simple.signature = FALSE, par.set = makeParamSet( makeNumericParam("x1", lower = -5, upper = 5), makeNumericParam("x2", lower = -3, upper = 3), makeDiscreteParam("disc1", values = c("a", "b")), makeLogicalParam("logic") ) ) pl = autoplot(fn.mixed) print(pl) # Since autoplot returns a ggplot object we can modify it, e.g., add a title # or hide the legend pl + ggtitle("My fancy function") + theme(legend.position = "none")
The functions can be called in two different ways
1. Pass a vector of function evaluations and a logical vector which indicates which runs were successful (see details).
2. Pass a vector of function evaluation, a vector of reached target values and a single target value. In this case the logical vector of option 1. is computed internally.
computeExpectedRunningTime( fun.evals, fun.success.runs = NULL, fun.reached.target.values = NULL, fun.target.value = NULL, penalty.value = Inf )
computeExpectedRunningTime( fun.evals, fun.success.runs = NULL, fun.reached.target.values = NULL, fun.target.value = NULL, penalty.value = Inf )
fun.evals |
[ |
fun.success.runs |
[ |
fun.reached.target.values |
[ |
fun.target.value |
[ |
penalty.value |
[ |
The Expected Running Time (ERT) is one of the most popular performance measures in optimization. It is defined as the expected number of function evaluations needed to reach a given precision level, i.e., to reach a certain objective value for the first time.
[numeric(1)
]
Estimated Expected Running Time.
A. Auger and N. Hansen. Performance evaluation of an advanced local search evolutionary algorithm. In Proceedings of the IEEE Congress on Evolutionary Computation (CEC 2005), pages 1777-1784, 2005.
We can minimize f by maximizing -f. The majority of predefined objective functions
in smoof should be minimized by default. However, there are a handful of
functions, e.g., Keane or Alpine02, which shall be maximized by default.
For benchmarking studies it might be beneficial to inverse the direction.
The functions convertToMaximization
and convertToMinimization
do exactly that, keeping the attributes.
convertToMaximization(fn) convertToMinimization(fn)
convertToMaximization(fn) convertToMinimization(fn)
fn |
[ |
[smoof_function
]
Converted smoof function
Both functions will quit with an error if multi-objective functions are passed.
# create a function which should be minimized by default fn = makeSphereFunction(1L) print(shouldBeMinimized(fn)) # Now invert the objective direction ... fn2 = convertToMaximization(fn) # and invert it again fn3 = convertToMinimization(fn2) # Now to convince ourselves we render some plots opar = par(mfrow = c(1, 3)) plot(fn) plot(fn2) plot(fn3) par(opar)
# create a function which should be minimized by default fn = makeSphereFunction(1L) print(shouldBeMinimized(fn)) # Now invert the objective direction ... fn2 = convertToMaximization(fn) # and invert it again fn3 = convertToMinimization(fn2) # Now to convince ourselves we render some plots opar = par(mfrow = c(1, 3)) plot(fn) plot(fn2) plot(fn3) par(opar)
In this case, the function is of type smoof_counting_function
or it
is further wrapped by another wrapper. This function then checks recursively,
if there is a counting wrapper.
doesCountEvaluations(object)
doesCountEvaluations(object)
object |
[any] |
logical(1)
TRUE
if the function counts its evaluations, FALSE
otherwise.
NK-landscapes and rMNK-landscapes are randomly generated combinatorial structures. In contrast to continuous benchmark function it thus makes perfect sense to store the landscape definitions in a text-based format.
exportNKFunction(x, path) importNKFunction(path)
exportNKFunction(x, path) importNKFunction(path)
x |
[ |
path |
[ |
The format uses two comment lines with basic information like the package version,
the date of storage etc. The third line contains ,
and
separated by a single-whitespace. Following that follow epistatic links from
which the number of epistatic links can be attracted. There are
lines for a MNK-landscape with
objectives and input dimension
N
.
The first lines contain the links for the first objective an so on.
Following that the tabular values follow in the same manner. For every position
there is a line with
values.
Note: exportNKFunction
overwrites existing files without asking.
Silently returns TRUE
on success.
importNKFunction
Other nk_landscapes:
makeMNKFunction()
,
makeNKFunction()
Single objective functions can be tagged, e.g., as unimodal. Searching for all
functions with a specific tag by hand is tedious. The filterFunctionsByTags
function helps to filter all single objective smoof functions.
filterFunctionsByTags(tags, or = FALSE)
filterFunctionsByTags(tags, or = FALSE)
tags |
[ |
or |
[ |
[character
]
Named vector of function names with the given tags.
# list all functions which are unimodal filterFunctionsByTags("unimodal") # list all functions which are both unimodal and separable filterFunctionsByTags(c("unimodal", "separable")) # list all functions which are unimodal or separable filterFunctionsByTags(c("multimodal", "separable"), or = TRUE)
# list all functions which are unimodal filterFunctionsByTags("unimodal") # list all functions which are both unimodal and separable filterFunctionsByTags(c("unimodal", "separable")) # list all functions which are unimodal or separable filterFunctionsByTags(c("multimodal", "separable"), or = TRUE)
Test function are frequently distinguished by characteristic high-level properties,
e.g., uni-modal or multi-modal, continuous or discontinuous, separable or non-separable.
The smoof package offers the possibility to associate a set of properties,
termed “tags” to a smoof_function
. This helper function returns
a character vector of all possible tags.
getAvailableTags()
getAvailableTags()
[character
]
Character vector of all the possible tags
Returns the description of the function.
getDescription(fn)
getDescription(fn)
fn |
[ |
[character(1)
]
A character string representing the description of the function.
Returns the global optimum and its value.
getGlobalOptimum(fn)
getGlobalOptimum(fn)
fn |
[ |
[list
] List containing the following entries:
param [list
] Named list of parameter value(s).
value [numeric(1)
] Optimal value.
is.minimum [logical(1)
] Is the global optimum a minimum or maximum?
Keep in mind, that this method makes sense only for single-objective target function.
Returns the ID / short name of the function or NA
if no ID is set.
getID(fn)
getID(fn)
fn |
[ |
[character(1)
] ID / short name or NA
This function returns the parameters and objective values of all local optima (including the global one).
getLocalOptimum(fn)
getLocalOptimum(fn)
fn |
[ |
[list
] List containing the following entries:
param [list
]List of parameter values per local optima.
value [list
]List of objective values per local optima.
is.minimum [logical(1)
]Are the local optima minima or maxima?
Keep in mind, that this method makes sense only for single-objective target functions.
Extracts the logged values of a function wrapped by a logging wrapper.
getLoggedValues(fn, compact = FALSE)
getLoggedValues(fn, compact = FALSE)
fn |
[ |
compact |
[ |
[list
|| data.frame
]
If compact
is TRUE
, a single data frame. Otherwise the function
returns a list containing the following values:
Data frame of parameter values, i.e., x-values or the empty data frame if x-values were not logged.
Numeric vector of objective values in the single-objective case respectively a matrix of objective values for multi-objective functions.
Returns lower box constraints for a Smoof function.
getLowerBoxConstraints(fn)
getLowerBoxConstraints(fn)
fn |
[ |
[numeric
]
Numeric vector representing the lower box constraints
Returns the true mean function in the noisy case.
getMeanFunction(fn)
getMeanFunction(fn)
fn |
[ |
[function
]
True mean function in the noisy case.
Returns the name of the function.
getName(fn)
getName(fn)
fn |
[ |
[character(1)
]
The name of the function.
smoof_function
.Returns the number of function evaluations performed by the wrapped
smoof_function
.
getNumberOfEvaluations(fn)
getNumberOfEvaluations(fn)
fn |
[ |
[integer(1)
]
The number of function evaluations.
Determines the number of objectives.
getNumberOfObjectives(fn)
getNumberOfObjectives(fn)
fn |
[ |
[integer(1)
]
The number of objectives.
Determines the number of parameters.
getNumberOfParameters(fn)
getNumberOfParameters(fn)
fn |
[ |
[integer(1)
]
The number of parameters.
This function returns data frame of global / local optima for visualization using ggplot.
getOptimaDf(fn)
getOptimaDf(fn)
fn |
[ |
[data.frame
]
A data frame containing information about the optima.
Each smoof function contains a parameter set of type ParamSet
assigned to it, which describes types and bounds of the function parameters.
This function returns the parameter set.
fn |
[ |
[ParamSet
]
fn = makeSphereFunction(3L) ps = getParamSet(fn) print(ps)
fn = makeSphereFunction(3L) ps = getParamSet(fn) print(ps)
Returns the reference point of a multi-objective function.
getRefPoint(fn)
getRefPoint(fn)
fn |
[ |
[numeric
]
The reference point.
Keep in mind, that this method makes sense only for multi-objective target functions.
Returns the vector of associated tags.
getTags(fn)
getTags(fn)
fn |
[ |
[character
]
Vector of associated tags.
Return upper box constaints.
getUpperBoxConstraints(fn)
getUpperBoxConstraints(fn)
fn |
[ |
[numeric
]
The smoof package offers means to let a function log its evaluations or even store to points and function values it has been evaluated on. This is done by wrapping the function with other functions. This helper function extract the wrapped function.
getWrappedFunction(fn, deepest = FALSE)
getWrappedFunction(fn, deepest = FALSE)
fn |
[ |
deepest |
[ |
[function
]
The extracted wrapped function.
If this function is applied to a simple smoof_function
, the
smoof_function
itself is returned.
addCountingWrapper
, addLoggingWrapper
Checks whether the objective function has box constraints.
hasBoxConstraints(fn)
hasBoxConstraints(fn)
fn |
[ |
[logical(1)
]
Checks whether the objective function has constraints.
hasConstraints(fn)
hasConstraints(fn)
fn |
[ |
[logical(1)
]
TRUE
if the function has constraints, FALSE
otherwise.
Checks whether the global optimum is known.
hasGlobalOptimum(fn)
hasGlobalOptimum(fn)
fn |
[ |
[logical(1)
]
TRUE
if the global optimum is known, FALSE
otherwise.
Checks whether local optima are known.
hasLocalOptimum(fn)
hasLocalOptimum(fn)
fn |
[ |
[logical(1)
]
Checks whether the objective function has other constraints.
hasOtherConstraints(fn)
hasOtherConstraints(fn)
fn |
[ |
[logical(1)
]
Each single-objective smoof function has tags assigned to it (see
getAvailableTags
). This little helper returns a vector of
assigned tags from a smoof function.
hasTags(fn, tags)
hasTags(fn, tags)
fn |
[ |
tags |
[ |
[logical(1)
]
Logical vector indicating the presence of specified tags.
Checks whether the given function is multi-objective.
isMultiobjective(fn)
isMultiobjective(fn)
fn |
[ |
[logical(1)
] TRUE
if function is multi-objective, FALSE
otherwise.
Checks whether the given function is noisy.
isNoisy(fn)
isNoisy(fn)
fn |
[ |
[logical(1)
]
TRUE
if the function is noisy, FALSE
otherwise.
Checks whether the given function is single-objective.
isSingleobjective(fn)
isSingleobjective(fn)
fn |
[ |
[logical(1)
] TRUE
if function is single-objective, FALSE
otherwise.
smoof_function
or a
smoof_wrapped_function
.Checks whether the given object is a smoof_function
or a
smoof_wrapped_function
.
isSmoofFunction(object)
isSmoofFunction(object)
object |
[any] |
[logical(1)
]
TRUE
if the object is a SMOOF function or wrapped function, FALSE
otherwise.
addCountingWrapper
, addLoggingWrapper
Checks whether the given function accepts “vectorized” input.
isVectorized(fn)
isVectorized(fn)
fn |
[ |
[logical(1)
]
TRUE
if the function accepts vectorized input, FALSE
otherwise.
smoof_wrapped_function
.Checks whether the function is of type smoof_wrapped_function
.
isWrappedSmoofFunction(object)
isWrappedSmoofFunction(object)
object |
[any] |
[logical(1)
]
TRUE
if the object is a SMOOF wrapped function, FALSE
otherwise.
Also known as “Ackley's Path Function”. Multi-modal test function with its global optimum in the center of the definition space. The implementation is based on the formula
with ,
and
. The feasible region is
given by the box constraints
.
makeAckleyFunction(dimensions)
makeAckleyFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Ackley Function.
[smoof_single_objective_function
]
Ackley, D. H.: A connectionist machine for genetic hillclimbing. Boston: Kluwer Academic Publishers, 1987.
This two-dimensional multi-modal test function follows the formula
with .
makeAdjimanFunction()
makeAdjimanFunction()
An object of class SingleObjectiveFunction
, representing the Adjiman Function.
[smoof_single_objective_function
]
C. S. Adjiman, S. Sallwig, C. A. Flouda, A. Neumaier, A Global Optimization Method, aBB for General Twice-Differentiable NLPs-1, Theoretical Advances, Computers Chemical Engineering, vol. 22, no. 9, pp. 1137-1158, 1998.
Highly multi-modal single-objective optimization test function. It is defined as
with box constraints for
.
makeAlpine01Function(dimensions)
makeAlpine01Function(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Alpine01 Function.
[smoof_single_objective_function
]
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, A Novel Population Initialization Method for Accelerating Evolutionary Algorithms, Computers and Mathematics with Applications, vol. 53, no. 10, pp. 1605-1614, 2007.
Another multi-modal optimization test function. The implementation is based on the formula
with for
.
makeAlpine02Function(dimensions)
makeAlpine02Function(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Alpine02 Function.
[smoof_single_objective_function
]
M. Clerc, The Swarm and the Queen, Towards a Deterministic and Adaptive Particle Swarm Optimization, IEEE Congress on Evolutionary Computation, Washington DC, USA, pp. 1951-1957, 1999.
Two-dimensional test function based on the formula
with .
makeAluffiPentiniFunction()
makeAluffiPentiniFunction()
[smoof_single_objective_function
]
This functions is also know as the Zirilli function.
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/26-aluffi-pentini-s-or-zirilli-s-function.
The Bartels Conn Function is defined as
subject to for
.
makeBartelsConnFunction()
makeBartelsConnFunction()
An object of class SingleObjectiveFunction
, representing the Bartels Conn Function.
[smoof_single_objective_function
]
Generator for the noiseless function set of the real-parameter Black-Box Optimization Benchmarking (BBOB).
makeBBOBFunction(dimensions, fid, iid)
makeBBOBFunction(dimensions, fid, iid)
dimensions |
[ |
fid |
[ |
iid |
[ |
[smoof_single_objective_function
]
Noiseless function from the BBOB benchmark.
It is possible to pass a matrix of parameters to the functions, where each column consists of one parameter setting.
See the BBOB website for a detailed description of the BBOB functions.
# get the first instance of the 2D Sphere function fn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L) if (require(plot3D)) { plot3D(fn, contour = TRUE) }
# get the first instance of the 2D Sphere function fn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L) if (require(plot3D)) { plot3D(fn, contour = TRUE) }
Multi-modal single-objective test function for optimization. It is based on the mathematic formula
usually evaluated within the bounds .
The function has a flat but multi-modal region around the single global optimum
and large peaks in the edges of its definition space.
makeBealeFunction()
makeBealeFunction()
An object of class SingleObjectiveFunction
, representing the Beale Function.
[smoof_single_objective_function
]
Scalable test function with
subject to for
.
makeBentCigarFunction(dimensions)
makeBentCigarFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Bent-Cigar Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/n-dimensions/164-bent-cigar-function.
Generator for the function set of the real-parameter Bi-Objective Black-Box Optimization Benchmarking (BBOB) with Function IDs 1-55, as well as its extended version (bbob-biobj-ext) with Function IDs 1-92.
makeBiObjBBOBFunction(dimensions, fid, iid)
makeBiObjBBOBFunction(dimensions, fid, iid)
dimensions |
[ |
fid |
[ |
iid |
[ |
[smoof_multi_objective_function
]
Bi-objective function from the BBOB benchmark.
Concatenation of single-objective BBOB functions into a bi-objective problem.
See the COCO website for a detailed description of the bi-objective BBOB functions. An overview of which pair of single-objective BBOB functions creates which of the 55 bi-objective BBOB functions can be found in the official documentation of the bi-objective BBOB test suite. And a full description of the extended suite with 92 functions can be found in the official documentation of the extended bi-objective BBOB test suite.
# get the fifth instance of the concatenation of the # 3D versions of sphere and Rosenbrock fn = makeBiObjBBOBFunction(dimensions = 3L, fid = 4L, iid = 5L) fn(c(3, -1, 0)) # compare to the output of its single-objective pendants f1 = makeBBOBFunction(dimensions = 3L, fid = 1L, iid = 2L * 5L + 1L) f2 = makeBBOBFunction(dimensions = 3L, fid = 8L, iid = 2L * 5L + 2L) identical(fn(c(3, -1, 0)), c(f1(c(3, -1, 0)), f2(c(3, -1, 0))))
# get the fifth instance of the concatenation of the # 3D versions of sphere and Rosenbrock fn = makeBiObjBBOBFunction(dimensions = 3L, fid = 4L, iid = 5L) fn(c(3, -1, 0)) # compare to the output of its single-objective pendants f1 = makeBBOBFunction(dimensions = 3L, fid = 1L, iid = 2L * 5L + 1L) f2 = makeBBOBFunction(dimensions = 3L, fid = 8L, iid = 2L * 5L + 2L) identical(fn(c(3, -1, 0)), c(f1(c(3, -1, 0)), f2(c(3, -1, 0))))
Multi-modal single-objective test function. The implementation is based on the mathematical formulation
The function is restricted to two dimensions with
makeBirdFunction()
makeBirdFunction()
An object of class SingleObjectiveFunction
, representing the Bird Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
Builds and returns the bi-objective Sphere test problem:
where
.
makeBiSphereFunction(dimensions, a = rep(0, dimensions))
makeBiSphereFunction(dimensions, a = rep(0, dimensions))
dimensions |
[ |
a |
[ |
[smoof_multi_objective_function
]
Returns an instance of the sphere function as a smoof_multi_objective_function
object.
Generates the BK1 function, a multi-objective optimization test function. The BK1 function is commonly used in benchmarking studies for evaluating the performance of optimization algorithms.
makeBK1Function()
makeBK1Function()
[smoof_multi_objective_function
]
Returns an instance of the BK1 function as a smoof_multi_objective_function
object.
...
Highly multi-modal single-objective test function. The mathematical formula is given by
with box-constraints for
.
The multi-modality will be visible by “zooming in” in the plot.
makeBohachevskyN1Function(dimensions)
makeBohachevskyN1Function(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Bohachevsky Function.
[smoof_single_objective_function
]
I. O. Bohachevsky, M. E. Johnson, M. L. Stein, General Simulated Annealing for Function Optimization, Technometrics, vol. 28, no. 3, pp. 209-217, 1986.
This function is based on the formula
subject to .
makeBoothFunction()
makeBoothFunction()
An object of class SingleObjectiveFunction
, representing the Booth Function.
[smoof_single_objective_function
]
Popular 2-dimensional single-objective test function based on the formula:
where and
. The box constraints are given by
and
. The function has three global minima.
makeBraninFunction()
makeBraninFunction()
An object of class SingleObjectiveFunction
, representing the Brainin RCOS Function.
[smoof_single_objective_function
]
F. H. Branin. Widely convergent method for finding multiple solutions of simultaneous nonlinear equations. IBM J. Res. Dev. 16, 504-522, 1972.
library(ggplot2) fn = makeBraninFunction() print(fn) print(autoplot(fn, show.optimum = TRUE))
library(ggplot2) fn = makeBraninFunction() print(fn) print(autoplot(fn, show.optimum = TRUE))
Single-objective two-dimensional test function. The formula is given as
subject to the constraints
makeBrentFunction()
makeBrentFunction()
An object of class SingleObjectiveFunction
, representing the Brent Function.
[smoof_single_objective_function
]
F. H. Branin Jr., Widely Convergent Method of Finding Multiple Solutions of Simul- taneous Nonlinear Equations, IBM Journal of Research and Development, vol. 16, no. 5, pp. 504-522, 1972.
This function belongs the the uni-modal single-objective test functions. The function is forumlated as
subject to for
.
makeBrownFunction(dimensions)
makeBrownFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Brown Function.
[smoof_single_objective_function
]
O. Begambre, J. E. Laier, A hybrid Particle Swarm Optimization - Simplex Algorithm (PSOS) for Structural Damage Identification, Journal of Advances in Engineering Software, vol. 40, no. 9, pp. 883-891, 2009.
Multi-modal, non-scalable, continuous optimization test function given by:
subject to and
.
makeBukinN2Function()
makeBukinN2Function()
An object of class SingleObjectiveFunction
, representing the Bukin N.2 Function.
[smoof_single_objective_function
]
Z. K. Silagadze, Finding Two-Dimensional Peaks, Physics of Particles and Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
makeBukinN4Function
, makeBukinN6Function
Second continuous Bukin function test function. The formula is given by
and the box constraints .
makeBukinN4Function()
makeBukinN4Function()
An object of class SingleObjectiveFunction
, representing the Bukin N.4 Function.
[smoof_single_objective_function
]
Z. K. Silagadze, Finding Two-Dimesnional Peaks, Physics of Particles and Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
makeBukinN2Function
, makeBukinN6Function
Beside Bukin N. 2 and N. 4 this is the last “Bukin family” function. It is given by the formula
and the box constraints .
makeBukinN6Function()
makeBukinN6Function()
An object of class SingleObjectiveFunction
, representing the Bukin N.6 Function.
[smoof_single_objective_function
]
Z. K. Silagadze, Finding Two-Dimensional Peaks, Physics of Particles and Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
makeBukinN2Function
, makeBukinN4Function
This function is defined as follows:
The box-constraints are given by .
makeCarromTableFunction()
makeCarromTableFunction()
An object of class SingleObjectiveFunction
, representing the Carrom Table Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
Continuous single-objective test function with
with .
makeChichinadzeFunction()
makeChichinadzeFunction()
An object of class SingleObjectiveFunction
, representing the Chichinadze Function.
[smoof_single_objective_function
]
The definition is given by
with box-constraings .
makeChungReynoldsFunction(dimensions)
makeChungReynoldsFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Chung Reynolds Function.
[smoof_single_objective_function
]
C. J. Chung, R. G. Reynolds, CAEP: An Evolution-Based Tool for Real-Valued Function Optimization Using Cultural Algorithms, International Journal on Artificial Intelligence Tool, vol. 7, no. 3, pp. 239-291, 1998.
Two-dimensional test function based on the formula
with .
makeComplexFunction()
makeComplexFunction()
An object of class SingleObjectiveFunction
, representing the Complex Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/43-complex-function.
Single-objective test function based on the formula
subject to for
.
makeCosineMixtureFunction(dimensions)
makeCosineMixtureFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Cosine Mixture Function.
[smoof_single_objective_function
]
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A Numerical Evaluation of Several Stochastic Algorithms on Selected Continuous Global Optimization Test Problems, Journal of Global Optimization, vol. 31, pp. 635-672, 2005.
Non-scalable, two-dimensional test function for numerical optimization with
subject to for
.
makeCrossInTrayFunction()
makeCrossInTrayFunction()
An object of class SingleObjectiveFunction
, representing the Cross-In-Tray Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
The Cube Function is defined as follows:
The box-constraints are given by
makeCubeFunction()
makeCubeFunction()
An object of class SingleObjectiveFunction
, representing the Cube Function.
[smoof_single_objective_function
]
A. Lavi, T. P. Vogel (eds), Recent Advances in Optimization Techniques, John Wliley & Sons, 1966.
This continuous single-objective test function is defined by the formula
with the bounding box for
.
makeDeckkersAartsFunction()
makeDeckkersAartsFunction()
An object of class SingleObjectiveFunction
, representing the Deckkers-Aarts Function.
[smoof_single_objective_function
]
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A Numerical Evaluation of Several Stochastic Algorithms on Selected Continuous Global Optimization Test Problems, Journal of Global Optimization, vol. 31, pp. 635-672, 2005.
Scalable single-objective test function based on the formula
with and
by default.
makeDeflectedCorrugatedSpringFunction(dimensions, K = 5, alpha = 5)
makeDeflectedCorrugatedSpringFunction(dimensions, K = 5, alpha = 5)
dimensions |
[ |
K |
[ |
alpha |
[ |
An object of class SingleObjectiveFunction
, representing the Deflected Corrugated Spring Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/n-dimensions/238-deflected-corrugated-spring-function.
Builds and returns the bi-objective Dent test problem, which is defined as follows:
with
and
where and
.
makeDentFunction()
makeDentFunction()
[smoof_multi_objective_function
]
Returns an instance of the Dent function as a smoof_multi_objective_function
object.
Dixon and Price defined the function
subject to for
.
makeDixonPriceFunction(dimensions)
makeDixonPriceFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Dixon-Price Function.
[smoof_single_objective_function
]
L. C. W. Dixon, R. C. Price, The Truncated Newton Method for Sparse Unconstrained Optimisation Using Automatic Differentiation, Journal of Optimization Theory and Applications, vol. 60, no. 2, pp. 261-275, 1989.
Also known as the rotated hyper-ellipsoid function. The formula is given by
with .
makeDoubleSumFunction(dimensions)
makeDoubleSumFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Double-Sum Function.
[smoof_single_objective_function
]
H.-P. Schwefel. Evolution and Optimum Seeking. John Wiley & Sons, New York, 1995.
Builds and returns the multi-objective DTLZ1 test problem.
The DTLZ1 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
with , for
where
makeDTLZ1Function(dimensions, n.objectives)
makeDTLZ1Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ1 family as a smoof_multi_objective_function
object.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ2 test problem.
The DTLZ2 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
Minimize
with , for
where
makeDTLZ2Function(dimensions, n.objectives)
makeDTLZ2Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ2 family as a smoof_multi_objective_function
object.
Note that in case of a bi-objective scenario (n.objectives = 2L
) DTLZ2 and DTLZ5 are identical.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ3 test problem. The formula
is very similar to the formula of DTLZ2, but it uses the function
of DTLZ1, which introduces a lot of local Pareto-optimal fronts. Thus, this
problems is well suited to check the ability of an optimizer to converge
to the global Pareto-optimal front.
The DTLZ3 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
Minimize
with , for
where
makeDTLZ3Function(dimensions, n.objectives)
makeDTLZ3Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ3 family as a smoof_multi_objective_function
object.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ4 test problem. It is a slight
modification of the DTLZ2 problems by introducing the parameter .
The parameter is used to map
.
The DTLZ4 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
Minimize
with , for
where
makeDTLZ4Function(dimensions, n.objectives, alpha = 100)
makeDTLZ4Function(dimensions, n.objectives, alpha = 100)
dimensions |
[ |
n.objectives |
[ |
alpha |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ4 family as a smoof_multi_objective_function
object.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ5 test problem. This problem can be characterized by a disconnected Pareto-optimal front in the search space. This introduces a new challenge to evolutionary multi-objective optimizers, i.e., to maintain different sub-populations within the search space to cover the entire Pareto-optimal front.
The DTLZ5 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
Minimize
with , for
where
for
and
makeDTLZ5Function(dimensions, n.objectives)
makeDTLZ5Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ5 family as a smoof_multi_objective_function
object.
This problem definition does not exist in the succeeding work of Deb et al. (K. Deb
and L. Thiele and M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization
test problems, Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830).
Also, note that in case of a bi-objective scenario (n.objectives = 2L
) DTLZ2 and DTLZ5 are identical.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ6 test problem. This problem can be characterized by a disconnected Pareto-optimal front in the search space. This introduces a new challenge to evolutionary multi-objective optimizers, i.e., to maintain different subpopulations within the search space to cover the entire Pareto-optimal front.
The DTLZ6 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
Minimize
with , for
where
for
and
makeDTLZ6Function(dimensions, n.objectives)
makeDTLZ6Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ6 family as a smoof_multi_objective_function
object.
Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele and M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization test problems, Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830) this problem was called DTLZ5.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Builds and returns the multi-objective DTLZ7 test problem. This problem can be characterized by a disconnected Pareto-optimal front in the search space. This introduces a new challenge to evolutionary multi-objective optimizers, i.e., to maintain different sub-populations within the search space to cover the entire Pareto-optimal front.
The DTLZ7 test problem is defined as follows:
Minimize
Minimize
Minimize
Minimize
with , for
where
and
makeDTLZ7Function(dimensions, n.objectives)
makeDTLZ7Function(dimensions, n.objectives)
dimensions |
[ |
n.objectives |
[ |
[smoof_multi_objective_function
]
Returns an instance of the DTLZ7 family as a smoof_multi_objective_function
object.
Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele and M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization test problems, Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830) this problem was called DTLZ6.
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable Multi-Objective Optimization Test Problems. Computer Engineering and Networks Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Uni-modal function with its global optimum in the center of the search space. The attraction area of the global optimum is very small in relation to the search space:
with
makeEasomFunction()
makeEasomFunction()
An object of class SingleObjectiveFunction
, representing the Easom Function.
[smoof_single_objective_function
]
Easom, E. E.: A survey of global optimization techniques. M. Eng. thesis, University of Louisville, Louisville, KY, 1990.
Builds and returns the multi-objective ED1 test problem.
The ED1 test problem is defined as follows:
Minimize , for
,
with , where
,
and
,
where
, for
and
.
Moreover ,
,
,
for
,
and .
makeED1Function(dimensions, n.objectives, gamma = 2, theta)
makeED1Function(dimensions, n.objectives, gamma = 2, theta)
dimensions |
[ |
n.objectives |
[ |
gamma |
[ |
theta |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ED1 function as a smoof_multi_objective_function
object.
M. T. M. Emmerich and A. H. Deutz. Test Problems based on Lame Superspheres. Proceedings of the International Conference on Evolutionary Multi-Criterion Optimization (EMO 2007), pp. 922-936, Springer, 2007.
Builds and returns the multi-objective ED2 test problem.
The ED2 test problem is defined as follows:
Minimize , for
,
with , where
,
and
,
where
, for
and
.
Moreover
with ,
, and
, as well as
,
,
for
,
and .
makeED2Function(dimensions, n.objectives, gamma = 2, theta)
makeED2Function(dimensions, n.objectives, gamma = 2, theta)
dimensions |
[ |
n.objectives |
[ |
gamma |
[ |
theta |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ED2 function as a smoof_multi_objective_function
object.
M. T. M. Emmerich and A. H. Deutz. Test Problems based on Lame Superspheres. Proceedings of the International Conference on Evolutionary Multi-Criterion Optimization (EMO 2007), pp. 922-936, Springer, 2007.
This single-objective function follows the definition
with for
.
makeEggCrateFunction()
makeEggCrateFunction()
An object of class SingleObjectiveFunction
, representing the Egg Crate Function.
[smoof_single_objective_function
]
The Egg Holder function is a difficult to optimize function based on the definition
subject to for
.
makeEggholderFunction()
makeEggholderFunction()
An object of class SingleObjectiveFunction
, representing the Egg Holder Function.
[smoof_single_objective_function
]
This function is based on the formula
subject to .
makeElAttarVidyasagarDuttaFunction()
makeElAttarVidyasagarDuttaFunction()
An object of class SingleObjectiveFunction
, representing the El-Attar-Vidyasagar-Dutta Function.
[smoof_single_objective_function
]
R. A. El-Attar, M. Vidyasagar, S. R. K. Dutta, An Algorithm for II-norm Minimization With Application to Nonlinear II-approximation, SIAM Journal on Numerical Analysis, vol. 16, no. 1, pp. 70-86, 1979.
Two-dimensional test function based on the formula
with .
makeEngvallFunction()
makeEngvallFunction()
An object of class SingleObjectiveFunction
, representing the Complex Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/116-engvall-s-function.
This scalable test function is based on the definition
with the box-constraints .
makeExponentialFunction(dimensions)
makeExponentialFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Exponential Function.
[smoof_single_objective_function
]
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, Opposition-Based Differential Evolution (ODE) with Variable Jumping Rate, IEEE Sympousim Foundations Com- putation Intelligence, Honolulu, HI, pp. 81-88, 2007.
This test function is based on the formula
subject to .
makeFreudensteinRothFunction()
makeFreudensteinRothFunction()
An object of class SingleObjectiveFunction
, representing the Freundstein-Roth Function.
[smoof_single_objective_function
]
S. S. Rao, Engineering Optimization: Theory and Practice, John Wiley & Sons, 2009.
This function is especially useful in combination with
filterFunctionsByTags
to generate a test set of functions
with certain properties, e.~g., multimodality.
makeFunctionsByName(fun.names, ...)
makeFunctionsByName(fun.names, ...)
fun.names |
[ |
... |
[any] |
[smoof_function
]
Smoof function generated based on the specified names and arguments.
# generate a testset of multimodal 2D functions ## Not run: test.set = makeFunctionsByName(filterFunctionsByTags("multimodal"), dimensions = 2L, m = 5L) ## End(Not run)
# generate a testset of multimodal 2D functions ## Not run: test.set = makeFunctionsByName(filterFunctionsByTags("multimodal"), dimensions = 2L, m = 5L) ## End(Not run)
Multi-modal single-objective function following the formula:
with .
makeGeneralizedDropWaveFunction(dimensions = 2L)
makeGeneralizedDropWaveFunction(dimensions = 2L)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Generalized Drop-Wave Function.
[smoof_single_objective_function
]
Multi-modal test function based on the definition
with box-constraints for
.
makeGiuntaFunction()
makeGiuntaFunction()
An object of class SingleObjectiveFunction
, representing the Giunta Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
Two-dimensional test function for global optimization. The implementation follows the formula:
with .
makeGoldsteinPriceFunction()
makeGoldsteinPriceFunction()
An object of class SingleObjectiveFunction
, representing the Goldstein-Price Function.
[smoof_single_objective_function
]
Goldstein, A. A. and Price, I. F.: On descent from local minima. Math. Comput., Vol. 25, No. 115, 1971.
Construct a multi-objective function by putting together multiple single-objective smoof functions.
makeGOMOPFunction(dimensions = 2L, funs = list())
makeGOMOPFunction(dimensions = 2L, funs = list())
dimensions |
[ |
funs |
[ |
The decision space of the resulting function is restricted
to . Each parameter
is stretched for each objective function.
I.e., if
are the single objective smoof functions with
box constraints
, then
for where the additions and multiplication are performed
component-wise.
[smoof_multi_objective_function
]
Returns an instance of the GOMOP function as a smoof_multi_objective_function
object.
Highly multi-modal function with a lot of regularly distributed local minima. The corresponding formula is:
subject to .
makeGriewankFunction(dimensions)
makeGriewankFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Griewank Function.
[smoof_single_objective_function
]
A. O. Griewank, Generalized Descent for Global Optimization, Journal of Optimization Theory and Applications, vol. 34, no. 1, pp. 11-39, 1981.
Test function with multiple global optima based on the definition
subject to .
makeHansenFunction()
makeHansenFunction()
An object of class SingleObjectiveFunction
, representing the Hansen Function.
[smoof_single_objective_function
]
C. Fraley, Software Performances on Nonlinear lems, Technical Report no. STAN-CS-89-1244, Computer Science, Stanford University, 1989.
Uni-modal single-objective test function with six local minima. The implementation is based on the mathematical formulation
, where
The function is restricted to six dimensions with
The function is not normalized in contrast to some benchmark applications in the literature.
makeHartmannFunction(dimensions)
makeHartmannFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Hartmann Function.
[smoof_single_objective_function
]
Picheny, V., Wagner, T., & Ginsbourger, D. (2012). A benchmark of kriging-based infill criteria for noisy optimization.
Two-dimensional test function based on the function definition
with box-constraints .
makeHimmelblauFunction()
makeHimmelblauFunction()
An object of class SingleObjectiveFunction
, representing the Himmelblau Function.
[smoof_single_objective_function
]
D. M. Himmelblau, Applied Nonlinear Programming, McGraw-Hill, 1972.
This multi-modal function is defined as
with box-constraints .
makeHolderTableN1Function()
makeHolderTableN1Function()
An object of class SingleObjectiveFunction
, representing the Holder Table function N. 1 Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
This multi-modal function is defined as
with box-constraints .
makeHolderTableN2Function()
makeHolderTableN2Function()
An object of class SingleObjectiveFunction
, representing the Holder Table function N. 2 Function.
[smoof_single_objective_function
]
S. K. Mishra, Global Optimization By Differential Evolution and Particle Swarm Methods: Evaluation On Some Benchmark Functions, Munich Research Papers in Economics.
Two-dimensional test function with
subject to and
.
makeHosakiFunction()
makeHosakiFunction()
An object of class SingleObjectiveFunction
, representing the Hosaki Function.
[smoof_single_objective_function
]
G. A. Bekey, M. T. Ung, A Comparative Evaluation of Two Global Search Algorithms, IEEE Transaction on Systems, Man and Cybernetics, vol. 4, no. 1, pp. 112- 116, 1974.
Uni-modal, convex test function similar to the Sphere function (see makeSphereFunction
).
Calculated via the formula:
makeHyperEllipsoidFunction(dimensions)
makeHyperEllipsoidFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Hyper-Ellipsoid Function.
[smoof_single_objective_function
]
Single-objective test function based on the formula
subject to for
.
makeInvertedVincentFunction(dimensions)
makeInvertedVincentFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Inverted Vincent Function.
[smoof_single_objective_function
]
Xiadong Li, Andries Engelbrecht, and Michael G. Epitropakis. Benchmark functions for CEC2013 special session and competition on niching methods for multi-modal function optimization. Technical report, RMIT University, Evolutionary Computation and Machine Learning Group, Australia, 2013.
Two-dimensional test function based on the formula
with .
makeJennrichSampsonFunction()
makeJennrichSampsonFunction()
An object of class SingleObjectiveFunction
, representing the Jennrich-Sampson Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/134-jennrich-sampson-s-function.
Two-dimensional test function based on the formula
with . For details on
see the referenced website.
makeJudgeFunction()
makeJudgeFunction()
An object of class SingleObjectiveFunction
, representing the Judge Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/133-judge-s-function.
Two-dimensional test function based on the definition
The domain of definition is bounded by the box constraints
.
makeKeaneFunction()
makeKeaneFunction()
An object of class SingleObjectiveFunction
, representing the Keane Function.
[smoof_single_objective_function
]
Two-dimensional test function based on the formula
with .
makeKearfottFunction()
makeKearfottFunction()
An object of class SingleObjectiveFunction
, representing the Kearfott Function.
[smoof_single_objective_function
]
See https://al-roomi.org/benchmarks/unconstrained/2-dimensions/59-kearfott-s-function.
Builds and returns the bi-objective Kursawe test problem.
The Kursawe test problem is defined as follows:
Minimize
Minimize
with , for
.
makeKursaweFunction(dimensions)
makeKursaweFunction(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the Kursawe function as a smoof_multi_objective_function
object.
F. Kursawe. A Variant of Evolution Strategies for Vector Optimization. Proceedings of the International Conference on Parallel Problem Solving from Nature, pp. 193-197, Springer, 1990.
The function is based on the definition
.
Box-constraints: for
.
makeLeonFunction()
makeLeonFunction()
An object of class SingleObjectiveFunction
, representing the Leon Function.
[smoof_single_objective_function
]
A. Lavi, T. P. Vogel (eds), Recent Advances in Optimization Techniques, John Wliley & Sons, 1966.
Two-dimensional, uni-modal test function
subject to .
makeMatyasFunction()
makeMatyasFunction()
An object of class SingleObjectiveFunction
, representing the Matyas Function.
[smoof_single_objective_function
]
A.-R. Hedar, Global Optimization Test Problems.
Two-dimensional, multi-modal test function. The definition is given by
subject to .
makeMcCormickFunction()
makeMcCormickFunction()
An object of class SingleObjectiveFunction
, representing the McCormick Function.
[smoof_single_objective_function
]
F. A. Lootsma (ed.), Numerical Methods for Non-Linear Optimization, Academic Press, 1972.
Highly multi-modal single-objective test function with local minima
with the formula:
The recommended value , which is used as a default in the
implementation.
makeMichalewiczFunction(dimensions, m = 10)
makeMichalewiczFunction(dimensions, m = 10)
dimensions |
[ |
m |
[ |
An object of class SingleObjectiveFunction
, representing the Michalewicz Function.
[smoof_single_objective_function
]
The location of the global optimum s varying based on both
the dimension and parameter and is thus not provided in the
implementation.
Michalewicz, Z.: Genetic Algorithms + Data Structures = Evolution Programs. Berlin, Heidelberg, New York: Springer-Verlag, 1992.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF10Function()
makeMMF10Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF10 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF11Function(np = 2L)
makeMMF11Function(np = 2L)
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF11 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF12Function(np = 2L, q = 4L)
makeMMF12Function(np = 2L, q = 4L)
np |
[ |
q |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF12 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF13Function(np = 2L)
makeMMF13Function(np = 2L)
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF13 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF14aFunction(dimensions, n.objectives, np = 2L)
makeMMF14aFunction(dimensions, n.objectives, np = 2L)
dimensions |
[ |
n.objectives |
[ |
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF14a function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF14Function(dimensions, n.objectives, np = 2L)
makeMMF14Function(dimensions, n.objectives, np = 2L)
dimensions |
[ |
n.objectives |
[ |
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF14 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF15aFunction(dimensions, n.objectives, np = 2L)
makeMMF15aFunction(dimensions, n.objectives, np = 2L)
dimensions |
[ |
n.objectives |
[ |
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF15a function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF15Function(dimensions, n.objectives, np = 2L)
makeMMF15Function(dimensions, n.objectives, np = 2L)
dimensions |
[ |
n.objectives |
[ |
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF15 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF1eFunction(a = exp(1L))
makeMMF1eFunction(a = exp(1L))
a |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF1e function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multimodal multiobjective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF1Function()
makeMMF1Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF1 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multimodal multiobjective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF1zFunction(k = 3)
makeMMF1zFunction(k = 3)
k |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF1z function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF2Function()
makeMMF2Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF2 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF3Function()
makeMMF3Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF3 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF4Function()
makeMMF4Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF4 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF5Function()
makeMMF5Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF5 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF6Function()
makeMMF6Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF6 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF7Function()
makeMMF7Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF7 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF8Function()
makeMMF8Function()
[smoof_multi_objective_function
]
Returns an instance of the MMF8 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeMMF9Function(np = 2L)
makeMMF9Function(np = 2L)
np |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MMF9 function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Generators for multi-objective NK-landscapes, i.e., with at least two objectives.
Function makeMNKLandscape(M, N, K)
create NK-landscapes with M
() objectives, input dimension
N
, and epistatic links specified
via parameter K
. K
can be a single integer value, a vector of
M
integers or a list of length-N
integer vectors (see parameter
description for details) which allow for maximum flexibility. It is also
possible to compose a MNK-landscape by passing a list of single-objective
NK-landscapes via argument funs
.
makeMNKFunction(M, N, K, funs = NULL) makeRMNKFunction(M, N, K, rho = 0)
makeMNKFunction(M, N, K, funs = NULL) makeRMNKFunction(M, N, K, rho = 0)
M |
[ |
N |
[ |
K |
[ |
funs |
[ |
rho |
[ |
Function makeRMNKLandscape(M, N, K, rho)
generates a MNK-landscape
with correlated objective function values. The correlation can be adjusted
by setting the rho
parameter to a value between minus one and one.
[smoof_multi_objective_function
]
H. E. Aguirre and K. Tanaka, Insights on properties of multiobjective MNK-landscapes, Proceedings of the 2004 Congress on Evolutionary Computation, Portland, OR, USA, 2004, pp. 196-203 Vol.1, doi: 10.1109/CEC.2004.1330857.
Other nk_landscapes:
exportNKFunction()
,
makeNKFunction()
# generate homogeneous uncorrelated bi-objective MNK-landscape with each # three epistatic links M = 2L N = 20L K = 3L fn = makeMNKFunction(M, N, K) # generate MNK-landscape where the first function has 3 epistatic links # per bit while the second function has 2 fn = makeMNKFunction(M, N, K = c(3L, 2L)) # sample the number of epistatic links individually from {1, ..., 5} for # every bit position and every objective K = lapply(seq_len(M), function(m) sample(1:(N-1), size = N, replace = TRUE)) fn = makeMNKFunction(M, N, K = K) #' # generate strongly positively correlated objectives fn = makeRMNKFunction(M, N, K, rho = 0.9) # alternative constructor: generate two single-objective NK-landscapes # and combine into bi-objective problem soofn1 = makeNKFunction(N, K = 2L) # homegeneous in K K = sample(2:3, size = N, replace = TRUE) soofn2 = makeNKFunction(N, K = K) # heterogeneous in K moofn = makeMNKFunction(funs = list(soofn1, soofn2)) getNumberOfObjectives(moofn)
# generate homogeneous uncorrelated bi-objective MNK-landscape with each # three epistatic links M = 2L N = 20L K = 3L fn = makeMNKFunction(M, N, K) # generate MNK-landscape where the first function has 3 epistatic links # per bit while the second function has 2 fn = makeMNKFunction(M, N, K = c(3L, 2L)) # sample the number of epistatic links individually from {1, ..., 5} for # every bit position and every objective K = lapply(seq_len(M), function(m) sample(1:(N-1), size = N, replace = TRUE)) fn = makeMNKFunction(M, N, K = K) #' # generate strongly positively correlated objectives fn = makeRMNKFunction(M, N, K, rho = 0.9) # alternative constructor: generate two single-objective NK-landscapes # and combine into bi-objective problem soofn1 = makeNKFunction(N, K = 2L) # homegeneous in K K = sample(2:3, size = N, replace = TRUE) soofn2 = makeNKFunction(N, K = K) # heterogeneous in K moofn = makeMNKFunction(funs = list(soofn1, soofn2)) getNumberOfObjectives(moofn)
A modified version of the Rastrigin function following the formula:
The box-constraints are given by for
and
is a numerical vector. Deb et al. (see references)
use, e.g.,
for
. See the reference for details.
makeModifiedRastriginFunction(dimensions, k = rep(1, dimensions))
makeModifiedRastriginFunction(dimensions, k = rep(1, dimensions))
dimensions |
[ |
k |
[numeric] |
An object of class SingleObjectiveFunction
, representing the Rastrigin Function.
[smoof_single_objective_function
]
Kalyanmoy Deb and Amit Saha. Multi-modal optimization using a bi- objective evolutionary algorithm. Evolutionary Computation, 20(1):27-62, 2012.
MOP1 function from Van Valedhuizen's test suite.
makeMOP1Function()
makeMOP1Function()
[smoof_multi_objective_function
]
Returns an instance of the MOP1 function as a smoof_multi_objective_function
object.
J. D. Schaffer, "Multiple objective optimization with vector evaluated genetic algorithms," in Proc. 1st Int. Conf. Genetic Algorithms and Their Applications, J. J. Grenfenstett, Ed., 1985, pp. 93-100.
MOP2 function from Van Valedhuizen's test suite due to Fonseca and Fleming.
makeMOP2Function(dimensions = 2L)
makeMOP2Function(dimensions = 2L)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MOP2 function as a smoof_multi_objective_function
object.
C. M. Fonseca and P. J. Fleming, "Multi-objective genetic algorithms made easy: Selection, sharing and mating restriction," Genetic Algorithms in Engineering Systems: Innovations and Applications, pp. 45-52, Sep. 1995. IEE.
MOP3 function from Van Valedhuizen's test suite.
makeMOP3Function(dimensions = 2L)
makeMOP3Function(dimensions = 2L)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the MOP3 function as a smoof_multi_objective_function
object.
C. Poloni, G. Mosetti, and S. Contessi, "Multi-objective optimization by GAs: Application to system and component design," in Proc. Comput. Methods in Applied Sciences'96: Invited Lectures and Special Technological Sessions of the 3rd ECCOMAS Comput. Fluid Dynamics Conf. and the 2nd ECCOMAS Conf. Numerical Methods in Engineering, Sep. 1996, pp. 258-264
MOP4 function from Van Valedhuizen's test suite based on Kursawe.
makeMOP4Function()
makeMOP4Function()
[smoof_multi_objective_function
]
Returns an instance of the MOP4 function as a smoof_multi_objective_function
object.
F. Kursawe, "A variant of evolution strategies for vector optimization," in Lecture Notes in Computer Science, H.-P. Schwefel and R. Maenner, Eds. Berlin, Germany: Springer-Verlag, 1991, vol. 496, Proc. Parallel Problem Solving From Nature. 1st Workshop, PPSN I, pp. 193-197.
MOP5 function from Van Valedhuizen's test suite.
makeMOP5Function()
makeMOP5Function()
[smoof_multi_objective_function
]
Returns an instance of the MOP5 function as a smoof_multi_objective_function
object.
Original box constraints where .
R. Viennet, C. Fonteix, and I. Marc, "Multi criteria optimization using a genetic algorithm for determining a Pareto set," Int. J. Syst. Sci., vol. 27, no. 2, pp. 255-260, 1996
MOP6 function from Van Valedhuizen's test suite.
makeMOP6Function()
makeMOP6Function()
[smoof_multi_objective_function
]
Returns an instance of the MOP6 function as a smoof_multi_objective_function
object.
MOP7 function from Van Valedhuizen's test suite.
makeMOP7Function()
makeMOP7Function()
[smoof_multi_objective_function
]
Returns an instance of the MOP7 function as a smoof_multi_objective_function
object.
R. Viennet, C. Fonteix, and I. Marc, "Multi-criteria optimization using a genetic algorithm for determining a Pareto set," Int. J. Syst. Sci., vol. 27, no. 2, pp. 255-260, 1996
Generator for function with multiple peaks following the multiple peaks model 2.
makeMPM2Function( n.peaks, dimensions, topology, seed, rotated = TRUE, peak.shape = "ellipse", evaluation.env = "R" )
makeMPM2Function( n.peaks, dimensions, topology, seed, rotated = TRUE, peak.shape = "ellipse", evaluation.env = "R" )
n.peaks |
[ |
dimensions |
[ |
topology |
[ |
seed |
[ |
rotated |
[ |
peak.shape |
[ |
evaluation.env |
[ |
[smoof_single_objective_function
]
An object of class SingleObjectiveFunction
, representing the Multiple peaks model 2 Function.
R interface by Jakob Bossek. Original python code provided by the Simon Wessing.
See the technical report of multiple peaks model 2 for an in-depth description of the underlying algorithm.
## Not run: fn = makeMPM2Function(n.peaks = 10L, dimensions = 2L, topology = "funnel", seed = 123, rotated = TRUE, peak.shape = "ellipse") if (require(plot3D)) { plot3D(fn) } ## End(Not run) ## Not run: fn = makeMPM2Function(n.peaks = 5L, dimensions = 2L, topology = "random", seed = 134, rotated = FALSE) plot(fn, render.levels = TRUE) ## End(Not run)
## Not run: fn = makeMPM2Function(n.peaks = 10L, dimensions = 2L, topology = "funnel", seed = 123, rotated = TRUE, peak.shape = "ellipse") if (require(plot3D)) { plot3D(fn) } ## End(Not run) ## Not run: fn = makeMPM2Function(n.peaks = 5L, dimensions = 2L, topology = "random", seed = 134, rotated = FALSE) plot(fn, render.levels = TRUE) ## End(Not run)
Generator for multi-objective target functions.
makeMultiObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, par.set, n.objectives = NULL, noisy = FALSE, fn.mean = NULL, minimize = NULL, vectorized = FALSE, constraint.fn = NULL, ref.point = NULL )
makeMultiObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, par.set, n.objectives = NULL, noisy = FALSE, fn.mean = NULL, minimize = NULL, vectorized = FALSE, constraint.fn = NULL, ref.point = NULL )
name |
[ |
id |
[ |
description |
[ |
fn |
[ |
has.simple.signature |
[ |
par.set |
[ |
n.objectives |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
vectorized |
[ |
constraint.fn |
[ |
ref.point |
[ |
[function
] Target function with additional stuff attached as attributes.
fn = makeMultiObjectiveFunction( name = "My test function", fn = function(x) c(sum(x^2), exp(x)), n.objectives = 2L, par.set = makeNumericParamSet("x", len = 1L, lower = -5L, upper = 5L) ) print(fn)
fn = makeMultiObjectiveFunction( name = "My test function", fn = function(x) c(sum(x^2), exp(x)), n.objectives = 2L, par.set = makeNumericParamSet("x", len = 1L, lower = -5L, upper = 5L) ) print(fn)
Generate a single-objective NK-landscape. NK-landscapes are combinatorial
problems with input space (in their basic definition). The
value of each bit position
depends on
other bits, the so-called (epistatic) links / interactions.
makeNKFunction(N, K)
makeNKFunction(N, K)
N |
[ |
K |
[ |
[smoof_single_objective_function
]
NK-landscape function.
Kauffman SA, Weinberger ED. The NK model of rugged fitness landscapes and its application to maturation of the immune response. Journal of Theoretical Biology 1989 Nov 21;141(2):211-45. doi: 10.1016/s0022-5193(89)80019-0.
Other nk_landscapes:
exportNKFunction()
,
makeMNKFunction()
# generate homogeneous NK-landscape with each K=3 epistatic links N = 20 fn = makeNKFunction(N, 3) # evaluate function on some random bitstrings bitstrings = matrix(sample(c(0, 1), size = 10 * N, replace = TRUE), ncol = N) apply(bitstrings, 1, fn) # generate heterogeneous NK-landscape where K is sampled from {2,3,4} # uniformly at random fn = makeNKFunction(N, K = sample(2:4, size = N, replace = TRUE))
# generate homogeneous NK-landscape with each K=3 epistatic links N = 20 fn = makeNKFunction(N, 3) # evaluate function on some random bitstrings bitstrings = matrix(sample(c(0, 1), size = 10 * N, replace = TRUE), ncol = N) apply(bitstrings, 1, fn) # generate heterogeneous NK-landscape where K is sampled from {2,3,4} # uniformly at random fn = makeNKFunction(N, K = sample(2:4, size = N, replace = TRUE))
Internal generator for function of smoof type.
makeObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, par.set, n.objectives = NULL, noisy = FALSE, fn.mean = NULL, minimize = NULL, vectorized = FALSE, constraint.fn = NULL )
makeObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, par.set, n.objectives = NULL, noisy = FALSE, fn.mean = NULL, minimize = NULL, vectorized = FALSE, constraint.fn = NULL )
name |
[ |
id |
[ |
description |
[ |
fn |
[ |
has.simple.signature |
[ |
par.set |
[ |
n.objectives |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
vectorized |
[ |
constraint.fn |
[ |
[function
] Target function with additional stuff attached as attributes.
Test problem from the set of "multimodal multiobjective functions" as for instance used in the CEC2019 competition.
makeOmniTestFunction()
makeOmniTestFunction()
[smoof_multi_objective_function
]
Returns an instance of the Omni function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multimodal multiobjective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Single-objective two-dimensional test function. The formula is given as
subject to the constraints
makePeriodicFunction()
makePeriodicFunction()
An object of class SingleObjectiveFunction
, representing the Periodic Function.
[smoof_single_objective_function
]
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A Numerical Evaluation of Several Stochastic Algorithms on Selected Continuous Global Optimization Test Problems, Journal of Global Optimization, vol. 31, pp. 635-672, 2005.
The formula that underlies the implementation is given by
with .
makePowellSumFunction(dimensions)
makePowellSumFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Powell-Sum Function.
[smoof_single_objective_function
]
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, A Novel Population Initialization Method for Accelerating Evolutionary Algorithms, Computers and Mathematics with Applications, vol. 53, no. 10, pp. 1605-1614, 2007.
Second function by Price. The implementation is based on the definition
subject to .
makePriceN1Function()
makePriceN1Function()
An object of class SingleObjectiveFunction
, representing the Price N. 1 Function.
[smoof_single_objective_function
]
W. L. Price, A Controlled Random Search Procedure for Global Optimization, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
makePriceN2Function
, makePriceN4Function
Second function by Price. The implementation is based on the defintion
subject to .
makePriceN2Function()
makePriceN2Function()
An object of class SingleObjectiveFunction
, representing the Price N. 2 Function.
[smoof_single_objective_function
]
W. L. Price, A Controlled Random Search Procedure for Global Optimisation, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
makePriceN1Function
, makePriceN4Function
Fourth function by Price. The implementation is based on the definition
subject to .
makePriceN4Function()
makePriceN4Function()
An object of class SingleObjectiveFunction
, representing the Price N. 4 Function.
[smoof_single_objective_function
]
W. L. Price, A Controlled Random Search Procedure for Global Optimisation, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
makePriceN1Function
, makePriceN2Function
One of the most popular single-objective test functions consists of many local optima and is thus highly multi-modal with a global structure. The implementation follows the formula
The box-constraints are given by for
.
makeRastriginFunction(dimensions)
makeRastriginFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Rastrigin Function.
[smoof_single_objective_function
]
L. A. Rastrigin. Extremal control systems. Theoretical Foundations of Engineering Cybernetics Series. Nauka, Moscow, 1974.
Also known as the “De Jong's function 2” or the “(Rosenbrock) banana/valley function” due to its shape. The global optimum is located within a large flat valley and thus it is hard for optimization algorithms to find it. The following formula underlies the implementation:
The domain is given by the constraints .
makeRosenbrockFunction(dimensions)
makeRosenbrockFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Rosenbrock Function.
[smoof_single_objective_function
]
H. H. Rosenbrock, An Automatic Method for Finding the Greatest or least Value of a Function, Computer Journal, vol. 3, no. 3, pp. 175-184, 1960.
Second function by Schaffer. The definition is given by the formula
subject to .
makeSchafferN2Function()
makeSchafferN2Function()
An object of class SingleObjectiveFunction
, representing the Modified Schaffer N. 2 Function.
[smoof_single_objective_function
]
S. K. Mishra, Some New Test Functions For Global Optimization And Performance of Repulsive Particle Swarm Method.
Second function by Schaffer. The definition is given by the formula
subject to .
makeSchafferN4Function()
makeSchafferN4Function()
An object of class SingleObjectiveFunction
, representing the Schaffer N. 4 Function.
[smoof_single_objective_function
]
S. K. Mishra, Some New Test Functions For Global Optimization And Performance of Repulsive Particle Swarm Method.
Highly multi-modal test function. The crucial thing about this function is, that the global optimum is far away from the next best local optimum. The function is computed via:
with
makeSchwefelFunction(dimensions)
makeSchwefelFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Schwefel Function.
[smoof_single_objective_function
]
Schwefel, H.-P.: Numerical optimization of computer models. Chichester: Wiley & Sons, 1981.
Single-objective test function based on the formula
.
Here, defines the number of local optima,
is a
matrix
and
is a vector. See https://www.sfu.ca/~ssurjano/shekel.html
for a definition of
.
makeShekelFunction(m)
makeShekelFunction(m)
m |
[ |
An object of class SingleObjectiveFunction
, representing the Shekel Functions.
[smoof_single_objective_function
]
The definition of this two-dimensional function is given by
subject to .
makeShubertFunction()
makeShubertFunction()
An object of class SingleObjectiveFunction
, representing the Shubert Function.
[smoof_single_objective_function
]
J. P. Hennart (ed.), Numerical Analysis, Proc. 3rd AS Workshop, Lecture Notes in Mathematics, vol. 90, Springer, 1982.
Generator for single-objective target functions.
makeSingleObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, vectorized = FALSE, par.set, noisy = FALSE, fn.mean = NULL, minimize = TRUE, constraint.fn = NULL, tags = character(0), global.opt.params = NULL, global.opt.value = NULL, local.opt.params = NULL, local.opt.values = NULL )
makeSingleObjectiveFunction( name = NULL, id = NULL, description = NULL, fn, has.simple.signature = TRUE, vectorized = FALSE, par.set, noisy = FALSE, fn.mean = NULL, minimize = TRUE, constraint.fn = NULL, tags = character(0), global.opt.params = NULL, global.opt.value = NULL, local.opt.params = NULL, local.opt.values = NULL )
name |
[ |
id |
[ |
description |
[ |
fn |
[ |
has.simple.signature |
[ |
vectorized |
[ |
par.set |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
constraint.fn |
[ |
tags |
[ |
global.opt.params |
[ |
global.opt.value |
[ |
local.opt.params |
[ |
local.opt.values |
[ |
[function
] Objective function with additional stuff attached as attributes.
library(ggplot2) fn = makeSingleObjectiveFunction( name = "Sphere Function", fn = function(x) sum(x^2), par.set = makeNumericParamSet("x", len = 1L, lower = -5L, upper = 5L), global.opt.params = list(x = 0) ) print(fn) print(autoplot(fn)) fn.num2 = makeSingleObjectiveFunction( name = "Numeric 2D", fn = function(x) sum(x^2), par.set = makeParamSet( makeNumericParam("x1", lower = -5, upper = 5), makeNumericParam("x2", lower = -10, upper = 20) ) ) print(fn.num2) print(autoplot(fn.num2)) fn.mixed = makeSingleObjectiveFunction( name = "Mixed 2D", fn = function(x) x$num1^2 + as.integer(as.character(x$disc1) == "a"), has.simple.signature = FALSE, par.set = makeParamSet( makeNumericParam("num1", lower = -5, upper = 5), makeDiscreteParam("disc1", values = c("a", "b")) ), global.opt.params = list(num1 = 0, disc1 = "b") ) print(fn.mixed) print(autoplot(fn.mixed))
library(ggplot2) fn = makeSingleObjectiveFunction( name = "Sphere Function", fn = function(x) sum(x^2), par.set = makeNumericParamSet("x", len = 1L, lower = -5L, upper = 5L), global.opt.params = list(x = 0) ) print(fn) print(autoplot(fn)) fn.num2 = makeSingleObjectiveFunction( name = "Numeric 2D", fn = function(x) sum(x^2), par.set = makeParamSet( makeNumericParam("x1", lower = -5, upper = 5), makeNumericParam("x2", lower = -10, upper = 20) ) ) print(fn.num2) print(autoplot(fn.num2)) fn.mixed = makeSingleObjectiveFunction( name = "Mixed 2D", fn = function(x) x$num1^2 + as.integer(as.character(x$disc1) == "a"), has.simple.signature = FALSE, par.set = makeParamSet( makeNumericParam("num1", lower = -5, upper = 5), makeDiscreteParam("disc1", values = c("a", "b")) ), global.opt.params = list(num1 = 0, disc1 = "b") ) print(fn.mixed) print(autoplot(fn.mixed))
Two dimensional single-objective test function with six local minima oh which two are global. The surface is similar to the back of a camel. That is why it is called Camel function. The implementation is based on the formula:
with box constraints and
.
makeSixHumpCamelFunction()
makeSixHumpCamelFunction()
An object of class SingleObjectiveFunction
, representing the Three-Hump Camel Function.
[smoof_single_objective_function
]
Dixon, L. C. W. and Szego, G. P.: The optimization problem: An introduction. In: Towards Global Optimization II, New York: North Holland, 1978.
Also known as the the “De Jong function 1”. Convex, continous function calculated via the formula
with box-constraints .
makeSphereFunction(dimensions)
makeSphereFunction(dimensions)
dimensions |
[ |
An object of class SingleObjectiveFunction
, representing the Sphere Function.
[smoof_single_objective_function
]
M. A. Schumer, K. Steiglitz, Adaptive Step Size Random Search, IEEE Transactions on Automatic Control. vol. 13, no. 3, pp. 270-276, 1968.
This function is based on the definition
with box-constraints given by .
makeStyblinkskiTangFunction()
makeStyblinkskiTangFunction()
An object of class SingleObjectiveFunction
, representing the Styblinkski-Tang Function.
[smoof_single_objective_function
]
Z. K. Silagadze, Finding Two-Dimesnional Peaks, Physics of Particles and Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
Simple uni-modal test function similar to the Sphere and Hyper-Ellipsoidal functions. Formula:
makeSumOfDifferentSquaresFunction(dimensions)
makeSumOfDifferentSquaresFunction(dimensions)
dimensions |
[ |
[smoof_single_objective_function
]
Mixed parameter space with one discrete parameter
and two numerical parameters
. The function is defined
as follows:
makeSwiler2014Function()
makeSwiler2014Function()
[smoof_single_objective_function
]
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeSYMPARTrotatedFunction(w = pi/4, a = 1, b = 10, c = 8)
makeSYMPARTrotatedFunction(w = pi/4, a = 1, b = 10, c = 8)
w |
[ |
a |
[ |
b |
[ |
c |
[ |
[smoof_multi_objective_function
]
Returns an instance of the SYM-PART Rotated function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Test problem from the set of "multi-modal multi-objective functions" as for instance used in the CEC2019 competition.
makeSYMPARTsimpleFunction(a = 1, b = 10, c = 8)
makeSYMPARTsimpleFunction(a = 1, b = 10, c = 8)
a |
[ |
b |
[ |
c |
[ |
[smoof_multi_objective_function
]
Returns an instance of the SYM-PART Simple function as a smoof_multi_objective_function
object.
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel scalable test problem suite for multi-modal multi-objective optimization," in Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
This two-dimensional function is based on the defintion
subject to .
makeThreeHumpCamelFunction()
makeThreeHumpCamelFunction()
An object of class SingleObjectiveFunction
, representing the Three-Hump Camel Function.
[smoof_single_objective_function
]
F. H. Branin Jr., Widely Convergent Method of Finding Multiple Solutions of Simultaneous Nonlinear Equations, IBM Journal of Research and Development, vol. 16, no. 5, pp. 504-522, 1972.
The Trecanni function belongs to the uni-modal test functions. It is based on the formula
The box-constraints define the
domain of definition.
makeTrecanniFunction()
makeTrecanniFunction()
An object of class SingleObjectiveFunction
, representing the Trecanni Function.
[smoof_single_objective_function
]
L. C. W. Dixon, G. P. Szego (eds.), Towards Global Optimization 2, Elsevier, 1978.
Generator for the functions UF1, ..., UF10 of the CEC 2009.
makeUFFunction(dimensions, id)
makeUFFunction(dimensions, id)
dimensions |
[ |
id |
[ |
[smoof_single_objective_function
]
The implementation is based on the original CPP implementation by Qingfu Zhang, Aimin Zhou, Shizheng Zhaoy, Ponnuthurai Nagaratnam Suganthany, Wudong Liu and Santosh Tiwar.
Jakob Bossek [email protected]
The Viennet test problem VNT is designed for three objectives only. It has a discrete set of Pareto fronts. It is defined by the following formulae.
with
with box constraints .
makeViennetFunction()
makeViennetFunction()
[smoof_multi_objective_function
]
Returns an instance of the Viennet function as a smoof_multi_objective_function
object.
Viennet, R. (1996). Multi-criteria optimization using a genetic algorithm for determining the Pareto set. International Journal of Systems Science 27 (2), 255-260.
First test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG1Function(n.objectives, k, l)
makeWFG1Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WGF1 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Second test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG2Function(n.objectives, k, l)
makeWFG2Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG2 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Third test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG3Function(n.objectives, k, l)
makeWFG3Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG3 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Fourth test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG4Function(n.objectives, k, l)
makeWFG4Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG4 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Fifth test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG5Function(n.objectives, k, l)
makeWFG5Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG5 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Sixth test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG6Function(n.objectives, k, l)
makeWFG6Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG6 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Seventh test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG7Function(n.objectives, k, l)
makeWFG7Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG7 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Eighth test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG8Function(n.objectives, k, l)
makeWFG8Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG8 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Ninth test problem from the "Walking Fish Group" problem generator toolkit.
makeWFG9Function(n.objectives, k, l)
makeWFG9Function(n.objectives, k, l)
n.objectives |
[ |
k |
[ |
l |
[ |
Huband et al. recommend a value of k = 4L
position-related
parameters for bi-objective problems and k = 2L * (n.objectives - 1L)
for many-objective problems. Furthermore the authors recommend a value of
l = 20
distance-related parameters. Therefore, if k
and/or
l
are not explicitly defined by the user, their values will be set
to the recommended values per default.
[smoof_multi_objective_function
]
Returns an instance of the WFG9 function as a smoof_multi_objective_function
object.
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objective Test Problems and a Scalable Test Problem Toolkit," in IEEE Transactions on Evolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
Builds and returns the two-objective ZDT1 test problem. For objective it
is defined as follows:
with
where
and
makeZDT1Function(dimensions)
makeZDT1Function(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ZDT1 function as a smoof_multi_objective_function
object.
E. Zitzler, K. Deb, and L. Thiele. Comparison of Multi-objective Evolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
Builds and returns the two-objective ZDT2 test problem. The function is
non-convex and resembles the ZDT1 function. For objective it
is defined as follows
with
where
and
makeZDT2Function(dimensions)
makeZDT2Function(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ZDT2 function as a smoof_multi_objective_function
object.
E. Zitzler, K. Deb, and L. Thiele. Comparison of Multi-objective Evolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
Builds and returns the two-objective ZDT3 test problem. For objective it
is defined as follows
with
where
and .
This function has some discontinuities in the Pareto-optimal front introduced
by the sine term in the
function (see above). The front consists of
multiple convex parts.
makeZDT3Function(dimensions)
makeZDT3Function(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ZDT3 function as a smoof_multi_objective_function
object.
E. Zitzler, K. Deb, and L. Thiele. Comparison of Multi-objective Evolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
Builds and returns the two-objective ZDT4 test problem. For objective it
is defined as follows
with
where
and .
This function has many Pareto-optimal fronts and is thus suited to test the
algorithms ability to tackle multi-modal problems.
makeZDT4Function(dimensions)
makeZDT4Function(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ZDT4 function as a smoof_multi_objective_function
object.
E. Zitzler, K. Deb, and L. Thiele. Comparison of Multi-objective Evolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
Builds and returns the two-objective ZDT6 test problem. For objective it
is defined as follows
with
where
and .
This function introduced two difficulties (see reference):
1. the density of solutions decreases with the closeness to the Pareto-optimal front and
2. the Pareto-optimal solutions are non-uniformly distributed along the front.
makeZDT6Function(dimensions)
makeZDT6Function(dimensions)
dimensions |
[ |
[smoof_multi_objective_function
]
Returns an instance of the ZDT6 function as a smoof_multi_objective_function
object.
E. Zitzler, K. Deb, and L. Thiele. Comparison of Multi-objective Evolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
The uni-modal Zettl Function is based on the definition
with box-constraints .
makeZettlFunction()
makeZettlFunction()
An object of class SingleObjectiveFunction
, representing the Zettl Function.
[smoof_single_objective_function
]
H. P. Schwefel, Evolution and Optimum Seeking, John Wiley Sons, 1995.
This is a simplifying wrapper around makeMultiObjectiveFunction
.
It can be used if the function to generate is purely numeric to save some lines
of code.
mnof( name = NULL, id = NULL, par.len = NULL, par.id = "x", par.lower = NULL, par.upper = NULL, n.objectives, description = NULL, fn, vectorized = FALSE, noisy = FALSE, fn.mean = NULL, minimize = rep(TRUE, n.objectives), constraint.fn = NULL, ref.point = NULL )
mnof( name = NULL, id = NULL, par.len = NULL, par.id = "x", par.lower = NULL, par.upper = NULL, n.objectives, description = NULL, fn, vectorized = FALSE, noisy = FALSE, fn.mean = NULL, minimize = rep(TRUE, n.objectives), constraint.fn = NULL, ref.point = NULL )
name |
[ |
id |
[ |
par.len |
[ |
par.id |
[ |
par.lower |
[ |
par.upper |
[ |
n.objectives |
[ |
description |
[ |
fn |
[ |
vectorized |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
constraint.fn |
[ |
ref.point |
[ |
[smoof_multi_objective_function
]
Returns a numeric multi-objective optimization test function created using the provided parameters.
# first we generate the 10d sphere function the long way fn = makeMultiObjectiveFunction( name = "Testfun", fn = function(x) c(sum(x^2), exp(sum(x^2))), par.set = makeNumericParamSet( len = 10L, id = "a", lower = rep(-1.5, 10L), upper = rep(1.5, 10L) ), n.objectives = 2L ) # ... and now the short way fn = mnof( name = "Testfun", fn = function(x) c(sum(x^2), exp(sum(x^2))), par.len = 10L, par.id = "a", par.lower = -1.5, par.upper = 1.5, n.objectives = 2L )
# first we generate the 10d sphere function the long way fn = makeMultiObjectiveFunction( name = "Testfun", fn = function(x) c(sum(x^2), exp(sum(x^2))), par.set = makeNumericParamSet( len = 10L, id = "a", lower = rep(-1.5, 10L), upper = rep(1.5, 10L) ), n.objectives = 2L ) # ... and now the short way fn = mnof( name = "Testfun", fn = function(x) c(sum(x^2), exp(sum(x^2))), par.len = 10L, par.id = "a", par.lower = -1.5, par.upper = 1.5, n.objectives = 2L )
This function generates a ggplot2 object for visualization.
## S3 method for class 'smoof_function' plot(x, ...)
## S3 method for class 'smoof_function' plot(x, ...)
x |
[ |
... |
[any] |
Nothing
Plot an one-dimensional function.
plot1DNumeric( x, show.optimum = FALSE, main = getName(x), n.samples = 500L, ... )
plot1DNumeric( x, show.optimum = FALSE, main = getName(x), n.samples = 500L, ... )
x |
[ |
show.optimum |
[ |
main |
[ |
n.samples |
[ |
... |
[any] |
Nothing
Either a contour-plot or a level-plot.
plot2DNumeric( x, show.optimum = FALSE, main = getName(x), render.levels = FALSE, render.contours = TRUE, n.samples = 100L, ... )
plot2DNumeric( x, show.optimum = FALSE, main = getName(x), render.levels = FALSE, render.contours = TRUE, n.samples = 100L, ... )
x |
[ |
show.optimum |
[ |
main |
[ |
render.levels |
[ |
render.contours |
[ |
n.samples |
[ |
... |
[any] |
Nothing
This function generates a surface plot of a two-dimensional smoof function.
plot3D(x, length.out = 100L, package = "plot3D", ...)
plot3D(x, length.out = 100L, package = "plot3D", ...)
x |
[ |
length.out |
[ |
package |
[ |
... |
[any] |
library(plot3D) fn = makeRastriginFunction(dimensions = 2L) ## Not run: # use the plot3D::persp3D method (default behaviour) plot3D(fn) plot3D(fn, contour = TRUE) plot3D(fn, image = TRUE, phi = 30) # use plotly::plot_ly for interactive plot plot3D(fn, package = "plotly") ## End(Not run)
library(plot3D) fn = makeRastriginFunction(dimensions = 2L) ## Not run: # use the plot3D::persp3D method (default behaviour) plot3D(fn) plot3D(fn, contour = TRUE) plot3D(fn, image = TRUE, phi = 30) # use plotly::plot_ly for interactive plot plot3D(fn, package = "plotly") ## End(Not run)
Reset evaluation counter.
resetEvaluationCounter(fn)
resetEvaluationCounter(fn)
fn |
[ |
Functions can have an associated global optimum. In this case one needs to know whether the optimum is a minimum or a maximum.
shouldBeMinimized(fn)
shouldBeMinimized(fn)
fn |
[ |
[logical
] Each component indicates whether the corresponding
objective should be minimized.
Regular R function with additional classes smoof_function
and one of smoof_single_objective_function
or codesmoof_multi_objective_function. Both single- and multi-objective functions share the following attributes.
character(1)
]Optional function name.
character(1)
]Short identifier.
character(1)
]Optional function description.
TRUE
if the target function expects a vector as input and FALSE
if it expects a named list of values.
ParamSet
]Parameter set describing different ascpects of the target function parameters, i. e., names, lower and/or upper bounds, types and so on.
integer(1)
]Number of objectives.
logical(1)
]Boolean indicating whether the function is noisy or not.
function
]Optional true mean function in case of a noisy objective function.
logical(1)
]Logical vector of length n.objectives
indicating which objectives shall
be minimized/maximized.
logical(1)
]Can the handle “vector” input, i. e., does it accept matrix of parameters?
function
]Optional function which returns a logical vector with each component indicating whether the corresponding constraint is violated.
Furthermore, single-objective function may contain additional parameters with information on local and/or global optima as well as characterizing tags.
character
]Optional character vector of tags or keywords.
data.frame
]Data frame of parameter values of global optima.
numeric(1)
]Function value of global optima.
data.frame
]Data frame of parameter values of local optima.
numeric
]Function values of local optima.
Currently tagging is not possible for multi-objective functions. The only additional attribute may be a reference point:
numeric
]Optional reference point of length n.objectives
.
This is a simplifying wrapper around makeSingleObjectiveFunction
.
It can be used if the function to generte is purely numeric to save some lines
of code.
snof( name = NULL, id = NULL, par.len = NULL, par.id = "x", par.lower = NULL, par.upper = NULL, description = NULL, fn, vectorized = FALSE, noisy = FALSE, fn.mean = NULL, minimize = TRUE, constraint.fn = NULL, tags = character(0), global.opt.params = NULL, global.opt.value = NULL, local.opt.params = NULL, local.opt.values = NULL )
snof( name = NULL, id = NULL, par.len = NULL, par.id = "x", par.lower = NULL, par.upper = NULL, description = NULL, fn, vectorized = FALSE, noisy = FALSE, fn.mean = NULL, minimize = TRUE, constraint.fn = NULL, tags = character(0), global.opt.params = NULL, global.opt.value = NULL, local.opt.params = NULL, local.opt.values = NULL )
name |
[ |
id |
[ |
par.len |
[ |
par.id |
[ |
par.lower |
[ |
par.upper |
[ |
description |
[ |
fn |
[ |
vectorized |
[ |
noisy |
[ |
fn.mean |
[ |
minimize |
[ |
constraint.fn |
[ |
tags |
[ |
global.opt.params |
[ |
global.opt.value |
[ |
local.opt.params |
[ |
local.opt.values |
[ |
# first we generate the 10d sphere function the long way fn = makeSingleObjectiveFunction( name = "Testfun", fn = function(x) sum(x^2), par.set = makeNumericParamSet( len = 10L, id = "a", lower = rep(-1.5, 10L), upper = rep(1.5, 10L) ) ) # ... and now the short way fn = snof( name = "Testfun", fn = function(x) sum(x^2), par.len = 10L, par.id = "a", par.lower = -1.5, par.upper = 1.5 )
# first we generate the 10d sphere function the long way fn = makeSingleObjectiveFunction( name = "Testfun", fn = function(x) sum(x^2), par.set = makeNumericParamSet( len = 10L, id = "a", lower = rep(-1.5, 10L), upper = rep(1.5, 10L) ) ) # ... and now the short way fn = snof( name = "Testfun", fn = function(x) sum(x^2), par.len = 10L, par.id = "a", par.lower = -1.5, par.upper = 1.5 )
Checks whether constraints are violated.
violatesConstraints(fn, values)
violatesConstraints(fn, values)
fn |
[ |
values |
[ |
[logical(1)
]
Quickly visualize the Pareto-optimal front of a bi-criteria objective
function by calling the EMOA nsga2
and extracting the
approximated Pareto-optimal front.
visualizeParetoOptimalFront(fn, ...)
visualizeParetoOptimalFront(fn, ...)
fn |
[ |
... |
[any] |
[ggplot
]
Returns a ggplot object representing the Pareto-optimal front visualization.
# Here we visualize the Pareto-optimal front of the bi-objective ZDT3 function fn = makeZDT3Function(dimensions = 3L) vis = visualizeParetoOptimalFront(fn) # Alternatively we can pass some more algorithm parameters to the NSGA2 algorithm vis = visualizeParetoOptimalFront(fn, popsize = 1000L)
# Here we visualize the Pareto-optimal front of the bi-objective ZDT3 function fn = makeZDT3Function(dimensions = 3L) vis = visualizeParetoOptimalFront(fn) # Alternatively we can pass some more algorithm parameters to the NSGA2 algorithm vis = visualizeParetoOptimalFront(fn, popsize = 1000L)