You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Full MinPatch Algorithm**: Complete implementation of all three stages
65
65
-**prioritizr Integration**: Seamless workflow with prioritizr solutions
66
+
-**Locked Constraints Support**: Automatically respects locked-in and locked-out constraints from prioritizr
66
67
-**Flexible Parameters**: Control minimum patch sizes, patch radius, and boundary penalties
67
68
-**Comprehensive Reporting**: Detailed statistics and comparisons
68
69
-**Visualization Support**: Plot results with ggplot2 (optional)
69
70
70
71
## Algorithm Details
71
72
73
+
### Locked Constraints
74
+
75
+
MinPatch automatically respects locked-in and locked-out constraints from prioritizr problems:
76
+
77
+
-**Locked-in constraints** (from `add_locked_in_constraints()`): Planning units that are locked-in will never be removed, regardless of patch size or during the whittling stage. These units are treated as "conserved" areas that must be retained in the final solution.
78
+
79
+
-**Locked-out constraints** (from `add_locked_out_constraints()`): Planning units that are locked-out will never be selected, even when adding new patches to meet conservation targets. These units are completely excluded from consideration.
80
+
81
+
If locked-in units form patches smaller than `min_patch_size`, a warning will be issued, but these units will still be preserved in the solution.
82
+
72
83
### Stage 1: Remove Small Patches
73
84
74
-
Identifies connected components (patches) in the solution and removes those smaller than the minimum size threshold. Only removes patches that weren't originally designated as conserved areas.
85
+
Identifies connected components (patches) in the solution and removes those smaller than the minimum size threshold. Locked-in planning units are never removed, even if they form small patches.
75
86
76
87
### Stage 2: Add New Patches (BestPatch Algorithm)
0 commit comments