ranking: RANK-based fitness assignment

Description Usage Arguments Value Author(s) Examples

View source: R/ranking.R

Description

This function ranks individuals represented by their associated cost, to be *minimized*, and returns a vector FitnV containing the corresponding individual fitnesses. For multiple subpopulations the ranking is performed separately for each subpopulation.

Usage

1
ranking(ObjV,RFun=c(2,0),SUBPOP=1)

Arguments

ObjV

a vector containing the objective values of the individuals in the current population (cost values).

RFun

if set RFun to a number range in [1, 2], linear ranking is assumed and the value indicates the selective pressure. If RFun is set to a 2 elements vector, then RFun[1] indicates the selective pressure and RFun[2] indicates the ranking method, when RFun[2] = 0, linear ranking is used, when RFun[2] = 1, non-linear ranking is used. If RFun is a vector with length(RFun) > 2, it will contain the fitness to be assigned to each rank. It should have the same length as ObjV. Usually RFun is monotonously increasing. If RFun is omitted, linear ranking and a selective pressure of 2 are assumed.

SUBPOP

an optional number indicating subpopulations. Default is set to 1 subpopulation.

Value

a vector containing the fitness values of the individuals in the current population.

Author(s)

The original matlab implementation of ranking was written by Hartmut Pohlheim and Carlos Fonseca. The R implementation was written by David Zhao.

Examples

1
2
3
4
5
Chrom = crtbp(40,10)$Chrom

#Ojbective function is the sum of individuals
ObjV = apply(Chrom,1,sum)
FitnV = ranking(ObjV)

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