add_binary_decisions: Add binary decisions

View source: R/add_binary_decisions.R

add_binary_decisionsR Documentation

Add binary decisions

Description

Add a binary decision to a project prioritization problem(). This is the conventional decision of either prioritizing funding for a management action or not.

Usage

add_binary_decisions(x)

Arguments

x

ProjectProblem object.

Details

Project prioritization problems involve making decisions about how funding will be allocated to management actions. Only a single decision should be added to a ProjectProblem object. If no decision is added to a problem then this decision type will be used by default. Currently, this is the only supported decision type.

Value

ProjectProblem object with the decisions added to it.

See Also

decisions.

Examples

# load data
data(sim_projects, sim_features, sim_actions)

# build problem with maximum richness objective, $200 budget, and
# binary decisions
p <- problem(sim_projects, sim_actions, sim_features,
             "name", "success", "name", "cost", "name") %>%
     add_max_richness_objective(budget = 200) %>%
     add_binary_decisions()

# print problem
print(p)

## Not run: 
# solve problem
s <- solve(p)

# print solution
print(s)

# plot solution
plot(p, s)

## End(Not run)

prioritizr/ppr documentation built on Sept. 10, 2022, 1:18 p.m.