Skip to contents

Each candidate proposes x + r1 (x_best - |x|) - r2 (x_worst - |x|), r1, r2 uniform per coordinate, and keeps it when better.

Usage

JayaAlgorithm(f, bounds, n_pop = 20, max_iter = 200, seed = 0)

Arguments

f

Objective to minimise.

bounds

List of c(low, high) pairs or a two-column matrix.

n_pop

Population size.

max_iter

Iterations.

seed

Philox seed.

Value

list(x, fun, estimate, history, n_fev, method).

References

Rao, R. V. (2016). Jaya: a simple and new optimization algorithm for solving constrained and unconstrained optimization problems. International Journal of Industrial Engineering Computations 7, 19-34.

Examples

JayaAlgorithm(function(x) sum(x^2), list(c(-5, 5), c(-5, 5)), max_iter = 50)$fun
#> [1] 8.166247e-09