# # Note: test needs updating
#
# # path <- system.file("test_data", "scenario_0", package = "mm.reoptimise")
# path <- system.file("testdata", "three3", package = "mm.reoptimise")
# scenario <- create_scenario(path)
#
# scenario <- set_scenario(scenario,
# period = "month",
# budget = 3.8e7,
# kpi1 = "Profit",
# kpi2 = "Profit",
# kpi3 = "Profit")
#
# optim_type <- "alloc"
#
# constant <- NULL
# # run functions that would be ran inside run_optimiaztion function ----------------
# if (is.null(constant)){
# if(optim_type == "alloc") constant = 1e-6
# if(optim_type == "alloc_pct") constant = 1e10
# if(optim_type == "net") constant = 1e-6
# }
#
# # Create data to be used in the optimisation
# scenario$data_optim <- get_data_optim(scenario)
#
# const_strings <- get_constraints_strings(scenario, optim_type = "alloc", "month")
#
# test_that("output is a list with expected length and data types", {
# # expect_type(const_strings, "list")
# # expect_length(const_strings, 6)
# # expect_true(is.character(const_strings$constraint_function))
# # expect_true(is.character(const_strings$constraint_jacobian))
# # expect_true(is.numeric(const_strings$num_constraints_eq))
# # expect_true(is.numeric(const_strings$num_constraints_ineq))
#
# })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.