In applied mathematics, test functions, known as artificial landscapes, are useful to evaluate characteristics of optimization algorithms, such as:
Here some test functions are presented with the aim of giving an idea about the different situations that optimization algorithms have to face when coping with these kinds of problems. In the first part, some objective functions for single-objective optimization cases are presented. In the second part, test functions with their respective Pareto fronts for multi-objective optimization problems (MOP) are given.
The artificial landscapes presented herein for single-objective optimization problems are taken from Bäck,[1] Haupt et al.[2] and from Rody Oldenhuis software.[3] Given the number of problems (55 in total), just a few are presented here.
The test functions used to evaluate the algorithms for MOP were taken from Deb,[4] Binh et al.[5] and Binh.[6] The software developed by Deb can be downloaded,[7] which implements the NSGA-II procedure with GAs, or the program posted on Internet,[8] which implements the NSGA-II procedure with ES.
Just a general form of the equation, a plot of the objective function, boundaries of the object variables and the coordinates of global minima are given herein.
Name | Plot | Formula | Global minimum | Search domain | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rastrigin function | f(x)=An+
-A\cos(2\pixi)\right] where:A=10 | f(0,...,0)=0 | -5.12\lexi\le5.12 | ||||||||||||||||||||||||||
Ackley function | f(x,y)=-20\exp\left[-0.2\sqrt{0.5\left(x2+y2\right)}\right] -\exp\left[0.5\left(\cos2\pix+\cos2\piy\right)\right]+e+20 | f(0,0)=0 | -5\lex,y\le5 | ||||||||||||||||||||||||||
Sphere function | f(\boldsymbol{x})=
| f(x1,...,xn)=f(0,...,0)=0 | -infty\lexi\leinfty 1\lei\len | ||||||||||||||||||||||||||
f(\boldsymbol{x})=
\left[100\left(xi+1-
\right)2+\left(1-xi\right)2\right] | Min= \begin{cases} n=2& → f(1,1)=0,\\ n=3& → f(1,1,1)=0,\\ n>3& → f(\underbrace{1,...,1}n)=0\\ \end{cases} | -infty\lexi\leinfty 1\lei\len | |||||||||||||||||||||||||||
Beale function | f(x,y)=\left(1.5-x+xy\right)2+\left(2.25-x+xy2\right)2 +\left(2.625-x+xy3\right)2 | f(3,0.5)=0 | -4.5\lex,y\le4.5 | ||||||||||||||||||||||||||
Goldstein–Price function | f(x,y)=\left[1+\left(x+y+1\right)2\left(19-14x+3x2-14y+6xy+3y2\right)\right] \left[30+\left(2x-3y\right)2\left(18-32x+12x2+48y-36xy+27y2\right)\right] | f(0,-1)=3 | -2\lex,y\le2 | ||||||||||||||||||||||||||
Booth function | f(x,y)=\left(x+2y-7\right)2+\left(2x+y-5\right)2 | f(1,3)=0 | -10\lex,y\le10 | ||||||||||||||||||||||||||
Bukin function N.6 | f(x,y)=100\sqrt{\left|y-0.01x2\right|}+0.01\left | x+10 \right | .\quad | f(-10,1)=0 | -15\lex\le-5 -3\ley\le3 | ||||||||||||||||||||||||
Matyas function | f(x,y)=0.26\left(x2+y2\right)-0.48xy | f(0,0)=0 | -10\lex,y\le10 | ||||||||||||||||||||||||||
Lévi function N.13 | f(x,y)=\sin23\pix+\left(x-1\right)2\left(1+\sin23\piy\right) +\left(y-1\right)2\left(1+\sin22\piy\right) | f(1,1)=0 | -10\lex,y\le10 | ||||||||||||||||||||||||||
Himmelblau's function | f(x,y)=(x2+y-11)2+(x+y2-7)2. | Min= \begin{cases} f\left(3.0,2.0\right)&=0.0\\ f\left(-2.805118,3.131312\right)&=0.0\\ f\left(-3.779310,-3.283186\right)&=0.0\\ f\left(3.584428,-1.848126\right)&=0.0\\ \end{cases} | -5\lex,y\le5 | ||||||||||||||||||||||||||
Three-hump camel function | f(x,y)=2x2-1.05x4+
+xy+y2 | f(0,0)=0 | -5\lex,y\le5 | ||||||||||||||||||||||||||
Easom function | f(x,y)=-\cos\left(x\right)\cos\left(y\right)\exp\left(-\left(\left(x-\pi\right)2+\left(y-\pi\right)2\right)\right) | f(\pi,\pi)=-1 | -100\lex,y\le100 | ||||||||||||||||||||||||||
Cross-in-tray function | f(x,y)=-0.0001\left[\left|\sinx\siny\exp\left(\left|100-
| Min= \begin{cases} f\left(1.34941,-1.34941\right)&=-2.06261\\ f\left(1.34941,1.34941\right)&=-2.06261\\ f\left(-1.34941,1.34941\right)&=-2.06261\\ f\left(-1.34941,-1.34941\right)&=-2.06261\\ \end{cases} | -10\lex,y\le10 | ||||||||||||||||||||||||||
Eggholder function[9] [10] | f(x,y)=-\left(y+47\right)\sin\sqrt{\left|
+\left(y+47\right)\right|}-x\sin\sqrt{\left|x-\left(y+47\right)\right|} | f(512,404.2319)=-959.6407 | -512\lex,y\le512 | ||||||||||||||||||||||||||
Hölder table function | f(x,y)=-\left | \sin x \cos y \exp \left(\left | 1 - \frac \right | \right)\right | Min= \begin{cases} f\left(8.05502,9.66459\right)&=-19.2085\\ f\left(-8.05502,9.66459\right)&=-19.2085\\ f\left(8.05502,-9.66459\right)&=-19.2085\\ f\left(-8.05502,-9.66459\right)&=-19.2085 \end{cases} | -10\lex,y\le10 | |||||||||||||||||||||||
McCormick function | f(x,y)=\sin\left(x+y\right)+\left(x-y\right)2-1.5x+2.5y+1 | f(-0.54719,-1.54719)=-1.9133 | -1.5\lex\le4 -3\ley\le4 | ||||||||||||||||||||||||||
Schaffer function N. 2 | f(x,y)=0.5+
| f(0,0)=0 | -100\lex,y\le100 | ||||||||||||||||||||||||||
Schaffer function N. 4 | f(x,y)=0.5+
| Min= \begin{cases} f\left(0,1.25313\right)&=0.292579\\ f\left(0,-1.25313\right)&=0.292579\\ f\left(1.25313,0\right)&=0.292579\\ f\left(-1.25313,0\right)&=0.292579 \end{cases} | -100\lex,y\le100 | ||||||||||||||||||||||||||
Styblinski–Tang function | f(\boldsymbol{x})=
| -39.16617n<f(\underbrace{-2.903534,\ldots,-2.903534}n)<-39.16616n | -5\lexi\le5 1\lei\len | ||||||||||||||||||||||||||
Shekel function | f(\vec{x})=
\left(ci+
(xj-aji)2\right)-1 f(x1,x2,...,xn-1,xn)=
\left(ci+
(xj-aij)2\right)-1 | -infty\lexi\leinfty 1\lei\len |
Name | Plot | Formula | Global minimum | Search domain | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Rosenbrock function constrained with a cubic and a line[11] | f(x,y)=(1-x)2+100(y-x2)2 subjected to: (x-1)3-y+1\le0andx+y-2\le0 | f(1.0,1.0)=0 | -1.5\lex\le1.5 -0.5\ley\le2.5 | |||||||||||
Rosenbrock function constrained to a disk[12] | f(x,y)=(1-x)2+100(y-x2)2 subjected to: x2+y2\le2 | f(1.0,1.0)=0 | -1.5\lex\le1.5 -1.5\ley\le1.5 | |||||||||||
Mishra's Bird function - constrained[13] [14] | f(x,y)=\sin(y)
+\cos(x)
+(x-y)2 (x+5)2+(y+5)2<25 | f(-3.1302468,-1.5821422)=-106.7645367 | -10\lex\le0 -6.5\ley\le0 | |||||||||||
Townsend function (modified)[15] | f(x,y)=-[\cos((x-0.1)y)]2-x\sin(3x+y) x2+y2<\left[2\cost-
\cos2t-
\cos3t-
\cos4t\right]2+[2\sint]2 | f(2.0052938,1.1944509)=-2.0239884 | -2.25\lex\le2.25 -2.5\ley\le1.75 | |||||||||||
Gomez and Levy function (modified)[16] | f(x,y)=4x2-2.1x4+
x6+xy-4y2+4y4 -\sin(4\pix)+2\sin2(2\piy)\le1.5 | f(0.08984201,-0.7126564)=-1.031628453 | -1\lex\le0.75 -1\ley\le1 | |||||||||||
Simionescu function[17] | f(x,y)=0.1xy x2+y
+rS\cos\left(n\arctan
\right)\right]2 where:rT=1,rS=0.2andn=8 | f(\pm0.84852813,\mp0.84852813)=-0.072 | -1.25\lex,y\le1.25 |
Name | Plot | Functions | Constraints | Search domain | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Binh and Korn function | Minimize= \begin{cases} f1\left(x,y\right)=4x2+4y2\\ f2\left(x,y\right)=\left(x-5\right)2+\left(y-5\right)2\\ \end{cases} | s.t.= \begin{cases} g1\left(x,y\right)=\left(x-5\right)2+y2\leq25\\ g2\left(x,y\right)=\left(x-8\right)2+\left(y+3\right)2\geq7.7\\ \end{cases} | 0\lex\le5 0\ley\le3 | |||||||||||||||||||
Chankong and Haimes function | Minimize= \begin{cases} f1\left(x,y\right)=2+\left(x-2\right)2+\left(y-1\right)2\\ f2\left(x,y\right)=9x-\left(y-1\right)2\\ \end{cases} | s.t.= \begin{cases} g1\left(x,y\right)=x2+y2\leq225\\ g2\left(x,y\right)=x-3y+10\leq0\\ \end{cases} | -20\lex,y\le20 | |||||||||||||||||||
Fonseca–Fleming function | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=1-\exp
\left(xi-
| -4\lexi\le4 1\lei\len | ||||||||||||||||||||
Test function 4: | Minimize= \begin{cases} f1\left(x,y\right)=x2-y\\ f2\left(x,y\right)=-0.5x-y-1\\ \end{cases} | s.t.= \begin{cases} g1\left(x,y\right)=6.5-
-y\geq0\\ g2\left(x,y\right)=7.5-0.5x-y\geq0\\ g3\left(x,y\right)=30-5x-y\geq0\\ \end{cases} | -7\lex,y\le4 | |||||||||||||||||||
Kursawe function | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=
\left[-10\exp\left(-0.2
+
| -5\lexi\le5 1\lei\le3 | ||||||||||||||||||||
Schaffer function N. 1:[21] | Minimize= \begin{cases} f1\left(x\right)=x2\\ f2\left(x\right)=\left(x-2\right)2\\ \end{cases} | -A\lex\leA A 10 105 A | ||||||||||||||||||||
Schaffer function N. 2: | Minimize= \begin{cases} f1\left(x\right)=\begin{cases} -x,&ifx\le1\\ x-2,&if1<x\le3\\ 4-x,&if3<x\le4\\ x-4,&ifx>4\\ \end{cases}\\ f2\left(x\right)=\left(x-5\right)2\\ \end{cases} | -5\lex\le10 | ||||||||||||||||||||
Poloni's two objective function: | Minimize= \begin{cases} f1\left(x,y\right)=\left[1+\left(A1-B1\left(x,y\right)\right)2+\left(A2-B2\left(x,y\right)\right)2\right]\\ f2\left(x,y\right)=\left(x+3\right)2+\left(y+1\right)2\\ \end{cases} where= \begin{cases} A1=0.5\sin\left(1\right)-2\cos\left(1\right)+\sin\left(2\right)-1.5\cos\left(2\right)\\ A2=1.5\sin\left(1\right)-\cos\left(1\right)+2\sin\left(2\right)-0.5\cos\left(2\right)\\ B1\left(x,y\right)=0.5\sin\left(x\right)-2\cos\left(x\right)+\sin\left(y\right)-1.5\cos\left(y\right)\\ B2\left(x,y\right)=1.5\sin\left(x\right)-\cos\left(x\right)+2\sin\left(y\right)-0.5\cos\left(y\right) \end{cases} | -\pi\lex,y\le\pi | ||||||||||||||||||||
Zitzler–Deb–Thiele's function N. 1:[22] | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=x1\\ f2\left(\boldsymbol{x}\right)=g\left(\boldsymbol{x}\right)h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)\\ g\left(\boldsymbol{x}\right)=1+
xi\\ h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)=1-\sqrt{
\\ \end{cases} | 0\lexi\le1 1\lei\le30 | ||||||||||||||||||||
Zitzler–Deb–Thiele's function N. 2: | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=x1\\ f2\left(\boldsymbol{x}\right)=g\left(\boldsymbol{x}\right)h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)\\ g\left(\boldsymbol{x}\right)=1+
xi\\ h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)=1-\left(
2\\ \end{cases} | 0\lexi\le1 1\lei\le30 | ||||||||||||||||||||
Zitzler–Deb–Thiele's function N. 3: | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=x1\\ f2\left(\boldsymbol{x}\right)=g\left(\boldsymbol{x}\right)h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)\\ g\left(\boldsymbol{x}\right)=1+
xi\\ h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)=1-\sqrt{
\right)}}-\left(
\right)\sin\left(10\pif1\left(\boldsymbol{x}\right)\right) \end{cases} | 0\lexi\le1 1\lei\le30 | ||||||||||||||||||||
Zitzler–Deb–Thiele's function N. 4: | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=x1\\ f2\left(\boldsymbol{x}\right)=g\left(\boldsymbol{x}\right)h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)\\ g\left(\boldsymbol{x}\right)=91+
-10\cos\left(4\pixi\right)\right)\\ h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)=1-\sqrt{
\right)}} \end{cases} | 0\lex1\le1 -5\lexi\le5 2\lei\le10 | ||||||||||||||||||||
Zitzler–Deb–Thiele's function N. 6: | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=1-\exp\left(-4x1\right)\sin6\left(6\pix1\right)\\ f2\left(\boldsymbol{x}\right)=g\left(\boldsymbol{x}\right)h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)\\ g\left(\boldsymbol{x}\right)=1+9\left[
\right]0.25\\ h\left(f1\left(\boldsymbol{x}\right),g\left(\boldsymbol{x}\right)\right)=1-\left(
\right)}\right)2\\ \end{cases} | 0\lexi\le1 1\lei\le10 | ||||||||||||||||||||
Osyczka and Kundu function:[23] | Minimize= \begin{cases} f1\left(\boldsymbol{x}\right)=-25\left(x1-2\right)2-\left(x2-2\right)2-\left(x3-1\right)2-\left(x4-4\right)2-\left(x5-1\right)2\\ f2\left(\boldsymbol{x}\right)=
\\ \end{cases} | s.t.= \begin{cases} g1\left(\boldsymbol{x}\right)=x1+x2-2\geq0\\ g2\left(\boldsymbol{x}\right)=6-x1-x2\geq0\\ g3\left(\boldsymbol{x}\right)=2-x2+x1\geq0\\ g4\left(\boldsymbol{x}\right)=2-x1+3x2\geq0\\ g5\left(\boldsymbol{x}\right)=4-\left(x3-3\right)2-x4\geq0\\ g6\left(\boldsymbol{x}\right)=\left(x5-3\right)2+x6-4\geq0 \end{cases} | 0\lex1,x2,x6\le10 1\lex3,x5\le5 0\lex4\le6 | |||||||||||||||||||
CTP1 function (2 variables):[24] | Minimize= \begin{cases} f1\left(x,y\right)=x\\ f2\left(x,y\right)=\left(1+y\right)\exp\left(-
\right) \end{cases} | s.t.= \begin{cases} g1\left(x,y\right)=
\geq1\\ g2\left(x,y\right)=
\geq1 \end{cases} | 0\lex,y\le1 | |||||||||||||||||||
Constr-Ex problem: | Minimize= \begin{cases} f1\left(x,y\right)=x\\ f2\left(x,y\right)=
\\ \end{cases} | s.t.= \begin{cases} g1\left(x,y\right)=y+9x\geq6\\ g2\left(x,y\right)=-y+9x\geq1\\ \end{cases} | 0.1\lex\le1 0\ley\le5 | |||||||||||||||||||
Viennet function: | Minimize= \begin{cases} f1\left(x,y\right)=0.5\left(x2+y2\right)+\sin\left(x2+y2\right)\\ f2\left(x,y\right)=
+
+15\\ f3\left(x,y\right)=
-1.1\exp\left(-\left(x2+y2\right)\right)\\ \end{cases} | -3\lex,y\le3 |