geo_cov_survey_scheme {surveyvoi} | R Documentation |
Geographic coverage survey scheme
Description
Generate a survey scheme by maximizing the geographic coverage of surveys.
Usage
geo_cov_survey_scheme(
site_data,
cost_column,
survey_budget,
locked_in_column = NULL,
locked_out_column = NULL,
exclude_locked_out = FALSE,
solver = "auto",
verbose = FALSE
)
Arguments
site_data |
|
cost_column |
|
survey_budget |
|
locked_in_column |
|
locked_out_column |
|
exclude_locked_out |
|
solver |
|
verbose |
|
Details
The integer programming formulation of the p-Median problem (Daskin & Maass 2015) is used to generate survey schemes.
Value
A matrix
of logical
(TRUE
/ FALSE
)
values indicating if a site is selected in a scheme or not. Columns
correspond to sites, and rows correspond to different schemes.
Solver
This function can use the Rsymphony package and the Gurobi optimization software to generate survey schemes. Although the Rsymphony package is easier to install because it is freely available on the The Comprehensive R Archive Network (CRAN), it is strongly recommended to install the Gurobi optimization software and the gurobi R package because it can generate survey schemes much faster. Note that special academic licenses are available at no cost. Installation instructions are available online for Linux, Windows, and Mac OS operating systems.
References
Daskin MS & Maass KL (2015) The p-median problem. In Location Science (pp. 21-45). Springer, Cham.
Examples
# set seed for reproducibility
set.seed(123)
# simulate data
x <- sf::st_as_sf(
tibble::tibble(x = rnorm(4), y = rnorm(4),
v1 = c(0.1, 0.2, 0.3, 10), # environmental axis 1
v2 = c(0.1, 0.2, 0.3, 10), # environmental axis 2
cost = rep(1, 4)),
coords = c("x", "y"))
# plot the sites' locations
plot(st_geometry(x), pch = 16, cex = 3)
# generate scheme with a budget of 2
s <- geo_cov_survey_scheme(x, "cost", 2)
# print scheme
print(s)
# plot scheme
x$scheme <- c(s)
plot(x[, "scheme"], pch = 16, cex = 3)