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.
datalist containing data (e.g., planning units, costs).
defaultslist indicating if other fields contain defaults.
objectiveObjective object specifying the objective
function for the problem formulation.
decisionsDecision object specifying the decision types
for the problem formulation.
targetsTarget object specifying the representation
targets for the problem formulation.
constraintslist containing Constraint objects that
specify constraints for the problem formulation.
penaltieslist containing Penalty objects that specify
penalties for the problem formulation.
portfolioPortfolio object specifying the approach for
generating multiple solutions.
solverSolver object specifying the solver for
generating solutions.
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()
new()Create a new conservation problem object.
ConservationProblem$new(data = list())datalist containing data
A new ConservationProblem object.
Invisible TRUE.
Invisible TRUE.
show()Display concise information about the object.
ConservationProblem$show()Invisible TRUE.
repr()Generate a character representation of the object.
ConservationProblem$repr()A character value.
get_data()Get values stored in the data field.
ConservationProblem$get_data(x)xcharacter name of data.
An object. If the data field does not contain an object
associated with the argument to x, then a new_waiver() object is
returned.
set_data()Set values stored in the data field. Note that this method will
overwrite existing data.
ConservationProblem$set_data(x, value)xcharacter name of data.
valueObject to store.
Invisible TRUE.
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.
ConservationProblem$number_of_planning_units()An integer value.
planning_unit_indices()Obtain the planning unit indices.
ConservationProblem$planning_unit_indices()An integer vector.
planning_unit_indices_with_finite_costs()Obtain the planning unit indices that are associated with finite cost values.
ConservationProblem$planning_unit_indices_with_finite_costs()A list of integer vectors. Each list element corresponds to
a different zone.
set_planning_unit_indices_with_finite_costs()Perform calculations to cache the planning unit indices that are associated with finite cost values.
ConservationProblem$set_planning_unit_indices_with_finite_costs()Invisible TRUE.
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.
ConservationProblem$number_of_total_units()An integer value.
planning_unit_costs()Obtain the planning unit costs.
ConservationProblem$planning_unit_costs()A numeric matrix.
set_planning_unit_costs()Perform calculations to cache the planning unit costs.
ConservationProblem$set_planning_unit_costs()Invisible TRUE.
number_of_features()Obtain the number of features.
ConservationProblem$number_of_features()An integer value.
feature_names()Obtain the names of the features.
ConservationProblem$feature_names()A character vector.
feature_abundances_in_planning_units()Obtain the abundance of the features in the planning units.
ConservationProblem$feature_abundances_in_planning_units()A numeric matrix. Each column corresponds to a different zone
and each row corresponds to a different feature.
set_feature_abundances_in_planning_units()Perform calculations to cache the abundance of the features in the planning units.
ConservationProblem$set_feature_abundances_in_planning_units()Invisible TRUE.
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,
ConservationProblem$feature_positive_abundances_in_planning_units()A numeric matrix. Each column corresponds to a different zone
and each row corresponds to a different feature.
set_feature_positive_abundances_in_planning_units()Perform calculations to cache the positive abundance of the features in the planning units.
ConservationProblem$set_feature_positive_abundances_in_planning_units()Invisible TRUE.
feature_abundances_in_total_units()Obtain the abundance of the features in the total units.
ConservationProblem$feature_abundances_in_total_units()A numeric matrix. Each column corresponds to a different zone
and each row corresponds to a different feature.
feature_targets()Obtain the representation targets for the features.
ConservationProblem$feature_targets()A tibble::tibble() data frame.
has_negative_feature_data()See if the feature data contain any negative values.
ConservationProblem$has_negative_feature_data()A logical value.
number_of_zones()Obtain the number of zones.
ConservationProblem$number_of_zones()An integer value.
zone_names()Obtain the zone names.
ConservationProblem$zone_names()A character vector.
add_portfolio()Create a new object with a portfolio added to the problem formulation.
ConservationProblem$add_portfolio(x)xPortfolio object.
An updated ConservationProblem object.
add_solver()Create a new object with a solver added to the problem formulation.
ConservationProblem$add_solver(x)xSolver object.
An updated ConservationProblem object.
add_targets()Create a new object with targets added to the problem formulation.
ConservationProblem$add_targets(x)xTarget object.
An updated ConservationProblem object.
add_objective()Create a new object with an objective added to the problem formulation.
ConservationProblem$add_objective(x)xObjective object.
An updated ConservationProblem object.
add_decisions()Create a new object with decisions added to the problem formulation.
ConservationProblem$add_decisions(x)xDecision object.
An updated ConservationProblem object.
add_constraint()Create a new object with a constraint added to the problem formulation.
ConservationProblem$add_constraint(x)xConstraint object.
An updated ConservationProblem object.
add_penalty()Create a new object with a penalty added to the problem formulation.
ConservationProblem$add_penalty(x)xPenalty object.
An updated ConservationProblem object.
clone()The objects of this class are cloneable with this method.
ConservationProblem$clone(deep = FALSE)deepWhether to make a deep clone.
Other classes:
ConservationModifier-class,
Constraint-class,
Decision-class,
Objective-class,
OptimizationProblem-class,
Penalty-class,
Portfolio-class,
Solver-class,
Target-class