population

fun <V, F> DistributedConfig<V, F>.population(size: Int, buffer: Int = 0, name: String? = null, factory: PopulationFactory<V, F>? = null): PanmicticPopulation<V, F>

Creates PanmicticPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

Parameters

size

the current size of population

buffer

the amount of reserved space in a population. If the expected maximum value of the population size (MAX - to which growth is possible) is known, improve performance by:

buffer = MAX - size

name

name of population, default value generated by generateChildName

factory

PopulationFactory for this population, default value DistributedPopulation.factory. Creates new Chromosome


fun <V, F> DistributedConfig<V, F>.population(population: Array<Chromosome<V, F>>, buffer: Int = 0, name: String? = null, factory: PopulationFactory<V, F>? = null): PanmicticPopulation<V, F>

Creates PanmicticPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

Parameters

population

initial or existing population. Size of population will be equal to Array.size - buffer. (Default buffer is 0)

buffer

the amount of reserved space in a population.

name

name of population, default value generated by generateChildName

factory

PopulationFactory for this population, default value DistributedPopulation.factory. Creates new Chromosome.


fun <V, F> DistributedConfig<V, F>.population(dimens: Dimens, name: String? = null, factory: PopulationFactory<V, F>? = null): CellularPopulation<V, F>

Creates CellularPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

Parameters

dimens

Dimens for cellular population. Define space and its boundaries for the population and, accordingly, population size. This space determines the position of the chromosomes relative to each other

name

name of population, default value generated by generateChildName

factory

PopulationFactory for this population, default value DistributedPopulation.factory. Creates new Chromosome


fun <V, F> DistributedConfig<V, F>.population(dimens: Dimens, population: Array<Chromosome<V, F>>, name: String? = null, factory: PopulationFactory<V, F>? = null): CellularPopulation<V, F>

Creates CellularPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

NOTE population.size must be equal to dimens.size

Parameters

dimens

Dimens for cellular population. Define space and its boundaries for the population and, accordingly, population size. This space determines the position of the chromosomes relative to each other

population

initial or existing population.

name

name of population, default value generated by generateChildName

factory

PopulationFactory for this population, default value DistributedPopulation.factory. Creates new Chromosome


fun <V, F> population(name: String, factory: PopulationFactory<V, F>, subpopulations: MutableList<Population<V, F>> = mutableListOf()): DistributedPopulation<V, F>

Creates DistributedPopulation.

Parameters

name

name of distributed population, default value = DistributedPopulation.DEFAULT_DISTRIBUTED_POPULATION_NAME, used to identify different populations

subpopulations

list of child populations for DistributedGA