Set the objective of a conservation planning problem()
to
secure as much of the features as possible without exceeding a budget. This
type of objective does not use targets, and feature weights should be used
instead to increase the representation of different features in solutions.
Note that this objective does not aim to maximize as much of each feature as
possible and so often results in solutions that are heavily biased towards
specific features.
add_max_utility_objective(x, budget)
x 


budget 

Object (i.e. ConservationProblem
) with the objective
added to it.
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 objectivesfailing to do so will return an error message when attempting to solve problem.
The maximum utility objective seeks to find the set of planning units that
maximizes the overall level of representation across a suite of
conservation features, while keeping cost within a fixed budget.
Additionally, weights can be used to favor the
representation of certain features over other features (see
add_feature_weights()
). This objective can be
expressed mathematically for a set of planning units (\(I\) indexed by
\(i\)) and a set of features (\(J\) indexed by \(j\)) as:
$$\mathit{Maximize} \space \sum_{i = 1}^{I} s \space c_i \space x_i + \sum_{j = 1}^{J} a_j w_j \\ \mathit{subject \space to} \\ a_j = \sum_{i = 1}^{I} x_i r_{ij} \space \forall j \in J \\ \sum_{i = 1}^{I} x_i c_i \leq B$$
Here, \(x_i\) is the decisions variable (e.g.
specifying whether planning unit \(i\) has been selected (1) or not
(0)), \(r_{ij}\) is the amount of feature \(j\) in planning
unit \(i\), \(A_j\) is the amount of feature \(j\)
represented in in the solution, and \(w_j\) 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, \(c_i\) 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.
In early versions (< 3.0.0.0), this function was named as
the add_max_cover_objective
function. It was renamed to avoid
confusion with existing terminology.
# load data data(sim_pu_raster, sim_pu_zones_stack, sim_features, sim_features_zones) # create problem with maximum utility objective p1 < problem(sim_pu_raster, sim_features) %>% add_max_utility_objective(5000) %>% add_binary_decisions() %>% add_default_solver(gap = 0, verbose = FALSE) # \dontrun{ # solve problem s1 < solve(p1)#> $LogToConsole #> [1] 0 #> #> $LogFile #> [1] "" #> #> $Presolve #> [1] 2 #> #> $MIPGap #> [1] 0 #> #> $TimeLimit #> [1] 2147483647 #> #> $Threads #> [1] 1 #> #> $NumericFocus #> [1] 0 #># } # create multizone problem with maximum utility objective that # has a single budget for all zones p2 < problem(sim_pu_zones_stack, sim_features_zones) %>% add_max_utility_objective(5000) %>% add_binary_decisions() %>% add_default_solver(gap = 0, verbose = FALSE) # \dontrun{ # solve problem s2 < solve(p2)#> $LogToConsole #> [1] 0 #> #> $LogFile #> [1] "" #> #> $Presolve #> [1] 2 #> #> $MIPGap #> [1] 0 #> #> $TimeLimit #> [1] 2147483647 #> #> $Threads #> [1] 1 #> #> $NumericFocus #> [1] 0 #># } # create multizone problem with maximum utility objective that # has separate budgets for each zone p3 < problem(sim_pu_zones_stack, sim_features_zones) %>% add_max_utility_objective(c(1000, 2000, 3000)) %>% add_binary_decisions() %>% add_default_solver(gap = 0, verbose = FALSE) # \dontrun{ # solve problem s3 < solve(p3)#> $LogToConsole #> [1] 0 #> #> $LogFile #> [1] "" #> #> $Presolve #> [1] 2 #> #> $MIPGap #> [1] 0 #> #> $TimeLimit #> [1] 2147483647 #> #> $Threads #> [1] 1 #> #> $NumericFocus #> [1] 0 #># }