Changeset 9599 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector
- Timestamp:
- 06/09/13 12:58:39 (12 years ago)
- Location:
- branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/BinBasedMultiComponentVectorCrossover.cs
r9596 r9599 46 46 47 47 int nrOfItems = parent1.NrOfItems; 48 48 49 bool[] itemAlreadyAssigned = new bool[nrOfItems]; 49 50 int nrOfBins = parent1.NrOfBins > parent2.NrOfBins ? parent2.NrOfBins : parent1.NrOfBins; … … 82 83 if (!itemAlreadyAssigned[itemID]) 83 84 child.PackingInformations[0].Add(new PackingInformation(itemID, random.Next(2) == 0 ? true : false)); 84 } 85 85 } 86 86 87 87 return child; -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/SequenceBasedMultiComponentVectorCrossover.cs
r9596 r9599 92 92 child.PackingInformations[0].Add(new PackingInformation(itemID, random.Next(2) == 0 ? true : false)); 93 93 } 94 95 94 96 95 return child; -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/MultiComponentVector/ThreeWayMultiComponentVectorManipulator.cs
r9495 r9599 58 58 if (individual.NrOfBins > 1) 59 59 do { targetBin = random.Next(individual.NrOfBins); } 60 while (targetBin != affectedBin);60 while (targetBin == affectedBin); 61 61 individual.PackingInformations = SingleGroupingMove.GetVectorAfterMove(individual, affectedBin, affectedIndex, targetBin).PackingInformations; 62 62 } … … 67 67 if (nrOfItems > 1) 68 68 do { targetIndex = random.Next(nrOfItems); } 69 while (targetIndex != affectedIndex);69 while (targetIndex == affectedIndex); 70 70 individual.PackingInformations = ChangePositionMove.GetVectorAfterMove(individual, affectedBin, affectedIndex, targetIndex).PackingInformations; 71 71 }
Note: See TracChangeset
for help on using the changeset viewer.