I need to optimize a problem using GA (I tried patternsearch but due to various reasons I have to use GA).
My fitness function is evaluated by calling an external application which absolutely does not work when the non-linear constraints are violated. I was perplexed when I found my GA code to be violating the constraints, but after reading Alan Weiss' Answer here, I learned that this was to be expected.
In short, my fitness function cannot be evaluated when nonlinear constraints are violated.
How do you suggest I overcome this problem? How would GA behave if I checked the constraints in the fitness function and if they were violated I just return an arbitrary high number (that is fixed) as the fitness of that individual?
Best Answer