Provides a high-level interface for analysing Agricultural Production Systems sIMulator ('APSIM') Next Generation simulation outputs to support structured decision-making workflows. The package coordinates domain-specific decision modules (e.g. cultivar selection, experimental design) and standardises their outputs into reproducible decision reports. It does not perform 'APSIM' simulations or implement decision logic directly, but serves as an orchestration layer connecting analysis results with reporting and downstream interpretation.
rapsimng.decide provides a small interface for decision workflows built from APSIM Next Generation outputs.
It currently exports three helpers:
read_output() to read a report from an APSIMX file into a data frame.evaluate() to run a decision workflow through a decision-specific package.document() to produce a documented report in the same workflow.Install from GitHub:
remotes::install_github("byzheng/rapsimng.decide")
library(rapsimng.decide)
sim_data <- read_output(
"path/to/model.apsimx",
report = "HarvestReport"
)
result <- evaluate(
data = sim_data,
decision = "cultivar",
context = list(location = "Wagga Wagga"),
criteria = list(min_yield = 3.5),
options = list()
)
The decision argument selects a domain-specific implementation from an installed decision package such as rapsimng.decide.cultivar. This package itself does not implement the decision logic; it provides a consistent interface and report structure.
read_output() expects APSIMX output columns such as Clock.Today, SowingDate, Cultivar, and Fertilisation.evaluate() returns a structured report object with meta, metrics, tables, and figures components.document() is available when you want a human-readable report as text.