Nothing
library(calibrar)
library(testthat)
tfn = function(x) sum(x^2) + 10
# optimh ------------------------------------------------------------------
message("\nTests for optimh() -------- \n")
algorithms = c("AHR-ES", "Nelder-Mead", "SANN", "hjn",
"CMA-ES", "genSA", "DE", "soma", "genoud", "PSO",
"hybridPSO", "mads", "hjk", "hjkb", "nmk", "nmkb", "bobyqa")
for(alg in algorithms) {
message(alg, " - ", date())
test_that(sprintf("algorithm test: '%s'.", alg), {
expect_no_error(
optimh(par=rep(0.5, 5), fn = tfn, lower=rep(-100, 5), upper=rep(100, 5),
method=alg))
})
}
message("\nTests for ahres() -------- \n")
test_that("ahres", {
expect_no_error(
suppressMessages(ahres(par=rep(0.5, 5), fn = tfn,
lower=rep(-100, 5), upper=rep(100, 5)
)))
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.