Does the genetic algorithm ensure that all non linear constraints are satisfied before passing variables to the fitness function?
Background: I drive a simulation software using genetic algorithm to optimize parametrized electric machine designs. The software will give an error and exit unless the constraints in nonlcon are satisfied. The constraints I create in nonlcon are to avoid geometrical infeasibility of the model and the software would exit with error if such parameters were passed to it. Since global optimization simulations take weeks, it is very costly (in terms of time) to deal with such an error somewhere in the middle. Currently, I take care of not passing anything infeasible to the program within the fitness function (before calling the program using VB scripts). What I do is set a very high cost for infeasible instances and skip running the electromagnetic simulation altogether, but I am considering letting GA handle the non linear constraints.
Best Answer