Learn R Programming

prioritizr (version 3.0.4)

add_semicontinuous_decisions: Add semi-continuous decisions

Description

Add a semi-continuous 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, which is the default function (see add_binary_decisions). This decision is similar to the add_proportion_decisions function except that it has an upper bound parameter. By default, the decision can range from prioritizing none (0 %) to all (100 %) of a planning unit. However, a upper bound can be specified to ensure that at most only a fraction (e.g. 80 %) of a planning unit can be preserved. This type of decision may be useful when it is not practical to conserve the entire planning unit.

Usage

add_semicontinuous_decisions(x, upper_limit)

Arguments

upper_limit

numeric value specifying the maximum proportion of a planning unit that can be reserved (e.g. set to 0.8 for 80 %).

Value

Decision-class 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. If multiple decisions are added to a problem object, then the last one to be added will be used.

See Also

decisions.

Examples

Run this code
# NOT RUN {
# create problem with semicontinuous decisions that have an upper bound of
# 50 % of the planning unit
p <- problem(sim_pu_raster, sim_features) %>%
     add_min_set_objective() %>%
     add_relative_targets(0.1) %>%
     add_semicontinuous_decisions(upper_limit = 0.5)
# }
# NOT RUN {
# solve problem
s <- solve(p)

# plot solutions
plot(s, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab