View source: R/add_binary_decisions.R
add_binary_decisions | R Documentation |
Add a binary decision to a project prioritization problem()
.
This is the conventional decision of either prioritizing funding
for a management action or not.
add_binary_decisions(x)
x |
ProjectProblem object. |
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.
ProjectProblem object with the decisions added to it.
decisions.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.