migrate: Migration of individuals between subpopulations

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/migrate.R

Description

This function performs migration of individuals.

Usage

1
2
migrate(Chrom, SUBPOP = 1, ObjV, MIGR = 0.2, Select = FALSE, 
Structure = c("net","neighbourhood","ring"))

Arguments

Chrom

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

SUBPOP

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

ObjV

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

MIGR

a number indicating rate of individuals to be migrated per subpopulation. Default is set to 0.2.

Select

an logical value indicating whether fitness-based selection will be used. Default is set to FALSE. If set to TRUE, then ObjV must also be defined.

Structure

an character string indicating the name of structure of the subpopulations for migration. The default structure "net" indicates net structure (unconstrained migration).

Details

gatbxr provides support for multiple subpopulations through the use of high-level genetic operator functions and a routine for exchanging individuals between subpopulations. In the literature, the use of multiple populations has been shown, in most cases, to improve the quality of the results obtained using GAs compared to the single population GA.

gatbxr supports the use of a single population divided into a number of subpopulations or demes by modifying the use of data structures such that subpopulations are stored in contiguous blocks wihtin a single matrix.

This model enables each subpopulation evolved over generations by a traditional GA and from time to time individuals migrate from one subpopulation to another. The amount of migration of individuals and the pattern of that migration determines how much genetic diversity can occur.

migrate implements the transfer of individuals between subpopulations, in which Structure specifies the population topology over which migration will tha place. The default structure unrestricted migration topology (net) is the most general migration strategy. Here, individuals may migrate from any subpopulation to another. For each subpopulation, a pool of potential immigrants is constructed from the other subpopulations. The individual migrants are then determined according to the appropriate selection strategy.

Structure ring transfers individuals between directionally adjacent subpopulations. And neighbourhood is a similar strategy. Like the ring topology, migration is made only between nearest neighbours, however, migration may occur in either direction between subpopulations. For each subpopulation, the possible immigrants are determined, according to the desired selection method, from the adjacent subpopulations and a final selection made from this pool of individuals. This ensures that individuals will not migrate from a subpopulation to the same population.

Value

a list containing following components:

Chrom

a matrix containing the individuals of the current population after reinsertion.

ObjV

if ObjV is input parameters, then return vector containing the objective values of the individuals of the current generation after reinsertion. Else return NULL.

Author(s)

The original matlab implementation of reins was written by Hartmut Pohlheim. The R implementation was written by David Zhao.

See Also

select, recombin, mutate, reins

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## create initial population
Chrom = crtbp(50,10)$Chrom

## calculate objective value with sum function
objv = apply(Chrom,1,sum)

## assume there are 5 subpopulations, then perform ranking
ObjV = ranking(objv, SUBPOP = 5)

## chosse 20% of the individuals of one subpopulation and replaces
## these individuals with the fittest individuals from an adjacent
## subpopulation in a unidirectional ring structure
res = migrate(Chrom,SUBPOP = 5, ObjV, Select = TRUE, Structure = "ring")

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