Specify that the CBC (COIN-OR branch and cut) software (Forrest & Lougee-Heimer 2005) should be used to solve a conservation planning problem(). This function can also be used to customize the behavior of the solver. It requires the rcbc package to be installed (only available on GitHub, see below for installation instructions).

add_cbc_solver(
x,
gap = 0.1,

## Value

Object (i.e. ConservationProblem) with the solver added to it.

## Details

CBC is an open-source mixed integer programming solver that is part of the Computational Infrastructure for Operations Research (COIN-OR) project. Although formal benchmarks examining the performance of this solver for conservation planning problems have yet to be completed, preliminary analyses suggest that it performs much faster than the other open-source solvers (i.e. add_rsymphony_solver(), add_rsymphony_solver()), and so we recommend using this solver if the Gurobi and IBM CPLEX solvers are unavailable.

## Installation

The rcbc package is required to use this solver. Since the rcbc package is not available on the the Comprehensive R Archive Network (CRAN), it must be installed from its GitHub repository. To install the rcbc package, please use the following code:

if (!require(remotes)) install.packages("remotes")
remotes::install_github("dirkschumacher/rcbc")


Note that you may also need to install several dependencies -- such as the Rtools software or system libraries -- prior to installing the rcbc package. For further details on installing this package, please consult official installation instructions for the package.

## References

Forrest J and Lougee-Heimer R (2005) CBC User Guide. In Emerging theory, Methods, and Applications (pp. 257--277). INFORMS, Catonsville, MD. doi: 10.1287/educ.1053.0020 .

## Examples

# \dontrun{
data(sim_pu_raster, sim_features)

# create problem
p <- problem(sim_pu_raster, sim_features) %>%