diff --git a/NAMESPACE b/NAMESPACE index 9235cfee0dc7061b25887ded0da09a638bc8a919..534a396dce2cbc1ca55db3e929ec0b9b96a6bbf1 100755 --- a/NAMESPACE +++ b/NAMESPACE @@ -42,20 +42,21 @@ export(hydroPSO, read_results, verification, wquantile, - sphere, - rosenbrock, + ackley, + griewank, rastrigrin, # wrong name, only used for backward compatibility rastrigin, - griewank, + rosenbrock, schafferF6, - ackley, - ssphere, - srosenbrock, - srastrigin, + schwefel + sphere, + sackley, sgriewank, + srastrigin, #schafferF6, - sackley, - sschwefel + srosenbrock, + sschwefel1_2, + ssphere ) S3method(params2ecdf, matrix) diff --git a/NEWS b/NEWS index 315b90ae5d856a2bc6b45d534be30a7dee84526c..e8cead84518838034d5d125fb9d0054fd75b8f80 100755 --- a/NEWS +++ b/NEWS @@ -55,12 +55,13 @@ NEWS/ChangeLog for hydroPSO -) boundary.wall: 'reflecting' in hydroPSO ver <= 0.1-58 is not longer equivalent to 'reflecting' in hydroPSO ver >= 0.1-58 o 'test_functions': -) new benchmark functions: - 'ssphere' : shifted Sphere (CEC 2005), - 'srosenbrock': shifted Rosenbrock (CEC 2005), - 'srastrigin' : shifted Rastrigin (CEC 2005), - 'sgriewank' : shifted Griewank (CEC 2005), - 'sackley' : shifted Ackley (CEC 2005), - 'sschwefel' : shifted Schwefel's Problem 1.2 (CEC 2005) + 'schwefel' : Schwefel function + 'ssphere' : shifted Sphere (CEC 2005), + 'srosenbrock' : shifted Rosenbrock (CEC 2005), + 'srastrigin' : shifted Rastrigin (CEC 2005), + 'sgriewank' : shifted Griewank (CEC 2005), + 'sackley' : shifted Ackley (CEC 2005), + 'sschwefel1_2': shifted Schwefel's Problem 1.2 (CEC 2005) 0.1-58 14-Sep-2012 o 'hydroPSO' : -) 'random.update' is now ONLY used when 'best.update="async". In hydroPSO 0.1-57 'random.update' was set to TRUE diff --git a/R/test_functions.R b/R/test_functions.R index 1fda72d39f0a60066555d5758d3016ae6f613a8a..478531304f1e6199ea7518f7545a059c038a5216 100755 --- a/R/test_functions.R +++ b/R/test_functions.R @@ -67,6 +67,18 @@ ackley <- function(x) { } # 'schafferF6' END +# MZB, 25-Sep-2012. Schwefel: f(xi,..,xi)=0, with xi= 420.968746 +# Minimization. In [-500, 500]^n. AcceptableError < +# Properties: Multimodal, Additively separable +# This function is deceptive in that the global minimum is geometrically +# distant, over the parameter space, from the next best local minima. +# Ref: http://www.scribd.com/doc/74351406/7/Schwefel%E2%80%99s-function +schwefel <- function(x) { + n <- length(x) + return( 418.98288727433799*n + sum( -x*sin( sqrt(abs(x)) ) ) ) +} # 'schwefel' END + + ################################################################################ ########################### Shifted Functions ################################## ################################################################################ @@ -127,12 +139,12 @@ srastrigin <- function(x, o=-5+10*runif(length(x)), fbias=-330) { # MZB, 25-Sep-2012. Shifted Schwefel's Problem 1.2 (CEC 2005): f(o,..,o)=-450. # Minimization. In [-100, 100]^n. AcceptableError < 100 # Properties: Unimodal, Shifted, Non-separable, Scalable -sschwefel <- function(x, o=-100+200*runif(length(x)), fbias=-450) { +sschwefel1_2 <- function(x, o=-100+200*runif(length(x)), fbias=-450) { n <- length(x) if (n != length(o)) stop("length(x) != length(o)") z <- x - o return( sum( (cumsum(z))^2 ) + fbias ) -} # 'srastrigin' END +} # 'sschwefel1_2' END #### TODO: find the definition of the rotation matrix M: diff --git a/man/test_functions.Rd b/man/test_functions.Rd index 1e1125c2676e4fcdac7d921dc95ff04a1dfe0ea7..b422d9b3b41b80c4db773c5ab8a36097e6f0079d 100755 --- a/man/test_functions.Rd +++ b/man/test_functions.Rd @@ -10,12 +10,13 @@ \alias{rastrigin} \alias{rosenbrock} \alias{schafferF6} +\alias{schwefel} \alias{sphere} \alias{sackley} \alias{sgriewank} \alias{srastrigin} \alias{srosenbrock} -\alias{sschwefel} +\alias{sschwefel1_2} \alias{ssphere} %- Also NEED an '\alias' for EACH other topic documented here. @@ -31,12 +32,13 @@ griewank(x) rastrigrin(x) rosenbrock(x) schafferF6(x) +schwefel(x) sphere(x) sackley(x, o=-32+64*runif(length(x)), fbias=-140) sgriewank(x, o=-600+1200*runif(length(x)), fbias=-180) srastrigin(x, o=-5+10*runif(length(x)), fbias=-330) srosenbrock(x, o=-100+200*runif(length(x)), fbias=390) -sschwefel(x, o=-100+200*runif(length(x)), fbias=-450) +sschwefel1_2(x, o=-100+200*runif(length(x)), fbias=-450) ssphere(x, o=-100+200*runif(length(x)), fbias=-450) } @@ -73,6 +75,9 @@ GEATbx: Example Functions (single and multi-objective functions) \cr Problem Definitions and Evaluation Criteria for the CEC 2005 Special Session on Real-Parameter Optimization \cr \cite{\url{www.lri.fr/~hansen/Tech-Report-May-30-05.pdf}} +Benchmark Problems \cr +\cite{\url{http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume24/ortizboyer05a-html/node6.html}} + \cite{\url{http://www.zsd.ict.pwr.wroc.pl/files/docs/functions.pdf}} } \author{