Documentation ¶
Overview ¶
Package cec2020 implements functions of the CEC2020 Testbed. Function definitions and overview: https://github.com/P-N-Suganthan/2020-Bound-Constrained-Opt-Benchmark/blob/d8b4c52f161562cd462e9b3352885e8df6fd2e41/Definitions%20of%20%20CEC2020%20benchmark%20suite%20Bound%20Constrained.pdf Example implementation: https://github.com/danney9512/CEC2020-Bound-Constrained-Opt_mpmL-SHADE/blob/master/mpmL-SHADE_source code/src/problem_test_functions.h
Index ¶
- Variables
- func Ackley(x []float64) float64
- func Asy(x []float64, beta float64)
- func BentCigar(x []float64) float64
- func Composition1(x []float64) float64
- func Composition2(x []float64) float64
- func Composition3(x []float64) float64
- func Discus(x []float64) float64
- func GetMaxFES(dim int) int
- func Griewank(x []float64) float64
- func HGBat(x []float64) float64
- func Happycat(x []float64) float64
- func HighConditionedElliptic(x []float64) float64
- func Hybrid1(x []float64) float64
- func Hybrid2(x []float64) float64
- func Hybrid3(x []float64) float64
- func LoadInputData(nx int) (map[int][][]float64, map[int][][]float64)
- func LunacekBiRastrigin(x []float64) float64
- func Rastrigin(x []float64) float64
- func Rosenbrock(x []float64) float64
- func RosenbrockGriewank(x []float64) float64
- func Rotate(x []float64, mr []float64)
- func Schaffer(x, y float64) float64
- func SchafferExpanded(x []float64) float64
- func Schwefel(x []float64) float64
- func SchwefelModified(x []float64) float64
- func Shift(x []float64, os []float64)
- func ShiftRotate(x []float64, os []float64, mr []float64, shiftRate float64, shift, rotate bool)
- func Weierstrass(x []float64) float64
Constants ¶
This section is empty.
Variables ¶
var ( // Dimensions to bench. Dimensions = []int{ 5, 10, 15, 20, } // MaxFES as specified for each dimension. MaxFES = []int{ 50000, 1000000, 3000000, 10000000, } )
var FuncNames = map[int]string{
0: "Bent Cigar",
1: "Schwefel Modified",
2: "Lunacek Bi-Rastrigin",
3: "Rosenbrock-Griewank",
4: "Hybrid1",
5: "Hybrid2",
6: "Hybrid3",
7: "Composition1",
8: "Composition2",
9: "Composition3",
}
FuncNames represents a numbered list of function name.
var Functions = map[string]func([]float64) float64{ "Bent Cigar": BentCigar, "Schwefel Modified": Schwefel, "Lunacek Bi-Rastrigin": LunacekBiRastrigin, "Rosenbrock-Griewank": RosenbrockGriewank, "Hybrid1": Hybrid1, "Hybrid2": Hybrid2, "Hybrid3": Hybrid3, "Composition1": Composition1, "Composition2": Composition2, "Composition3": Composition3, }
Functions is a string-func map of function names and specific bench funcs for easier iterable access.
var SearchRange = bench.NewfuncParams(searchRangeMin, searchRangeMax)
SearchRange specifies the CEC2020 search range.
Functions ¶
func Composition1 ¶
Composition1 is the "Composition Function 1" of CEC2020.
func Composition2 ¶
Composition2 is the "Composition Function 2" of CEC2020.
func Composition3 ¶
Composition3 is the "Composition Function 3" of CEC2020.
func GetMaxFES ¶
GetMaxFES returns maxFES for the passed dimension, given that it's present in the MaxFES slice, returns -1 otherwise.
func Griewank ¶
Griewank is the "Griewank's Function" of CEC2020. ref: https://www.sfu.ca/~ssurjano/griewank.html
func HighConditionedElliptic ¶
HighConditionedElliptic is the "High Conditioned Elliptic Function" of CEC2020.
func LoadInputData ¶
LoadInputData loads matrices and shift/rotation/shuffle input data and returns them as maps.
func LunacekBiRastrigin ¶
LunacekBiRastrigin is the "Shifted and Rotated Lunacek bi-Rastrigin Function" of CEC2020. ref: https://al-roomi.org/benchmarks/unconstrained/n-dimensions/229-lunacek-s-bi-rastrigin-function.
func Rosenbrock ¶
Rosenbrock is the "Rosenbrock's Function" of CEC2020. ref: https://infinity77.net/global_optimization/test_functions_nd_R.html#go_benchmark.Rosenbrock
func RosenbrockGriewank ¶
RosenbrockGriewank is the "Expanded Rosenbrock's plus Griewank's Function" of CEC2020.
func SchafferExpanded ¶
SchafferExpanded is the "Expanded Schaffer's Function" of CEC2020.
func SchwefelModified ¶
SchwefelModified is the "Modified Schwefel's Function" of CEC2020 with summation of g(zi) where zi = xi + 4.209687462275036e+002 and g(zi) = zi * sin(|zi|^(1/2)) ... if |zi| <= 500, g(zi) = (500-mod(zi,500)) * sin(sqrt(|500-mod(zi,500)|)) - (zi-500^2)/10000D ... if zi > 500, g(zi) = (mod(|zi|,500)-500) * sin(sqrt(|mod(|zi|,500)-500|)) - (zi-500^2)/10000D ... if zi < -500.
func ShiftRotate ¶
ShiftRotate shifts and/or rotates the input x based on the request params shift and rotate (bool), using the values of os and/or mr.
func Weierstrass ¶
Weierstrass is the "Weierstrass Function" of CEC2020 with a=0.5, b=3 and kmax=20.
Types ¶
This section is empty.