Skip to content
Snippets Groups Projects
Commit 055a5f99 authored by Mauricio Zambrano-Bigiarini's avatar Mauricio Zambrano-Bigiarini
Browse files

'test\_functions': new test function 'sschwefel1\_2'

parent a6ecfc08
No related branches found
No related tags found
No related merge requests found
...@@ -42,20 +42,21 @@ export(hydroPSO, ...@@ -42,20 +42,21 @@ export(hydroPSO,
read_results, read_results,
verification, verification,
wquantile, wquantile,
sphere, ackley,
rosenbrock, griewank,
rastrigrin, # wrong name, only used for backward compatibility rastrigrin, # wrong name, only used for backward compatibility
rastrigin, rastrigin,
griewank, rosenbrock,
schafferF6, schafferF6,
ackley, schwefel
ssphere, sphere,
srosenbrock, sackley,
srastrigin,
sgriewank, sgriewank,
srastrigin,
#schafferF6, #schafferF6,
sackley, srosenbrock,
sschwefel sschwefel1_2,
ssphere
) )
S3method(params2ecdf, matrix) S3method(params2ecdf, matrix)
......
...@@ -55,12 +55,13 @@ NEWS/ChangeLog for hydroPSO ...@@ -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 -) 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: o 'test_functions': -) new benchmark functions:
'ssphere' : shifted Sphere (CEC 2005), 'schwefel' : Schwefel function
'srosenbrock': shifted Rosenbrock (CEC 2005), 'ssphere' : shifted Sphere (CEC 2005),
'srastrigin' : shifted Rastrigin (CEC 2005), 'srosenbrock' : shifted Rosenbrock (CEC 2005),
'sgriewank' : shifted Griewank (CEC 2005), 'srastrigin' : shifted Rastrigin (CEC 2005),
'sackley' : shifted Ackley (CEC 2005), 'sgriewank' : shifted Griewank (CEC 2005),
'sschwefel' : shifted Schwefel's Problem 1.2 (CEC 2005) 'sackley' : shifted Ackley (CEC 2005),
'sschwefel1_2': shifted Schwefel's Problem 1.2 (CEC 2005)
0.1-58 14-Sep-2012 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 o 'hydroPSO' : -) 'random.update' is now ONLY used when 'best.update="async". In hydroPSO 0.1-57 'random.update' was set to TRUE
......
...@@ -67,6 +67,18 @@ ackley <- function(x) { ...@@ -67,6 +67,18 @@ ackley <- function(x) {
} # 'schafferF6' END } # '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 ################################## ########################### Shifted Functions ##################################
################################################################################ ################################################################################
...@@ -127,12 +139,12 @@ srastrigin <- function(x, o=-5+10*runif(length(x)), fbias=-330) { ...@@ -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. # MZB, 25-Sep-2012. Shifted Schwefel's Problem 1.2 (CEC 2005): f(o,..,o)=-450.
# Minimization. In [-100, 100]^n. AcceptableError < 100 # Minimization. In [-100, 100]^n. AcceptableError < 100
# Properties: Unimodal, Shifted, Non-separable, Scalable # 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) n <- length(x)
if (n != length(o)) stop("length(x) != length(o)") if (n != length(o)) stop("length(x) != length(o)")
z <- x - o z <- x - o
return( sum( (cumsum(z))^2 ) + fbias ) return( sum( (cumsum(z))^2 ) + fbias )
} # 'srastrigin' END } # 'sschwefel1_2' END
#### TODO: find the definition of the rotation matrix M: #### TODO: find the definition of the rotation matrix M:
......
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
\alias{rastrigin} \alias{rastrigin}
\alias{rosenbrock} \alias{rosenbrock}
\alias{schafferF6} \alias{schafferF6}
\alias{schwefel}
\alias{sphere} \alias{sphere}
\alias{sackley} \alias{sackley}
\alias{sgriewank} \alias{sgriewank}
\alias{srastrigin} \alias{srastrigin}
\alias{srosenbrock} \alias{srosenbrock}
\alias{sschwefel} \alias{sschwefel1_2}
\alias{ssphere} \alias{ssphere}
%- Also NEED an '\alias' for EACH other topic documented here. %- Also NEED an '\alias' for EACH other topic documented here.
...@@ -31,12 +32,13 @@ griewank(x) ...@@ -31,12 +32,13 @@ griewank(x)
rastrigrin(x) rastrigrin(x)
rosenbrock(x) rosenbrock(x)
schafferF6(x) schafferF6(x)
schwefel(x)
sphere(x) sphere(x)
sackley(x, o=-32+64*runif(length(x)), fbias=-140) sackley(x, o=-32+64*runif(length(x)), fbias=-140)
sgriewank(x, o=-600+1200*runif(length(x)), fbias=-180) sgriewank(x, o=-600+1200*runif(length(x)), fbias=-180)
srastrigin(x, o=-5+10*runif(length(x)), fbias=-330) srastrigin(x, o=-5+10*runif(length(x)), fbias=-330)
srosenbrock(x, o=-100+200*runif(length(x)), fbias=390) 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) ssphere(x, o=-100+200*runif(length(x)), fbias=-450)
} }
...@@ -73,6 +75,9 @@ GEATbx: Example Functions (single and multi-objective functions) \cr ...@@ -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 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}} \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}} \cite{\url{http://www.zsd.ict.pwr.wroc.pl/files/docs/functions.pdf}}
} }
\author{ \author{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment