Last chance! 50% off unlimited learning
Sale ends in
Set an objective to find the solution that fulfills as many targets as possible while ensuring that the cost of the solution does not exceed a budget.
add_max_features_objective(x, budget)
ConservationProblem-class
object.
numeric
value specifying the maximum expenditure of
the prioritization.
A problem objective is used to specify the overall goal of the conservation planning problem. Please note that all conservation planning problems formulated in the prioritizr package require the addition of both objectives and targets. Failing to do so will return a default error message when solving.
The maximum feature representation problem is a hybrid between the minimum
set (see add_min_set_objective
) and maximum cover
(see add_max_cover_objective
) problems in that it allows for
both a budget and targets to be set. This problem finds the set of planning
units that meets representation targets for as many features as possible
while staying within a fixed budget. If multiple solutions can meet all
targets while staying within budget, the cheapest solution is chosen.
The maximum feature objective for the reserve design problem can be
expressed mathematically for a set of planning units (
Here, decisions
variable (e.g.
specifying whether planning unit add_feature_weights
to specify weights). Additionally,
# NOT RUN {
# load data
data(sim_pu_raster, sim_features)
# create problem
p <- problem(sim_pu_raster, sim_features) %>%
add_max_features_objective(5000) %>%
add_relative_targets(0.1) %>%
add_binary_decisions()
# }
# NOT RUN {
# solve problem
s <- solve(p)
# plot solution
plot(s, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab