Marxan conservation problem
Create a conservation planning problem()
following the
mathematical formulations used in Marxan (detailed in Beyer
et al. 2016). Note that these problems are solved using
exact algorithms and not simulated annealing (i.e. the Marxan software).
marxan_problem(x, ...) ## Default S3 method: marxan_problem(x, ...) ## S3 method for class 'data.frame' marxan_problem(x, spec, puvspr, bound = NULL, blm = 0, ...) ## S3 method for class 'character' marxan_problem(x, ...)
x |
|
... |
not used. |
spec |
'
|
puvspr |
|
bound |
|
blm |
|
This function is provided as a convenient wrapper for solving Marxan problems using prioritizr.
problem()
(i.e. ConservationProblem
) object.
In early versions, this function could accommodate asymmetric connectivity
data. This functionality is no longer supported. To specify asymmetric
connectivity, please see the add_connectivity_penalties()
function.
Ball IR, Possingham HP, and Watts M (2009) Marxan and relatives: Software for spatial conservation prioritisation in Spatial conservation prioritisation: Quantitative methods and computational tools. Eds Moilanen A, Wilson KA, and Possingham HP. Oxford University Press, Oxford, UK.
Beyer HL, Dujardin Y, Watts ME, and Possingham HP (2016) Solving conservation planning problems with integer linear programming. Ecological Modelling, 228: 14–22.
For more information on the correct format for for Marxan input data, see the official Marxan website and Ball et al. (2009).
# create Marxan problem using Marxan input file input_file <- system.file("extdata/input.dat", package = "prioritizr") p1 <- marxan_problem(input_file) %>% add_default_solver(verbose = FALSE) ## Not run: # solve problem s1 <- solve(p1) # print solution head(s1) ## End(Not run) # create Marxan problem using data.frames that have been loaded into R ## load in planning unit data pu_path <- system.file("extdata/input/pu.dat", package = "prioritizr") pu_dat <- data.table::fread(pu_path, data.table = FALSE) head(pu_dat) ## load in feature data spec_path <- system.file("extdata/input/spec.dat", package = "prioritizr") spec_dat <- data.table::fread(spec_path, data.table = FALSE) head(spec_dat) ## load in planning unit vs feature data puvspr_path <- system.file("extdata/input/puvspr.dat", package = "prioritizr") puvspr_dat <- data.table::fread(puvspr_path, data.table = FALSE) head(puvspr_dat) ## load in the boundary data bound_path <- system.file("extdata/input/bound.dat", package = "prioritizr") bound_dat <- data.table::fread(bound_path, data.table = FALSE) head(bound_dat) # create problem without the boundary data p2 <- marxan_problem(pu_dat, spec_dat, puvspr_dat) %>% add_default_solver(verbose = FALSE) ## Not run: # solve problem s2 <- solve(p2) # print solution head(s2) ## End(Not run) # create problem with the boundary data and a boundary length modifier # set to 5 p3 <- marxan_problem(pu_dat, spec_dat, puvspr_dat, bound_dat, 5) %>% add_default_solver(verbose = FALSE) ## Not run: # solve problem s3 <- solve(p3) # print solution head(s3) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.