This class is used to represent conservation planning problems.
It stores the data (e.g., planning units, and features) and
mathematical formulation (e.g., the objective, constraints,
and other design criteria) needed to generate prioritizations.
Most users should use problem()
to generate new conservation problem
objects, and the functions distributed with the package to interact
with them (e.g., number_of_features()
, number_of_planning_units()
).
Only experts should use the fields and methods for this class directly.
Public fields
data
list
containing data (e.g., planning units, costs).defaults
list
indicating if other fields contain defaults.objective
Objective
object specifying the objective function for the problem formulation.decisions
s
Decision
object specifying the decision types for the problem formulation.targets
Target
object specifying the representation targets for the problem formulation.constraints
list
containingConstraint
objects that specify constraints for the problem formulation.penalties
list
containingPenalty
objects that specify penalties for the problem formulation.portfolio
Portfolio
object specifying the approach for generating multiple solutions.solver
Solver
object specifying the solver for generating solutions.
Methods
Public methods
ConservationProblem$planning_unit_indices_with_finite_costs()
ConservationProblem$set_planning_unit_indices_with_finite_costs()
ConservationProblem$set_feature_abundances_in_planning_units()
ConservationProblem$feature_positive_abundances_in_planning_units()
ConservationProblem$set_feature_positive_abundances_in_planning_units()
Method summary()
Print extended information about the object.
Method print()
Print concise information about the object.
Method show()
Display concise information about the object.
Method get_data()
Get values stored in the data
field.
Returns
An object. If the data
field does not contain an object
associated with the argument to x
, then a new_waiver()
object is
returned.
Method set_data()
Set values stored in the data
field. Note that this method will
overwrite existing data.
Method number_of_planning_units()
Obtain the number of planning units. The planning units correspond to
elements in the cost data
(e.g., indices, rows, geometries, pixels) that have finite
values in at least one zone. In other words, planning unit are
elements in the cost data that do not have missing (NA
) values in
every zone.
Method planning_unit_indices_with_finite_costs()
Obtain the planning unit indices that are associated with finite cost values.
Method set_planning_unit_indices_with_finite_costs()
Perform calculations to cache the planning unit indices that are associated with finite cost values.
Method number_of_total_units()
Obtain the number of total units. The total units include all elements
in the cost data
(e.g., indices, rows, geometries, pixels), including those with
missing (NA
) values.
Method number_of_features()
Obtain the number of features.
Method feature_names()
Obtain the names of the features.
Method feature_abundances_in_planning_units()
Obtain the abundance of the features in the planning units.
Method set_feature_abundances_in_planning_units()
Perform calculations to cache the abundance of the features in the planning units.
Method feature_positive_abundances_in_planning_units()
Obtain the positive abundance of the features in the planning units.
Note that this method, unlike feature_abundances_in_planning_units
,
Method set_feature_positive_abundances_in_planning_units()
Perform calculations to cache the positive abundance of the features in the planning units.
Method feature_targets()
Obtain the representation targets for the features.
Returns
A tibble::tibble()
data frame.
Method number_of_zones()
Obtain the number of zones.
Method zone_names()
Obtain the zone names.
Method add_portfolio()
Create a new object with a portfolio added to the problem formulation.
Arguments
x
Portfolio object.
Method add_solver()
Create a new object with a solver added to the problem formulation.
Arguments
x
Solver object.
Method add_targets()
Create a new object with targets added to the problem formulation.
Arguments
x
Target object.
Method add_objective()
Create a new object with an objective added to the problem formulation.
Arguments
x
Objective object.
Method add_decisions()
Create a new object with decisions added to the problem formulation.
Arguments
x
Decision object.
Method add_constraint()
Create a new object with a constraint added to the problem formulation.
Arguments
x
Constraint object.
Method add_penalty()
Create a new object with a penalty added to the problem formulation.
Arguments
x
Penalty object.