get_action_sets: Inspect registered action sets

View source: R/add_action_sets.R

get_action_setsR Documentation

Inspect registered action sets

Description

Return the definitions registered by add_action_sets() in long format. This function inspects a planning problem, not selected actions in a solution.

Usage

get_action_sets(x)

Arguments

x

A Problem object.

Value

A data.frame with character columns set and action, sorted by set and action id. If no sets are registered, a zero-row table with the same columns is returned. Internal identifiers are not exposed.

See Also

add_action_sets(), get_actions()

Examples

problem <- create_problem(
  pu = data.frame(id = 1:2, cost = 1),
  features = data.frame(id = 1L, name = "woodland"),
  dist_features = data.frame(pu = 1:2, feature = 1L, amount = 10)
) |>
  add_actions(data.frame(id = c("restore", "control")))

get_action_sets(problem)
problem <- add_action_sets(
  problem, list(restore_control = c("restore", "control"))
)
get_action_sets(problem)


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