Test functions for optimization

From testwiki
Revision as of 22:59, 18 February 2025 by imported>MrOllie (Reverted 1 edit by 128.46.161.197 (talk): No)
(diff) โ† Older revision | Latest revision (diff) | Newer revision โ†’ (diff)
Jump to navigation Jump to search

Template:Short description In applied mathematics, test functions, known as artificial landscapes, are useful to evaluate characteristics of optimization algorithms, such as convergence rate, precision, robustness and general performance.

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.

Test functions for single-objective optimization

Name Plot Formula Global minimum Search domain
Rastrigin function Rastrigin function for n=2 f(๐ฑ)=An+i=1n[xi2Acos(2πxi)]

where: A=10

f(0,,0)=0 5.12xi5.12
Ackley function Ackley's function for n=2 f(x,y)=20exp[0.20.5(x2+y2)]

exp[0.5(cos2πx+cos2πy)]+e+20

f(0,0)=0 5x,y5
Sphere function Sphere function for n=2 f(๐’™)=i=1nxi2 f(x1,,xn)=f(0,,0)=0 xi, 1in
Rosenbrock function Rosenbrock's function for n=2 f(๐’™)=i=1n1[100(xi+1xi2)2+(1xi)2] Min={n=2f(1,1)=0,n=3f(1,1,1)=0,n>3f(1,,1n times)=0 xi, 1in
Beale function Beale's function f(x,y)=(1.5x+xy)2+(2.25x+xy2)2

+(2.625x+xy3)2

f(3,0.5)=0 4.5x,y4.5
Goldsteinโ€“Price function Goldsteinโ€“Price function f(x,y)=[1+(x+y+1)2(1914x+3x214y+6xy+3y2)]

[30+(2x3y)2(1832x+12x2+48y36xy+27y2)]

f(0,1)=3 2x,y2
Booth function Booth's function f(x,y)=(x+2y7)2+(2x+y5)2 f(1,3)=0 10x,y10
Bukin function N.6 Bukin function N.6 f(x,y)=100|y0.01x2|+0.01|x+10|. f(10,1)=0 15x5, 3y3
Matyas function Matyas function f(x,y)=0.26(x2+y2)0.48xy f(0,0)=0 10x,y10
Lรฉvi function N.13 Lรฉvi function N.13 f(x,y)=sin23πx+(x1)2(1+sin23πy)

+(y1)2(1+sin22πy)

