Skip to content

Commit

Permalink
Merge pull request #129 from kerschke/master
Browse files Browse the repository at this point in the history
Integration of MO benchmark functions from the CEC2019 competition
  • Loading branch information
jakobbossek committed Apr 2, 2020
2 parents 98daacf + 4e33ae5 commit 69a23cc
Show file tree
Hide file tree
Showing 68 changed files with 2,521 additions and 38 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Expand Up @@ -5,8 +5,8 @@ Description: Provides generators for a high number of both single- and multi-
objective test functions which are frequently used for the benchmarking of
(numerical) optimization algorithms. Moreover, it offers a set of convenient
functions to generate, plot and work with objective functions.
Version: 1.6.0.2
Date: 2020-01-07
Version: 1.6.0.3
Date: 2020-04-01
Authors@R: c(person("Jakob", "Bossek", email = "j.bossek@gmail.com", role =
c("aut", "cre")), person("Pascal", "Kerschke", email = "kerschke@uni-muenster.de",
role = "ctb"))
Expand All @@ -32,4 +32,5 @@ Suggests:
LazyData: yes
ByteCompile: yes
LinkingTo: Rcpp, RcppArmadillo
RoxygenNote: 6.1.1
RoxygenNote: 7.1.0
Encoding: UTF-8
22 changes: 22 additions & 0 deletions NAMESPACE
Expand Up @@ -172,6 +172,25 @@ export(makeKeaneFunction)
export(makeKearfottFunction)
export(makeKursaweFunction)
export(makeLeonFunction)
export(makeMMF10Function)
export(makeMMF11Function)
export(makeMMF12Function)
export(makeMMF13Function)
export(makeMMF14Function)
export(makeMMF14aFunction)
export(makeMMF15Function)
export(makeMMF15aFunction)
export(makeMMF1Function)
export(makeMMF1eFunction)
export(makeMMF1zFunction)
export(makeMMF2Function)
export(makeMMF3Function)
export(makeMMF4Function)
export(makeMMF5Function)
export(makeMMF6Function)
export(makeMMF7Function)
export(makeMMF8Function)
export(makeMMF9Function)
export(makeMOP1Function)
export(makeMOP2Function)
export(makeMOP3Function)
Expand All @@ -185,13 +204,16 @@ export(makeMcCormickFunction)
export(makeMichalewiczFunction)
export(makeModifiedRastriginFunction)
export(makeMultiObjectiveFunction)
export(makeOmniTestFunction)
export(makePeriodicFunction)
export(makePowellSumFunction)
export(makePriceN1Function)
export(makePriceN2Function)
export(makePriceN4Function)
export(makeRastriginFunction)
export(makeRosenbrockFunction)
export(makeSYMPARTrotatedFunction)
export(makeSYMPARTsimpleFunction)
export(makeSchafferN2Function)
export(makeSchafferN4Function)
export(makeSchwefelFunction)
Expand Down
8 changes: 8 additions & 0 deletions NEWS
@@ -1,3 +1,11 @@
smoof 1.6.3
===========

* Added MMF1 to MMF13 problems from CEC2019 test suite
* Added SYM-Part simple, SYM-Part rotated and Omni-Test problems from CEC2019 test suite
* Added MMF14, MMF14a, MMF15 and MMF15a problems from CEC2019 test suite


smoof 1.6.0
===========

Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
@@ -1,3 +1,11 @@
# smoof 1.6.3

## New features

* Added MMF1 to MMF13 problems from CEC2019 test suite
* Added SYM-Part simple, SYM-Part rotated and Omni-Test problems from CEC2019 test suite
* Added MMF14, MMF14a, MMF15 and MMF15a problems from CEC2019 test suite

# smoof 1.6.0

## New features
Expand Down
88 changes: 88 additions & 0 deletions R/RcppExports.R
Expand Up @@ -37,6 +37,94 @@ mof_ED_2 <- function(x, m, gamma, theta) {
.Call(`_smoof_mof_ED_2`, x, m, gamma, theta)
}

mof_cec2019_SYM_PART_SIMPLE <- function(x, a, b, c) {
.Call(`_smoof_mof_cec2019_SYM_PART_SIMPLE`, x, a, b, c)
}

mof_cec2019_SYM_PART_ROTATED <- function(x, w, a, b, c) {
.Call(`_smoof_mof_cec2019_SYM_PART_ROTATED`, x, w, a, b, c)
}

mof_cec2019_OMNI_Test <- function(x) {
.Call(`_smoof_mof_cec2019_OMNI_Test`, x)
}

mof_cec2019_mmf1 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf1`, x)
}

mof_cec2019_mmf1_z <- function(x, k) {
.Call(`_smoof_mof_cec2019_mmf1_z`, x, k)
}

mof_cec2019_mmf1_e <- function(x, a) {
.Call(`_smoof_mof_cec2019_mmf1_e`, x, a)
}

mof_cec2019_mmf2 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf2`, x)
}

