force_param_values: Generates files to force parameters values in STICS...

View source: R/force_param_values.R

force_param_valuesR Documentation

Generates files to force parameters values in STICS simulations

Description

Generates a param.sti file and sets code optim in new_travail.usm to force parameters values in STICS simulations (this function is typically called before SticsOnR::run_stics())

Usage

force_param_values(workspace, values, javastics)

Arguments

workspace

Path of the workspace containing the STICS (txt) input files.

values

named vector of parameter values to force. See Details for more information.

javastics

Path of JavaSTICS

Details

This function operates on STICS text input files. Do not use it before calling gen_usms_xml2txt(), otherwise param.sti and new_travail.usm files will be overwritten.

This function has been created to be called before SticsOnR::run_stics(). It can not work with SticsOnR::run_javastics(), that will overwrite param.sti and new_travail.usm files.

values can contain NA. In this case, the corresponding parameter(s) will not be forced (default value(s), i.e. read in STICS input files, will be used). If values==NA or values==NULL, not any parameter will be forced (all default values used).

Value

A logical status TRUE if successful, FALSE otherwise

See Also

SticsOnR::run_stics()

Examples

## Not run: 
example_txt_dir <- get_examples_path(file_type = "txt")
force_param_values(example_txt_dir,
  setNames(object = c(220, 330), c("stlevamf", "stamflax")),
  javastics = "/path/to/javastics"
)

## End(Not run)


SticsRPacks/SticsRFiles documentation built on July 4, 2025, 4:19 p.m.