1.2. Crossover¶
1.2.1. cxOnePoint¶

surrogate.crossover.
cxOnePoint
()[source]¶ Executes a one point crossover on the input sequence individuals. The two individuals are modified in place. The resulting individuals will respectively have the length of the other.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
Returns: A tuple of two variables.
This function uses the
randint()
function from the python baserandom
module.
1.2.2. cxTwoPoint¶

surrogate.crossover.
cxTwoPoint
()[source]¶ Executes a twopoint crossover on the input sequence individuals. The two individuals are modified in place and both keep their original length.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
Returns: A tuple of two variables.
This function uses the
randint()
function from the Python baserandom
module.
1.2.3. cxUniform¶

surrogate.crossover.
cxUniform
()[source]¶ Executes a uniform crossover that modify in place the two sequence individuals. The attributes are swapped accordingto the indpb probability.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
 prob – Independent probabily for each attribute to be exchanged.
Returns: A tuple of two variables.
This function uses the
random()
function from the python baserandom
module.
1.2.4. cxPartialyMatch¶

surrogate.crossover.
cxPartialyMatch
()[source]¶ Executes a partially matched crossover (PMX) on the input individuals. The two individuals are modified in place. This crossover expects sequence individuals of indices, the result for any other type of individuals is unpredictable.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
Returns: A tuple of two variables.
Moreover, this crossover generates two children by matching pairs of values in a certain range of the two parents and swapping the values of those indexes. For more details see [Goldberg1985].
This function uses the
randint()
function from the python baserandom
module.[Goldberg1985] Goldberg and Lingel, “Alleles, loci, and the traveling salesman problem”, 1985.
1.2.5. cxUniformPartialMatch¶

surrogate.crossover.
cxUniformPartialMatch
()[source]¶ Executes a uniform partially matched crossover (UPMX) on the input individuals. The two individuals are modified in place. This crossover expects sequence individuals of indices, the result for any other type of individuals is unpredictable.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
 prob – Independent probabily for each attribute to be exchanged.
Returns: A tuple of two variables.
Moreover, this crossover generates two children by matching pairs of values chosen at random with a probability of indpb in the two parents and swapping the values of those indexes. For more details see [Cicirello2000].
This function uses the
random()
andrandint()
functions from the python baserandom
module.[Cicirello2000] Cicirello and Smith, “Modeling GA performance for control parameter optimization”, 2000.
1.2.6. cxOrdered¶

surrogate.crossover.
cxOrdered
()[source]¶ Executes an ordered crossover (OX) on the input individuals. The two individuals are modified in place. This crossover expects sequence individuals of indices, the result for any other type of individuals is unpredictable.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
Returns: A tuple of two variables.
Moreover, this crossover generates holes in the input individuals. A hole is created when an attribute of an individual is between the two crossover points of the other individual. Then it rotates the element so that all holes are between the crossover points and fills them with the removed elements in order. For more details see [Goldberg1989].
This function uses the
sample()
function from the python baserandom
module.[Goldberg1989] Goldberg. Genetic algorithms in search, optimization and machine learning. Addison Wesley, 1989
1.2.7. cxBlend¶

surrogate.crossover.
cxBlend
()[source]¶ Executes a blend crossover that modify inplace the input individuals. The blend crossover expects sequence individuals of floating point numbers.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
 alpha – Extent of the interval in which the new values can be drawn for each attribute on both side of the parents’ attributes.
Returns: A tuple of two variables.
This function uses the
random()
function from the python baserandom
module.
1.2.8. cxSimulatedBinary¶

surrogate.crossover.
cxSimulatedBinary
()[source]¶ Executes a simulated binary crossover that modify inplace the input individuals. The simulated binary crossover expects sequence individuals of floating point numbers.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
 eta – Crowding degree of the crossover. A high eta will produce children resembling to their parents, while a small eta will produce solutions much more different.
Returns: A tuple of two variables.
This function uses the
random()
function from the python baserandom
module.
1.2.9. cxSimulatedBinaryBounded¶

surrogate.crossover.
cxSimulatedBinaryBounded
()[source]¶ Executes a simulated binary crossover that modify inplace the input individuals. The simulated binary crossover expects sequence individuals of floating point numbers.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
 eta – Crowding degree of the crossover. A high eta will produce children resembling to their parents, while a small eta will produce solutions much more different.
 low – A value or a python:sequence of values that is the lower bound of the search space.
 up – A value or a python:sequence of values that is the upper bound of the search space.
Returns: A tuple of two variables.
This function uses the
random()
function from the python baserandom
module.Note
This implementation is similar to the one implemented in the original NSGAII C code presented by Deb.
1.2.10. cxMessyOnePoint¶

surrogate.crossover.
cxMessyOnePoint
()[source]¶ Executes a one point crossover on sequence individual. The crossover will in most cases change the individuals size. The two individuals are modified in place.
Parameters:  var1 – The first variable participating in the crossover.
 var2 – The second variable participating in the crossover.
Returns: A tuple of two variables.
This function uses the
randint()
function from the python baserandom
module.