Skip to content

Commit

Permalink
add example for AS-EMOA
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobbossek committed Jun 14, 2016
1 parent 55a98bc commit a392a1f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/emoa.as-emoa.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#' @param ... [any]\cr
#' Further arguments passed to \code{\link{setupECRControl}}.
#' @return [\code{ecr_asemoa_result, ecr_multi_objective_result}]
#' @example examples/ex_asemoa.R
#' @export
asemoa = function(
task,
Expand Down
20 changes: 20 additions & 0 deletions examples/ex_asemoa.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
library(smoof)

obj.fn = makeDTLZ2Function(dimensions = 2L, n.objectives = 2L)

# define the aspiration set, i.e., a set of reference points
aspiration.set = matrix(
c(0.1531, 0.1594, 0.1656, 0.1719, 0.1781, 0.1844, 0.1906, 0.1969, 0.2031, 0.2094,
0.2094, 0.2031, 0.1969, 0.1906, 0.1844, 0.1781, 0.1719, 0.1656, 0.1594, 0.1531),
byrow = TRUE,
nrow = 2L
)

\dontrun{
res = asemoa(
task = obj.fn,
n.population = 10L,
aspiration.set = aspiration.set,
max.evals = 1000L
)
}
22 changes: 22 additions & 0 deletions man/asemoa.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a392a1f

Please sign in to comment.