number_of_projects | R Documentation |
Extract the number of projects in an object.
number_of_projects(x)
## S4 method for signature 'ProjectProblem'
number_of_projects(x)
## S4 method for signature 'OptimizationProblem'
number_of_projects(x)
x |
ProjectProblem or OptimizationProblem object. |
integer
number of projects.
# load data
data(sim_projects, sim_features, sim_actions)
# build problem with default solver
p <- problem(sim_projects, sim_actions, sim_features,
"name", "success", "name", "cost", "name") %>%
add_max_richness_objective(budget = 200) %>%
add_binary_decisions() %>%
add_default_solver()
# print problem
print(p)
# print number of projects
number_of_projects(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.