sbx_crossover: Performs sbx (simulated binary) crossover operation on a pair...

Description Usage Arguments Value Author(s) References Examples

View source: R/oplibrary.R

Description

This function is not called directly but is given as a parameter in GA::ga function. In GA::ga, if the parameter crossover= is set to sbx_crossover than the sbx crossover operator is applied in the genetic search. sbx_crossover mimics the classical single-point crossover operator in binary genetic algorithms.

Usage

1
sbx_crossover(object, parents, ...)

Arguments

object

A GA::ga object

parents

Indices of the selected parents

...

Additional arguments to be passed to the function

Value

List of two generated offspring

Author(s)

Mehmet Hakan Satman - mhsatman@istanbul.edu.tr

References

Deb, Kalyanmoy, and Ram Bhushan Agrawal. "Simulated binary crossover for continuous search space." Complex systems 9.2 (1995): 115-148.

Examples

1
2
3
4
5
6
f <- function(x){ 
  return(-sum( (x-5)^2 ) )
}
myga <- ga(type="real-valued", fitness = f, popSize = 100, maxiter = 100, 
           min = rep(-50,5), max = rep(50,5), crossover = sbx_crossover)
print(myga@solution)

mcga documentation built on May 29, 2017, 9:01 p.m.

Search within the mcga package
Search all R packages, documentation and source code