initval {adana}R Documentation

Value encoded initialization

Description

Initialize the population with integer or real numbers

Usage

initval(n, m, prevpop, lb, ub, nmode="real", type, ...)

Arguments

n

Population size

m

Chromosome length (number of variables)

prevpop

Matrix of solutions used in heuristic and hybrid initialization

lb

Lower bound of each variables

ub

Upper bound of each variables

nmode

Type of variables (“integer” or “real”)

type

Type of output matrix

...

Further arguments passed to or from other methods.

Details

With this function, populations are initialized with integer and/or real numbers depending on the GA problem. In this case, the value type must be known. Furthermore, the lower and upper bound values for each variable must be known. If desired, heuristic or mixed initialization can be done with the prevpop argument.

Value

The output matrix includes only chromosomes of initial population when type=2, otherwise The output matrix includes chromosomes of initial population and additional two empty columns for generation number and fitness values.

Author(s)

Zeynel Cebeci & Erkut Tekeli

See Also

initbin, initperm, initnorm, initialize

Examples

n = 15  #Population size (number of chromosemes)
m = 4   #number of Variables
population = initval(n, m)
head(population, 3)
tail(population, 3)

[Package adana version 1.1.0 Index]