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

add_proportion_decisions(x)

## Arguments

x

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

## Value

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

## 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). 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.

See decisions for an overview of all functions for adding decisions.

Other decisions: add_binary_decisions(), add_default_decisions(), add_semicontinuous_decisions()

## Examples

# set seed for reproducibility
set.seed(500)

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) %>%
# \dontrun{
# solve problem
s1 <- solve(p1)

# plot solutions
plot(s1, main = "solution") # }
# build multi-zone conservation problem with proportion decisions
p2 <- problem(sim_pu_zones_stack, sim_features_zones) %>%
add_relative_targets(matrix(runif(15, 0.1, 0.2), nrow = 5,
ncol = 3)) %>%
# \dontrun{
# solve the problem
s2 <- solve(p2)

# print solution
print(s2)
#> class      : RasterStack
#> dimensions : 10, 10, 100, 3  (nrow, ncol, ncell, nlayers)
#> resolution : 0.1, 0.1  (x, y)
#> extent     : 0, 1, 0, 1  (xmin, xmax, ymin, ymax)
#> crs        : NA
#> names      : zone_1, zone_2, zone_3
#> min values :      0,      0,      0
#> max values :      1,      1,      1
#>

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