Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_proportion_decisions

Add proportion decisions


Description

Add a proportion decision to a conservation planning problem(). This is a relaxed decision where a part of a planning unit can be prioritized as opposed to the entire planning unit. Typically, this decision has the assumed action of buying a fraction of a planning unit to include in decisions will solve much faster than problems that use binary-type decisions

Usage

add_proportion_decisions(x)

Arguments

x

problem() (i.e. ConservationProblem) object.

Details

Conservation planning problems involve making decisions on planning units. These decisions are then associated with actions (e.g. turning a planning unit into a protected area). If no decision is explicitly added to a problem, then the binary decision class will be used by default. Only a single decision should be added to a ConservationProblem object. Note that if multiple decisions are added to a problem object, then the last one to be added will be used.

Value

Object (i.e. ConservationProblem) with the decisions added to it.

See Also

Examples

# set seed for reproducibility
set.seed(500)

# load data
data(sim_pu_raster, sim_features, sim_pu_zones_stack, sim_features_zones)

# create minimal problem with proportion decisions
p1 <- problem(sim_pu_raster, sim_features) %>%
      add_min_set_objective() %>%
      add_relative_targets(0.1) %>%
      add_proportion_decisions() %>%
      add_default_solver(verbose = FALSE)
## Not run: 
# solve problem
s1 <- solve(p1)

# plot solutions
plot(s1, main = "solution")

## End(Not run)
# build multi-zone conservation problem with proportion decisions
p2 <- problem(sim_pu_zones_stack, sim_features_zones) %>%
      add_min_set_objective() %>%
      add_relative_targets(matrix(runif(15, 0.1, 0.2), nrow = 5,
                                  ncol = 3)) %>%
      add_proportion_decisions() %>%
      add_default_solver(verbose = FALSE)
## Not run: 
# solve the problem
s2 <- solve(p2)

# print solution
print(s2)

# plot solution
# panels show the proportion of each planning unit allocated to each zone
plot(s2, axes = FALSE, box = FALSE)

## End(Not run)

prioritizr

Systematic Conservation Prioritization in R

v7.0.1
GPL-3
Authors
Jeffrey O Hanson [aut] (<https://orcid.org/0000-0002-4716-6134>), Richard Schuster [aut, cre] (<https://orcid.org/0000-0003-3191-7869>), Nina Morrell [aut], Matthew Strimas-Mackey [aut] (<https://orcid.org/0000-0001-8929-7776>), Matthew E Watts [aut], Peter Arcese [aut] (<https://orcid.org/0000-0002-8097-482X>), Joseph Bennett [aut] (<https://orcid.org/0000-0002-3901-9513>), Hugh P Possingham [aut] (<https://orcid.org/0000-0001-7755-996X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.