Summary

Summary of the package

prioritizr

prioritizr

Data

Simulated data sets distributed with the package

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

Simulated conservation planning data

Create and solve problems

Functions for creating new problems and solving them

problem(<Raster>,<Raster>) problem(<Raster>,<ZonesRaster>) problem(<Spatial>,<Raster>) problem(<Spatial>,<ZonesRaster>) problem(<Spatial>,<character>) problem(<Spatial>,<ZonesCharacter>) problem(<data.frame>,<character>) problem(<data.frame>,<ZonesCharacter>) problem(<data.frame>,<data.frame>) problem(<numeric>,<data.frame>) problem(<matrix>,<data.frame>)

Conservation planning problem

marxan_problem()

Marxan conservation problem

solve

Solve

Objectives

Functions for adding an objective to a problem

objectives

Problem objective

add_max_cover_objective()

Add maximum coverage objective

add_max_features_objective()

Add maximum feature representation objective

add_max_phylo_objective()

Add maximum phylogenetic representation objective

add_max_utility_objective()

Add maximum utility objective

add_min_set_objective()

Add minimum set objective

Targets

Functions for adding targets to a problem

targets

Targets

add_absolute_targets(<ConservationProblem>,<numeric>) add_absolute_targets(<ConservationProblem>,<matrix>) add_absolute_targets(<ConservationProblem>,<character>)

Add absolute targets

add_loglinear_targets()

Add targets using log-linear scaling

add_manual_targets(<ConservationProblem>,<data.frame>) add_manual_targets(<ConservationProblem>,<tbl_df>)

Add manual targets

add_relative_targets(<ConservationProblem>,<numeric>) add_relative_targets(<ConservationProblem>,<matrix>) add_relative_targets(<ConservationProblem>,<character>)

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_locked_in_constraints()

Add locked in constraints

add_locked_out_constraints()

Add locked out 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

Conservation problem 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>,<dgCMatrix>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<data.frame>) add_connectivity_penalties(<ConservationProblem>,<ANY>,<ANY>,<array>)

Add connectivity penalties

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

Add feature weights

Decisions

Functions for specifying the type of decisions in a problem

decisions

Specify the type of decisions

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_default_solver()

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_pool_portfolio()

Add a pool portfolio

add_shuffle_portfolio()

Add a shuffle portfolio

Data simulation

Functions for simulating new data sets

simulate_cost()

Simulate cost data

simulate_data()

Simulate data

simulate_species()

Simulate species habitat suitabilities

Geoprocessing

Functions for manipulating spatial data sets

fast_extract(<Raster>,<SpatialPolygons>) fast_extract(<Raster>,<SpatialLines>) fast_extract(<Raster>,<SpatialPoints>)

Fast extract

intersecting_units(<Raster>,<Raster>) intersecting_units(<Spatial>,<Spatial>) intersecting_units(<Raster>,<Spatial>) intersecting_units(<Spatial>,<Raster>) intersecting_units(<data.frame>,<ANY>)

Find intersecting units

Parallel processing

Functions for controlling multi-threaded processing

distribute_load()

Distribute load

is.parallel()

Is parallel?

set_number_of_threads() get_number_of_threads()

Number of threads for data processing

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

Matrix functions

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

boundary_matrix()

Boundary matrix

branch_matrix()

Branch matrix

connected_matrix()

Connected matrix

connectivity_matrix(<Spatial>,<character>) connectivity_matrix(<Spatial>,<Raster>) connectivity_matrix(<Raster>,<Raster>)

Connectivity matrix

marxan_boundary_data_to_matrix()

Convert Marxan boundary data to a matrix format

rij_matrix(<Raster>,<Raster>) rij_matrix(<Spatial>,<Raster>)

Feature by planning unit matrix

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

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 operator

%T>%

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

loglinear_interpolation()

Log-linear interpolation

run_calculations()

Run calculations

feature_representation(<ConservationProblem>,<numeric>) feature_representation(<ConservationProblem>,<matrix>) feature_representation(<ConservationProblem>,<data.frame>) feature_representation(<ConservationProblem>,<Spatial>) feature_representation(<ConservationProblem>,<Raster>)

Feature representation

feature_abundances()

Feature abundances

Class definitions and methods

These pages document the package’s internal data structures and functions for manipulating them—they contain information that is really only useful when adding new functionality to the package

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

Array parameter prototype

Collection-class

Collection prototype

ConservationModifier-class

Conservation problem modifier prototype

ConservationProblem-class

Conservation problem class

Constraint-class

Constraint prototype

Decision-class

Decision prototype

MiscParameter-class

Miscellaneous parameter prototype

Objective-class

Objective prototype

OptimizationProblem-class

Optimization problem class

Parameter-class

Parameter class

Parameters-class

Parameters class

Penalty-class

Penalty prototype

Portfolio-class

Portfolio prototype

ScalarParameter-class

Scalar parameter prototype

Solver-class

Solver prototype

Target-class

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

These pages document the package’s internal data structures for representing different types of variables—they contain information that is really only useful when adding new functionality to the package

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