problem | R Documentation |
Create a project prioritization problem. This function is used to
specify the underlying data used in a prioritization problem: the projects,
the management actions, and the features that need
to be conserved (e.g. species, ecosystems). After constructing this
ProjectProblem-class
object,
it can be customized using objectives, targets,
weights, constraints, decisions and
solvers. After building the problem, the
solve()
function can be used to identify solutions.
problem( projects, actions, features, project_name_column, project_success_column, action_name_column, action_cost_column, feature_name_column, adjust_for_baseline = TRUE )
projects |
|
actions |
|
features |
|
project_name_column |
|
project_success_column |
|
action_name_column |
|
action_cost_column |
|
feature_name_column |
|
adjust_for_baseline |
|
A project prioritization problem has actions, projects,
and features. Features are the biological entities that need to
be conserved (e.g. species, populations, ecosystems). Actions are
real-world management actions that can be implemented to enhance
biodiversity (e.g. habitat restoration, monitoring, pest eradication). Each
action should have a known cost, and this usually means that each
action should have a defined spatial extent and time period (though this
is not necessary). Conservation projects are groups of management actions
(they can also comprise a singular action too), and each project is
associated with a probability of success if all of its associated actions
are funded. To determine which projects should be funded, each project is
associated with an probability of persistence for the
features that they benefit. These values should indicate the
probability that each feature will persist if only that project funded
and not the additional benefit relative to the baseline project. Missing
(NA
) values should be used to indicate which projects do not
enhance the probability of certain features.
The goal of a project prioritization exercise is then to identify which management actions—and as a consequence which conservation projects—should be funded. Broadly speaking, the goal of an optimization problem is to minimize (or maximize) an objective function given a set of control variables and decision variables that are subject to a series of constraints. In the context of project prioritization problems, the objective is usually some measure of utility (e.g. the net probability of each feature persisting into the future), the control variables determine which actions should be funded or not, the decision variables contain additional information needed to ensure correct calculations, and the constraints impose limits such as the total budget available for funding management actions. For more information on the mathematical formulations used in this package, please refer to the manual entries for the available objectives (listed in objectives).
A new ProjectProblem object.
constraints, decisions,
objectives, solvers, targets,
weights, solution_statistics()
,
plot.ProjectProblem()
.
# load data data(sim_projects, sim_features, sim_actions) # print project data print(sim_projects) # print action data print(sim_features) # print feature data print(sim_actions) # build problem p <- problem(sim_projects, sim_actions, sim_features, "name", "success", "name", "cost", "name") %>% add_max_richness_objective(budget = 400) %>% add_feature_weights("weight") %>% add_binary_decisions() # print problem print(p) ## Not run: # solve problem s <- solve(p) # print output print(s) # print which actions are funded in the solution s[, sim_actions$name, drop = FALSE] # print the expected probability of persistence for each feature # if the solution were implemented s[, sim_features$name, drop = FALSE] # visualize solution plot(p, s) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.