It is fairly common to do an genetic algorithm with no cross-over.
Especially if some of your variables have weird and unusual types that are not easy to describe how to combine.
For this reason I assume the NoCrossover class was provided.
However in MixedVariableMating it requires that the crossover have 2 children and 2 parents:
|
XOVER_N_PARENTS = 2 |
|
XOVER_N_OFFSPRINGS = 2 |
|
assert crossover.n_parents == XOVER_N_PARENTS and crossover.n_offsprings == XOVER_N_OFFSPRINGS |
And NoCrossover specified that it has exactly 1 of each
|
super().__init__(1, 1, 0.0) |
This means they can't be used together.