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
datalistcontaining data (e.g., planning units, costs).defaultslistindicating if other fields contain defaults.objectiveObjectiveobject specifying the objective function for the problem formulation.decisionsDecisionobject specifying the decision types for the problem formulation.targetsTargetobject specifying the representation targets for the problem formulation.constraintslistcontainingConstraintobjects that specify constraints for the problem formulation.penaltieslistcontainingPenaltyobjects that specify penalties for the problem formulation.portfolioPortfolioobject specifying the approach for generating multiple solutions.solverSolverobject 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, cells) 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 is_ids_equivalent_to_indices()
Check if planning unit identifiers are equivalent to the planning
unit indices? Only FALSE if the planning units are
data.frame format.
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, cells), 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
xPortfolio object.
Method add_solver()
Create a new object with a solver added to the problem formulation.
Arguments
xSolver object.
Method add_targets()
Create a new object with targets added to the problem formulation.
Arguments
xTarget object.
Method add_objective()
Create a new object with an objective added to the problem formulation.
Arguments
xObjective object.
Method add_decisions()
Create a new object with decisions added to the problem formulation.
Arguments
xDecision object.
Method add_constraint()
Create a new object with a constraint added to the problem formulation.
Arguments
xConstraint object.
Method add_penalty()
Create a new object with a penalty added to the problem formulation.
Arguments
xPenalty object.
Method remove_all_penalties()
Create a new object without any penalties.
