% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/add_objectives.R
\name{add_objective_min_intervention_impact}
\alias{add_objective_min_intervention_impact}
\title{Add objective: minimize intervention impact}
\usage{
add_objective_min_intervention_impact(
  x,
  impact_col = "amount",
  features = NULL,
  actions = NULL,
  alias = NULL
)
}
\arguments{
\item{x}{A \code{Problem} object.}

\item{impact_col}{Character string giving the column in the
feature-distribution table that contains the per-\code{(pu, feature)}
impact amount. The default is \code{"amount"}.}

\item{features}{Optional subset of features to include. Values may match
\code{x$data$features$id} and, if present, \code{x$data$features$name}.}

\item{actions}{Optional subset of actions used to define the intervention
context. Values may match \code{x$data$actions$id} and, if present,
\code{x$data$actions$action_set}.}

\item{alias}{Optional identifier used to register this objective for
multi-objective workflows.}
}
\value{
An updated \code{Problem} object.
}
\description{
Define 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.
}
\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 \eqn{w_i \in \{0,1\}} denote whether planning unit \eqn{i} is selected
for intervention. Let \eqn{q_{if}} denote the impact amount associated with
planning unit \eqn{i} and feature \eqn{f}, taken from column
\code{impact_col} in the feature-distribution table.

If all selected features are included, the objective can be interpreted as:

\deqn{
\min \sum_{i \in \mathcal{I}} \left( \sum_{f \in \mathcal{F}^{\star}} q_{if}
\right) w_i,
}

where \eqn{\mathcal{F}^{\star}} denotes the selected subset of features.

Thus, the coefficient attached to \eqn{w_i} is the aggregated impact of the
selected features in planning unit \eqn{i}.

The role of \code{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 \eqn{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

p2 <- add_objective_min_intervention_impact(
  p,
  features = 1
)
p2$data$model_args

p3 <- add_objective_min_intervention_impact(
  p,
  actions = "restoration"
)
p3$data$model_args

}
\seealso{
\code{\link{add_objective_max_benefit}},
\code{\link{add_objective_min_loss}}
}
