Learn R Programming

oppr (version 1.0.0)

add_binary_decisions: 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

Value

ProjectProblem-class object with the decisions added to it.

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.

See Also

decisions.

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataLab