Function File: xoverKids = crossoverscattered (parents, options, nvars, FitnessFcn, unused, popuplation)

Default crossover function for problems without linear constraints

crossoverscattered creates a random binary vector and selects genes where the vector is a 1 from the first parent and a 0 from the next parent.

Inputs

parents

Row vector of parents chosen from selection function

options

options

nvars

Number of variables

FitnessFcn

Fitness function to use

unused

Placeholder variable not used

population

Matrix representing the current population

Outputs

xoverkids

Crossover offspring matrix where roes correspond to children. The number of columns is the number of variables.

See also: ga.

Package: ga