Overview

Overview of the package.

prioritizr

prioritizr: Systematic Conservation Prioritization in R

Create and solve problems

Functions for creating new problems and solving them.

problem()

Conservation planning problem

solve(<OptimizationProblem>,<Solver>) solve(<ConservationProblem>,<missing>)

Solve

Data

Simulated datasets distributed with the package.

sim_pu_polygons sim_pu_zones_polygons sim_pu_points sim_pu_lines sim_pu_sf sim_pu_zones_sf sim_pu_raster sim_locked_in_raster sim_locked_out_raster sim_pu_zones_stack sim_features sim_features_zones sim_phylogeny

Simulated conservation planning data

Objectives

Functions for adding an objective to a problem.

objectives

Add an objective

add_max_cover_objective()

Add maximum coverage objective

add_max_features_objective()

Add maximum feature representation objective

add_max_phylo_div_objective()

Add maximum phylogenetic diversity objective

add_max_phylo_end_objective()

Add maximum phylogenetic endemism objective

add_max_utility_objective()

Add maximum utility objective

add_min_largest_shortfall_objective()

Add minimum largest shortfall objective

add_min_set_objective()

Add minimum set objective

add_min_shortfall_objective()

Add minimum shortfall objective

Targets

Functions for adding targets to a problem.

targets

Add representation targets

add_absolute_targets()

Add absolute targets

add_loglinear_targets()

Add targets using log-linear scaling

add_manual_targets()

Add manual targets

add_relative_targets()

Add relative targets

Constraints

Functions for adding constraints to a problem.

constraints

Conservation problem constraints

add_contiguity_constraints(<ConservationProblem>,<ANY>,<ANY>) add_contiguity_constraints(<ConservationProblem>,<ANY>,<data.frame>) add_contiguity_constraints(<ConservationProblem>,<ANY>,<matrix>)

Add contiguity constraints

add_feature_contiguity_constraints(<ConservationProblem>,<ANY>,<Matrix>) add_feature_contiguity_constraints(<ConservationProblem>,<ANY>,<data.frame>) add_feature_contiguity_constraints(<ConservationProblem>,<ANY>,<matrix>) add_feature_contiguity_constraints(<ConservationProblem>,<ANY>,<ANY>)

Add feature contiguity constraints

add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<character>) add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<numeric>) add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<matrix>) add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<Matrix>) add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<Raster>) add_linear_constraints(<ConservationProblem>,<ANY>,<ANY>,<dgCMatrix>)

Add linear constraints

add_locked_in_constraints()

Add locked in constraints

add_locked_out_constraints()

Add locked out constraints

add_mandatory_allocation_constraints(<ConservationProblem>)

Add mandatory allocation constraints

add_manual_bounded_constraints()

Add manually specified bound constraints

add_manual_locked_constraints()

Add manually specified locked constraints

add_neighbor_constraints(<ConservationProblem>,<ANY>,<ANY>,<ANY>) add_neighbor_constraints(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) add_neighbor_constraints(<ConservationProblem>,<ANY>,<ANY>,<matrix>) add_neighbor_constraints(<ConservationProblem>,<ANY>,<ANY>,<array>)

Add neighbor constraints

Penalties

Functions for adding penalties to a problem.

penalties

Add a penalty

add_asym_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<matrix>) add_asym_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<Matrix>) add_asym_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) add_asym_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<dgCMatrix>) add_asym_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<array>)

Add asymmetric connectivity penalties

add_boundary_penalties()

Add boundary penalties

add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<matrix>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<Matrix>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<dgCMatrix>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<array>)

Add connectivity penalties

add_feature_weights(<ConservationProblem>,<numeric>) add_feature_weights(<ConservationProblem>,<matrix>)

Add feature weights

add_linear_penalties(<ConservationProblem>,<ANY>,<character>) add_linear_penalties(<ConservationProblem>,<ANY>,<numeric>) add_linear_penalties(<ConservationProblem>,<ANY>,<matrix>) add_linear_penalties(<ConservationProblem>,<ANY>,<Matrix>) add_linear_penalties(<ConservationProblem>,<ANY>,<Raster>) add_linear_penalties(<ConservationProblem>,<ANY>,<dgCMatrix>)

Add linear penalties

Decisions

Functions for specifying the type of decisions in a problem.

decisions

Add decision types

add_binary_decisions()

Add binary decisions

add_default_decisions()

Add default decisions

add_proportion_decisions()

Add proportion decisions

add_semicontinuous_decisions()

Add semi-continuous decisions

Solvers

Functions for specifying how a problem should be solved.

solvers

Problem solvers

add_cbc_solver()

Add a CBC solver

add_cplex_solver()

Add a CPLEX solver

add_default_solver()

Add a default solver

add_gurobi_solver()

Add a Gurobi solver

add_lpsymphony_solver()

Add a SYMPHONY solver with lpsymphony

add_rsymphony_solver()

Add a SYMPHONY solver with Rsymphony

Portfolios

Functions for generating a portfolio of solutions.

portfolios

Solution portfolios

add_cuts_portfolio()

Add Bender's cuts portfolio

add_extra_portfolio()

Add an extra portfolio

add_gap_portfolio()

Add a gap portfolio

add_shuffle_portfolio()

Add a shuffle portfolio

add_top_portfolio()

Add a top portfolio

Summary statistics

Functions for summarizing the performance of solutions.

summaries

Evaluate solutions using summary statistics

