initbin | R Documentation |
The initbin function is an initialization function that can be used for binary encoding. It generates an initial population of population size n and chromosome length m.
initbin(n, m, prevpop, type, ...)
n |
Population size |
m |
Chromosome length |
prevpop |
Matrix of solutions used in heuristic and hybrid initialization |
type |
Type of output matrix |
... |
Further arguments passed to or from other methods. |
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.
Zeynel Cebeci & Erkut Tekeli
initval
,
initperm
,
initnorm
,
initialize
n = 20 #Population size (number of chromosemes) m = 5 #Number of gene (chromosome length) population = initbin(n, m) head(population, 4) tail(population, 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.