Fixed error at generation of new Individuals in LTGA, now the solution is found quicker

This commit is contained in:
Alexander Seitz 2013-01-21 09:54:42 +00:00
parent c55a130ea0
commit eecbb18f51

View File

@ -274,9 +274,9 @@ public class LTGA implements InterfaceOptimizer, java.io.Serializable, Interface
}
AbstractEAIndividual indy1 = indies.getEAIndividual(0);
AbstractEAIndividual indy2 = indies.getEAIndividual(1);
BitSet gen1 = getBinaryData(indy1);
BitSet gen2 = getBinaryData(indy2);
for (Set<Integer> mask : linkageTree) {
BitSet gen1 = getBinaryData(indy1);
BitSet gen2 = getBinaryData(indy2);
BitSet newGene1 = (BitSet) gen1.clone();
BitSet newGene2 = (BitSet) gen2.clone();
boolean same = true;