add_default_solver {oppr} | R Documentation |
Add a default solver
Description
Identify the best solver currently installed on the system and specify that
it should be used to solve a project prioritization problem()
.
Usage
add_default_solver(x, ...)
Arguments
x |
ProjectProblem object. |
... |
arguments passed to the solver. |
Details
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.
See Also
Examples
# 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)
[Package oppr version 1.0.4 Index]