package cec2020
import "git.dotya.ml/wanderer/math-optim/bench/cec2020"
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
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 Ackley ¶
Ackley is the "Ackley's Function" of CEC2020.
func Asy ¶
Asy is the asymptotic function.
func BentCigar ¶
BentCigar is the "Bent Cigar Function" of CEC2020.
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 Discus ¶
Discus is the "Discus Function" 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 HGBat ¶
HGBat is the "HGBat Function" of CEC2020.
func Happycat ¶
Happycat is the "Happycat Function" of CEC2020.
func HighConditionedElliptic ¶
HighConditionedElliptic is the "High Conditioned Elliptic Function" of CEC2020.
func Hybrid1 ¶
Hybrid1 is the "Hybrid Function 1" of CEC2020.
func Hybrid2 ¶
Hybrid2 is the "Hybrid Function 2" of CEC2020.
func Hybrid3 ¶
Hybrid3 is the "Hybrid Function 3" 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 Rastrigin ¶
Rastrigin calculates the value of the Rastrigin function for x.
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 Rotate ¶
Rotate rotates values of x based on values of mr.
func Schaffer ¶
Schaffer is the Schaffer's function.
func SchafferExpanded ¶
SchafferExpanded is the "Expanded Schaffer's Function" of CEC2020.
func Schwefel ¶
Schwefel is the "Shifted and Rotated Schwefel'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 Shift ¶
Shift shifts values of x based on values of os.
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.
Source Files ¶
basicFunctions.go benchFunctions.go constants.go doc.go helperFunctions.go inputData.go log.go vars.go
- Version
- v0.0.0-20230224152531-7a5de808e98c (latest)
- Published
- Feb 24, 2023
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 2 months ago –
Tools for package owners.