Skip to contents

Solve an ordinary prioritizr prioritization problem.

Usage

basic_scenario(cost_raster, features_rasters, budget_perc)

Arguments

cost_raster

SpatRaster object used as cost for prioritization. Its coordinates must correspond to the input given at preprocess_graphs.

features_rasters

features SpatRaster object used for prioritization. Its coordinates must correspond to the input given at preprocess_graphs.

budget_perc

numeric value \([0,1]\). It represents the budget percentage of the cost to be used for prioritization.

Details

A basic prioritization problem is created and solved using prioritizr package. The solver used for solving the problems is the best available on the computer, following the solver hierarchy of prioritizr. By default, the highs package using the HiGHS solver is downloaded during package installation.

Value

A list containing input for get_outputs.

References

Hanson, Jeffrey O, Richard Schuster, Nina Morrell, Matthew Strimas-Mackey, Brandon P M Edwards, Matthew E Watts, Peter Arcese, Joseph Bennett, and Hugh P Possingham. 2024. prioritizr: Systematic Conservation Prioritization in R. https://prioritizr.net.

Huangfu, Qi, and JA Julian Hall. 2018. Parallelizing the Dual Revised Simplex Method. Mathematical Programming Computation 10 (1): 119–42. doi:10.1007/s12532-017-0130-5

Examples

# Read connectivity files from folder and combine them
combined_edge_list <- preprocess_graphs(system.file("external", package="priorCON"),
                                        header = FALSE, sep =";")

# Set seed for reproducibility
set.seed(42)

cost_raster <- get_cost_raster()
features_rasters <- get_features_raster()

# Solve an ordinary prioritizr prioritization problem
basic_solution <- basic_scenario(cost_raster=cost_raster,
features_rasters=features_rasters, budget_perc=0.1)