f(1,1)=0 10x,y10
Griewank function Griewank's function f(x)=1+14000i=1nxi2i=1nPi(xi), where Pi(xi)=cos(xii) f(0,,0)=0 xi, 1in
Himmelblau's function Himmelblau's function f(x,y)=(x2+y11)2+(x+y27)2. Min={f(3.0,2.0)=0.0f(2.805118,3.131312)=0.0f(3.779310,3.283186)=0.0f(3.584428,1.848126)=0.0 5x,y5
Three-hump camel function Three Hump Camel function f(x,y)=2x21.05x4+x66+xy+y2 f(0,0)=0 5x,y5
Easom function Easom function f(x,y)=cos(x)cos(y)exp(((xπ)2+(yπ)2)) f(π,π)=1 100x,y100
Cross-in-tray function Cross-in-tray function f(x,y)=0.0001[|sinxsinyexp(|100x2+y2π|)|+1]0.1 Min={f(1.34941,1.34941)=2.06261f(1.34941,1.34941)=2.06261f(1.34941,1.34941)=2.06261f(1.34941,1.34941)=2.06261 10x,y10
Eggholder function[9][10] Eggholder function f(x,y)=(y+47)sin|x2+(y+47)|xsin|x(y+47)| f(512,404.2319)=959.6407 512x,y512
Hรถlder table function Holder table function f(x,y)=|sinxcosyexp(|1x2+y2π|)| Min={f(8.05502,9.66459)=19.2085f(8.05502,9.66459)=19.2085f(8.05502,9.66459)=19.2085f(8.05502,9.66459)=19.2085 10x,y10
McCormick function McCormick function f(x,y)=sin(x+y)+(xy)21.5x+2.5y+1 f(0.54719,1.54719)=1.9133 1.5x4, 3y4
Schaffer function N. 2 Schaffer function N.2 f(x,y)=0.5+sin2(x2y2)0.5[1+0.001(x2+y2)]2 f(0,0)=0 100x,y100
Schaffer function N. 4 Schaffer function N.4 f(x,y)=0.5+cos2[sin(|x2y2|)]0.5[1+0.001(x2+y2)]2 Min={f(0,1.25313)=0.292579f(0,1.25313)=0.292579f(1.25313,0)=0.292579f(1.25313,0)=0.292579 100x,y100
Styblinskiโ€“Tang function Styblinski-Tang function f(๐’™)=i=1nxi416xi2+5xi2 39.16617n<f(2.903534,,2.903534n times)<39.16616n 5xi5, 1in..
Shekel function A Shekel function in 2 dimensions and with 10 maxima f(xโ†’)=i=1m(ci+j=1n(xjaji)2)1

or, similarly, f(x1,x2,...,xn1,xn)=i=1m(ci+j=1n(xjaij)2)1

xi, 1in

Test functions for constrained optimization

Name Plot Formula Global minimum Search domain
Rosenbrock function constrained to a disk[11] Rosenbrock function constrained to a disk f(x,y)=(1x)2+100(yx2)2,

subjected to: x2+y22

f(1.0,1.0)=0 1.5x1.5, 1.5y1.5
Mishra's Bird function - constrained[12][13] Bird function (constrained) f(x,y)=sin(y)e[(1cosx)2]+cos(x)e[(1siny)2]+(xy)2,

subjected to: (x+5)2+(y+5)2<25

f(3.1302468,1.5821422)=106.7645367 10x0, 6.5y0
Townsend function (modified)[14] Heart constrained multimodal function f(x,y)=[cos((x0.1)y)]2xsin(3x+y),

subjected to:x2+y2<[2cost12cos2t14cos3t18cos4t]2+[2sint]2 where: Template:Math

f(2.0052938,1.1944509)=2.0239884 2.25x2.25, 2.5y1.75
Keane's bump functionTemplate:Anchor[15] Keane's bump function f(x)=|[i=1mcos4(xi)2i=1mcos2(xi)](i=1mixi2)0.5|,

subjected to: 0.75i=1mxi<0, and i=1mxi7.5m<0

f((1.60025376,0.468675907))=0.364979746 0<xi<10

Test functions for multi-objective optimization

Template:Explain

Name Plot Functions Constraints Search domain
Binh and Korn function:[5] Binh and Korn function Minimize={f1(x,y)=4x2+4y2f2(x,y)=(x5)2+(y5)2 s.t.={g1(x,y)=(x5)2+y225g2(x,y)=(x8)2+(y+3)27.7 0x5, 0y3
Chankong and Haimes function:[16] Chakong and Haimes function Minimize={f1(x,y)=2+(x2)2+(y1)2f2(x,y)=9x(y1)2 s.t.={g1(x,y)=x2+y2225g2(x,y)=x3y+100 20x,y20
Fonsecaโ€“Fleming function:[17] Fonseca and Fleming function Minimize={f1(๐’™)=1exp[i=1n(xi1n)2]f2(๐’™)=1exp[i=1n(xi+1n)2] 4xi4, 1in
Test function 4:[6] Test function 4.[6] Minimize={f1(x,y)=x2yf2(x,y)=0.5xy1 s.t.={g1(x,y)=6.5x6y0g2(x,y)=7.50.5xy0g3(x,y)=305xy0 7x,y4
Kursawe function:[18] Kursawe function Minimize={f1(๐’™)=i=12[10exp(0.2xi2+xi+12)]f2(๐’™)=i=13[|xi|0.8+5sin(xi3)] 5xi5, 1i3.
Schaffer function N. 1:[19] Schaffer function N.1 Minimize={f1(x)=x2f2(x)=(x2)2 AxA. Values of A from 10 to 105 have been used successfully. Higher values of A increase the difficulty of the problem.
Schaffer function N. 2: Schaffer function N.2 Minimize={f1(x)={x,if x1x2,if 1<x34x,if 3<x4x4,if x>4f2(x)=(x5)2 5x10.
Poloni's two objective function: Poloni's two objective function Minimize={f1(x,y)=[1+(A1B1(x,y))2+(A2B2(x,y))2]f2(x,y)=(x+3)2+(y+1)2

where={A1=0.5sin(1)2cos(1)+sin(2)1.5cos(2)A2=1.5sin(1)cos(1)+2sin(2)0.5cos(2)B1(x,y)=0.5sin(x)2cos(x)+sin(y)1.5cos(y)B2(x,y)=1.5sin(x)cos(x)+2sin(y)0.5cos(y)

πx,yπ
Zitzlerโ€“Debโ€“Thiele's function N. 1:[20] Zitzler-Deb-Thiele's function N.1 Minimize={f1(๐’™)=x1f2(๐’™)=g(๐’™)h(f1(๐’™),g(๐’™))g(๐’™)=1+929i=230xih(f1(๐’™),g(๐’™))=1f1(๐’™)g(๐’™) 0xi1, 1i30.
Zitzlerโ€“Debโ€“Thiele's function N. 2:[20] Zitzler-Deb-Thiele's function N.2 Minimize={f1(๐’™)=x1f2(๐’™)=g(๐’™)h(f1(๐’™),g(๐’™))g(๐’™)=1+929i=230xih(f1(๐’™),g(๐’™))=1(f1(๐’™)g(๐’™))2 0xi1, 1i30.
Zitzlerโ€“Debโ€“Thiele's function N. 3:[20] Zitzler-Deb-Thiele's function N.3 Minimize={f1(๐’™)=x1f2(๐’™)=g(๐’™)h(f1(๐’™),g(๐’™))g(๐’™)=1+929i=230xih(f1(๐’™),g(๐’™))=1f1(๐’™)g(๐’™)(f1(๐’™)g(๐’™))sin(10πf1(๐’™)) 0xi1, 1i30.
Zitzlerโ€“Debโ€“Thiele's function N. 4:[20] Zitzler-Deb-Thiele's function N.4 Minimize={f1(๐’™)=x1f2(๐’™)=g(๐’™)h(f1(๐’™),g(๐’™))g(๐’™)=91+i=210(xi210cos(4πxi))h(f1(๐’™),g(๐’™))=1f1(๐’™)g(๐’™) 0x11, 5xi5, 2i10
Zitzlerโ€“Debโ€“Thiele's function N. 6:[20] Zitzler-Deb-Thiele's function N.6 Minimize={f1(๐’™)=1exp(4x1)sin6(6πx1)f2(๐’™)=g(๐’™)h(f1(๐’™),g(๐’™))g(๐’™)=1+9[i=210xi9]0.25h(f1(๐’™),g(๐’™))=1(f1(๐’™)g(๐’™))2 0xi1, 1i10.
Osyczka and Kundu function:[21] Osyczka and Kundu function Minimize={f1(๐’™)=25(x12)2(x22)2(x31)2(x44)2(x51)2f2(๐’™)=i=16xi2 s.t.={g1(๐’™)=x1+x220g2(๐’™)=6x1x20g3(๐’™)=2x2+x10g4(๐’™)=2x1+3x20g5(๐’™)=4(x33)2x40g6(๐’™)=(x53)2+x640 0x1,x2,x610, 1x3,x55, 0x46.
CTP1 function (2 variables):[4][22] CTP1 function (2 variables).[4] Minimize={f1(x,y)=xf2(x,y)=(1+y)exp(x1+y) s.t.={g1(x,y)=f2(x,y)0.858exp(0.541f1(x,y))1g2(x,y)=f2(x,y)0.728exp(0.295f1(x,y))1 0x,y1.
Constr-Ex problem:[4] Constr-Ex problem.[4] Minimize={f1(x,y)=xf2(x,y)=1+yx s.t.={g1(x,y)=y+9x6g2(x,y)=y+9x1 0.1x1, 0y5
Viennet function: Viennet function Minimize={f1(x,y)=0.5(x2+y2)+sin(x2+y2)f2(x,y)=(3x2y+4)28+(xy+1)227+15f3(x,y)=1x2+y2+11.1exp((x2+y2)) 3x,y3.

References

  1. โ†‘ Template:Cite book
  2. โ†‘ Template:Cite book
  3. โ†‘ Template:Cite web
  4. โ†‘ 4.0 4.1 4.2 4.3 4.4 Deb, Kalyanmoy (2002) Multiobjective optimization using evolutionary algorithms (Repr. ed.). Chichester [u.a.]: Wiley. Template:Isbn.
  5. โ†‘ 5.0 5.1 Binh T. and Korn U. (1997) MOBES: A Multiobjective Evolution Strategy for Constrained Optimization Problems. In: Proceedings of the Third International Conference on Genetic Algorithms. Czech Republic. pp. 176โ€“182
  6. โ†‘ 6.0 6.1 6.2 Binh T. (1999) A multiobjective evolutionary algorithm. The study cases. Technical report. Institute for Automation and Communication. Barleben, Germany
  7. โ†‘ Deb K. (2011) Software for multi-objective NSGA-II code in C. Available at URL: https://www.iitk.ac.in/kangal/codes.shtml
  8. โ†‘ Template:Cite web
  9. โ†‘ Template:Cite journal
  10. โ†‘ Vanaret C. (2015) Hybridization of interval methods and evolutionary algorithms for solving difficult optimization problems. PhD thesis. Ecole Nationale de l'Aviation Civile. Institut National Polytechnique de Toulouse, France.
  11. โ†‘ Template:Cite web
  12. โ†‘ Template:Cite web
  13. โ†‘ Template:Cite journal
  14. โ†‘ Template:Cite web
  15. โ†‘ Template:Cite journal
  16. โ†‘ Template:Cite book
  17. โ†‘ Template:Cite journal
  18. โ†‘ F. Kursawe, โ€œA variant of evolution strategies for vector optimization,โ€ in PPSN I, Vol 496 Lect Notes in Comput Sc. Springer-Verlag, 1991, pp. 193โ€“197.
  19. โ†‘ Template:Cite book
  20. โ†‘ 20.0 20.1 20.2 20.3 20.4 Template:Cite book
  21. โ†‘ Template:Cite journal
  22. โ†‘ Template:Cite book