Description Usage Arguments Value See Also Examples
Add constraints to a conservation problem to ensure that all selected planning units are spatially connected to each other.
1 |
x |
|
... |
arguments passed to |
ConservationProblem-class
object with the constraint
added to it.
constraints
for all the available constraints.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # create basic problem
p1 <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2)
# create problem with added connected constraints
p2 <- p1 %>% add_connected_constraints()
# solve problems
s <- stack(solve(p1), solve(p2))
# plot solutions
plot(s, main=c("basic solution", "connected solution"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.