Learn R Programming

oppr (version 1.0.4)

decisions: Specify the type of decisions

Description

Project prioritization problems involve making decisions about how funding will be allocated to management actions.

Arguments

Details

Please note that only one type of decision is currently supported:

add_binary_decisions()

This is the conventional type of decision where management actions are either prioritized for funding or not.

See Also

constraints, objectives, problem(), solvers, targets, weights.

Examples

Run this code
# 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)

if (FALSE) {
# solve problem
s <- solve(p)

# print solution
print(s)

# plot solution
plot(p, s)
}

Run the code above in your browser using DataLab