Description Usage Arguments Value See Also Examples
Create a systematic conservation planning problem. This function is used to
specify the basic data used in a spatial prioritization problem: the
spatial distribution of the planning units and their costs, as well as
the features (eg. species, ecosystems) that need to be conserved. After
constructing this object, it can be customized to meet specific
objectives using targets (see targets
) and constraints
(see constraints
).
1 2 3 4 5 6 7 8 9 10 |
x |
|
features |
The correct argument for
|
... |
not used. |
cost_column |
|
rij |
|
A ConservationProblem-class
object containing the
basic data used to build a prioritization problem.
constraints
, objectives
,
targets
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # create problem using raster planning unit data
p1 <- problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2) %>%
add_binary_decision()
# create problem using polygon planning unit data
p2 <- problem(sim_pu_polygons, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2) %>%
add_binary_decision()
# create problem using line planning unit data
p3 <- problem(sim_pu_lines, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2) %>%
add_binary_decision()
# create problem using point planning unit data
p4 <- problem(sim_pu_points, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.2) %>%
add_binary_decision()
# solve problems
s <- list(solve(p1), solve(p2), solve(p3), solve(p4))
# plot solutions
par(mfrow=c(2,2))
plot(s[[1]], main = "raster data")
plot(s[[2]], main = "polygon data")
plot(s[[2]][s[[2]]$solution == 1, ], col = "darkgreen", add = TRUE)
plot(s[[3]], main = "line data")
lines(s[[3]][s[[3]]$solution == 1, ], col = "darkgreen", lwd = 2)
plot(s[[4]], main = "point data", pch = 19)
points(s[[4]][s[[4]]$solution == 1, ], col = "darkgreen", cex = 2, pch = 19)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.