View source: R/add_lpsolveapi_solver.R
add_lpsolveapi_solver  R Documentation 
Specify that the lp_solve software should be used to solve a
project prioritization problem()
using the lpSolveAPI
package. This function can also be used to customize the behavior of the
solver. It requires the lpSolveAPI package.
add_lpsolveapi_solver(x, gap = 0, presolve = FALSE, verbose = TRUE)
x 
ProjectProblem object. 
gap 

presolve 

verbose 

lp_solve is an
opensource integer programming solver.
Although this solver is the slowest currently supported solver,
it is also the only exact algorithm solver that can be installed on all
operating systems without any manual installation steps. This solver is
provided so that
users can try solving small project prioritization problems, without
needing to install additional software. When solve moderate or large
project prioritization problems, consider using
add_gurobi_solver()
.
ProjectProblem object with the solver added to it.
solvers.
# load data data(sim_projects, sim_features, sim_actions) # build problem with lpSolveAPI solver p < problem(sim_projects, sim_actions, sim_features, "name", "success", "name", "cost", "name") %>% add_max_richness_objective(budget = 200) %>% add_binary_decisions() %>% add_lpsolveapi_solver() # print problem print(p) # solve problem s < solve(p) # print solution print(s) # plot solution plot(p, s)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.