add_benefits: Add benefits

View source: R/add_effects.R

add_benefitsR Documentation

Add benefits

Description

Legacy convenience wrapper around add_effects that retains only positive signed changes (effect > 0). Positive change does not necessarily imply an ecological benefit. For new code, prefer add_effects() to retain signed effects of both directions. Effects can be defined only once per problem.

Usage

add_benefits(
  x,
  benefits = NULL,
  effect_type = c("delta", "after"),
  effect_aggregation = c("sum", "mean")
)

Arguments

x

A Problem created by create_problem with feasible actions already defined by add_actions.

benefits

Alias of effects, kept for backwards compatibility.

effect_type

Deprecated interpretation argument: "delta" for signed changes or "after" for expected amounts. Legacy multipliers retain their original interpretation; omit for modern tables.

effect_aggregation

Deprecated raster aggregation argument; use raster_aggregation instead.

Value

An updated Problem object containing:

dist_effects

The canonical filtered effects table, containing only rows with benefit > 0.

dist_benefit

A backwards-compatible mirror table containing only the benefit component.

See Also

add_effects, add_losses, add_objective_max_benefit


multiscape documentation built on Oct. 12, 2026, 5:08 p.m.