# generate homogeneous uncorrelated bi-objective MNK-landscape with each
# three epistatic links
M = 2L
N = 20L
K = 3L
fn = makeMNKFunction(M, N, K)
# generate MNK-landscape where the first function has 3 epistatic links
# per bit while the second function has 2
fn = makeMNKFunction(M, N, K = c(3L, 2L))
# sample the number of epistatic links individually from {1, ..., 5} for
# every bit position and every objective
K = lapply(seq_len(M), function(m) sample(1:(N-1), size = N, replace = TRUE))
fn = makeMNKFunction(M, N, K = K)
#' # generate strongly positively correlated objectives
fn = makeRMNKFunction(M, N, K, rho = 0.9)
# alternative constructor: generate two single-objective NK-landscapes
# and combine into bi-objective problem
soofn1 = makeNKFunction(N, K = 2L) # homegeneous in K
K = sample(2:3, size = N, replace = TRUE)
soofn2 = makeNKFunction(N, K = K) # heterogeneous in K
moofn = makeMNKFunction(funs = list(soofn1, soofn2))
getNumberOfObjectives(moofn)
Run the code above in your browser using DataLab