50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


prioritizr (version 3.0.4)

add_max_features_objective: Add Maximum Feature Representation Objective

Description

Set an objective to find the solution that fulfills as many targets as possible while ensuring that the cost of the solution does not exceed a budget.

Usage

add_max_features_objective(x, budget)

Arguments

budget

numeric value specifying the maximum expenditure of the prioritization.

Details

A problem objective is used to specify the overall goal of the conservation planning problem. Please note that all conservation planning problems formulated in the prioritizr package require the addition of both objectives and targets. Failing to do so will return a default error message when solving.

The maximum feature representation problem is a hybrid between the minimum set (see add_min_set_objective) and maximum cover (see add_max_cover_objective) problems in that it allows for both a budget and targets to be set. This problem finds the set of planning units that meets representation targets for as many features as possible while staying within a fixed budget. If multiple solutions can meet all targets while staying within budget, the cheapest solution is chosen.

The maximum feature objective for the reserve design problem can be expressed mathematically for a set of planning units (I indexed by i) and a set of features (J indexed by j) as:

Maximize i=1Is ci+j=1Jyjwjsubject toi=1Ixirij>=yjtjjJi=1IxiciB

Here, xi is the decisions variable (e.g. specifying whether planning unit i has been selected (1) or not (0)), rij is the amount of feature j in planning unit i, tj is the representation target for feature j, yj indicates if the solution has meet the target tj for feature j, and wj is the weight for feature j (defaults to 1 for all features; see add_feature_weights to specify weights). Additionally, B is the budget allocated for the solution, ci is the cost of planning unit i, and s is a scaling factor used to shrink the costs so that the problem will return a cheapest solution when there are multiple solutions that represent the same amount of all features within the budget.

See Also

objectives.

Examples

Run this code
# NOT RUN {
# load data
data(sim_pu_raster, sim_features)

# create problem
p <- problem(sim_pu_raster, sim_features) %>%
     add_max_features_objective(5000) %>%
     add_relative_targets(0.1) %>%
     add_binary_decisions()
# }
# NOT RUN {
# solve problem
s <- solve(p)

# plot solution
plot(s, main = "solution", axes = FALSE, box = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab