| Title: | Shuffled Complex Evolution Algorithm for Optimization |
|---|---|
| Description: | Provides an 'R' interface to a 'Rust' implementation of the Shuffled Complex Evolution - University of Arizona (SCE-UA) global optimization algorithm (Duan et al., 1992). SCE-UA combines simplex search, competitive evolution, and complex shuffling to solve nonlinear, non-convex, continuous parameter estimation problems. The method is commonly used for calibrating hydrological and environmental models and follows the algorithm proposed by Duan et al. (1992) <doi:10.1029/91WR02985>. |
| Authors: | Anatoly Tsyplenkov [aut, cre, cph] (ORCID: <https://orcid.org/0000-0003-4144-8402>) |
| Maintainer: | Anatoly Tsyplenkov <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-26 18:42:53 UTC |
| Source: | https://github.com/cran/sceua |
Find the parameter set that minimizes an objective function using the Shuffled Complex Evolution - University of Arizona (SCE-UA) algorithm (Duan et al., 1992).
sceua( fn, lower, upper, initial = NULL, max_evaluations = 10000L, kstop = 5L, pcento = 0.01, complexes = 2L, points_per_complex = NULL, simplex_size = NULL, evolution_steps = NULL, min_complexes = NULL, parameter_epsilon = 0.001, ... )sceua( fn, lower, upper, initial = NULL, max_evaluations = 10000L, kstop = 5L, pcento = 0.01, complexes = 2L, points_per_complex = NULL, simplex_size = NULL, evolution_steps = NULL, min_complexes = NULL, parameter_epsilon = 0.001, ... )
fn |
Function to minimize. Must accept a single numeric vector of parameters and return a scalar numeric value. |
lower |
Numeric vector of lower bounds. Must have the same length as
|
upper |
Numeric vector of upper bounds. Must have the same length as
|
initial |
Optional initial parameter vector. If provided, it is included in the initial population. |
max_evaluations |
Maximum number of function evaluations. |
kstop |
Number of shuffling loops over which the objective value must
change by |
pcento |
Objective convergence threshold. |
complexes |
Number of complexes in the initial population. |
points_per_complex |
Number of points in each complex. Defaults to
|
simplex_size |
Number of points in each sub-complex. Defaults to
|
evolution_steps |
Number of evolution steps allowed for each complex
before shuffling. Defaults to |
min_complexes |
Minimum number of complexes required. Defaults to
|
parameter_epsilon |
Parameter convergence threshold. |
... |
Additional arguments passed to |
The R wrapper draws the internal SCE-UA seed from R's global random number
generator. Call set.seed() before sceua() for reproducible results.
An object of class sceua: a list with components:
par: best parameter vector.
value: objective value at par.
counts: number of function evaluations.
iterations: number of shuffling loops.
termination: reason for termination.
history: a data.frame with one row per shuffling loop.
Duan, Q., Sorooshian, S., and Gupta, V.K., 1992. Effective and efficient global optimization for conceptual rainfall-runoff models. Water Resour. Res. 28 (4), 1015-1031.
set.seed(1234) # Two-dimensional sphere result <- sceua( fn = function(x) sum(x^2), lower = c(-5, -5), upper = c(5, 5), max_evaluations = 5000, kstop = 5, pcento = 1e-8, complexes = 5 ) resultset.seed(1234) # Two-dimensional sphere result <- sceua( fn = function(x) sum(x^2), lower = c(-5, -5), upper = c(5, 5), max_evaluations = 5000, kstop = 5, pcento = 1e-8, complexes = 5 ) result