mof_cec2019_mmf3 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf3`, x)
}

mof_cec2019_mmf4 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf4`, x)
}

mof_cec2019_mmf5 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf5`, x)
}

mof_cec2019_mmf6 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf6`, x)
}

mof_cec2019_mmf7 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf7`, x)
}

mof_cec2019_mmf8 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf8`, x)
}

mof_cec2019_mmf9 <- function(x, np) {
.Call(`_smoof_mof_cec2019_mmf9`, x, np)
}

mof_cec2019_mmf10 <- function(x) {
.Call(`_smoof_mof_cec2019_mmf10`, x)
}

mof_cec2019_mmf11 <- function(x, np) {
.Call(`_smoof_mof_cec2019_mmf11`, x, np)
}

mof_cec2019_mmf12 <- function(x, np, q) {
.Call(`_smoof_mof_cec2019_mmf12`, x, np, q)
}

mof_cec2019_mmf13 <- function(x, np) {
.Call(`_smoof_mof_cec2019_mmf13`, x, np)
}

mof_cec2019_mmf14 <- function(x, M, np) {
.Call(`_smoof_mof_cec2019_mmf14`, x, M, np)
}

mof_cec2019_mmf14_a <- function(x, M, np) {
.Call(`_smoof_mof_cec2019_mmf14_a`, x, M, np)
}

mof_cec2019_mmf15 <- function(x, M, np) {
.Call(`_smoof_mof_cec2019_mmf15`, x, M, np)
}

mof_cec2019_mmf15_a <- function(x, M, np) {
.Call(`_smoof_mof_cec2019_mmf15_a`, x, M, np)
}

kursawe <- function(x) {
.Call(`_smoof_kursawe`, x)
}
Expand Down
64 changes: 64 additions & 0 deletions R/mof.SYMPARTrotated.R
@@ -0,0 +1,64 @@
#' @title
#' MMF13 Function
#'
#' @description
#' Test problem from the set of "multimodal multiobjective functions" as for
#' instance used in the CEC2019 competition.
#'
#' @param w [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{w = pi / 4}.
#' @param a [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{a = 1}.
#' @param b [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{b = 10}.
#' @param c [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{c = 8}.
#'
#' @references
#' Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel
#' scalable test problem suite for multimodal multiobjective optimization," in
#' Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
#' @return [\code{smoof_multi_objective_function}]
#' @export
makeSYMPARTrotatedFunction = function(w = pi / 4, a = 1, b = 10, c = 8) {
assertNumber(x = w, finite = TRUE)
assertNumber(x = a, finite = TRUE)
assertNumber(x = b, finite = TRUE)
assertNumber(x = c, finite = TRUE)
force(w)
force(a)
force(b)
force(c)

# C implementation
fn = function(x) {
assertNumeric(x, len = 2L, any.missing = FALSE, all.missing = FALSE, finite = TRUE)
return(mof_cec2019_SYM_PART_ROTATED(x = x, w = w, a = a, b = b, c = c))
}

n.objectives = 2L
makeMultiObjectiveFunction(
name = "SYMPART-rotated function",
id = sprintf("SYMPART-rotated-%id-%io", 2L, n.objectives),
description = "SYMPART-rotated function",
fn = fn,
par.set = makeNumericParamSet(
len = 2L,
id = "x",
lower = rep(-20, 2L),
upper = rep(20, 2L),
vector = TRUE
),
minimize = rep(TRUE, n.objectives),
n.objectives = n.objectives
)
}

class(makeSYMPARTrotatedFunction) = c("function", "smoof_generator")
attr(makeSYMPARTrotatedFunction, "name") = c("SYMPART-rotated")
attr(makeSYMPARTrotatedFunction, "type") = c("multi-objective")
attr(makeSYMPARTrotatedFunction, "tags") = c("multi-objective")
59 changes: 59 additions & 0 deletions R/mof.SYMPARTsimple.R
@@ -0,0 +1,59 @@
#' @title
#' MMF13 Function
#'
#' @description
#' Test problem from the set of "multimodal multiobjective functions" as for
#' instance used in the CEC2019 competition.
#'
#' @param a [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{a = 1}.
#' @param b [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{b = 10}.
#' @param c [\code{double}(1)]\cr
#' Parametrizable factor. In the CEC2019 competition, the organizers used
#' \code{c = 8}.
#'
#' @references
#' Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel
#' scalable test problem suite for multimodal multiobjective optimization," in
#' Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
#' @return [\code{smoof_multi_objective_function}]
#' @export
makeSYMPARTsimpleFunction = function(a = 1, b = 10, c = 8) {
assertNumber(x = a, finite = TRUE)
assertNumber(x = b, finite = TRUE)
assertNumber(x = c, finite = TRUE)
force(a)
force(b)
force(c)

# C implementation
fn = function(x) {
assertNumeric(x, len = 2L, any.missing = FALSE, all.missing = FALSE, finite = TRUE)
return(mof_cec2019_SYM_PART_SIMPLE(x = x, a = a, b = b, c = c))
}

n.objectives = 2L
makeMultiObjectiveFunction(
name = "SYMPART-simple function",
id = sprintf("SYMPART-simple-%id-%io", 2L, n.objectives),
description = "SYMPART-simple function",
fn = fn,
par.set = makeNumericParamSet(
len = 2L,
id = "x",
lower = rep(-20, 2L),
upper = rep(20, 2L),
vector = TRUE
),
minimize = rep(TRUE, n.objectives),
n.objectives = n.objectives
)
}

