| Type: | Package |
| 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. |
| Version: | 1.6.0.3 |
| Date: | 2023-03-06 |
| Maintainer: | Jakob Bossek <j.bossek@gmail.com> |
| URL: | https://jakobbossek.github.io/smoof/,https://github.com/jakobbossek/smoof |
| BugReports: | https://github.com/jakobbossek/smoof/issues |
| License: | BSD_2_clause + file LICENSE |
| Depends: | ParamHelpers (≥ 1.8), checkmate (≥ 1.1) |
| Imports: | BBmisc (≥ 1.6), ggplot2 (≥ 2.2.1), Rcpp (≥ 0.11.0) |
| Suggests: | testthat, plot3D, plotly, mco, RColorBrewer, reticulate, covr |
| ByteCompile: | yes |
| LinkingTo: | Rcpp, RcppArmadillo |
| RoxygenNote: | 7.2.3 |
| Encoding: | UTF-8 |
| NeedsCompilation: | yes |
| Packaged: | 2023-03-08 15:45:18 UTC; bossek |
| Author: | Jakob Bossek |
| Repository: | CRAN |
| Date/Publication: | 2023-03-10 14:20:05 UTC |
smoof: Single and Multi-Objective Optimization test functions.
Description
Thesmoof R package provides generators for huge set of single- andmulti-objective test functions, which are frequently used in the literatureto benchmark optimization algorithms. Moreover the package provides methodsto create arbitrary objective functions in an object-orientated manner, extracttheir parameters sets and visualize them graphically.
Some more details
Given a set of criteria\mathcal{F} = \{f_1, \ldots, f_m\} with eachf_i : S \subseteq \mathbf{R}^d \to \mathbf{R} , i = 1, \ldots, m being anobjective-function, the goal inGlobal Optimization (GO) is to find the bestsolution\mathbf{x}^* \in S. The setS is termed theset offeasible soluations. In the case of only a single objective functionf,- which we want to restrict ourself in this brief description - the goal is tominimize the objective, i. e.,
\min_{\mathbf{x}} f(\mathbf{x}).
Sometimes we may be interested in maximizing the objective function value, butsincemin(f(\mathbf{x})) = -\min(-f(\mathbf{x})), we do not have to tacklethis separately.To compare the robustness of optimization algorithms and to investigate their behaviourin different contexts, a common approach in the literature is to useartificialbenchmarking functions, which are mostly deterministic, easy to evaluate and givenby a closed mathematical formula.A recent survey by Jamil and Yang lists 175 single-objective benchmarking functionsin total for global optimization [1]. Thesmoof package offers implementationsof a subset of these functions beside some other functions as well asgenerators for large benchmarking sets like the noiseless BBOB2009 function set [2]or functions based on the multiple peaks model 2 [3].
References
[1] Momin Jamil and Xin-She Yang, A literature survey of benchmarkfunctions for global optimization problems, Int. Journal of MathematicalModelling and Numerical Optimisation, Vol. 4, No. 2, pp. 150-194 (2013).[2] Hansen, N., Finck, S., Ros, R. and Auger, A. Real-Parameter Black-BoxOptimization Benchmarking 2009: Noiseless Functions Definitions. Technical reportRR-6829. INRIA, 2009.[3] Simon Wessing, The Multiple Peaks Model 2, Algorithm Engineering ReportTR15-2-001, TU Dortmund University, 2015.
Return a function which counts its function evaluations.
Description
This is a counting wrapper for asmoof_function, i.e., the returned functionfirst checks whether the given argument is a vector or matrix, saves thenumber of function evaluations of the wrapped function to compute the functionvalues and finally passes down the argument to the wrappedsmoof_function.
Usage
addCountingWrapper(fn)Arguments
fn | [ |
Value
[smoof_counting_function]
See Also
getNumberOfEvaluations,resetEvaluationCounter
Examples
fn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L)fn = addCountingWrapper(fn)# we get a value of 0 since the function has not been called yetprint(getNumberOfEvaluations(fn))# now call the function 10 times consecutivelyfor (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 vectorx = matrix(runif(10), ncol = 5L)fn(x)print(getNumberOfEvaluations(fn))Return a function which internally stores x or y values.
Description
Often it is desired and useful to store the optimization path, i.e., the evaluatedfunction values and/or the parameters. Not all optimization algorithms offersuch a trace. This wrapper makes a smoof function handle x/y-values itself.
Usage
addLoggingWrapper(fn, logg.x = FALSE, logg.y = TRUE, size = 100L)Arguments
fn | [ |
logg.x | [ |
logg.y | [ |
size | [ |
Value
[smoof_logging_function]
Note
Logging values, in particular logging x-values, will substantially slowdown the evaluation of the function.
Examples
# We first build the smoof function and apply the logging wrapper to itfn = 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 valueslog.res = getLoggedValues(fn)print(log.res$pars)print(log.res$obj.vals)log.res = getLoggedValues(fn, compact = TRUE)print(log.res)Generate ggplot2 object.
Description
This function expects a smoof function and returns a ggplot object depictingthe function landscape. The output depends highly on the decision space of thesmoof function or more technically on theParamSetof the function. The following destinctions regarding the parameter types aremade. In case of a single numeric parameter a simple line plot is drawn. Fortwo numeric parameters or a single numeric vector parameter of length 2 either acontour plot or a heatmap (or a combination of both depending on the choiceof additional parameters) is depicted. If there are both up to two numericand at least one discrete vector parameter, ggplot facetting is used togenerate subplots of the above-mentioned types for all combinations of discreteparameters.
Usage
## 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)Arguments
object | [ |
... | [any] |
show.optimum | [ |
main | [ |
render.levels | [ |
render.contours | [ |
log.scale | [ |
length.out | [ |
Value
[ggplot]
Note
Keep in mind, that the plots for mixed parameter spaces may be very large andcomputationally expensive if the number of possible discrete parameter valuesis large. I.e., if we have d discrete parameter with each n_1, n_2, ..., n_dpossible values we end up with n_1 x n_2 x ... x n_d subplots.
Examples
library(ggplot2)# Simple 2D contour plot with activated heatmap for the Himmelblau functionfn = 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 legendpl + ggtitle("My fancy function") + theme(legend.position = "none")Compute the Expected Running Time (ERT) performance measure.
Description
The functions can be called in two different ways
1. Pass a vector of function evaluations and a logical vector whichindicates which runs were successful (see details).
2. Pass a vector of function evaluation, a vector of reached targetvalues and a single target value. In this case the logical vector ofoption 1. is computed internally.
Usage
computeExpectedRunningTime( fun.evals, fun.success.runs = NULL, fun.reached.target.values = NULL, fun.target.value = NULL, penalty.value = Inf)Arguments
fun.evals | [ |
fun.success.runs | [ |
fun.reached.target.values | [ |
fun.target.value | [ |
penalty.value | [ |
Details
The Expected Running Time (ERT) is one of the most popular performancemeasures in optimization. It is defined as the expected number of functionevaluations needed to reach a given precision level, i. e., to reach a certainobjective value for the first time.
Value
[numeric(1)]Estimated Expected Running Time.
References
A. Auger and N. Hansen. Performance evaluation of an advanced localsearch evolutionary algorithm. In Proceedings of the IEEE Congress on EvolutionaryComputation (CEC 2005), pages 1777-1784, 2005.
Conversion between minimization and maximization problems.
Description
We can minimize f by maximizing -f. The majority of predefined objective functionsinsmoof should be minimized by default. However, there is a handful offunctions, e.g., Keane or Alpine02, which shall be maximized by default.For benchmarking studies it might be beneficial to inverse the direction.The functionsconvertToMaximization andconvertToMinimizationdo exactly that keeping the attributes.
Usage
convertToMaximization(fn)convertToMinimization(fn)Arguments
fn | [ |
Value
[smoof_function]
Note
Both functions will quit with an error if multi-objective functions are passed.
Examples
# create a function which should be minimized by defaultfn = makeSphereFunction(1L)print(shouldBeMinimized(fn))# Now invert the objective direction ...fn2 = convertToMaximization(fn)# and invert it againfn3 = convertToMinimization(fn2)# Now to convince ourselves we render some plotsopar = par(mfrow = c(1, 3))plot(fn)plot(fn2)plot(fn3)par(opar)Check whether the function is counting its function evaluations.
Description
In this case the function is of typesmoof_counting_function or itis further wrapped by another wrapper. This function then checks recursively,if there is a counting wrapper.
Usage
doesCountEvaluations(object)Arguments
object | [any] |
Value
logical(1)
See Also
Get a list of implemented test functions with specific tags.
Description
Single objective functions can be tagged, e.g., as unimodal. Searching for allfunctions with a specific tag by hand is tedious. ThefilterFunctionsByTagsfunction helps to filter all single objective smoof function.
Usage
filterFunctionsByTags(tags, or = FALSE)Arguments
tags | [ |
or | [ |
Value
[character]Named vector of function names with the given tags.
Examples
# list all functions which are unimodalfilterFunctionsByTags("unimodal")# list all functions which are both unimodal and separablefilterFunctionsByTags(c("unimodal", "separable"))# list all functions which are unimodal or separablefilterFunctionsByTags(c("multimodal", "separable"), or = TRUE)Returns a character vector of possible function tags.
Description
Test function are frequently distinguished by characteristic high-level properties,e.g., unimodal or multimodal, continuous or discontinuous, separable or non-separable.Thesmoof package offers the possibility to associate a set of properties,termed “tags” to asmoof_function. This helper function returnsa character vector of all possible tags.
Usage
getAvailableTags()Value
[character]
Return the description of the function.
Description
Return the description of the function.
Usage
getDescription(fn)Arguments
fn | [ |
Value
[character(1)]
Returns the global optimum and its value.
Description
Returns the global optimum and its value.
Usage
getGlobalOptimum(fn)Arguments
fn | [ |
Value
[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?
Note
Keep in mind, that this method makes sense only for single-objective target function.
Return the ID / short name of the function orNA if no ID is set.
Description
Return the ID / short name of the function orNA if no ID is set.
Usage
getID(fn)Arguments
fn | [ |
Value
[character(1)] orNA
Returns the local optima of a single objective smoof function.
Description
This function returns the parameters and objective values ofall local optima (including the global one).
Usage
getLocalOptimum(fn)Arguments
fn | [ |
Value
[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?
Note
Keep in mind, that this method makes sense only for single-objective target functions.
Extract logged values of a function wrapped by a logging wrapper.
Description
Extract logged values of a function wrapped by a logging wrapper.
Usage
getLoggedValues(fn, compact = FALSE)Arguments
fn | [ |
compact | [ |
Value
[list ||data.frame]Ifcompact isTRUE, a single data frame. Otherwise the functionreturns a list containing the following values:
- pars
Data frame of parameter values, i.e., x-values or the emptydata frame if x-values were not logged.
- obj.vals
Numeric vector of objective vals in the single-objectivecase respectively a matrix of objective vals for multi-objective functions.
See Also
Return lower box constaints.
Description
Return lower box constaints.
Usage
getLowerBoxConstraints(fn)Arguments
fn | [ |
Value
[numeric]
Return the true mean function in the noisy case.
Description
Return the true mean function in the noisy case.
Usage
getMeanFunction(fn)Arguments
fn | [ |
Value
[function]
Return the name of the function.
Description
Return the name of the function.
Usage
getName(fn)Arguments
fn | [ |
Value
[character(1)]
Return the number of function evaluations performed by the wrappedsmoof_function.
Description
Return the number of function evaluations performed by the wrappedsmoof_function.
Usage
getNumberOfEvaluations(fn)Arguments
fn | [ |
Value
[integer(1)]
Determine the number of objectives.
Description
Determine the number of objectives.
Usage
getNumberOfObjectives(fn)Arguments
fn | [ |
Value
[integer(1)]
Determine the number of parameters.
Description
Determine the number of parameters.
Usage
getNumberOfParameters(fn)Arguments
fn | [ |
Value
[integer(1)]
Get parameter set.
Description
Each smoof function contains a parameter set of typeParamSetassigned to it, which describes types and bounds of the function parameters.This function returns the parameter set.
Arguments
fn | [ |
Value
[ParamSet]
Examples
fn = makeSphereFunction(3L)ps = getParamSet(fn)print(ps)Returns the reference point of a multi-objective function.
Description
Returns the reference point of a multi-objective function.
Usage
getRefPoint(fn)Arguments
fn | [ |
Value
[numeric]
Note
Keep in mind, that this method makes sense only for multi-objective target functions.
Returns vector of associated tags.
Description
Returns vector of associated tags.
Usage
getTags(fn)Arguments
fn | [ |
Value
[character]
Return upper box constaints.
Description
Return upper box constaints.
Usage
getUpperBoxConstraints(fn)Arguments
fn | [ |
Value
[numeric]
Extract wrapped function.
Description
Thesmoof package offers means to let a function log its evaluations oreven store to points and function values it has been evaluated on. This is doneby wrapping the function with other functions. This helper function extractthe wrapped function.
Usage
getWrappedFunction(fn, deepest = FALSE)Arguments
fn | [ |
deepest | [ |
Value
[function]
Note
If this function is applied to a simplesmoof_function, thesmoof_function itself is returned.
See Also
addCountingWrapper,addLoggingWrapper
Checks whether the objective function has box constraints.
Description
Checks whether the objective function has box constraints.
Usage
hasBoxConstraints(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether the objective function has constraints.
Description
Checks whether the objective function has constraints.
Usage
hasConstraints(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether global optimum is known.
Description
Checks whether global optimum is known.
Usage
hasGlobalOptimum(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether local optima are known.
Description
Checks whether local optima are known.
Usage
hasLocalOptimum(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether the objective function has other constraints.
Description
Checks whether the objective function has other constraints.
Usage
hasOtherConstraints(fn)Arguments
fn | [ |
Value
[logical(1)]
Check if function has assigend special tags.
Description
Each single-objective smoof function has tags assigned to it (seegetAvailableTags). This little helper returns a vector ofassigned tags from a smoof function.
Usage
hasTags(fn, tags)Arguments
fn | [ |
tags | [ |
Value
[logical(1)]
Checks whether the given function is multi-objective.
Description
Checks whether the given function is multi-objective.
Usage
isMultiobjective(fn)Arguments
fn | [ |
Value
[logical(1)]TRUE if function is multi-objective.
Checks whether the given function is noisy.
Description
Checks whether the given function is noisy.
Usage
isNoisy(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether the given function is single-objective.
Description
Checks whether the given function is single-objective.
Usage
isSingleobjective(fn)Arguments
fn | [ |
Value
[logical(1)]TRUE if function is single-objective.
Checks whether the given object is asmoof_function or asmoof_wrapped_function.
Description
Checks whether the given object is asmoof_function or asmoof_wrapped_function.
Usage
isSmoofFunction(object)Arguments
object | [any] |
Value
[logical(1)]
See Also
addCountingWrapper,addLoggingWrapper
Checks whether the given function accept “vectorized” input.
Description
Checks whether the given function accept “vectorized” input.
Usage
isVectorized(fn)Arguments
fn | [ |
Value
[logical(1)]
Checks whether the function is of typesmoof_wrapped_function.
Description
Checks whether the function is of typesmoof_wrapped_function.
Usage
isWrappedSmoofFunction(object)Arguments
object | [any] |
Value
[logical(1)]
Ackley Function
Description
Also known as “Ackley's Path Function”.Multimodal test function with its global optimum in the center of the defintionspace. The implementation is based on the formula
f(\mathbf{x}) = -a \cdot \exp\left(-b \cdot \sqrt{\left(\frac{1}{n} \sum_{i=1}^{n} \mathbf{x}_i\right)}\right) - \exp\left(\frac{1}{n} \sum_{i=1}^{n} \cos(c \cdot \mathbf{x}_i)\right),
witha = 20,b = 0.2 andc = 2\pi. The feasible region isgiven by the box constraints\mathbf{x}_i \in [-32.768, 32.768].
Usage
makeAckleyFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
Ackley, D. H.: A connectionist machine for genetic hillclimbing.Boston: Kluwer Academic Publishers, 1987.
Adjiman function
Description
This two-dimensional multimodal test function follows the formula
f(\mathbf{x}) = \cos(\mathbf{x}_1)\sin(\mathbf{x}_2) - \frac{\mathbf{x}_1}{(\mathbf{x}_2^2 + 1)}
with\mathbf{x}_1 \in [-1, 2], \mathbf{x}_2 \in [2, 1].
Usage
makeAdjimanFunction()Value
[smoof_single_objective_function]
References
C. S. Adjiman, S. Sallwig, C. A. Flouda, A. Neumaier, A Global OptimizationMethod, aBB for General Twice-Differentiable NLPs-1, Theoretical Advances, ComputersChemical Engineering, vol. 22, no. 9, pp. 1137-1158, 1998.
Alpine01 function
Description
Highly multimodal single-objective optimization test function. It is definedas
f(\mathbf{x}) = \sum_{i = 1}^{n} |\mathbf{x}_i \sin(\mathbf{x}_i) + 0.1\mathbf{x}_i|
with box constraints\mathbf{x}_i \in [-10, 10] fori = 1, \ldots, n.
Usage
makeAlpine01Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, A Novel PopulationInitialization Method for Accelerating Evolutionary Algorithms, Computers andMathematics with Applications, vol. 53, no. 10, pp. 1605-1614, 2007.
Alpine02 function
Description
Another multimodal optimization test function. The implementation is based onthe formula
f(\mathbf{x}) = \prod_{i = 1}^{n} \sqrt{\mathbf{x}_i}\sin(\mathbf{x}_i)
with\mathbf{x}_i \in [0, 10] fori = 1, \ldots, n.
Usage
makeAlpine02Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
M. Clerc, The Swarm and the Queen, Towards a Deterministic andAdaptive Particle Swarm Optimization, IEEE Congress on Evolutionary Computation,Washington DC, USA, pp. 1951-1957, 1999.
Aluffi-Pentini function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = 0.25 x_1^4 - 0.5 x_1^2 + 0.1 x_1 + 0.5 x_2^2
with\mathbf{x}_1, \mathbf{x}_2 \in [-10, 10].
Usage
makeAluffiPentiniFunction()Value
[smoof_single_objective_function]
Note
This functions is also know as the Zirilli function.
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/26-aluffi-pentini-s-or-zirilli-s-function.
Generator for the noiseless function set of the real-parameter Black-BoxOptimization Benchmarking (BBOB).
Description
Generator for the noiseless function set of the real-parameter Black-BoxOptimization Benchmarking (BBOB).
Usage
makeBBOBFunction(dimensions, fid, iid)Arguments
dimensions | [ |
fid | [ |
iid | [ |
Value
[smoof_single_objective_function]
Note
It is possible to pass a matrix of parameters to the functions, whereeach column consists of one parameter setting.
References
See theBBOB websitefor a detailed description of the BBOB functions.
Examples
# get the first instance of the 2D Sphere functionfn = makeBBOBFunction(dimensions = 2L, fid = 1L, iid = 1L)if (require(plot3D)) { plot3D(fn, contour = TRUE)}BK1 function generator
Description
...
Usage
makeBK1Function()Value
[smoof_multi_objective_function]
References
...
Bartels Conn Function
Description
The Bartels Conn Function is defined as
f(\mathbf{x}) = |\mathbf{x}_1^2 + \mathbf{x}_2^2 + \mathbf{x}_1\mathbf{x}_2| + |\sin(\mathbf{x}_1)| + |\cos(\mathbf{x})|
subject to\mathbf{x}_i \in [-500, 500] fori = 1, 2.
Usage
makeBartelsConnFunction()Value
[smoof_single_objective_function]
Beale Function
Description
Multimodal single-objective test function for optimization. It is based onthe mathematic formula
f(\mathbf{x}) = (1.5 - \mathbf{x}_1 + \mathbf{x}_1\mathbf{x}_2)^2 + (2.25 - \mathbf{x}_1 + \mathbf{x}_1\mathbf{x}_2^2)^2 + (2.625 - \mathbf{x}_1 + \mathbf{x}_1\mathbf{x}_2^3)^2
usually evaluated within the bounds\mathbf{x}_i \in [-4.5, 4.5], i = 1, 2.The function has a flat but multimodal region aroung the single global optimumand large peaks in the edges of its definition space.
Usage
makeBealeFunction()Value
[smoof_single_objective_function]
Bent-Cigar Function
Description
Scalable test functionf with
f(\mathbf{x}) = x_1^2 + 10^6 \sum_{i = 2}^{n} x_i^2
subject to-100 \leq \mathbf{x}_i \leq 100 fori = 1, \ldots, n.
Usage
makeBentCigarFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/n-dimensions/164-bent-cigar-function.
Generator for the function set of the real-parameter Bi-ObjectiveBlack-Box Optimization Benchmarking (BBOB).
Description
Generator for the function set of the real-parameter Bi-ObjectiveBlack-Box Optimization Benchmarking (BBOB).
Usage
makeBiObjBBOBFunction(dimensions, fid, iid)Arguments
dimensions | [ |
fid | [ |
iid | [ |
Value
[smoof_multi_objective_function]
Note
Concatenation of single-objective BBOB functions intoa bi-objective problem.
References
See theCOCO websitefor a detailed description of the bi-objective BBOB functions.An overview of which pair of single-objective BBOB functions createswhich of the 55 bi-objective BBOB functions can be foundhere.
Examples
# get the fifth instance of the concatenation of the# 3D versions of sphere and Rosenbrockfn = makeBiObjBBOBFunction(dimensions = 3L, fid = 4L, iid = 5L)fn(c(3, -1, 0))# compare to the output of its single-objective pendantsf1 = 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))))Bi-objective Sphere function
Description
Builds and returns the bi-objective Sphere test problem:
f(\mathbf{x}) = \left(\sum_{i=1}^{n} \mathbf{x}_i^2, \sum_{i=1}^{n} (\mathbf{x}_i - \mathbf{a})^2\right)
where
\mathbf{a} \in R^n
.
Usage
makeBiSphereFunction(dimensions, a = rep(0, dimensions))Arguments
dimensions | [ |
a | [ |
Value
[smoof_multi_objective_function]
Bird Function
Description
Multimodal single-objective test function. The implementation is based on themathematical formulation
f(\mathbf{x}) = (\mathbf{x}_1 - \mathbf{x}_2)^2 + \exp((1 - \sin(\mathbf{x}_1))^2)\cos(\mathbf{x}_2) + \exp((1 - \cos(\mathbf{x}_2))^2)\sin(\mathbf{x}_1).
The function is restricted to two dimensions with\mathbf{x}_i \in [-2\pi, 2\pi], i = 1, 2.
Usage
makeBirdFunction()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, Munich ResearchPapers in Economics.
Bohachevsky function N. 1
Description
Highly multimodal single-objective test function. The mathematical formula isgiven by
f(\mathbf{x}) = \sum_{i = 1}^{n - 1} (\mathbf{x}_i^2 + 2 \mathbf{x}_{i + 1}^2 - 0.3\cos(3\pi\mathbf{x}_i) - 0.4\cos(4\pi\mathbf{x}_{i + 1}) + 0.7)
with box-constraints\mathbf{x}_i \in [-100, 100] fori = 1, \ldots, n.The multimodality will be visible by “zooming in” in the plot.
Usage
makeBohachevskyN1Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
I. O. Bohachevsky, M. E. Johnson, M. L. Stein, General SimulatedAnnealing for Function Optimization, Technometrics, vol. 28, no. 3, pp. 209-217, 1986.
Booth Function
Description
This function is based on the formula
f(\mathbf{x}) = (\mathbf{x}_1 + 2\mathbf{x}_2 - 7)^2 + (2\mathbf{x}_1 + \mathbf{x}_2 - 5)^2
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeBoothFunction()Value
[smoof_single_objective_function]
Branin RCOS function
Description
Popular 2-dimensional single-objective test function based on the formula:
f(\mathbf{x}) = a \left(\mathbf{x}_2 - b \mathbf{x}_1^2 + c \mathbf{x_1} - d\right)^2 + e\left(1 - f\right)\cos(\mathbf{x}_1) + e,
wherea = 1, b = \frac{5.1}{4\pi^2}, c = \frac{5}{\pi}, d = 6, e = 10 andf = \frac{1}{8\pi}. The box constraints are given by\mathbf{x}_1 \in [-5, 10]and\mathbf{x}_2 \in [0, 15]. The function has three global minima.
Usage
makeBraninFunction()Value
[smoof_single_objective_function]
References
F. H. Branin. Widely convergent method for findingmultiple solutions of simultaneous nonlinear equations.IBM J. Res. Dev. 16, 504-522, 1972.
Examples
library(ggplot2)fn = makeBraninFunction()print(fn)print(autoplot(fn, show.optimum = TRUE))Brent Function
Description
Single-objective two-dimensional test function. The formula is given as
f(\mathbf{x}) = (\mathbf{x}_1 + 10)^2 + (\mathbf{x}_2 + 10)^2 + exp(-\mathbf{x}_1^2 - \mathbf{x}_2^2)
subject to the constraints\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeBrentFunction()Value
[smoof_single_objective_function]
References
F. H. Branin Jr., Widely Convergent Method of Finding MultipleSolutions of Simul- taneous Nonlinear Equations, IBM Journal of Research andDevelopment, vol. 16, no. 5, pp. 504-522, 1972.
Brown Function
Description
This function belongs the the unimodal single-objective test functions. Thefunction is forumlated as
f(\mathbf{x}) = \sum_{i = 1}^{n} (\mathbf{x}_i^2)^{(\mathbf{x}_{i + 1} + 1)} + (\mathbf{x}_{i + 1})^{(\mathbf{x}_i + 1)}
subject to\mathbf{x}_i \in [-1, 4] fori = 1, \ldots, n.
Usage
makeBrownFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
O. Begambre, J. E. Laier, A hybrid Particle Swarm Optimization -Simplex Algorithm (PSOS) for Structural Damage Identification, Journal ofAdvances in Engineering Software, vol. 40, no. 9, pp. 883-891, 2009.
Bukin function N. 2
Description
Muldimodal, non-scalable, continous optimization test function given by:
f(\mathbf{x}) = 100 (\mathbf{x}_2 - 0.01 * \mathbf{x}_1^2 + 1) + 0.01 (\mathbf{x}_1 + 10)^2
subject to\mathbf{x}_1 \in [-15, -5] and\mathbf{x}_2 \in [-3, 3].
Usage
makeBukinN2Function()Value
[smoof_single_objective_function]
References
Z. K. Silagadze, Finding Two-Dimensional Peaks, Physics of Particlesand Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
See Also
makeBukinN4Function,makeBukinN6Function
Bukin function N. 4
Description
Second continous Bukin function test function. The formula is given by
f(\mathbf{x}) = 100 \mathbf{x}_2^2 + 0.01 * ||\mathbf{x}_1 +10||
and the box constraintsmathbf{x}_1 \in [-15, 5], \mathbf{x}_2 \in [-3, 3].
Usage
makeBukinN4Function()Value
[smoof_single_objective_function]
References
Z. K. Silagadze, Finding Two-Dimesnional Peaks, Physics of Particlesand Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
See Also
makeBukinN2Function,makeBukinN6Function
Bukin function N. 6
Description
Beside Bukin N. 2 and N. 4 this is the last “Bukin family” function.It is given by the formula
f(\mathbf{x}) = 100 \sqrt{||\mathbf{x}_2 - 0.01 \mathbf{x}_1^2||} + 0.01 ||\mathbf{x}_1 + 10||
and the box constraintsmathbf{x}_1 \in [-15, 5], \mathbf{x}_2 \in [-3, 3].
Usage
makeBukinN6Function()Value
[smoof_single_objective_function]
References
Z. K. Silagadze, Finding Two-Dimesnional Peaks, Physics of Particlesand Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
See Also
makeBukinN2Function,makeBukinN4Function
Carrom Table Function
Description
This function is defined as follows:
f(\mathbf{x}) = -\frac{1}{30} \left((\cos(\mathbf{x}_1)\exp(|1 - ((\mathbf{x}_1^2 + \mathbf{x}_2^2)^{0.5} / \pi)^2)|\right).
The box-constraints are given by\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeCarromTableFunction()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, MunichResearch Papers in Economics.
Chichinadze Function
Description
Continuous single-objective test functionf with
f(\mathbf{x}) = \mathbf{x}_1^2 - 12 \mathbf{x}_1 + 11 + 10\cos(0.5\pi\mathbf{x}_1) + 8\sin(2.5\pi\mathbf{x}_1) - (0.25)^{0.5}\exp(-0.5(\mathbf{x}_2 - 0.5)^2)
with-30 \leq \mathbf{x}_i \leq 30, i = 1, 2.
Usage
makeChichinadzeFunction()Value
[smoof_single_objective_function]
Chung Reynolds Function
Description
The defintion is given by
f(\mathbf{x}) = \left(\sum_{i=1}^{n} \mathbf{x}_i^2\right)^2
with box-constraings\mathbf{x}_i \in [-100, 100], i = 1, \ldots, n.
Usage
makeChungReynoldsFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
C. J. Chung, R. G. Reynolds, CAEP: An Evolution-Based Tool forReal-Valued Func- tion Optimization Using Cultural Algorithms, InternationalJournal on Artificial In- telligence Tool, vol. 7, no. 3, pp. 239-291, 1998.
Complex function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = (x_1^3 - 3 x_1 x_2^2 - 1)^2 + (3 x_2 x_1^2 - x_2^3)^2
with\mathbf{x}_1, \mathbf{x}_2 \in [-2, 2].
Usage
makeComplexFunction()Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/43-complex-function.
Cosine Mixture Function
Description
Single-objective test function based on the formula
f(\mathbf{x}) = -0.1 \sum_{i = 1}^{n} \cos(5\pi\mathbf{x}_i) - \sum_{i = 1}^{n} \mathbf{x}_i^2
subject to\mathbf{x}_i \in [-1, 1] fori = 1, \ldots, n.
Usage
makeCosineMixtureFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A Numerical Evaluationof Several Stochastic Algorithms on Selected Continuous Global OptimizationTest Problems, Journal of Global Optimization, vol. 31, pp. 635-672, 2005.
Cross-In-Tray Function
Description
Non-scalable, two-dimensional test function for numerical optimization with
f(\mathbf{x}) = -0.0001\left(|\sin(\mathbf{x}_1\mathbf{x}_2\exp(|100 - [(\mathbf{x}_1^2 + \mathbf{x}_2^2)]^{0.5} / \pi|)| + 1\right)^{0.1}
subject to\mathbf{x}_i \in [-15, 15] fori = 1, 2.
Usage
makeCrossInTrayFunction()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, MunichResearch Papers in Economics.
Cube Function
Description
The Cube Function is defined as follows:
f(\mathbf{x}) = 100 (\mathbf{x}_2 - \mathbf{x}_1^3)^2 + (1 - \mathbf{x}_1)^2.
The box-constraints are given by\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeCubeFunction()Value
[smoof_single_objective_function]
References
A. Lavi, T. P. Vogel (eds), Recent Advances in OptimizationTechniques, John Wliley & Sons, 1966.
DTLZ1 Function (family)
Description
Builds and returns the multi-objective DTLZ1 test problem.
The DTLZ1 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = \frac{1}{2} x_1 x_2 \cdots x_{M-1} (1+g(\mathbf{x}_M),
Minimizef_2(\mathbf{x}) = \frac{1}{2} x_1 x_2 \cdots (1-x_{M-1}) (1+g(\mathbf{x}_M)),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = \frac{1}{2} x_1 (1-x_2) (1+g(\mathbf{x}_M)),
Minimizef_{M}(\mathbf{x}) = \frac{1}{2} (1-x_1) (1+g(\mathbf{x}_M)),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
whereg(\mathbf{x}_M) = 100 \left[|\mathbf{x}_M| + \sum\limits_{x_i \in \mathbf{x}_M} (x_i - 0.5)^2 - \cos(20\pi(x_i - 0.5))\right]
Usage
makeDTLZ1Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ2 Function (family)
Description
Builds and returns the multi-objective DTLZ2 test problem.
The DTLZ2 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \cos(x_{M-2}\pi/2) \cos(x_{M-1}\pi/2),
Minimizef_2(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \cos(x_{M-2}\pi/2) \sin(x_{M-1}\pi/2),
Minimizef_3(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \sin(x_{M-2}\pi/2),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \sin(x_2\pi/2),
Minimizef_{M}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \sin(x_1\pi/2),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
whereg(\mathbf{x}_M) = \sum\limits_{x_i\in \mathbf{x}_M}(x_i-0.5)^2
Usage
makeDTLZ2Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
Note
Note that in case of a bi-objective scenario (n.objectives = 2L) DTLZ2 and DTLZ5 are identical.
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ3 Function (family)
Description
Builds and returns the multi-objective DTLZ3 test problem. The formulais very similar to the formula of DTLZ2, but it uses theg functionof DTLZ1, which introduces a lot of local Pareto-optimal fronts. Thus, thisproblems is well suited to check the ability of an optimizer to convergeto the global Pareto-optimal front.
The DTLZ3 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \cos(x_{M-2}\pi/2) \cos(x_{M-1}\pi/2),
Minimizef_2(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \cos(x_{M-2}\pi/2) \sin(x_{M-1}\pi/2),
Minimizef_3(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \cos(x_2\pi/2) \cdots \sin(x_{M-2}\pi/2),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1\pi/2) \sin(x_2\pi/2),
Minimizef_{M}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \sin(x_1\pi/2),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
whereg(\mathbf{x}_M) = 100 \left[|\mathbf{x}_M| + \sum\limits_{x_i \in \mathbf{x}_M} (x_i - 0.5)^2 - \cos(20\pi(x_i - 0.5))\right]
Usage
makeDTLZ3Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ4 Function (family)
Description
Builds and returns the multi-objective DTLZ4 test problem. It is a slightmodification of the DTLZ2 problems by introducing the parameter\alpha.The parameter is used to map\mathbf{x}_i \rightarrow \mathbf{x}_i^{\alpha}.
The DTLZ4 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1^\alpha\pi/2) \cos(x_2^\alpha\pi/2) \cdots \cos(x_{M-2}^\alpha\pi/2) \cos(x_{M-1}^\alpha\pi/2),
Minimizef_2(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1^\alpha\pi/2) \cos(x_2^\alpha\pi/2) \cdots \cos(x_{M-2}^\alpha\pi/2) \sin(x_{M-1}^\alpha\pi/2),
Minimizef_3(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1^\alpha\pi/2) \cos(x_2^\alpha\pi/2) \cdots \sin(x_{M-2}^\alpha\pi/2),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(x_1^\alpha\pi/2) \sin(x_2^\alpha\pi/2),
Minimizef_{M}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \sin(x_1^\alpha\pi/2),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
whereg(\mathbf{x}_M) = \sum\limits_{x_i\in \mathbf{x}_M}(x_i-0.5)^2
Usage
makeDTLZ4Function(dimensions, n.objectives, alpha = 100)Arguments
dimensions | [ |
n.objectives | [ |
alpha | [ |
Value
[smoof_multi_objective_function]
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ5 Function (family)
Description
Builds and returns the multi-objective DTLZ5 test problem. This problemcan be characterized by a disconnected Pareto-optimal front in the searchspace. This introduces a new challenge to evolutionary multi-objectiveoptimizers, i.e., to maintain different subpopulations within the searchspace to cover the entire Pareto-optimal front.
The DTLZ5 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \cos(\theta_{M-2}\pi/2) \cos(\theta_{M-1}\pi/2),
Minimizef_2(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \cos(\theta_{M-2}\pi/2) \sin(\theta_{M-1}\pi/2),
Minimizef_3(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \sin(\theta_{M-2}\pi/2),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \sin(\theta_2\pi/2),
Minimizef_{M}((1+g(\mathbf{x}_M)) \sin(\theta_1\pi/2),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
where\theta_i = \frac{\pi}{4(1+ g(\mathbf{x}_M))} (1+2g(\mathbf{x}_M)x_i),fori = 2,3,\dots,(M-1)
andg(\mathbf{x}_M) = \sum\limits_{x_i\in\mathbf{x}_M}(x_i-0.5)^2
Usage
makeDTLZ5Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
Note
This problem definition does not exist in the succeeding work of Deb et al. (K. Deband L. Thiele and M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimizationtest 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.
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ6 Function (family)
Description
Builds and returns the multi-objective DTLZ6 test problem. This problemcan be characterized by a disconnected Pareto-optimal front in the searchspace. This introduces a new challenge to evolutionary multi-objectiveoptimizers, i.e., to maintain different subpopulations within the searchspace to cover the entire Pareto-optimal front.
The DTLZ6 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \cos(\theta_{M-2}\pi/2) \cos(\theta_{M-1}\pi/2),
Minimizef_2(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \cos(\theta_{M-2}\pi/2) \sin(\theta_{M-1}\pi/2),
Minimizef_3(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \cos(\theta_2\pi/2) \cdots \sin(\theta_{M-2}\pi/2),
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = (1+g(\mathbf{x}_M)) \cos(\theta_1\pi/2) \sin(\theta_2\pi/2),
Minimizef_{M}((1+g(\mathbf{x}_M)) \sin(\theta_1\pi/2),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
where\theta_i = \frac{\pi}{4(1+ g(\mathbf{x}_M))} (1+2g(\mathbf{x}_M)x_i),fori = 2,3,\dots,(M-1)
andg(\mathbf{x}_M) = \sum\limits_{x_i\in\mathbf{x}_M}x_i^{0.1}
Usage
makeDTLZ6Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
Note
Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele andM. 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.
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
DTLZ7 Function (family)
Description
Builds and returns the multi-objective DTLZ7 test problem. This problemcan be characterized by a disconnected Pareto-optimal front in the searchspace. This introduces a new challenge to evolutionary multi-objectiveoptimizers, i.e., to maintain different subpopulations within the searchspace to cover the entire Pareto-optimal front.
The DTLZ7 test problem is defined as follows:
Minimizef_1(\mathbf{x}) = x_1,
Minimizef_2(\mathbf{x}) = x_2,
\vdots\\
Minimizef_{M-1}(\mathbf{x}) = x_{M-1},
Minimizef_{M}(\mathbf{x}) = (1+g(\mathbf{x}_M)) h(f_1,f_2,\cdots,f_{M-1}, g),
with0 \leq x_i \leq 1, fori=1,2,\dots,n,
whereg(\mathbf{x}_M) = 1 + \frac{9}{|\mathbf{x}_M|} \sum_{x_i\in\mathbf{x}_M} x_i
andh(f_1,f_2,\cdots,f_{M-1}, g) = M - \sum_{i=1}^{M-1}\left[\frac{f_i}{1+g}(1 + sin(3\pi f_i))\right]
Usage
makeDTLZ7Function(dimensions, n.objectives)Arguments
dimensions | [ |
n.objectives | [ |
Value
[smoof_multi_objective_function]
Note
Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele andM. 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.
References
K. Deb and L. Thiele and M. Laumanns and E. Zitzler. ScalableMulti-Objective Optimization Test Problems. Computer Engineering and NetworksLaboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
Deckkers-Aarts Function
Description
This continuous single-objective test function is defined by the formula
f(\mathbf{x}) = 10^5\mathbf{x}_1^2 + \mathbf{x}_2^2 - (\mathbf{x}_1^2 + \mathbf{x}_2^2)^2 + 10^{-5} (\mathbf{x}_1^2 + \mathbf{x}_2^2)^4
with the bounding box-20 \leq \mathbf{x}_i \leq 20 fori = 1, 2.
Usage
makeDeckkersAartsFunction()Value
[smoof_single_objective_function]
References
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A Numerical Evaluationof Several Stochastic Algorithms on Selected Continuous Global OptimizationTest Problems, Journal of Global Optimization, vol. 31, pp. 635-672, 2005.
Deflected Corrugated Spring function
Description
Scalable single-objective test function based on the formula
f(\mathbf{x}) = 0.1 \sum_{i = 1}^{n} (x_i - \alpha)^2 - \cos\left(K \sqrt{\sum_{i = 1}^{n} (x_i - \alpha)^2}\right)
with\mathbf{x}_i \in [0, 2\alpha], i = 1, \ldots, n and\alpha = K = 5by default.
Usage
makeDeflectedCorrugatedSpringFunction(dimensions, K = 5, alpha = 5)Arguments
dimensions | [ |
K | [ |
alpha | [ |
Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/n-dimensions/238-deflected-corrugated-spring-function.
Dent Function
Description
Builds and returns the bi-objective Dent test problem, which is defined asfollows:
f(\mathbf{x}) = \left(f_1(\mathbf{x}_1), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}_1) = 0.5 \left( \sqrt(1 + (x_1 + x_2)^2) + \sqrt(1 + (x_1 - x_2)^2) + x_1 - x_2\right) + d
and
f_1(\mathbf{x}_1) = 0.5 \left( \sqrt(1 + (x_1 + x_2)^2) + \sqrt(1 + (x_1 - x_2)^2) - x_1 + x_2\right) + d
whered = \lambda * \exp(-(x_1 - x_2)^2) and\mathbf{x}_i \in [-1.5, 1.5], i = 1, 2.
Usage
makeDentFunction()Value
[smoof_multi_objective_function]
Dixon-Price Function
Description
Dixon and Price defined the function
f(\mathbf{x}) = (\mathbf{x}_1 - 1)^2 + \sum_{i = 1}^{n} i (2\mathbf{x}_i^2 - \mathbf{x}_{i - 1})
subject to\mathbf{x}_i \in [-10, 10] fori = 1, \ldots, n.
Usage
makeDixonPriceFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
L. C. W. Dixon, R. C. Price, The Truncated Newton Method forSparse Unconstrained Optimisation Using Automatic Differentiation, Journal ofOptimization Theory and Applications, vol. 60, no. 2, pp. 261-275, 1989.
Double-Sum Function
Description
Also known as the rotated hyper-ellipsoid function. The formula is given by
f(\mathbf{x}) = \sum_{i=1}^n \left( \sum_{j=1}^{i} \mathbf{x}_j \right)^2
with\mathbf{x}_i \in [-65.536, 65.536], i = 1, \ldots, n.
Usage
makeDoubleSumFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
H.-P. Schwefel. Evolution and Optimum Seeking.John Wiley & Sons, New York, 1995.
ED1 Function
Description
Builds and returns the multi-objective ED1 test problem.
The ED1 test problem is defined as follows:
Minimizef_j(\mathbf{x}) = \frac{1}{r(\mathbf{x}) + 1} \cdot \tilde{p}(\Theta (\mathbf{X})), forj = 1, \ldots, m,
with\mathbf{x} = (x_1, \ldots, x_n)^T, where0 \leq x_i \leq 1,and\Theta = (\theta_1, \ldots, \theta_{m-1}),where0 \le \theta_j \le \frac{\pi}{2}, fori = 1, \ldots, n, andj = 1, \ldots, m - 1.
Moreoverr(\mathbf{X}) = \sqrt{x_m^2 + \ldots, x_n^2},
\tilde{p}_1(\Theta) = \cos(\theta_1)^{2/\gamma},
\tilde{p}_j(\Theta) = \left( \sin(\theta_1) \cdot \ldots \cdot \sin(\theta_{j - 1}) \cdot \cos(\theta_j) \right)^{2/\gamma},for2 \le j \le m - 1,
and\tilde{p}_m(\Theta) = \left( \sin(\theta_1) \cdot \ldots \cdot \sin(\theta_{m - 1}) \right)^{2/\gamma}.
Usage
makeED1Function(dimensions, n.objectives, gamma = 2, theta)Arguments
dimensions | [ |
n.objectives | [ |
gamma | [ |
theta | [ |
Value
[smoof_multi_objective_function]
References
M. T. M. Emmerich and A. H. Deutz. Test Problems based on LameSuperspheres. Proceedings of the International Conference on EvolutionaryMulti-Criterion Optimization (EMO 2007), pp. 922-936, Springer, 2007.
ED2 Function
Description
Builds and returns the multi-objective ED2 test problem.
The ED2 test problem is defined as follows:
Minimizef_j(\mathbf{x}) = \frac{1}{F_{natmin}(\mathbf{x}) + 1} \cdot \tilde{p}(\Theta (\mathbf{X})), forj = 1, \ldots, m,
with\mathbf{x} = (x_1, \ldots, x_n)^T, where0 \leq x_i \leq 1,and\Theta = (\theta_1, \ldots, \theta_{m-1}),where0 \le \theta_j \le \frac{\pi}{2}, fori = 1, \ldots, n, andj = 1, \ldots, m - 1.
MoreoverF_{natmin}(\mathbf{x}) = b + (r(\mathbf{x}) - a) + 0.5 + 0.5 \cdot (2 \pi \cdot (r(\mathbf{x}) - a) + \pi)
witha \approx 0.051373,b \approx 0.0253235, andr(\mathbf{X}) = \sqrt{x_m^2 + \ldots, x_n^2}, as well as
\tilde{p}_1(\Theta) = \cos(\theta_1)^{2/\gamma},
\tilde{p}_j(\Theta) = \left( \sin(\theta_1) \cdot \ldots \cdot \sin(\theta_{j - 1}) \cdot \cos(\theta_j) \right)^{2/\gamma},for2 \le j \le m - 1,
and\tilde{p}_m(\Theta) = \left( \sin(\theta_1) \cdot \ldots \cdot \sin(\theta_{m - 1}) \right)^{2/\gamma}.
Usage
makeED2Function(dimensions, n.objectives, gamma = 2, theta)Arguments
dimensions | [ |
n.objectives | [ |
gamma | [ |
theta | [ |
Value
[smoof_multi_objective_function]
References
M. T. M. Emmerich and A. H. Deutz. Test Problems based on LameSuperspheres. Proceedings of the International Conference on EvolutionaryMulti-Criterion Optimization (EMO 2007), pp. 922-936, Springer, 2007.
Easom Function
Description
Unimodal 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 thesearch space:
f(\mathbf{x}) = -\cos(\mathbf{x}_1)\cos(\mathbf{x}_2)\exp\left(-\left((\mathbf{x}_1 - \pi)^2 + (\mathbf{x}_2 - pi)^2\right)\right)
with\mathbf{x}_i \in [-100, 100], i = 1,2.
Usage
makeEasomFunction()Value
[smoof_single_objective_function]
References
Easom, E. E.: A survey of global optimization techniques. M. Eng.thesis, University of Louisville, Louisville, KY, 1990.
Egg Crate Function
Description
This single-objective function follows the definition
f(\mathbf{x}) = \mathbf{x}_1^2 + \mathbf{x}_2^2 + 25(\sin^2(\mathbf{x}_1) + \sin^2(\mathbf{x}_2))
with\mathbf{x}_i \in [-5, 5] fori = 1, 2.
Usage
makeEggCrateFunction()Value
[smoof_single_objective_function]
Egg Holder function
Description
The Egg Holder function is a difficult to optimize function based on thedefinition
f(\mathbf{x}) = \sum_{i = 1}^{n-1} \left[-(\mathbf{x}_{i + 1} + 47)\sin\sqrt{|\mathbf{x}_{i + 1} + 0.5 \mathbf{x}_{i} + 47|} - \mathbf{x}_i\sin(\sqrt{|\mathbf{x}_i - (\mathbf{x}_{i + 1} - 47)|})\right]
subject to-512 \leq \mathbf{x}_i \leq 512 fori = 1, \ldots, n.
Usage
makeEggholderFunction()Value
[smoof_single_objective_function]
El-Attar-Vidyasagar-Dutta Function
Description
This function is based on the formula
f(\mathbf{x}) = (\mathbf{x}_1^2 + \mathbf{x}_2 - 10)^2 + (\mathbf{x}_1 + \mathbf{x}_2^2 - 7)^2 + (\mathbf{x}_1^2 + \mathbf{x}_2^3 - 1)^2
subject to\mathbf{x}_i \in [-500, 500], i = 1, 2.
Usage
makeElAttarVidyasagarDuttaFunction()Value
[smoof_single_objective_function]
References
R. A. El-Attar, M. Vidyasagar, S. R. K. Dutta, An Algorithm forII-norm Minimiza- tion With Application to Nonlinear II-approximation, SIAMJournal on Numverical Analysis, vol. 16, no. 1, pp. 70-86, 1979.
Complex function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = (x_1^4 + x_2^4 + 2 x_1^2 x_2^2 - 4 x_1 + 3
with\mathbf{x}_1, \mathbf{x}_2 \in [-2000, 2000].
Usage
makeEngvallFunction()Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/116-engvall-s-function.
Exponential Function
Description
This scalable test function is based on the definition
f(\mathbf{x}) = -\exp\left(-0.5 \sum_{i = 1}^{n} \mathbf{x}_i^2\right)
with the box-constraints\mathbf{x}_i \in [-1, 1], i = 1, \ldots, n.
Usage
makeExponentialFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, Opposition-BasedDifferential Evolution (ODE) with Variable Jumping Rate, IEEE SympousimFoundations Com- putation Intelligence, Honolulu, HI, pp. 81-88, 2007.
Freudenstein Roth Function
Description
This test function is based on the formula
f(\mathbf{x}) = (\mathbf{x}_1 - 13 + ((5 - \mathbf{x}_2)\mathbf{x}_2 - 2)\mathbf{x}_2)^2 + (\mathbf{x}_1 - 29 + ((\mathbf{x}_2 + 1)\mathbf{x}_2 - 14)\mathbf{x}_2)^2
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeFreudensteinRothFunction()Value
[smoof_single_objective_function]
References
S. S. Rao, Engineering Optimization: Theory and Practice,John Wiley & Sons, 2009.
Generate smoof function by passing a character vector of generatornames.
Description
This function is especially useful in combination withfilterFunctionsByTags to generate a test set of functionswith certain properties, e.~g., multimodality.
Usage
makeFunctionsByName(fun.names, ...)Arguments
fun.names | [ |
... | [any] |
Value
[smoof_function]
See Also
Examples
# generate a testset of multimodal 2D functions## Not run: test.set = makeFunctionsByName(filterFunctionsByTags("multimodal"), dimensions = 2L, m = 5L)## End(Not run)GOMOP function generator.
Description
Construct a multi-objective function by putting together multiple single-objectivesmoof functions.
Usage
makeGOMOPFunction(dimensions = 2L, funs = list())Arguments
dimensions | [ |
funs | [ |
Details
The decision space of the resulting function is restrictedto[0,1]^d. Each parameterx is stretched for each objective function.I.e., iff_1, \ldots, f_n are the single objective smoof functions withbox constraints[l_i, u_i], i = 1, \ldots, n, then
f(x) = \left(f_1(l_1 + x * (u_1 - l_1)), \ldots, f_1(l_1 + x * (u_1 - l_1))\right)
forx \in [0,1]^d where the additions and multiplication are performedcomponent-wise.
Value
[smoof_multi_objective_function]
Generalized Drop-Wave Function
Description
Multimodal single-objective function following the formula:
\mathbf{x} = -\frac{1 + \cos(\sqrt{\sum_{i = 1}^{n} \mathbf{x}_i^2})}{2 + 0.5 \sum_{i = 1}^{n} \mathbf{x}_i^2}
with\mathbf{x}_i \in [-5.12, 5.12], i = 1, \ldots, n.
Usage
makeGeneralizedDropWaveFunction(dimensions = 2L)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
Giunta Function
Description
Multimodal test function based on the definition
f(\mathbf{x}) = 0.6 + \sum_{i = 1}^{n} \left[\sin(\frac{16}{15} \mathbf{x}_i - 1) + \sin^2(\frac{16}{15}\mathbf{x}_i - 1) + \frac{1}{50} \sin(4(\frac{16}{15}\mathbf{x}_i - 1))\right]
with box-constraints\mathbf{x}_i \in [-1, 1] fori = 1, \ldots, n.
Usage
makeGiuntaFunction()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, MunichResearch Papers in Economics.
Goldstein-Price Function
Description
Two-dimensional test function for global optimization. The implementationfollows the formula:
f(\mathbf{x}) = \left(1 + (\mathbf{x}_1 + \mathbf{x}_2 + 1)^2 \cdot (19 - 14\mathbf{x}_1 + 3\mathbf{x}_1^2 - 14\mathbf{x}_2 + 6\mathbf{x}_1\mathbf{x}_2 + 3\mathbf{x}_2^2)\right)\\ \qquad \cdot \left(30 + (2\mathbf{x}_1 - 3\mathbf{x}_2)^2 \cdot (18 - 32\mathbf{x}_1 + 12\mathbf{x}_1^2 + 48\mathbf{x}_2 - 36\mathbf{x}_1\mathbf{x}_2 + 27\mathbf{x}_2^2)\right)
with\mathbf{x}_i \in [-2, 2], i = 1, 2.
Usage
makeGoldsteinPriceFunction()Value
[smoof_single_objective_function]
References
Goldstein, A. A. and Price, I. F.: On descent from local minima.Math. Comput., Vol. 25, No. 115, 1971.
Griewank Function
Description
Highly multimodal function with a lot of regularly distributed local minima.The corresponding formula is:
f(\mathbf{x}) = \sum_{i=1}^{n} \frac{\mathbf{x}_i^2}{4000} - \prod_{i=1}^{n} \cos\left(\frac{\mathbf{x}_i}{\sqrt{i}}\right) + 1
subject to\mathbf{x}_i \in [-100, 100], i = 1, \ldots, n.
Usage
makeGriewankFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
A. O. Griewank, Generalized Descent for Global Optimization,Journal of Optimization Theory and Applications, vol. 34, no. 1,pp. 11-39, 1981.
Hansen Function
Description
Test function with multiple global optima based on the definition
f(\mathbf{x}) = \sum_{i = 1}^{4} (i + 1)\cos(i\mathbf{x}_1 + i - 1) \sum_{j = 1}^{4} (j + 1)\cos((j + 2) \mathbf{x}_2 + j + 1)
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeHansenFunction()Value
[smoof_single_objective_function]
References
C. Fraley, Software Performances on Nonlinear lems, TechnicalReport no. STAN-CS-89-1244, Computer Science, Stanford University, 1989.
Hartmann Function
Description
Unimodal single-objective test function with six local minima.The implementation is based on the mathematical formulation
f(x) = - \sum_{i=1}^4 \alpha_i \ exp \left(-\sum_{j=1}^6 A_{ij}(x_j-P_{ij})^2 \right)
, where
\alpha = (1.0, 1.2, 3.0, 3.2)^T, \\ A = \left( \begin{array}{rrrrrr} 10 & 3 & 17 & 3.50 & 1.7 & 8 \\ 0.05 & 10 & 17 & 0.1 & 8 & 14 \\ 3 & 3.5 & 1.7 & 10 & 17 & 8 \\ 17 & 8 & 0.05 & 10 & 0.1 & 14 \end{array} \right), \\ P = 10^{-4} \cdot \left(\begin{array}{rrrrrr} 1312 & 1696 & 5569 & 124 & 8283 & 5886 \\ 2329 & 4135 & 8307 & 3736 & 1004 & 9991 \\ 2348 & 1451 & 3522 & 2883 & 3047 & 6650 \\ 4047 & 8828 & 8732 & 5743 & 1091 & 381 \end{array} \right)
The function is restricted to six dimensions with\mathbf{x}_i \in [0,1], i = 1, \ldots, 6.The function is not normalized in contrast to some benchmark applications in the literature.
Usage
makeHartmannFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
Picheny, V., Wagner, T., & Ginsbourger, D. (2012). A benchmarkof kriging-based infill criteria for noisy optimization.
Himmelblau Function
Description
Two-dimensional test function based on the function defintion
f(\mathbf{x}) = (\mathbf{x}_1^2 + \mathbf{x}_2 - 11)^2 + (\mathbf{x}_1 + \mathbf{x}_2^2 - 7)^2
with box-constraings\mathbf{x}_i \in [-5, 5], i = 1, 2.
Usage
makeHimmelblauFunction()Value
[smoof_single_objective_function]
References
D. M. Himmelblau, Applied Nonlinear Programming, McGraw-Hill, 1972.
Holder Table function N. 1
Description
This multimodal function is defined as
f(\mathbf{x}) = -\left|\cos(\mathbf{x}_1)\cos(\mathbf{x}_2)\exp(|1 - \sqrt{\mathbf{x}_1 + \mathbf{x}_2}/\pi|)\right|
with box-constraints\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeHolderTableN1Function()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, MunichResearch Papers in Economics.
See Also
Holder Table function N. 2
Description
This multimodal function is defined as
f(\mathbf{x}) = -\left|\sin(\mathbf{x}_1)\cos(\mathbf{x}_2)\exp(|1 - \sqrt{\mathbf{x}_1 + \mathbf{x}_2}/\pi|)\right|
with box-constraints\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeHolderTableN2Function()Value
[smoof_single_objective_function]
References
S. K. Mishra, Global Optimization By Differential Evolution andParticle Swarm Methods: Evaluation On Some Benchmark Functions, MunichResearch Papers in Economics.
See Also
Hosaki Function
Description
Two-dimensional test functionf with
f(\mathbf{x}) = (1 - 8 \mathbf{x}_1 + 7 \mathbf{x}_1^2 - 7/3 \mathbf{x}_1^3 + 1/4 \mathbf{x}_1^4)\mathbf{x}_2^2e^{-\mathbf{x}_2}
subject to0 \leq \mathbf{x}_1 \leq 5 and0 \leq \mathbf{x}_2 \leq 6.
Usage
makeHosakiFunction()Value
[smoof_single_objective_function]
References
G. A. Bekey, M. T. Ung, A Comparative Evaluation of Two GlobalSearch Algorithms, IEEE Transaction on Systems, Man and Cybernetics, vol. 4,no. 1, pp. 112- 116, 1974.
Hyper-Ellipsoid function
Description
Unimodal, convex test function similar to the Sphere function (seemakeSphereFunction).Calculated via the formula:
f(\mathbf{x}) = \sum_{i=1}^{n} i \cdot \mathbf{x}_i.
Usage
makeHyperEllipsoidFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
Inverted Vincent Function
Description
Single-objective test function based on the formula
f(\mathbf{x}) = \frac{1}{n} \sum_{i = 1}^{n} \sin(10 \log(\mathbf{x}_i))
subject to\mathbf{x}_i \in [0.25, 10] fori = 1, \ldots, n.
Usage
makeInvertedVincentFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
Xiadong Li, Andries Engelbrecht, and Michael G. Epitropakis. Benchmarkfunctions for CEC2013 special session and competition on niching methods formultimodal function optimization. Technical report, RMIT University, EvolutionaryComputation and Machine Learning Group, Australia, 2013.
Jennrich-Sampson function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = \sum_{i=1}^{10} \left[2 + 2i - (e^{ix_1} + e^{ix_2})\right]^2
with\mathbf{x}_1, \mathbf{x}_2 \in [-1, 1].
Usage
makeJennrichSampsonFunction()Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/134-jennrich-sampson-s-function.
Judge function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = \sum_{i=1}^{20} \left[(x_1 + B_i x_2 + C_i x_2^2) - A_i\right]^2
with\mathbf{x}_1, \mathbf{x}_2 \in [-10, 10]. For details onA, B, Csee the referenced website.
Usage
makeJudgeFunction()Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/133-judge-s-function.
Keane Function
Description
Two-dimensional test function based on the defintion
f(\mathbf{x}) = \frac{\sin^2(\mathbf{x}_1 - \mathbf{x}_2)\sin^2(\mathbf{x}_1 + \mathbf{x}_2)}{\sqrt{\mathbf{x}_1^2 + \mathbf{x}_2^2}}.
The domain of definition is bounded by the box constraints\mathbf{x}_i \in [0, 10], i = 1, 2.
Usage
makeKeaneFunction()Value
[smoof_single_objective_function]
Kearfott function.
Description
Two-dimensional test function based on the formula
f(\mathbf{x}) = (x_1^2 + x_2^2 - 2)^2 + (x_1^2 - x_2^2 - 1)^2
with\mathbf{x}_1, \mathbf{x}_2 \in [-3, 4].
Usage
makeKearfottFunction()Value
[smoof_single_objective_function]
References
Seehttps://al-roomi.org/benchmarks/unconstrained/2-dimensions/59-kearfott-s-function.
Kursawe Function
Description
Builds and returns the bi-objective Kursawe test problem.
The Kursawe test problem is defined as follows:
Minimizef_1(\mathbf{x}) = \sum\limits_{i = 1}^{n - 1} (-10 \cdot \exp(-0.2 \cdot \sqrt{x_i^2 + x_{i + 1}^2})),
Minimizef_2(\mathbf{x}) = \sum\limits_{i = 1}^{n} ( |x_i|^{0.8} + 5 \cdot \sin^3(x_i)),
with-5 \leq x_i \leq 5, fori = 1, 2, \ldots, n,.
Usage
makeKursaweFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
F. Kursawe. A Variant of Evolution Strategies for VectorOptimization. Proceedings of the International Conference on ParallelProblem Solving from Nature, pp. 193-197, Springer, 1990.
Leon Function
Description
The function is based on the defintion
f(\mathbf{x}) = 100 (\mathbf{x}_2 - \mathbf{x}_1^2)^2 + (1 - \mathbf{x}_1)^2
.Box-constraints:\mathbf{x}_i \in [-1.2, 1.2] fori = 1, 2.
Usage
makeLeonFunction()Value
[smoof_single_objective_function]
References
A. Lavi, T. P. Vogel (eds), Recent Advances in OptimizationTechniques, John Wliley & Sons, 1966.
MMF10 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF10Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF11 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF11Function(np = 2L)Arguments
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF12 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF12Function(np = 2L, q = 4L)Arguments
np | [ |
q | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF13 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF13Function(np = 2L)Arguments
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF14 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF14Function(dimensions, n.objectives, np = 2L)Arguments
dimensions | [ |
n.objectives | [ |
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF14a Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF14aFunction(dimensions, n.objectives, np = 2L)Arguments
dimensions | [ |
n.objectives | [ |
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF15 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF15Function(dimensions, n.objectives, np = 2L)Arguments
dimensions | [ |
n.objectives | [ |
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF15a Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF15aFunction(dimensions, n.objectives, np = 2L)Arguments
dimensions | [ |
n.objectives | [ |
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF1 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF1Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF1e Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF1eFunction(a = exp(1L))Arguments
a | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF1z Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF1zFunction(k = 3)Arguments
k | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF2 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF2Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF3 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF3Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF4 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF4Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF5 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF5Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF6 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF6Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF7 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF7Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF8 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF8Function()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF9 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeMMF9Function(np = 2L)Arguments
np | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MOP1 function generator.
Description
MOP1 function from Van Valedhuizen's test suite.
Usage
makeMOP1Function()Value
[smoof_multi_objective_function]
References
J. D. Schaffer, "Multiple objective optimization with vector evaluatedgenetic algorithms," in Proc. 1st Int. Conf. Genetic Algorithms and TheirApplications, J. J. Grenfenstett, Ed., 1985, pp. 93-100.
MOP2 function generator.
Description
MOP2 function from Van Valedhuizen's test suite due to Fonseca and Fleming.
Usage
makeMOP2Function(dimensions = 2L)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
C. M. Fonseca and P. J. Fleming, "Multiobjective genetic algorithmsmade easy: Selection, sharing and mating restriction," Genetic Algorithmsin Engineering Systems: Innovations and Applications, pp. 45-52, Sep. 1995. IEE.
MOP3 function generator.
Description
MOP3 function from Van Valedhuizen's test suite.
Usage
makeMOP3Function(dimensions = 2L)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
C. Poloni, G. Mosetti, and S. Contessi, "Multi objective optimization byGAs: Application to system and component design," in Proc. Comput.Methods in Applied Sciences'96: Invited Lectures and Special TechnologicalSessions of the 3rd ECCOMAS Comput. Fluid Dynamics Conf.and the 2nd ECCOMAS Conf. Numerical Methods in Engineering, Sep.1996, pp. 258-264
MOP4 function generator.
Description
MOP4 function from Van Valedhuizen's test suite based on Kursawe.
Usage
makeMOP4Function()Value
[smoof_multi_objective_function]
References
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. ParallelProblem Solving From Nature. 1st Workshop, PPSN I, pp. 193-197.
MOP5 function generator.
Description
MOP5 function from Van Valedhuizen's test suite.
Usage
makeMOP5Function()Value
[smoof_multi_objective_function]
Note
Original box constraints where[-3, 3].
References
R. Viennet, C. Fonteix, and I. Marc, "Multicriteria optimization using agenetic algorithm for determining a Pareto set," Int. J. Syst. Sci., vol. 27,no. 2, pp. 255-260, 1996
MOP6 function generator.
Description
MOP6 function from Van Valedhuizen's test suite.
Usage
makeMOP6Function()Value
[smoof_multi_objective_function]
MOP7 function generator.
Description
MOP7 function from Van Valedhuizen's test suite.
Usage
makeMOP7Function()Value
[smoof_multi_objective_function]
References
R. Viennet, C. Fonteix, and I. Marc, "Multicriteria optimization using agenetic 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.
Description
Generator for function with multiple peaks following the multiple peaks model 2.
Usage
makeMPM2Function( n.peaks, dimensions, topology, seed, rotated = TRUE, peak.shape = "ellipse")Arguments
n.peaks | [ |
dimensions | [ |
topology | [ |
seed | [ |
rotated | [ |
peak.shape | [ |
Value
[smoof_single_objective_function]
Author(s)
R interface by Jakob Bossek. Original python code provided by the Simon Wessing.
References
See the technical report of multiple peaks model 2 for an in-depthdescription of the underlying algorithm.
Examples
## 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)Matyas Function
Description
Two-dimensional, unimodal test function
f(\mathbf{x}) = 0.26 (\mathbf{x}_1^2 + \mathbf{x}_2^2) - 0.48\mathbf{x}_1\mathbf{x}_2
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeMatyasFunction()Value
[smoof_single_objective_function]
References
A.-R. Hedar, Global Optimization Test Problems.
McCormick Function
Description
Two-dimensional, multimodal test function. The defintion is given by
f(\mathbf{x}) = \sin(\mathbf{x}_1 + \mathbf{x}_2) + (\mathbf{x}_1 - \mathbf{x}_2)^2 - 1.5 \mathbf{x}_1 + 2.5 \mathbf{x}_2 + 1
subject to\mathbf{x}_1 \in [-1.5, 4], \mathbf{x}_2 \in [-3, 3].
Usage
makeMcCormickFunction()Value
[smoof_single_objective_function]
References
F. A. Lootsma (ed.), Numerical Methods for Non-LinearOptimization, Academic Press, 1972.
Michalewicz Function
Description
Highly multimodal single-objective test function withn! local minimawith the formula:
f(\mathbf{x}) = -\sum_{i=1}^{n} \sin(\mathbf{x}_i) \cdot \left(\sin\left(\frac{i \cdot \mathbf{x}_i}{\pi}\right)\right)^{2m}.
The recommended valuem = 10, which is used as a default in theimplementation.
Usage
makeMichalewiczFunction(dimensions, m = 10)Arguments
dimensions | [ |
m | [ |
Value
[smoof_single_objective_function]
Note
The location of the global optimum s varying based on boththe dimension andm parameter and is thus not provided in theimplementation.
References
Michalewicz, Z.: Genetic Algorithms + Data Structures = EvolutionPrograms. Berlin, Heidelberg, New York: Springer-Verlag, 1992.
Rastrigin Function
Description
A modified version of the Rastrigin function following the formula:
f(\mathbf{x}) = \sum_{i=1}^{n} 10\left(1 + \cos(2\pi k_i \mathbf{x}_i)\right) + 2 k_i \mathbf{x}_i^2.
The box-constraints are given by\mathbf{x}_i \in [0, 1] fori = 1, \ldots, n andk is a numerical vector. Deb et al. (see references)use, e.g.,k = (2, 2, 3, 4) forn = 4. See the reference for details.
Usage
makeModifiedRastriginFunction(dimensions, k = rep(1, dimensions))Arguments
dimensions | [ |
k | [numeric] |
Value
[smoof_single_objective_function]
References
Kalyanmoy Deb and Amit Saha. Multimodal optimization using a bi-objective evolutionary algorithm. Evolutionary Computation, 20(1):27-62, 2012.
Generator for multi-objective target functions.
Description
Generator for multi-objective target functions.
Usage
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)Arguments
name | [ |
id | [ |
description | [ |
fn | [ |
has.simple.signature | [ |
par.set | [ |
n.objectives | [ |
noisy | [ |
fn.mean | [ |
minimize | [ |
vectorized | [ |
constraint.fn | [ |
ref.point | [ |
Value
[function] Target function with additional stuff attached as attributes.
Examples
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)MMF13 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeOmniTestFunction()Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Periodic Function
Description
Single-objective two-dimensional test function. The formula is given as
f(\mathbf{x}) = 1 + \sin^2(\mathbf{x}_1) + \sin^2(\mathbf{x}_2) - 0.1e^{-(\mathbf{x}_1^2 + \mathbf{x}_2^2)}
subject to the constraints\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makePeriodicFunction()Value
[smoof_single_objective_function]
References
M. M. Ali, C. Khompatraporn, Z. B. Zabinsky, A NumericalEvaluation of Several Stochastic Algorithms on Selected Continuous GlobalOptimization Test Problems, Journal of Global Optimization, vol. 31, pp.635-672, 2005.
Powell-Sum Function
Description
The formula that underlies the implementation is given by
f(\mathbf{x}) = \sum_{i=1}^n |\mathbf{x}_i|^{i+1}
with\mathbf{x}_i \in [-1, 1], i = 1, \ldots, n.
Usage
makePowellSumFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
S. Rahnamyan, H. R. Tizhoosh, N. M. M. Salama, A Novel PopulationInitialization Method for Accelerating Evolutionary Algorithms, Computers andMathematics with Applications, vol. 53, no. 10, pp. 1605-1614, 2007.
Price Function N. 1
Description
Second function by Price. The implementation is based on the defintion
f(\mathbf{x}) = (|\mathbf{x}_1| - 5)^2 + (|\mathbf{x}_2 - 5)^2
subject to\mathbf{x}_i \in [-500, 500], i = 1, 2.
Usage
makePriceN1Function()Value
[smoof_single_objective_function]
References
W. L. Price, A Controlled Random Search Procedure for GlobalOptimisation, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
See Also
makePriceN2Function,makePriceN4Function
Price Function N. 2
Description
Second function by Price. The implementation is based on the defintion
f(\mathbf{x}) = 1 + \sin^2(\mathbf{x}_1) + \sin^2(\mathbf{x}_2) - 0.1 \exp(-\mathbf{x}^2 - \mathbf{x}_2^2)
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makePriceN2Function()Value
[smoof_single_objective_function]
References
W. L. Price, A Controlled Random Search Procedure for GlobalOptimisation, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
See Also
makePriceN1Function,makePriceN4Function
Price Function N. 4
Description
Fourth function by Price. The implementation is based on the defintion
f(\mathbf{x}) = (2\mathbf{x}_1^3 \mathbf{x}_2 - \mathbf{x}_2^3)^2 + (6\mathbf{x}_1 - \mathbf{x}_2^2 + \mathbf{x}_2)^2
subject to\mathbf{x}_i \in [-500, 500].
Usage
makePriceN4Function()Value
[smoof_single_objective_function]
References
W. L. Price, A Controlled Random Search Procedure for GlobalOptimisation, Computer journal, vol. 20, no. 4, pp. 367-370, 1977.
See Also
makePriceN1Function,makePriceN2Function
Rastrigin Function
Description
One of the most popular single-objective test functions consists of manylocal optima and is thus highly multimodal with a global structure.The implementation follows the formula
f(\mathbf{x}) = 10n + \sum_{i=1}^{n} \left(\mathbf{x}_i^2 - 10 \cos(2\pi \mathbf{x}_i)\right).
The box-constraints are given by\mathbf{x}_i \in [-5.12, 5.12] fori = 1, \ldots, n.
Usage
makeRastriginFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
L. A. Rastrigin. Extremal control systems. Theoretical Foundationsof Engineering Cybernetics Series. Nauka, Moscow, 1974.
Rosenbrock Function
Description
Also known as the “De Jong's function 2” or the “(Rosenbrock)banana/valley function” due to its shape. The global optimum is located withina large flat valley and thus it is hard for optimization algorithms to find it.The following formula underlies the implementation:
f(\mathbf{x}) = \sum_{i=1}^{n-1} 100 \cdot (\mathbf{x}_{i+1} - \mathbf{x}_i^2)^2 + (1 - \mathbf{x}_i)^2.
The domain is given by the constraints\mathbf{x}_i \in [-30, 30], i = 1, \ldots, n.
Usage
makeRosenbrockFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
H. H. Rosenbrock, An Automatic Method for Finding the Greatest orleast Value of a Function, Computer Journal, vol. 3, no. 3, pp. 175-184, 1960.
MMF13 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeSYMPARTrotatedFunction(w = pi/4, a = 1, b = 10, c = 8)Arguments
w | [ |
a | [ |
b | [ |
c | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
MMF13 Function
Description
Test problem from the set of "multimodal multiobjective functions" as forinstance used in the CEC2019 competition.
Usage
makeSYMPARTsimpleFunction(a = 1, b = 10, c = 8)Arguments
a | [ |
b | [ |
c | [ |
Value
[smoof_multi_objective_function]
References
Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novelscalable test problem suite for multimodal multiobjective optimization," inSwarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
Modified Schaffer Function N. 2
Description
Second function by Schaffer. The defintion is given by the formula
f(\mathbf{x}) = 0.5 + \frac{\sin^2(\mathbf{x}_1^2 - \mathbf{x}_2^2) - 0.5}{(1 + 0.001(\mathbf{x}_1^2 + \mathbf{x}_2^2))^2}
subject to\mathbf{x}_i \in [-100, 100], i = 1, 2.
Usage
makeSchafferN2Function()Value
[smoof_single_objective_function]
References
S. K. Mishra, Some New Test Functions For Global OptimizationAnd Performance of Repulsive Particle Swarm Method.
Schaffer Function N. 4
Description
Second function by Schaffer. The defintion is given by the formula
f(\mathbf{x}) = 0.5 + \frac{\cos^2(sin(|\mathbf{x}_1^2 - \mathbf{x}_2^2|)) - 0.5}{(1 + 0.001(\mathbf{x}_1^2 + \mathbf{x}_2^2))^2}
subject to\mathbf{x}_i \in [-100, 100], i = 1, 2.
Usage
makeSchafferN4Function()Value
[smoof_single_objective_function]
References
S. K. Mishra, Some New Test Functions For Global OptimizationAnd Performance of Repulsive Particle Swarm Method.
Schwefel function
Description
Highly multimodal test function. The cursial thing about this function is, thatthe global optimum is far away from the next best local optimum.The function is computed via:
f(\mathbf{x}) = \sum_{i=1}^{n} -\mathbf{x}_i \sin\left(\sqrt(|\mathbf{x}_i|)\right)
with\mathbf{x}_i \in [-500, 500], i = 1, \ldots, n.
Usage
makeSchwefelFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
Schwefel, H.-P.: Numerical optimization of computer models.Chichester: Wiley & Sons, 1981.
Shekel functions
Description
Single-objective test function based on the formula
f(\mathbf{x}) = -\sum_{i=1}^{m} \left(\sum_{j=1}^{4} (x_j - C_{ji})^2 + \beta_{i}\right)^{-1}
.Here,m \in \{5, 7, 10\} defines the number of local optima,C is a4 x 10 matrixand\beta = \frac{1}{10}(1, 1, 2, 2, 4, 4, 6, 3, 7, 5, 5) is a vector. Seehttps://www.sfu.ca/~ssurjano/shekel.htmlfor a defintion ofC.
Usage
makeShekelFunction(m)Arguments
m | [ |
Value
[smoof_single_objective_function]
Shubert Function
Description
The defintion of this two-dimensional function is given by
f(\mathbf{x}) = \prod_{i = 1}^{2} \left(\sum_{j = 1}^{5} \cos((j + 1)\mathbf{x}_i + j\right)
subject to\mathbf{x}_i \in [-10, 10], i = 1, 2.
Usage
makeShubertFunction()Value
[smoof_single_objective_function]
References
J. P. Hennart (ed.), Numerical Analysis, Proc. 3rd AS Workshop,Lecture Notes in Mathematics, vol. 90, Springer, 1982.
Generator for single-objective target functions.
Description
Generator for single-objective target functions.
Usage
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)Arguments
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 | [ |
Value
[function] Objective function with additional stuff attached as attributes.
Examples
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))Three-Hump Camel Function
Description
Two dimensional single-objective test function with six local minima oh whichtwo are global. The surface is similar to the back of a camel. That is why itis called Camel function. The implementation is based on the formula:
f(\mathbf{x}) = \left(4 - 2.1\mathbf{x}_1^2 + \mathbf{x}_1^{0.75}\right)\mathbf{x}_1^2 + \mathbf{x}_1 \mathbf{x}_2 + \left(-4 + 4\mathbf{x}_2^2\right)\mathbf{x}_2^2
with box constraints\mathbf{x}_1 \in [-3, 3] and\mathbf{x}_2 \in [-2, 2].
Usage
makeSixHumpCamelFunction()Value
[smoof_single_objective_function]
References
Dixon, L. C. W. and Szego, G. P.: The optimization problem: An introduction.In: Towards Global Optimization II, New York: North Holland, 1978.
Sphere Function
Description
Also known as the the “De Jong function 1”. Convex, continous functioncalculated via the formula
f(\mathbf{x}) = \sum_{i=1}^{n} \mathbf{x}_i^2
with box-constraings\mathbf{x}_i \in [-5.12, 5.12], i = 1, \ldots, n.
Usage
makeSphereFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
References
M. A. Schumer, K. Steiglitz, Adaptive Step Size Random Search,IEEE Transactions on Automatic Control. vol. 13, no. 3, pp. 270-276, 1968.
Styblinkski-Tang function
Description
This function is based on the defintion
f(\mathbf{x}) = \frac{1}{2} \sum_{i = 1}^{2} (\mathbf{x}_i^4 - 16 \mathbf{x}_i^2 + 5\mathbf{x}_i)
with box-constraints given by\mathbf{x}_i \in [-5, 5], i = 1, 2.
Usage
makeStyblinkskiTangFunction()Value
[smoof_single_objective_function]
References
Z. K. Silagadze, Finding Two-Dimesnional Peaks, Physics ofParticles and Nuclei Letters, vol. 4, no. 1, pp. 73-80, 2007.
Sum of Different Squares Function
Description
Simple unimodal test function similar to the Sphere and Hyper-Ellipsoidal functions.Formula:
f(\mathbf{x}) = \sum_{i=1}^{n} |\mathbf{x}_i|^{i+1}.
Usage
makeSumOfDifferentSquaresFunction(dimensions)Arguments
dimensions | [ |
Value
[smoof_single_objective_function]
Swiler2014 function.
Description
Mixed parameter space with one discrete parameterx_1 \in \{1, 2, 3, 4, 5\}and two numerical parametersx_1, x_2 \in [0, 1]. The function is definedas follows:
f(\mathbf{x}) = \\\sin(2\pi x_3 - \pi) + 7 \sin^2(2 \pi x_2 - \pi) \, if \, x_1 = 1 \\\sin(2\pi x_3 - \pi) + 7 \sin^2(2 \pi x_2 - \pi) + 12 \sin(2 \pi x_3 - \pi) \, if \, x_1 = 2 \\\sin(2\pi x_3 - \pi) + 7 \sin^2(2 \pi x_2 - \pi) + 0.5 \sin(2 \pi x_3 - \pi) \, if \, x_1 = 3 \\\sin(2\pi x_3 - \pi) + 7 \sin^2(2 \pi x_2 - \pi) + 8.0 \sin(2 \pi x_3 - \pi) \, if \, x_1 = 4 \\\sin(2\pi x_3 - \pi) + 7 \sin^2(2 \pi x_2 - \pi) + 3.5 \sin(2 \pi x_3 - \pi) \, if \, x_1 = 5.
Usage
makeSwiler2014Function()Value
[smoof_single_objective_function]
Three-Hump Camel Function
Description
This two-dimensional function is based on the defintion
f(\mathbf{x}) = 2 \mathbf{x}_1^2 - 1.05 \mathbf{x}_1^4 + \frac{\mathbf{x}_1^6}{6} + \mathbf{x}_1\mathbf{x}_2 + \mathbf{x}_2^2
subject to-5 \leq \mathbf{x}_i \leq 5.
Usage
makeThreeHumpCamelFunction()Value
[smoof_single_objective_function]
References
F. H. Branin Jr., Widely Convergent Method of Finding MultipleSolutions of Simul- taneous Nonlinear Equations, IBM Journal of Researchand Development, vol. 16, no. 5, pp. 504-522, 1972.
Trecanni Function
Description
The Trecanni function belongs to the unimodal test functions. It is basedon the formula
f(\mathbf(x)) = \mathbf(x)_1^4 - 4 \mathbf(x)_1^3 + 4 \mathbf(x)_1 + \mathbf(x)_2^2.
The box-constraints\mathbf{x}_i \in [-5, 5], i = 1, 2 define thedomain of defintion.
Usage
makeTrecanniFunction()Value
[smoof_single_objective_function]
References
L. C. W. Dixon, G. P. Szego (eds.), Towards Global Optimization 2,Elsevier, 1978.
Generator for the functions UF1, ..., UF10 of the CEC 2009.
Description
Generator for the functions UF1, ..., UF10 of the CEC 2009.
Usage
makeUFFunction(dimensions, id)Arguments
dimensions | [ |
id | [ |
Value
[smoof_single_objective_function]
Note
The implementation is based on the original CPP implemenation by QingfuZhang, Aimin Zhou, Shizheng Zhaoy, Ponnuthurai Nagaratnam Suganthany, Wudong Liuand Santosh Tiwar.
Author(s)
Jakob Bossekj.bossek@gmail.com
Viennet function generator
Description
The Viennet test problem VNT is designed for three objectives only. It hasa discrete set of Pareto fronts. It is defined by the following formulae.
f(\mathbf{x}) = \left(f_1(\mathbf{x}), f_2(\mathbf{x}, f_3(\mathbf{x}\right)
with
f_1(\mathbf{x}) = 0.5(\mathbf{x}_1^2 + \mathbf{x}_2^2) + \sin(\mathbf{x}_1^2 + \mathbf{x}_2^2)
f_2(\mathbf{x}) = \frac{(3\mathbf{x}_1 + 2\mathbf{x}_2 + 4)^2}{8} + \frac{(\mathbf{x}_1 - \mathbf{x}_2 + 1)^2}{27} + 15
f_3(\mathbf{x}) = \frac{1}{\mathbf{x}_1^2 + \mathbf{x}_2^2 + 1} - 1.1\exp(-(\mathbf{x}_1^1 + \mathbf{x}_2^2))
with box constraints-3 \leq \mathbf{x}_1, \mathbf{x}_2 \leq 3.
Usage
makeViennetFunction()Value
[smoof_multi_objective_function]
References
Viennet, R. (1996). Multicriteria optimization using a genetic algorithm for determining thePareto set. International Journal of Systems Science 27 (2), 255-260.
WFG1 Function
Description
First test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG1Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG2 Function
Description
Second test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG2Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG3 Function
Description
Third test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG3Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG4 Function
Description
Fourth test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG4Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG5 Function
Description
Fifth test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG5Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG6 Function
Description
Sixth test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG6Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG7 Function
Description
Seventh test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG7Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG8 Function
Description
Eighth test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG8Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
WFG9 Function
Description
Ninth test problem from the "Walking Fish Group" problem generator toolkit.
Usage
makeWFG9Function(n.objectives, k, l)Arguments
n.objectives | [ |
k | [ |
l | [ |
Details
Huband et al. recommend a value ofk = 4L position-relatedparameters for bi-objective problems andk = 2L * (n.objectives - 1L)for many-objective problems. Furthermore the authors recommend a value ofl = 20 distance-related parameters. Therefore, ifk and/orl are not explicitly defined by the user, their values will be setto the recommended values per default.
Value
[smoof_multi_objective_function]
References
S. Huband, P. Hingston, L. Barone, and L. While, "A Review of Multi-objectiveTest Problems and a Scalable Test Problem Toolkit," in IEEE Transactions onEvolutionary Computation, Volume 10, No 5, October 2006, pp. 477-506. IEEE.
ZDT1 Function
Description
Builds and returns the two-objective ZDT1 test problem. Form objective itis defined as follows:
f(\mathbf{x}) = \left(f_1(\mathbf{x}_1), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}_1) = \mathbf{x}_1, f_2(\mathbf{x}) = g(\mathbf{x}) h(f_1(\mathbf{x}_1), g(\mathbf{x}))
where
g(\mathbf{x}) = 1 + \frac{9}{m - 1} \sum_{i = 2}^m \mathbf{x}_i, h(f_1, g) = 1 - \sqrt{\frac{f_1}{g}}
and\mathbf{x}_i \in [0,1], i = 1, \ldots, m
Usage
makeZDT1Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
E. Zitzler, K. Deb, and L. Thiele. Comparison of MultiobjectiveEvolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
ZDT2 Function
Description
Builds and returns the two-objective ZDT2 test problem. The function isnonconvex and resembles the ZDT1 function. Form objective itis defined as follows
f(\mathbf{x}) = \left(f_1(\mathbf{x}_1), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}_1) = \mathbf{x}_1, f_2(\mathbf{x}) = g(\mathbf{x}) h(f_1(\mathbf{x}_1), g(\mathbf{x}))
where
g(\mathbf{x}) = 1 + \frac{9}{m - 1} \sum_{i = 2}^m \mathbf{x}_i, h(f_1, g) = 1 - \left(\frac{f_1}{g}\right)^2
and\mathbf{x}_i \in [0,1], i = 1, \ldots, m
Usage
makeZDT2Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
E. Zitzler, K. Deb, and L. Thiele. Comparison of MultiobjectiveEvolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
ZDT3 Function
Description
Builds and returns the two-objective ZDT3 test problem. Form objective itis defined as follows
f(\mathbf{x}) = \left(f_1(\mathbf{x}_1), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}_1) = \mathbf{x}_1, f_2(\mathbf{x}) = g(\mathbf{x}) h(f_1(\mathbf{x}_1), g(\mathbf{x}))
where
g(\mathbf{x}) = 1 + \frac{9}{m - 1} \sum_{i = 2}^m \mathbf{x}_i, h(f_1, g) = 1 - \sqrt{\frac{f_1(\mathbf{x})}{g(\mathbf{x})}} - \left(\frac{f_1(\mathbf{x})}{g(\mathbf{x})}\right)\sin(10\pi f_1(\mathbf{x}))
and\mathbf{x}_i \in [0,1], i = 1, \ldots, m.This function has some discontinuities in the Pareto-optimal front introducedby the sine term in theh function (see above). The front consists ofmultiple convex parts.
Usage
makeZDT3Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
E. Zitzler, K. Deb, and L. Thiele. Comparison of MultiobjectiveEvolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
ZDT4 Function
Description
Builds and returns the two-objective ZDT4 test problem. Form objective itis defined as follows
f(\mathbf{x}) = \left(f_1(\mathbf{x}_1), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}_1) = \mathbf{x}_1, f_2(\mathbf{x}) = g(\mathbf{x}) h(f_1(\mathbf{x}_1), g(\mathbf{x}))
where
g(\mathbf{x}) = 1 + 10 (m - 1) + \sum_{i = 2}^{m} (\mathbf{x}_i^2 - 10\cos(4\pi\mathbf{x}_i)), h(f_1, g) = 1 - \sqrt{\frac{f_1(\mathbf{x})}{g(\mathbf{x})}}
and\mathbf{x}_i \in [0,1], i = 1, \ldots, m.This function has many Pareto-optimal fronts and is thus suited to test thealgorithms ability to tackle multimodal problems.
Usage
makeZDT4Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
E. Zitzler, K. Deb, and L. Thiele. Comparison of MultiobjectiveEvolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
ZDT6 Function
Description
Builds and returns the two-objective ZDT6 test problem. Form objective itis defined as follows
f(\mathbf{x}) = \left(f_1(\mathbf{x}), f_2(\mathbf{x})\right)
with
f_1(\mathbf{x}) = 1 - \exp(-4\mathbf{x}_1)\sin^6(6\pi\mathbf{x}_1), f_2(\mathbf{x}) = g(\mathbf{x}) h(f_1(\mathbf{x}_1), g(\mathbf{x}))
where
g(\mathbf{x}) = 1 + 9 \left(\frac{\sum_{i = 2}^{m}\mathbf{x}_i}{m - 1}\right)^{0.25}, h(f_1, g) = 1 - \left(\frac{f_1(\mathbf{x})}{g(\mathbf{x})}\right)^2
and\mathbf{x}_i \in [0,1], i = 1, \ldots, m.This function introduced two difficulities (see reference):1. the density of solutions decreases with the closeness to the Pareto-optimal front and2. the Pareto-optimal solutions are nonuniformly distributed along the front.
Usage
makeZDT6Function(dimensions)Arguments
dimensions | [ |
Value
[smoof_multi_objective_function]
References
E. Zitzler, K. Deb, and L. Thiele. Comparison of MultiobjectiveEvolutionary Algorithms: Empirical Results. Evolutionary Computation, 8(2):173-195, 2000
Zettl Function
Description
The unimodal Zettl Function is based on the defintion
f(\mathbf{x}) = (\mathbf{x}_1^2 + \mathbf{x}_2^2 - 2\mathbf{x}_1)^2 + 0.25 \mathbf{x}_1
with box-constraints\mathbf{x}_i \in [-5, 10], i = 1, 2.
Usage
makeZettlFunction()Value
[smoof_single_objective_function]
References
H. P. Schwefel, Evolution and Optimum Seeking, John Wiley Sons, 1995.
Helper function to create numeric multi-objective optimization test function.
Description
This is a simplifying wrapper aroundmakeMultiObjectiveFunction.It can be used if the function to generate is purely numeric to save some linesof code.
Usage
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)Arguments
name | [ |
id | [ |
par.len | [ |
par.id | [ |
par.lower | [ |
par.upper | [ |
n.objectives | [ |
description | [ |
fn | [ |
vectorized | [ |
noisy | [ |
fn.mean | [ |
minimize | [ |
constraint.fn | [ |
ref.point | [ |
Examples
# first we generate the 10d sphere function the long wayfn = 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 wayfn = 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)Generate ggplot2 object.
Description
Generate ggplot2 object.
Usage
## S3 method for class 'smoof_function'plot(x, ...)Arguments
x | [ |
... | [any] |
Value
Nothing
Plot an one-dimensional function.
Description
Plot an one-dimensional function.
Usage
plot1DNumeric( x, show.optimum = FALSE, main = getName(x), n.samples = 500L, ...)Arguments
x | [ |
show.optimum | [ |
main | [ |
n.samples | [ |
... | [any] |
Value
Nothing
Plot a two-dimensional numeric function.
Description
Either a contour-plot or a level-plot.
Usage
plot2DNumeric( x, show.optimum = FALSE, main = getName(x), render.levels = FALSE, render.contours = TRUE, n.samples = 100L, ...)Arguments
x | [ |
show.optimum | [ |
main | [ |
render.levels | [ |
render.contours | [ |
n.samples | [ |
... | [any] |
Value
Nothing
Surface plot of two-dimensional test function.
Description
Surface plot of two-dimensional test function.
Usage
plot3D(x, length.out = 100L, package = "plot3D", ...)Arguments
x | [ |
length.out | [ |
package | [ |
... | [any] |
Examples
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 plotplot3D(fn, package = "plotly")## End(Not run)Reset evaluation counter.
Description
Reset evaluation counter.
Usage
resetEvaluationCounter(fn)Arguments
fn | [ |
Check if function should be minimized.
Description
Functions can have an associated global optimum. In this caseone needs to know whether the optimum is a minimum or a maximum.
Usage
shouldBeMinimized(fn)Arguments
fn | [ |
Value
[logical] Each component indicates whether the correspondingobjective should be minimized.
Smoof function
Description
Regular R function with additional classessmoof_function and one ofsmoof_single_objective_functionor codesmoof_multi_objective_function. Both single- and multi-objective functions share the following attributes.
- name [
character(1)] Optional function name.
- id [
character(1)] Short identifier.
- description [
character(1)] Optional function description.
- has.simple.signature
TRUEif the target function expects a vector as input andFALSEif it expects a named list of values.- par.set [
ParamSet] Parameter set describing different ascpects of the target function parameters, i. e.,names, lower and/or upper bounds, types and so on.
- n.objectives [
integer(1)] Number of objectives.
- noisy [
logical(1)] Boolean indicating whether the function is noisy or not.
- fn.mean [
function] Optional true mean function in case of a noisy objective function.
- minimize [
logical(1)] Logical vector of length
n.objectivesindicating which objectives shallbe minimzed/maximized.- vectorized [
logical(1)] Can the handle “vector” input, i. e., does it accept matrix ofparameters?
- constraint.fn [
function] Optional function which returns a logical vector with each component indicatingwhether the corresponding constraint is violated.
Futhermore, single-objective function may contain additional parameters with information onlocal and/or global optima as well as characterizing tags.
- tags [
character] Optional character vector of tags or keywords.
- global.opt.params [
data.frame] Data frame of parameter values of global optima.
- global.opt.value [
numeric(1)] Function value of global optima.
- local.opt.params [
data.frame] Data frame of parameter values of local optima.
- global.opt.value [
numeric] Function values of local optima.
Currenlty tagging is not possible for multi-objective functions. The only additional attribute may bea reference point:
- ref.point [
numeric] Optional reference point of length
n.objectives
.
Helper function to create numeric single-objective optimization test function.
Description
This is a simplifying wrapper aroundmakeSingleObjectiveFunction.It can be used if the function to generte is purely numeric to save some linesof code.
Usage
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)Arguments
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 | [ |
Examples
# first we generate the 10d sphere function the long wayfn = 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 wayfn = 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.
Description
Checks whether constraints are violated.
Usage
violatesConstraints(fn, values)Arguments
fn | [ |
values | [ |
Value
[logical(1)]
Pareto-optimal front visualization.
Description
Quickly visualize the Pareto-optimal front of a bi-criteria objectivefunction by calling the EMOAnsga2 and extracting theapproximated Pareto-optimal front.
Usage
visualizeParetoOptimalFront(fn, ...)Arguments
fn | [ |
... | [any] |
Value
[ggplot]
Examples
# Here we visualize the Pareto-optimal front of the bi-objective ZDT3 functionfn = makeZDT3Function(dimensions = 3L)vis = visualizeParetoOptimalFront(fn)# Alternatively we can pass some more algorithm parameters to the NSGA2 algorithmvis = visualizeParetoOptimalFront(fn, popsize = 1000L)