
Add objective: minimize intervention impact
Source:R/add_objectives.R
add_objective_min_intervention_impact.RdDefine an objective that minimizes the impact associated with selecting planning units for intervention.
This objective uses planning-unit selection variables rather than summing the same impact repeatedly over multiple actions. As a result, each planning unit contributes at most once to the objective, regardless of how many feasible actions exist in that unit.
Usage
add_objective_min_intervention_impact(
x,
impact_col = "amount",
features = NULL,
actions = NULL,
alias = NULL
)Arguments
- x
A
Problemobject.- impact_col
Character string giving the column in the feature-distribution table that contains the per-
(pu, feature)impact amount. The default is"amount".- features
Optional subset of features to include. Values may match
x$data$features$idand, if present,x$data$features$name.- actions
Optional subset of actions used to define the intervention context. Values may match
x$data$actions$idand, if present,x$data$actions$action_set.- alias
Optional identifier used to register this objective for multi-objective workflows.
Details
Use this function when intervention itself has a baseline ecological, social, or operational burden that should be minimized independently of the detailed effects of particular actions.
Let \(w_i \in \{0,1\}\) denote whether planning unit \(i\) is selected
for intervention. Let \(q_{if}\) denote the impact amount associated with
planning unit \(i\) and feature \(f\), taken from column
impact_col in the feature-distribution table.
If all selected features are included, the objective can be interpreted as:
$$ \min \sum_{i \in \mathcal{I}} \left( \sum_{f \in \mathcal{F}^{\star}} q_{if} \right) w_i, $$
where \(\mathcal{F}^{\star}\) denotes the selected subset of features.
Thus, the coefficient attached to \(w_i\) is the aggregated impact of the selected features in planning unit \(i\).
The role of actions in this objective is not to make impact additive
over actions, but to restrict the notion of intervention to planning units
that are relevant for the selected subset of actions in downstream model
construction. Even when multiple feasible actions exist in a planning unit,
the planning unit contributes at most once through \(w_i\).
This objective is useful when intervention itself has a baseline ecological, social, or operational impact that should be minimized independently of the detailed gain or loss generated by particular actions.
Examples
pu_tbl <- data.frame(
id = 1:4,
cost = c(1, 2, 3, 4)
)
feat_tbl <- data.frame(
id = 1:2,
name = c("feature_1", "feature_2")
)
dist_feat_tbl <- data.frame(
pu = c(1, 1, 2, 3, 4),
feature = c(1, 2, 2, 1, 2),
amount = c(5, 2, 3, 4, 1)
)
actions_df <- data.frame(
id = c("conservation", "restoration"),
name = c("conservation", "restoration")
)
p <- create_problem(
pu = pu_tbl,
features = feat_tbl,
dist_features = dist_feat_tbl,
cost = "cost"
) |>
add_actions(actions_df, cost = c(conservation = 1, restoration = 2))
p1 <- add_objective_min_intervention_impact(p)
p1$data$model_args
#> $model_type
#> [1] "minimizeInterventionImpact"
#>
#> $objective_id
#> [1] "min_intervention_impact"
#>
#> $objective_args
#> $objective_args$impact_col
#> [1] "amount"
#>
#> $objective_args$features
#> [1] 1 2
#>
#> $objective_args$actions
#> [1] "conservation" "restoration"
#>
#>
p2 <- add_objective_min_intervention_impact(
p,
features = 1
)
p2$data$model_args
#> $model_type
#> [1] "minimizeInterventionImpact"
#>
#> $objective_id
#> [1] "min_intervention_impact"
#>
#> $objective_args
#> $objective_args$impact_col
#> [1] "amount"
#>
#> $objective_args$features
#> [1] 1
#>
#> $objective_args$actions
#> [1] "conservation" "restoration"
#>
#>
p3 <- add_objective_min_intervention_impact(
p,
actions = "restoration"
)
p3$data$model_args
#> $model_type
#> [1] "minimizeInterventionImpact"
#>
#> $objective_id
#> [1] "min_intervention_impact"
#>
#> $objective_args
#> $objective_args$impact_col
#> [1] "amount"
#>
#> $objective_args$features
#> [1] 1 2
#>
#> $objective_args$actions
#> [1] "restoration"
#>
#>