ConservationProblem-class: Conservation problem class

Description Fields Usage Arguments Details

Description

This class is used to represent conservation planning problems. A conservation planning problem has spatially explicit planning units. A prioritization involves making a decision on each planning unit (eg. is the planning unit going to be turned into a protected area?). Each planning unit is associated with a cost that represents the cost incurred by applying the decision to the planning unit. The problem also has a set of representation targets for each feature. Further, it also has constraints used to ensure that the solution meets additional objectives (eg. certain areas are locked into the solution). Finally, a conservation planning problem–unlike an optimization problem–also requires a method to solve the problem. This class represents a planning problem, to actually build and then solve a planning problem, use the problem function. Only experts should use this class directly.

Fields

$data

list object containing data.

$objective

Objective-class object used to represent how the targets relate to the solution.

$decision

Decision-class object used to represent the type of decision made on planning units.

$targets

Target-class object used to represent representation targets for features.

$penalties

Collection-class object used to represent additional penalties that the problem is subject to.

$constraints

Collection-class object used to represent additional constraints that the problem is subject to.

$solver

Solver-class object used to solve the problem.

Usage

x$print()

x$show()

x$repr()

x$get_data(name)

x$set_data(name, value)

x$number_of_total_units()

x$number_of_planning_units()

x$planning_unit_costs()

x$number_of_features()

x$feature_names()

x$feature_abundances_in_planning_units()

x$feature_targets()

x$add_objective(obj)

x$add_decision(dec)

x$add_solver(sol)

x$add_constraint(con)

x$add_targets(targ)

x$get_constraint_parameter(id)

x$set_constraint_parameter(id, value)

x$render_constraint_parameter(id)

x$render_all_constraint_parameters()

x$get_objective_parameter(id)

x$set_objective_parameter(id, value)

x$render_objective_parameter(id)

x$render_all_objective_parameters()

x$get_solver_parameter(id)

x$set_solver_parameter(id, value)

x$render_solver_parameter(id)

x$render_all_solver_parameters()

Arguments

name

character name for object.

value

an object.

obj

Objective-class object.

dec

Decision-class object.

con

Constraint-class object.

sol

Solver-class object.

targ

Target-class object.

cost

RasterLayer-class, SpatialPolygonsDataFrame-class, or SpatialLinesDataFrame-class object showing spatial representation of the planning units and their cost.

features

RasterStack-class object showing distribution of features.

id

Id object that refers to a specific parameter.

value

object that the parameter value should become.

Details

print

print the object.

show

show the object.

repr

return character representation of the object.

get_data

return an object stored in the data field with the corresponding name. If the object is not present in the data field, a waiver object is returned.

set_data

store an object stored in the data field with the corresponding name. If an object with that name already exists then the object is overwritten.

number_of_planning_units

integer number of planning units.

number_of_total_units

integer number of units in the cost data including units that have NA values for cost.

planning_unit_costs

numeric costs of each planning unit.

number_of_features

integer number of features.

feature_names

character names of features in problem.

feature_abundances_in_planning_units

numeric get total abundance of each feature in all the planning units.

feature_targets

numeric targets for each feature.

add_objective

return a new ConservationProblem-class with the objective added to it.

add_decision

return a new ConservationProblem-class object with the decision added to it.

add_solver

return a new ConservationProblem-class object with the solver added to it.

add_constraint

return a new ConservationProblem-class object with the constraint added to it.

add_targets

return a copy with the targets to the problem.

get_constraint_parameter

get the value of a parameter (specified by argument id) used in one of the constraints in the object.

set_constraint_parameter

set the value of a parameter (specified by argument id) used in one of the constraints in the object to value.

render_constraint_parameter

generate a shiny widget to modify the value of a parameter (specified by argument id).

render_all_constraint_parameters

generate a shiny div containing all the parameters" widgets.

get_objective_parameter

get the value of a parameter (specified by argument id) used in one of the objectives in the object.

set_objective_parameter

set the value of a parameter (specified by argument id) used in one of the objectives in the object to value.

render_objective_parameter

generate a shiny widget to modify the value of a parameter (specified by argument id).

render_all_objective_parameters

generate a shiny div containing all the parameters" widgets.

get_solver_parameter

get the value of a parameter (specified by argument id) used in one of the solvers in the object.

set_solver_parameter

set the value of a parameter (specified by argument id) used in one of the solvers in the object to value.

render_solver_parameter

generate a shiny widget to modify the the value of a parameter (specified by argument id).

render_all_solver_parameters

generate a shiny div containing all the parameters" widgets.


prioritizr/prioritizrutils documentation built on May 25, 2019, 12:20 p.m.