opti: Optimization function

optiR Documentation

Optimization function

Description

Optimization function

Usage

opti(USM_path, Plant, weight, obs_name, Parameters, ...)

Arguments

USM_path

Path to the USM directory for evaluation.

Plant

A vector for the plant (i.e. Principal or associated) for which the parameters will be set (only for plant or technical parameters in mixed crop simulations) Set to NULL if using STICS in sole crop

weight

The weight used for each variable (see details)

obs_name

A data.frame of observation file name(s) of the form ⁠data.frame(Principal= c(obs1.obs), Dominated= c(obs2.obs)⁠ for mixed crops (simply remove the Dominated column for sole crops.

Parameters

A data.frame with parameter name, starting (optional), min, max values, and data type (optional). See details and example.

...

Further arguments to pass to the optimization function, i.e. dfoptim::nmkb() or stats::optimize()

Details

The function uses stats::optimize() for univariate optimization, and the dfoptim package functions for multivariate. Currently only the Nelder-Mead algorithm is implemented from dfoptim. The Parameters argument should be formated as a a data.frame (see example). The start values should exclude the min and max values (they are exclusive bounds). If the start is NULL, then the mean value between the min and max values is taken. The data type is optional and only takes double (numeric) or integer. If a parameter is an integer, then a rounding is applied (very crude but functional). If weight is not provided by the user, the selection criteria is computed using the equation 5 from Wallach et al. (2011). If they are provided, the equation 6 is used instead.

Value

A named vector of the optimized values of the parameters.

References

Wallach, D., Buis, S., Lecharpentier, P., Bourges, J., Clastre, P., Launay, M., … Justes, E. (2011). A package of parameter estimation methods and implementation for the STICS crop-soil model. Environmental Modelling & Software, 26(4), 386–394. doi:10.1016/j.envsoft.2010.09.004

See Also

dfoptim::nmkb()


VEZY/sticRs documentation built on Oct. 26, 2023, 7:37 a.m.