Learn R Programming

⚠️There's a newer version (0.2.0) of this package.Take me there.

rmoo - R Multi-Objective Optimization

Overview

A Non-Dominated Sorting based Multi-Objective Optimization package, built upon the ‘GA’ package.

‘rmoo’ provides a complete and flexible framework for optimizing multiple supplied objectives. You will have at your disposal a wide range of configuration options for the NSGA, NSGA-II and NSGA-III algorithms, as well as representation of real numbers, permutations and binaries.

Installation

You can install the stable version on R CRAN:

install.packages("rmoo")

Or you can install the development version from GitHub:

# install.packages("devtools")
devtools::install_github("Evolutionary-Optimization-Laboratory/rmoo")

Usage

A simple example of running nsga3 solving the DTLZ1 problem:

library(rmoo)

DTLZ1 <- function (x, nobj = 3) 
{
    if (is.null(dim(x))) {
        x <- matrix(x, 1)
    }
    n <- ncol(x)
    y <- matrix(x[, 1:(nobj - 1)], nrow(x))
    z <- matrix(x[, nobj:n], nrow(x))
    g <- 100 * (n - nobj + 1 + rowSums((z - 0.5)^2 - cos(20 * 
        pi * (z - 0.5))))
    tmp <- t(apply(y, 1, cumprod))
    tmp <- cbind(t(apply(tmp, 1, rev)), 1)
    tmp2 <- cbind(1, t(apply(1 - y, 1, rev)))
    f <- tmp * tmp2 * 0.5 * (1 + g)
    return(f)
}

result <- nsga3(fitness = DTLZ1,
                type = "real-valued",
                lower = c(0,0,0),
                upper = c(1,1,1),
                popSize = 92,
                n_partitions = 12,
                maxiter = 300)
                
pcp(object = result)

#Scatter without optimal points
scatter(object = result)

#Scatter with optimal points (Using reference points as optimal points)
scatter(object = result, optimal = result@reference_points)

#Polar Coordinates
polar(fitness = result@fitness[1:3,])

#Heatmap Plot
heat_map(fitness = result@fitness[1:3,])

Copy Link

Version

Install

install.packages('rmoo')

Monthly Downloads

318

Version

0.1.8

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Francisco Benitez

Last Published

August 11th, 2022

Functions in rmoo (0.1.8)

associate

Association Operation in Non-Dominated Genetic Algorithms III
crowding_distance

Calculation of Crowding Distance
nsga3-class

Virtual Class 'nsga3 - Simple Class for subassigment Values'
nsgaMonitor

Monitor non-dominated genetic algorithm evolution
nsga3

Non-Dominated Sorting in Genetic Algorithms III
nsga2-class

Virtual Class 'nsga2 - Simple Class for subassigment Values'
nsgaControl

A function for setting or retrieving defaults non-dominated genetic operators
nsga_Crossover

Crossover operators in non-dominated genetic algorithms
nsga_Mutation

Mutation operators in non-dominated genetic algorithms
nsga2

Non-Dominated Sorting in Genetic Algorithms II
nsga-class

Virtual Class 'nsga - Simple Class for subassigment Values'
nsga

Non-Dominated Sorting in Genetic Algorithms
reference_point_multi_layer

Determination of Multi-layer Reference Points
sharing

Calculation of Dummy Fitness
pcp

Parallel Coordinate Plots
numberOrNAOrMatrix-class

Virtual Class 'numberOrNAOrMatrix - Simple Class for subassigment Values'
rmoo-package

rmoo: Multi-Objective Optimization in R
update_points

Adaptive normalization of population members
performance_metrics

Objective Values performance metrics
polar

Polar Area Aiagram
Summary

Summarize non-dominated genetic algorithm evolution
scatter

Scatter Plot Functions
scale_reference_directions

Scale Reference Points
nsga_Population

Population initialization in non-dominated genetic algorithms
nsga_Selection

Selection operators in non-dominated genetic algorithms
kroC100

KROC100
kroB100

KROB100
generate_reference_points

Determination of Reference Points on a Hyper-Plane
niching

Niche-Preservation Operation
non_dominated_fronts

Calculate of Non-Dominated Front
get_fixed_rowsum_integer_matrix

Determine the division points on the hyperplane
heat_map

Heatmap Plots
kroA100

KROA100