Configuration class Encapsulates all configuration parameters for the package, with validation. The same object is used for all workflows (evaluation, export, plots), with workflow-specific validation methods.

Public fields

stics_exe

Path to STICS executable (required if init_workspace = TRUE)

usms_workspace

Path to USMs workspace (required if init_workspace = TRUE)

metadata_file

Path to metadata file (required if init_workspace = TRUE)

eval_workspace

Path to evaluation workspace (required)

output_dir

Path to output directory for export workflow (required for export)

run_simulations

Logical. Whether to run simulations or just prepare the workspace.

init_workspace

Logical. Whether to initialize the evaluation workspace (run simulations, prepare metadata, etc.) or assume it's already set up.

parallel

Logical. Whether to run simulations in parallel (only if init_workspace = TRUE).

verbose

Integer. Verbosity level (0 = silent, 1 = info, 2 = debug).

cores

Integer or NA. Number of CPU cores to use for parallel processing (only if parallel = TRUE). NA means auto-detect.

percentage

Numeric. Percentage of simulations to consider for export and plots (between 0 and 100).

reference_version

Character or NULL. If specified, the version in the evaluation workspace to use as reference for export and plots. Must be present in the workspace.

species

Character vector or NULL. If specified, only these species will be included in export and plots.

usms

Character vector or NULL. If specified, only these USMs will be included in export and plots.

var2exclude

Character vector or NULL. If specified, these variables will be excluded from export and plots.

Methods


Configuration$new()

Create a Configuration object. Values are validated against a declarative schema.

Usage

Configuration$new(...)

Arguments

...

Named configuration fields. Must match names defined in config_schema$fields. Unspecified fields use their default values. Invalid or unknown fields will trigger validation errors.


Configuration$validate_eval()

Validate configuration for evaluation workflow

Usage

Configuration$validate_eval()


Configuration$validate_export()

Validate configuration for export

Usage

Configuration$validate_export()


Configuration$validate_plots()

Validate configuration for plots

Usage

Configuration$validate_plots()


Configuration$clone()

The objects of this class are cloneable with this method.

Usage

Configuration$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.