add_settings {restoptr} | R Documentation |
Add settings
Description
Add settings to a restoration problem (restopt_problem()
) object
to customize the optimization procedure.
Usage
add_settings(
problem,
precision = 4,
time_limit = 0,
nb_solutions = 1,
optimality_gap = 0,
solution_name_prefix = "Solution "
)
Arguments
problem |
|
precision |
|
time_limit |
|
nb_solutions |
|
optimality_gap |
|
solution_name_prefix |
|
Value
An updated restoration problem (restopt_problem()
) object.
Examples
# 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)
[Package restoptr version 1.0.6 Index]