During the last few years several methods have been proposed for handling constraints by Genetic Algorithms. These methods can be grouped into two main categories:
methods that preserve the feasibility of solutions
methods based on penalty functions
The methods that preserve the feasibility are quite effective but are not always applicable. In fact the feasibility of the off-springs can be maintained only by repairing techniques or by specialized cross-over operators that are usually problem-dependent.
The methods based on penalty functions are based on the concept that the fitness function is decreased according to the intensity of the constraint violation.
A drawback of this methodology is that the intensity of the penalization can be problem-dependent and might draw the optimization to premature convergence. A way to overcome this problem is to adapt the penalty function to the current population under evaluation.
In the following two possible methods suitable also for multi-objective optimization are described. The constraint is transformed into a fuzzy function as follow:
for all the objectives the fitness function is computed as follow:
fiti(x)=obji(x)-SjCj(x)*objmax
0 is the "soft" constraint limit and k is the "hard" constraint limit. If g(x) is negative the individual is feasible and the optimizer works as in the case of unconstrained optimization, if g(x) is higher than k the individual is worse than any feasible solution and the number of violated constraints dominates the problem. For 0 < g(x) < k the distinction between feasible and unfeasible individuals is fuzzy.
When the problem to be solved is dominated by the constraints and the optimization task is in fact to find a feasible solution that might even not exist, the number of constraints violated can become itself a new objective to be minimized:
objnobj+1=SjCj(x)