-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial commit with CEC2019 test functions
- Loading branch information
Showing
22 changed files
with
1,417 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#' @title | ||
#' MMF10 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 | ||
makeMMF10Function = function() { | ||
# C implementation | ||
fn = function(x) { | ||
assertNumeric(x, len = 2L, any.missing = FALSE, all.missing = FALSE, finite = TRUE) | ||
return(mof_cec2019_mmf10(x = x)) | ||
} | ||
|
||
n.objectives = 2L | ||
makeMultiObjectiveFunction( | ||
name = "MMF10 function", | ||
id = sprintf("MMF10-%id-%io", 2L, n.objectives), | ||
description = "MMF10 function", | ||
fn = fn, | ||
par.set = makeNumericParamSet( | ||
len = 2L, | ||
id = "x", | ||
lower = rep(0.1, 2L), | ||
upper = rep(1.1, 2L), | ||
vector = TRUE | ||
), | ||
minimize = rep(TRUE, n.objectives), | ||
n.objectives = n.objectives | ||
) | ||
} | ||
|
||
class(makeMMF10Function) = c("function", "smoof_generator") | ||
attr(makeMMF10Function, "name") = c("MMF10") | ||
attr(makeMMF10Function, "type") = c("multi-objective") | ||
attr(makeMMF10Function, "tags") = c("multi-objective") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#' @title | ||
#' MMF11 Function | ||
#' | ||
#' @description | ||
#' Test problem from the set of "multimodal multiobjective functions" as for | ||
#' instance used in the CEC2019 competition. | ||
#' | ||
#' @param np [\code{integer}(1)]\cr | ||
#' Number of global Pareto sets. In the CEC2019 competition, the organizers used | ||
#' \code{np = 2L}. | ||
#' | ||
#' @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 | ||
makeMMF11Function = function(np = 2L) { | ||
assertInt(x = np, lower = 1L) | ||
force(np) | ||
|
||
# C implementation | ||
fn = function(x) { | ||
assertNumeric(x, len = 2L, any.missing = FALSE, all.missing = FALSE, finite = TRUE) | ||
return(mof_cec2019_mmf11(x = x, np = np)) | ||
} | ||
|
||
n.objectives = 2L | ||
makeMultiObjectiveFunction( | ||
name = "MMF11 function", | ||
id = sprintf("MMF11-%id-%io", 2L, n.objectives), | ||
description = "MMF11 function", | ||
fn = fn, | ||
par.set = makeNumericParamSet( | ||
len = 2L, | ||
id = "x", | ||
lower = rep(0.1, 2L), | ||
upper = rep(1.1, 2L), | ||
vector = TRUE | ||
), | ||
minimize = rep(TRUE, n.objectives), | ||
n.objectives = n.objectives | ||
) | ||
} | ||
|
||
class(makeMMF11Function) = c("function", "smoof_generator") | ||
attr(makeMMF11Function, "name") = c("MMF11") | ||
attr(makeMMF11Function, "type") = c("multi-objective") | ||
attr(makeMMF11Function, "tags") = c("multi-objective") |
Oops, something went wrong.