initPop: Create initial population

Description Usage Arguments Value Examples

Description

This function creates an initial population of randomly generated individuals.

Usage

1
initPop(N, min_val, max_val)

Arguments

N

Number of individuals in the population.

min_val

A vector of the minimum acceptable values for each gene.

max_val

A vector of the maximum acceptable values for each gene.

Value

A N x length(min_val) matrix. Each line corresponds to an individual in the initial population. Each column correspond to the value of each gene, randomly chosen between min_val and max_val. The last column corresponds to the fitness of each individual (NA after initialization).

Examples

1
#TODO

swarm-lab/geneOptimQAD documentation built on May 30, 2019, 9:35 p.m.