set_no_objective {restoptr} | R Documentation |
Configure the solver to only satisfy the constraints, without optimization objective
Description
Specify that a restoration problem (restopt_problem()
) should satisfy
the constraints without optimization objective.
Usage
set_no_objective(problem)
Arguments
problem |
|
Details
Using set_no_objective() in a restopt problem, the solver will return the first solution found satisfying the constraint, without any optimization objective. This "no objective" setting is set by default when creating a restopt problem.
Value
An updated restoration problem (restopt_problem()
) object.
See Also
Other objectives:
set_max_iic_objective()
,
set_max_mesh_objective()
,
set_max_nb_pus_objective()
,
set_max_restore_objective()
,
set_min_nb_pus_objective()
,
set_min_restore_objective()
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
) %>% set_no_objective()
# print problem
print(p)
# Solve problem
s <- solve(p)
# plot solution
plot(s)
[Package restoptr version 1.0.6 Index]