add_highs_solver {prioritizr} | R Documentation |
Add a HiGHS solver
Description
Specify that the HiGHS software should be used to solve a conservation planning problem (Huangfu and Hall 2018). This function can also be used to customize the behavior of the solver. It requires the highs package to be installed.
Usage
add_highs_solver(
x,
gap = 0.1,
time_limit = .Machine$integer.max,
presolve = TRUE,
threads = 1,
verbose = TRUE
)
Arguments
x |
|
gap |
|
time_limit |
|
presolve |
|
threads |
|
verbose |
|
Details
HiGHS is an open source optimization software.
Although this solver can have comparable performance to the CBC solver
(i.e., add_cbc_solver()
) for particular problems and is generally faster
than the SYMPHONY based solvers (i.e., add_rsymphony_solver()
,
add_lpsymphony_solver()
), it can sometimes take much longer than the
CBC solver for particular problems. This solver is recommended if
the add_gurobi_solver()
, add_cplex_solver()
, add_cbc_solver()
cannot
be used.
Value
An updated problem()
object with the solver added to it.
References
Huangfu Q and Hall JAJ (2018). Parallelizing the dual revised simplex method. Mathematical Programming Computation, 10: 119-142.
See Also
Other solvers:
add_cbc_solver()
,
add_cplex_solver()
,
add_default_solver()
,
add_gurobi_solver()
,
add_lsymphony_solver
,
add_rsymphony_solver()
Examples
## Not run:
# load data
sim_pu_raster <- get_sim_pu_raster()
sim_features <- get_sim_features()
# create problem
p <-
problem(sim_pu_raster, sim_features) %>%
add_min_set_objective() %>%
add_relative_targets(0.1) %>%
add_binary_decisions() %>%
add_highs_solver(gap = 0, verbose = FALSE)
# generate solution
s <- solve(p)
# plot solution
plot(s, main = "solution", axes = FALSE)
## End(Not run)