reins: RE-INSertion of offspring in population replacing parents

Description Usage Arguments Value Author(s)

View source: R/reins.R

Description

This function reinserts offspring in the population.

Usage

1
reins(Chrom,SelCh,SUBPOP=1,InsOpt=c(0,1),ObjVCh=NULL,ObjVSel=NULL)

Arguments

Chrom

matrix containing the individuals (parents) of the current population. Each row corresponds to one individual.

SelCh

matrix containing the offspring of the current population. Each row corresponds to one individual.

SUBPOP

an optional number indicating subpopulations. 1 subpopulation is as default.

InsOpt

an optional vector containing the insertion method parameters. InsOpt[1] number indicating kind of insertion. 0 stands for uniform insertion and 1 for fitness-based insertion. if omitted, 0 is assumed. InsOpt[2] rate of offspring to be inserted per subpopulation. if omitted, 1.0 is assumed

ObjVCh

an optional vector containing the objective values of the individuals (parents - Chrom) in the current population, needed for fitness-based insertion saves recalculation of objective values for population

ObjVSel

an optional vector containing the objective values of the offspring (SelCh) in the current population, needed for partial insertion of offspring, saves recalculation of objective values for population

Value

a list containing following components:

Chrom

matrix containing the individuals of the current population after reinsertion.

ObjVCh

if ObjVCh and ObjVSel are input parameters, then return vector containing the objective values of the individuals of the current generation after reinsertion.

Author(s)

The original matlab implementation of reins was written by Hartmut Pohlheim and tested by Alex Shenfield. The R implementation was written by David Zhao.


drizztxx/gatbxr documentation built on Dec. 27, 2021, 2:26 a.m.