I am trying to write a code to optimise a stack of materials, based on certain parameters.
Currently I have an integer constrained ga optimisation, basically evaluating the objective function for a population of different stacks. However I would like to constrain this optimisation so that it doesn't look at stacks with two identical layers next to each other. Currently I am doing this by putting a big penalty on such structures in the objective function.
I was wondering if there is a way to constrain the ga function such that nearest neighbour variables cannot have the same value, i.e. x1~=x2, but x1 may equal x3.
Best Answer