jaya_multi {Jaya} | R Documentation |
Jaya Algorithm for Multi-Objective Optimization
Description
Implements the Jaya optimization algorithm for multi-objective optimization. This algorithm supports non-dominated sorting and handles constraints and adaptive population sizes.
Usage
jaya_multi(
objectives,
lower,
upper,
popSize = 50,
maxiter,
n_var,
seed = NULL,
suggestions = data.frame(),
constraints = list(),
adaptive_pop = FALSE,
min_popSize = 20,
max_popSize = 100,
early_stopping = FALSE,
tolerance = 1e-06,
patience = 10
)
Arguments
objectives |
A list of objective functions to optimize. |
lower |
Numeric vector specifying the lower bounds for variables. |
upper |
Numeric vector specifying the upper bounds for variables. |
popSize |
Population size. Default is 50. |
maxiter |
Maximum number of iterations. |
n_var |
Number of variables. |
seed |
Random seed for reproducibility. Default is 'NULL'. |
suggestions |
Data frame of initial suggestions for starting population. Default is an empty data frame. |
constraints |
A list of constraint functions. Each constraint should return a non-positive value if satisfied. |
adaptive_pop |
Logical. Whether to adapt population size during optimization. Default is 'FALSE'. |
min_popSize |
Minimum population size if adaptive population is enabled. Default is 20. |
max_popSize |
Maximum population size if adaptive population is enabled. Default is 100. |
early_stopping |
Logical. Whether to stop early if no improvement is observed. Default is 'FALSE'. |
tolerance |
Numeric tolerance for early stopping. Default is 1e-6. |
patience |
Number of iterations to wait for improvement before stopping. Default is 10. |
Value
A list containing: - 'Pareto_Front': A data frame of non-dominated solutions with decision variables and their corresponding objective values. - 'Solutions': The final population including decision variables and their objective values.
Examples
# Example: Multi-objective optimization
sphere_function_1 <- function(x) sum(x^2)
sphere_function_2 <- function(x) sum((x - 2)^2)
result <- jaya_multi(
objectives = list(sphere_function_1, sphere_function_2),
lower = rep(-5, 3),
upper = rep(5, 3),
popSize = 20,
maxiter = 50,
n_var = 3
)
print(summary(result))