add_min_mesh_constraint {restoptr} | R Documentation |
Add constraint to enforce a minimum effective mesh size (MESH) value
Description
Add constraint to a restoration problem (restopt_problem()
) object
to specify the minimum effective mesh size of a solution.
Usage
add_min_mesh_constraint(problem, min_mesh, precision = 4, unit = "ha")
Arguments
problem |
|
min_mesh |
|
precision |
|
unit |
|
Details
The effective mesh size (MESH) is a measure of landscape fragmentation based on the probability that two randomly chosen points are located in the same patch (Jaeger, 2000). Maximizing it in the context of restoration favours fewer and larger patches.
Value
An updated restoration problem (restopt_problem()
) object.
References
Jaeger, J. A. G. (2000). Landscape division, splitting index, and effective mesh size: New measures of landscape fragmentation. Landscape Ecology, 15(2), 115‑130. https://doi.org/10.1023/A:1008129329289
See Also
Other constraints:
add_available_areas_constraint()
,
add_compactness_constraint()
,
add_components_constraint()
,
add_connected_constraint()
,
add_locked_out_constraint()
,
add_min_iic_constraint()
,
add_restorable_constraint()
Examples
# load data
habitat_data <- rast(
system.file("extdata", "habitat_hi_res.tif", package = "restoptr")
)
# create problem
p <- restopt_problem(
existing_habitat = habitat_data,
aggregation_factor = 16,
habitat_threshold = 0.7
) %>%
add_restorable_constraint(
min_restore = 200,
max_restore = 300,
) %>%
add_min_mesh_constraint(min_mesh = 2500, unit = "ha")
# plot preprocessed data
plot(rast(list(p$data$existing_habitat, p$data$restorable_habitat)), nc = 2)
# print problem
print(p)
# Solve problem
s <- solve(p)
# plot solution
plot(s)