Normalizing Constraints For A Multi Objective Fitness Function

Most optimization problems involving genetic algorithms will contain multiple constraints; a useful way of handling these constraints, is by multiplying them by a factor which will scale the constraint to a predefined range. It is generally a good idea to have all constraints contributing equally to the final fitness value.


//calculate fitness
m_dFitness = distFit + 400*rotFit + 4*fitAirTime;

The factor been used in the above example is 400, distFit has a max of 400 therefore, rotFit which has a max of 1 is multiplied by 400 and fitAirTime which has a max of 100 is multiplied by 4.

If you wanted to normalize each constraint to a different range then you could use this formula to calculate the normalized value y = 1 + (x-A)*(r2-r1)/(B-A) where A,B is the original range and r1, r2 is the range that the value x should be normalized to.


//calculate fitness
var distFit = 1 + (x-0)*(10-1)/(50-0);
var rotFit  = 1 + (x-0)*(10-1)/(90-0);
var fitAirTime = 1 + (x-0)*(10-1)/(30-0);

m_dFitness = distFit + rotFit + fitAirTime;

This option is more feasible since it does not rely on any constraint value to derive a multiplication factor.