compile | R Documentation |
Compile a project prioritization problem()
into a general
purpose format for optimization.
compile(x, ...) ## S3 method for class 'ProjectProblem' compile(x, ...)
x |
ProjectProblem object. |
... |
not used. |
This function might be useful for those interested in understanding
how their project prioritization problem()
is expressed
as a mathematical problem. However, if the problem just needs to
be solved, then the solve()
function should be used instead.
OptimizationProblem object.
# 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) # compile problem o <- compile(p) # print compiled problem print(o)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.