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

restopt_problem() Restoration problem object.

min_mesh

numeric Minimum MESH value.

precision

integer Precision for calculations. Defaults to 4.

unit

unit object or a character that can be coerced to an area unit (see unit package), or "cells" for cell width of aggregated habitat raster. Corresponds to the unit of the minimum mesh value If the input habitat raster does not use a projected coordinate system, only "cells" is available. Defaults to "ha".

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

set_max_mesh_objective

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)



[Package restoptr version 1.0.6 Index]