class(makeSYMPARTsimpleFunction) = c("function", "smoof_generator")
attr(makeSYMPARTsimpleFunction, "name") = c("SYMPART-simple")
attr(makeSYMPARTsimpleFunction, "type") = c("multi-objective")
attr(makeSYMPARTsimpleFunction, "tags") = c("multi-objective")
2 changes: 2 additions & 0 deletions R/mof.dtlz2.R
Expand Up @@ -32,6 +32,8 @@
#' Multi-Objective Optimization Test Problems. Computer Engineering and Networks
#' Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
#'
#' @note Note that in case of a bi-objective scenario (\code{n.objectives = 2L}) DTLZ2 and DTLZ5 are identical.
#'
#' @param dimensions [\code{integer(1)}]\cr
#' Number of decision variables.
#' @param n.objectives [\code{integer(1)}]\cr
Expand Down
5 changes: 5 additions & 0 deletions R/mof.dtlz5.R
Expand Up @@ -39,6 +39,11 @@
#' @references K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable
#' Multi-Objective Optimization Test Problems. Computer Engineering and Networks
#' Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
#'
#' @note This problem definition does not exist in the succeeding work of Deb et al. (K. Deb
#' and L. Thiele and M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization
#' test problems, Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830).\cr
#' Also, note that in case of a bi-objective scenario (\code{n.objectives = 2L}) DTLZ2 and DTLZ5 are identical.
#'
#' @param dimensions [\code{integer(1)}]\cr
#' Number of decision variables.
Expand Down
5 changes: 5 additions & 0 deletions R/mof.dtlz6.R
Expand Up @@ -40,6 +40,11 @@
#' Multi-Objective Optimization Test Problems. Computer Engineering and Networks
#' Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
#'
#' @note Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele and
#' M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization test problems,
#' Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830)
#' this problem was called DTLZ5.
#'
#' @param dimensions [\code{integer(1)}]\cr
#' Number of decision variables.
#' @param n.objectives [\code{integer(1)}]\cr
Expand Down
5 changes: 5 additions & 0 deletions R/mof.dtlz7.R
Expand Up @@ -35,6 +35,11 @@
#' @references K. Deb and L. Thiele and M. Laumanns and E. Zitzler. Scalable
#' Multi-Objective Optimization Test Problems. Computer Engineering and Networks
#' Laboratory (TIK), Swiss Federal Institute of Technology (ETH) Zurich, 112, 2001
#'
#' @note Attention: Within the succeeding work of Deb et al. (K. Deb and L. Thiele and
#' M. Laumanns and E. Zitzler (2002). Scalable multi-objective optimization test problems,
#' Proceedings of the IEEE Congress on Evolutionary Computation, pp. 825-830)
#' this problem was called DTLZ6.
#'
#' @param dimensions [\code{integer(1)}]\cr
#' Number of decision variables.
Expand Down
43 changes: 43 additions & 0 deletions R/mof.mmf1.R
@@ -0,0 +1,43 @@
#' @title
#' MMF1 Function
#'
#' @description
#' Test problem from the set of "multimodal multiobjective functions" as for
#' instance used in the CEC2019 competition.
#'
#' @references
#' Caitong Yue, Boyang Qu, Kunjie Yu, Jing Liang, and Xiaodong Li, "A novel
#' scalable test problem suite for multimodal multiobjective optimization," in
#' Swarm and Evolutionary Computation, Volume 48, August 2019, pp. 62–71, Elsevier.
#' @return [\code{smoof_multi_objective_function}]
#' @export
makeMMF1Function = function() {

# C implementation
fn = function(x) {
assertNumeric(x, len = 2L, any.missing = FALSE, all.missing = FALSE, finite = TRUE)
return(mof_cec2019_mmf1(x = x))
}

n.objectives = 2L
makeMultiObjectiveFunction(
name = "MMF1 function",
id = sprintf("MMF1-%id-%io", 2L, n.objectives),
description = "MMF1 function",
fn = fn,
par.set = makeNumericParamSet(
len = 2L,
id = "x",
lower = c(1, -1),
upper = c(3, 1),
vector = TRUE
),
minimize = rep(TRUE, n.objectives),
n.objectives = n.objectives
)
}

class(makeMMF1Function) = c("function", "smoof_generator")
attr(makeMMF1Function, "name") = c("MMF1")
attr(makeMMF1Function, "type") = c("multi-objective")
attr(makeMMF1Function, "tags") = c("multi-objective")

0 comments on commit 69a23cc

Please sign in to comment.