Description Usage Arguments See Also Examples
Set up, execute, and log a race between several solvers (candidates
) to solve partition problem's instances (task
).
It requires the package race.
1 2 3 | PartRace(candidates, tasks, maxExp = 0, stat.test = c("friedman",
"t.bonferroni", "t.holm", "t.none"), conf.level = 0.95, first.test = 10,
interactive = TRUE, log.file = "", timeout = NA, plot.file = "")
|
candidates |
a character vector which contains the names of the solver's functions |
tasks |
a list of integer sets (numeric vector) |
maxExp |
Maximum number of experiments (i.e. evaluations of the
function |
stat.test |
Statistical test to be used for discarding inferior candidates. |
conf.level |
The confidence level to be used for the statistical test. |
first.test |
The first test for discarding inferior candidates is
performed only when all candidates have been evaluated on a minimum
number of tasks equal to |
interactive |
If |
log.file |
File for saving periodically the state of the race. |
timeout |
per run in seconds (one candidate executes one task) that requires the package R.utils |
plot.file |
filename to plot the progress of the race. |
race, race.wrapper,
1 2 3 4 5 6 7 8 9 | ## Generate five random instances of the partition problem
tasks <- PartGenInt( m = 5)
## Functions that return a random partition
BeatMe <- function(sizes) sample(c(TRUE,FALSE),length(sizes), replace=TRUE)
BeatMeAgain <- BeatMe
## vector of candidate names
candidates <- c("BeatMe", "BeatMeAgain")
## Race between the two functions/algorithms
PartRace(candidates, tasks, plot.file = NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.