Closed apleonhardt closed 9 years ago
Can you track which variable becomes complex first?
Do any of you individuals contain values smaller than low or larger than up? There is no check done in the operator.
I'll flag this as invalid as I cannot reproduce the error. Do not hesitate to reopen it if you can provide a minimal example that reproduces it.
Apologies for the delay. It was indeed the problem you mentioned -- the population initialisation was buggy, so individuals outside [low, high]
would show up. User error!
However, it might be nice to offer a more informative error: that is, some form of bounds checking as opposed to what happens now.
I've been using DEAP for a simple genetic algorithm using NSGA-II. For large populations and many applications of the
cxSimulatedBinaryBounded
operator, I eventually end up with aTypeError
:The culprit is the following line:
I assume that for certain values,
c1
ends up complex (using Python 3.4.1). User error? Bug? Should there be some safeguard that prevents this? It's unfortunate because it (stochastically) kills large jobs.