Specify that the SYMPHONY software should be used to solve a conservation planning problem using the Rsymphony package. This function can also be used to customize the behavior of the solver. It requires the Rsymphony package.

  gap = 0.1,
  time_limit = -1,
  first_feasible = 0,
  verbose = TRUE



problem() (i.e. ConservationProblem) object.


numeric gap to optimality. This gap is absolute and expresses the acceptable deviance from the optimal objective. For example, solving a minimum set objective problem with a gap of 5 will cause the solver to terminate when the cost of the solution is within 5 cost units from the optimal solution.


numeric time limit in seconds to run the optimizer. The solver will return the current best solution when this time limit is exceeded.


logical should the first feasible solution be be returned? If first_feasible is set to TRUE, the solver will return the first solution it encounters that meets all the constraints, regardless of solution quality. Note that the first feasible solution is not an arbitrary solution, rather it is derived from the relaxed solution, and is therefore often reasonably close to optimality.


logical should information be printed while solving optimization problems? Defaults to TRUE.


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


SYMPHONY is an open-source integer programming solver that is part of the Computational Infrastructure for Operations Research (COIN-OR) project, an initiative to promote development of open-source tools for operations research (a field that includes linear programming). The Rsymphony package provides an interface to COIN-OR and is available on CRAN. This solver uses the Rsymphony package to solve problems.

See also


# load data data(sim_pu_raster, sim_features) # create problem p <- problem(sim_pu_raster, sim_features) %>% add_min_set_objective() %>% add_relative_targets(0.1) %>% add_binary_decisions() # \dontrun{ # if the package is installed then add solver and generate solution if (require("Rsymphony")) { # specify solver and generate solution s <- p %>% add_rsymphony_solver(time_limit = 10) %>% solve() # plot solutions plot(stack(sim_pu_raster, s), main = c("planning units", "solution"), axes = FALSE, box = FALSE) }
#> Loading required package: Rsymphony
# }