evaluate_decision() is a high-level orchestration wrapper for decision
workflows built on APSIM Next Generation outputs. It validates inputs,
dispatches to a domain-specific decision package, and standardises the
returned result into a common report structure. It does not implement the
decision logic itself.
A data frame or tibble containing APSIM Next Generation simulation outputs.
A single string identifying which decision workflow to run,
such as "cultivar".
A named list of contextual inputs supplied to the selected decision workflow.
A named list of decision criteria or thresholds used by the selected decision workflow.
A named list of additional options that control reporting or evaluation behaviour in the selected decision workflow.
Additional arguments passed through to the domain-specific decision evaluator.
A list with class "rapsimng_decide_report" containing four named
components:
meta: metadata describing the decision context and execution.
metrics: summary metrics produced by the decision workflow.
tables: tabular outputs ready for reporting.
figures: figure objects, specifications, or references for visual output.
This package separates responsibilities across the wider workflow:
rapsimng is responsible for running or preparing APSIM Next Generation
simulations and outputs.
rapsimng.decide.* packages implement domain-specific decision logic,
such as cultivar suitability assessment.
downstream analysis or interpretation layers, including packages such as
agrillm, can consume the standardised report returned here.
rapsimng.decide sits between these layers and provides a consistent entry
point and output contract for decision-oriented reporting.
mock_data <- data.frame(
SimulationName = "example",
Yield = 4.2,
stringsAsFactors = FALSE
)
# Example usage once a decision package is installed:
# evaluate_decision(
# data = mock_data,
# decision = "cultivar",
# context = list(location = "Wagga Wagga"),
# criteria = list(min_yield = 3.5),
# options = list()
# )