summary.jaya {Jaya} | R Documentation |
Summary Method for Jaya Algorithm Optimization Results
Description
Provides a summary of optimization results for both single-objective and multi-objective cases. Displays key parameters, limits, and results such as the best solution for single-objective optimization or the Pareto front for multi-objective optimization.
Usage
## S3 method for class 'jaya'
summary(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments (currently unused). |
Details
- For single-objective optimization, the summary includes the best solution and the associated function value. - For multi-objective optimization, the summary displays the objectives, decision variable limits, and the first few entries of the Pareto front. - Automatically handles missing or incomplete attributes gracefully.
Examples
# Single-objective optimization example
sphere_function <- function(x) sum(x^2)
single_result <- jaya(
fun = sphere_function,
lower = c(-5, -5, -5),
upper = c(5, 5, 5),
popSize = 20,
maxiter = 50,
n_var = 3,
opt = "minimize"
)
summary(single_result)
# Multi-objective optimization example
objective1 <- function(x) sum(x^2)
objective2 <- function(x) sum(abs(x))
multi_result <- jaya_multi(
objectives = list(objective1, objective2),
lower = c(-5, -5, -5),
upper = c(5, 5, 5),
popSize = 50,
maxiter = 100,
n_var = 3
)
summary(multi_result)
[Package Jaya version 1.0.3 Index]