This is a general function to create Rap objects from scratch and solve them to generate solutions.
rap(
pus,
species,
spaces = NULL,
formulation = c("unreliable", "reliable")[1],
solve = TRUE,
...
)
sf::st_as_sf()
object representing planning
units.
terra::rast()
object with species distribution
data.
terra::rast()
or list
of terra::rast()
objects. Each
elements denotes the spatial distribution for each space. Defaults to
NULL
such that spaces are generated automatically.
character
to indicate if the "unreliable"
or
"reliable"
formulation should be used to generate prioritizations.
Defaults to "unreliable"
.
logical
should solutions be generated?
arguments are passed to GurobiOpts()
,
make.RapData()
, and RapReliableOpts()
or
RapUnreliableOpts()
functions.
A new RapSolved()
object if solve
is TRUE
,
otherwise an RapUnsolved()
is returned.
Type vignette("raptr")
to see the package vignette for a
tutorial.