← Back to all sparks
P

prioritizr

INFRA · APIS
Velocity0.0

Systematic Conservation Prioritization in R

Conservation planning absorbs the literature's target-setting rules as code.

conservation-planningoptimizationspatialtarget-settingsolvers
Current state
prioritizr builds and solves systematic conservation planning problems, handing them to CBC, HiGHS, Gurobi or SYMPHONY. The last two years moved it onto the sf and terra spatial stack and rewrote its internals as R6 classes; the newest release adds a target-setting layer with seventeen named methods from the conservation literature, plus automatic penalty calibration. Solver control parameters and neighbour penalties arrive in the same release.
Where it's heading
The package keeps absorbing decisions that used to sit with the analyst. Targets were something you computed and passed in; now add_auto_targets() takes a method specification and the published rules from Jung, Rodrigues, Ward, Watson and Wilson are first-class objects. Penalty values were tuned by hand; calibrate_cohon_penalty() searches for them. The same instinct shows in exporting its validation helpers for other packages to vendor.
Prediction
The deprecation of add_loglinear_targets() in favour of a spec function suggests the older manual target helpers are next to be folded into the same interface.

Recent moves

  1. 9mo ago

    add_auto_targets() brings 17 published target-setting methods

    ⚡ SPARK

    The release that moves target setting inside the package: add_auto_targets() takes a method specification, with seventeen spec_* functions covering the standard rules, and add_group_targets() applies them per feature group. calibrate_cohon_penalty() does the same for penalty values, and the solvers gain a control parameter for direct tuning.

    View source ↗
  2. 2y ago

    Default portfolio no longer shuffles the optimization problem

    Changes the default portfolio to generate a single unshuffled solution, because shuffling was hiding the spatial artifacts that signal an under-specified problem. solve() now also reports how far a solution sits from optimality, which matters once a gap has been set on the solver.

    View source ↗
  3. 3y ago

    Boundary data rescaling reworked to avoid optimization artifacts

    Replaces the previously recommended rescaling of boundary data, which could leave a planning unit's perimeter inconsistent with the sum of its edges and produce reserves with an unselected hole in the middle at high boundary penalties.

    View source ↗
  4. 3y ago

    Moves to sf and terra; internals rewritten as R6 classes

    ⚡ SPARK

    The release that changed what the package is built on: sf and terra become the supported spatial classes with sp and raster deprecated on a stated timeline, and the proto class system is replaced by R6. Existing code keeps working but starts warning.

    View source ↗
  5. 3y ago

    maptools, PBSmapping and rgeos dropped as dependencies

    Sheds three retiring geometry dependencies, moves boundary_matrix() to STR query trees, speeds up the simulation helpers, and fixes a segfault in the CBC solver on problems whose last feature has zero amount in the last planning unit.

    View source ↗
  6. 4y ago

    Vignette build fixes and lpsymphony remote setup

    Vignette build repairs and remote configuration for the Bioconductor-hosted lpsymphony solver. Build plumbing with no effect on planning problems.

    View source ↗