View source: R/getExactFront.R
getExactFront | R Documentation |
Function which expects a problem instance of a combinatorial optimization problem (e.g., MST), a multi-objective function and a solution enumerator, i.e., a function which enumerates all possible solutions (e.g., all Pruefer codes in case of a MST problem) and determines both the Pareto front and Pareto set by exhaustive enumeration.
getExactFront(instance, obj.fun, enumerator.fun, n.objectives, simplify = TRUE)
instance |
[any] |
obj.fun |
[ |
enumerator.fun |
[ |
n.objectives |
[ |
simplify |
[ |
[list
] List with elements pareto.set
(matrix of Pareto-optimal solutions)
and pareto.front
(matrix of corresponding weight vectors).
This method exhaustively enumerates all possible solutions of a given multi-objective combinatorial optimization problem. Thus, it is limited to small input size due to combinatorial explosion.
# here we enumerate all Pareto-optimal solutions of a bi-objective mcMST problem
# we use the Pruefer-code enumerator. Thus, we need to define an objective
# function, which is able to handle this type of endcoding
objfunMCMST = function(pcode, instance) {
getWeight(instance, prueferToEdgeList(pcode))
}
# next we generate a random bi-objective graph
g = genRandomMCGP(5L)
# ... and finally compute the exact front of g
res = getExactFront(g, obj.fun = objfunMCMST, enumerator.fun = enumerateMST, n.objectives = 2L)
## Not run:
plot(res$pareto.front)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.