eval_asym_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<matrix>) eval_asym_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<Matrix>) eval_asym_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) eval_asym_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<dgCMatrix>) eval_asym_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<array>)

Evaluate asymmetric connectivity of solution

eval_boundary_summary()

Evaluate solution boundary length

eval_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<matrix>) eval_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<Matrix>) eval_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) eval_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<dgCMatrix>) eval_connectivity_summary(<ConservationProblem>,<ANY>,<ANY>,<array>)

Evaluate connectivity of solution

eval_cost_summary()

Evaluate solution cost

eval_feature_representation_summary()

Evaluate feature representation

eval_n_summary()

Evaluate number of planning units selected

eval_target_coverage_summary()

Evaluate target coverage

Importance

Functions for calculating importance scores for a solution.

importance irreplaceability

Evaluate solution importance

eval_ferrier_importance()

Evaluate solution importance using Ferrier scores

eval_rare_richness_importance()

Evaluate solution importance using rarity weighted richness scores

eval_replacement_importance()

Evaluate solution importance using replacement cost scores

Data simulation

Functions for simulating new datasets.

simulate_cost()

Simulate cost data

simulate_data()

Simulate data

simulate_species()

Simulate species habitat suitability data

Geoprocessing

Functions for manipulating spatial datasets.

fast_extract()

Fast extract

intersecting_units()

Find intersecting units

Marxan functions

Functions for importing and converting Marxan data.

marxan_problem()

Marxan conservation problem

marxan_boundary_data_to_matrix()

Convert Marxan boundary data to matrix format

marxan_connectivity_data_to_matrix()

Convert Marxan connectivity data to matrix format

Matrix functions

Functions for creating matrices that are used in conservation planning problems.

adjacency_matrix()

Adjacency matrix

boundary_matrix()

Boundary matrix

branch_matrix()

Branch matrix

connectivity_matrix()

Connectivity matrix

proximity_matrix()

Proximity matrix

rij_matrix()

Feature by planning unit matrix

Processing multi-zone data

Functions for manipulating data that pertain to multiple zones.

category_layer()

Category layer

category_vector()

Category vector

binary_stack()

Binary stack

Problem manipulation functions

Functions for extracting information from problems.

number_of_features()

Number of features

number_of_planning_units()

Number of planning units

number_of_total_units()

Number of total units

number_of_zones()

Number of zones

feature_names()

Feature names

feature_abundances()

Feature abundances

zone_names()

Zone names

Miscellaneous functions

Assorted functions distributed with the package.

print(<ConservationProblem>) print(<ConservationModifier>) print(<Id>) print(<Id>) print(<OptimizationProblem>) print(<ScalarParameter>) print(<ArrayParameter>) print(<Solver>) print(<Zones>) print(<tbl_df>)

Print

show(<ConservationModifier>) show(<ConservationProblem>) show(<Id>) show(<OptimizationProblem>) show(<Parameter>) show(<Solver>)

Show

%>% pipe

Pipe operator

%T>% tee

Tee operator

is.Id() is.Waiver()

Is it?

as.Id() as.list(<Parameters>) as.list(<Zones>)

Coerce object to another object

compile()

Compile a problem

presolve_check()

Presolve check

loglinear_interpolation()

Log-linear interpolation

run_calculations()

Run calculations

distribute_load()

Distribute load

write_problem()

Write problem

Class definitions and methods

Documentation for internal data structures and associated functions.

new_id()

Identifier

new_waiver()

Waiver

pproto()

Create a new pproto object

new_optimization_problem()

Optimization problem

predefined_optimization_problem()

Predefined optimization problem

as.list(<OptimizationProblem>)

Convert OptimizationProblem to list

ArrayParameter-class ArrayParameter

Array parameter prototype

Collection-class Collection

Collection prototype

ConservationModifier-class ConservationModifier

Conservation problem modifier prototype

ConservationProblem-class ConservationProblem

Conservation problem class

Constraint-class Constraint

Constraint prototype

Decision-class Decision

Decision prototype

MiscParameter-class MiscParameter

Miscellaneous parameter prototype

Objective-class Objective

Objective prototype

OptimizationProblem-class OptimizationProblem

Optimization problem class

Parameter-class Parameter

Parameter class

Parameters-class Parameters

Parameters class

Penalty-class Penalty

Penalty prototype

Portfolio-class Portfolio

Portfolio prototype

ScalarParameter-class ScalarParameter

Scalar parameter prototype

Solver-class Solver

Solver prototype

Target-class Target

Target prototype

zones()

Management zones

nrow() ncol() ncell() modelsense() vtype() obj() A() rhs() sense() lb() ub() col_ids() row_ids() compressed_formulation()

Optimization problem methods

nrow(<tbl_df>) ncol(<tbl_df>) as.list(<tbl_df>)

Manipulate tibbles

Parameter definitions

Documentation for internal structures that describe input parameters.

proportion_parameter_array() binary_parameter_array() integer_parameter_array() numeric_parameter_array()

Array parameters

numeric_matrix_parameter() binary_matrix_parameter()

Matrix parameters

misc_parameter()

Miscellaneous parameter

proportion_parameter() binary_parameter() integer_parameter() numeric_parameter()

Scalar parameters

parameters()

Parameters

Deprecated functions

Documentation for functions that are no longer available.

add_connected_constraints() add_corridor_constraints() set_number_of_threads() get_number_of_threads() is.parallel() add_pool_portfolio() connected_matrix() feature_representation() replacement_cost() rarity_weighted_richness() ferrier_score()

Deprecation notice