View source: R/add_default_solver.R
add_default_solver | R Documentation |
Identify the best solver currently installed on the system and specify that
it should be used to solve a project prioritization problem()
.
add_default_solver(x, ...)
x |
ProjectProblem object. |
... |
arguments passed to the solver. |
Ranked from best to worst, the solvers that can be used are:
gurobi, (add_gurobi_solver()
),
Rsymphony (add_rsymphony_solver()
), lpsymphony
(add_lpsymphony_solver()
), and lpSolveAPI
(add_lpsolveapi_solver()
). This function does not consider
solvers that generate solutions using heuristic algorithms (i.e.
add_heuristic_solver()
) or random processes
(i.e. add_random_solver()
) because they cannot provide
any guarantees on solution quality.
solvers.
# 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) ## 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.