Description Usage Arguments Value See Also Examples
Add penalties to a conservation problem to favor solutions that clump selected planning units together into contiguous reserves.
1 | add_boundary_penalties(x, penalty, edge_factor, boundary_data = NULL)
|
x |
|
penalty |
|
edge_factor |
|
boundary_data |
|
ConservationProblem-class
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # create basic problem
p1 <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2) %>%
add_default_solver()
# create problem with low boundary penalties
p2 <- p1 %>% add_boundary_penalties(5, 1)
# create problem with high boundary penalties
# receive half the penalty as inner edges
p3 <- p1 %>% add_boundary_penalties(50, 1)
# solve problems
s <- stack(solve(p1), solve(p2), solve(p3))
# plot solutions
plot(s, main = c("basic solution", "small penalties", "high penalties"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.