View source: R/add_objectives.R
| add_objective_min_intervention_impact | R Documentation |
Deprecated; retained temporarily with its original behavior.
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.
add_objective_min_intervention_impact(
x,
impact_col = "amount",
features = NULL,
actions = NULL,
alias = NULL
)
x |
A |
impact_col |
Character string giving the column in the
feature-distribution table that contains the per- |
features |
Optional subset of features to include. Values may match
|
actions |
Optional subset of actions used to define the intervention
context. Values may match |
alias |
Optional identifier used to register this objective for multi-objective workflows. |
The legacy objective minimizes the reference amount in units where at least one action in the selected scope is executed, counting each unit once. Its original arguments, objective sense, and single/MO formulations remain available during the transition.
An updated Problem object.
This function will be removed in a future version of multiscape. New workflows
should express action consequences with add_effects and optimize
signed changes with add_objective_max_effect.
This is not an automatic replacement. For deficit-based prioritization,
let q_{if} be the reference amount and M_f a common ceiling for
feature f. Supply M_f-q_{if} as the restoration effect, or
M_f as its outcome. If every plan restores exactly K units and
at most one scoped action is selected in each unit, then
\sum_i(M_f-q_{if})r_i=K M_f-\sum_iq_{if}r_i.
Maximizing this deficit is equivalent to minimizing the old baseline sum.
Equal area fixes K only when units have equal effective action areas.
With variable effort, varying ceilings, or concurrent scoped actions,
equivalence is not guaranteed. The common ceiling is a modelling assumption,
not an empirical estimate of restoration response.
With alias = NULL, one explicit single objective can be defined per
problem; a second unaliased definition raises an error. With an alias,
objectives accumulate under distinct names; a repeated alias raises an error.
Aliased definitions preserve an explicitly configured single objective.
To compare alternatives, start from the problem before its objective was added.
add_objective_max_effect,
add_objective_min_loss
# Equal-area units with a fixed restoration effort of two units.
p <- create_problem(
data.frame(id = 1:3, cost = 1, area = 1),
data.frame(id = 1, name = "service"),
data.frame(pu = 1:3, feature = 1, amount = c(0.2, 0.6, 0.9))
) |>
add_actions(data.frame(id = "restore"), cost = 1) |>
add_effects(data.frame(action = "restore", feature = "service", outcome = 1)) |>
add_constraint_area(2, "equal", tolerance = 0, actions = "restore") |>
add_objective_max_effect(features = "service", actions = "restore")
p$data$model_args
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.