View source: R/greedy_heuristic_optimization.R
greedy_heuristic_prioritization | R Documentation |
Generate a prioritization for protected area establishment.
greedy_heuristic_prioritization(
site_data,
feature_data,
site_probability_columns,
site_management_cost_column,
feature_target_column,
total_budget,
site_management_locked_in_column = NULL,
site_management_locked_out_column = NULL
)
site_data |
|
feature_data |
|
site_probability_columns |
|
site_management_cost_column |
|
feature_target_column |
|
total_budget |
|
site_management_locked_in_column |
|
site_management_locked_out_column |
|
The prioritization is generated using a greedy heuristic algorithm. The objective function for this algorithm is calculated by: (i) estimating the probability that each species meets its target, and (ii) calculating the sum of these probabilities. Note that this function underpins the value of information calculations because it is used to assess a potential management decision given updated information on the presence of particular species in particular sites.
A list
containing the following elements:
logical
vector indicating if each site is selected for
protection or not.
numeric
value denoting the objective value for
the prioritization.
# set seeds for reproducibility
set.seed(123)
# load example site data
data(sim_sites)
print(sim_sites)
# load example feature data
data(sim_features)
print(sim_features)
# set total budget for managing sites for conservation
# (i.e. 50% of the cost of managing all sites)
total_budget <- sum(sim_sites$management_cost) * 0.5
# generate reserve selection prioritization
results <- greedy_heuristic_prioritization(
sim_sites, sim_features,
c("p1", "p2", "p3"),
"management_cost",
"target",
total_budget
)
# print results
print(results)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.