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,])

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

Copy Link

Version

Install

install.packages('rmoo')

Monthly Downloads

260

Version

0.1.6

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Francisco Benitez

Last Published

February 5th, 2021

Functions in rmoo (0.1.6)

kroA100

KROA100
nsgaMonitor

Monitor non-dominated genetic algorithm evolution
nsga2-class

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

Non-Dominated Sorting in Genetic Algorithms III
nsgaControl

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

KROC100
numberOrNAOrMatrix-class

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

Non-Dominated Sorting in Genetic Algorithms II
nsga3-class

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

Crossover operators in non-dominated genetic algorithms
rmoo-package

rmoo: Multi-Objective Optimization in R
pcp

Parallel Coordinate Plots
scatter

Scatter Plot Functions
Summary

Summarize non-dominated genetic algorithm evolution
sharing

Calculation of Dummy Fitness
polar

Polar Area Aiagram
nsga_Mutation

Mutation operators in non-dominated genetic algorithms
performance_metrics

Objective Values performance metrics
nsga-class

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

Population initialization in non-dominated genetic algorithms
nsga

Non-Dominated Sorting in Genetic Algorithms
nsga_Selection

Selection operators in non-dominated genetic algorithms
update_points

Adaptive normalization of population members
niching

Niche-Preservation Operation
non_dominated_fronts

Calculate of Non-Dominated Front
associate

Association Operation in Non-Dominated Genetic Algorithms III
crowding_distance

Calculation of Crowding Distance
heat_map

Heatmap Plots
kroB100

KROB100
generate_reference_points

Determination of Reference Points on a Hyper-Plane
get_fixed_rowsum_integer_matrix

Determine the division points on the hyperplane