add_settings | R Documentation |
Add settings to a restoration problem (restopt_problem()
) object
to customize the optimization procedure.
add_settings(
problem,
precision = 4,
time_limit = 0,
nb_solutions = 1,
optimality_gap = 0,
solution_name_prefix = "Solution "
)
problem |
|
precision |
|
time_limit |
|
nb_solutions |
|
optimality_gap |
|
solution_name_prefix |
|
An updated restoration problem (restopt_problem()
) object.
## Not run:
# load data
habitat_data <- rast(
system.file("extdata", "habitat_hi_res.tif", package = "restoptr")
)
# create problem
p <- restopt_problem(
existing_habitat = habitat_data,
aggregation_factor = 16,
habitat_threshold = 0.7
) %>%
add_settings(time_limit = 1, precision = 4, nb_solutions = 2)
# print problem
print(p)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.