Changeset 14153 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/IntegerVectorEncoding/IntegerVectorDecoderBase.cs
- Timestamp:
- 07/21/16 14:33:53 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/IntegerVectorEncoding/IntegerVectorDecoderBase.cs
r14151 r14153 39 39 40 40 41 public Solution Decode(IntegerVector intVec, PackingShape binShape, IList<PackingItem> items) {41 public virtual Solution Decode(IntegerVector intVec, PackingShape binShape, IList<PackingItem> items) { 42 42 var sequenceMatrix = IntegerVectorProblem.GenerateSequenceMatrix(intVec); 43 43 Solution result = CreateSolution(binShape); … … 54 54 var temp = new List<int>(remainingIDs); 55 55 foreach (int id in temp) { 56 foreach ( varbp in result.BinPackings) {56 foreach (BinPacking2D bp in result.BinPackings) { 57 57 var position = FindPositionForItem(bp, items[id]); 58 58 if (position != null) { … … 70 70 result.UpdateBinPackings(); 71 71 72 // gkronber: original implementation also updates the encoded solution72 // gkronber: original implementation by Helm also updates the encoded solution (TODO) 73 73 // var newSolution = new int[intVec.Length]; 74 74 // int binIndex = 0; … … 84 84 85 85 protected abstract Solution CreateSolution(PackingShape binShape); 86 protected abstract PackingPosition FindPositionForItem(BinPacking .BinPacking<PackingPosition, PackingShape, PackingItem>bp, PackingItem item);87 protected abstract BinPacking .BinPacking<PackingPosition, PackingShape, PackingItem>CreatePacking(Solution partialSolution, ref IList<int> remainingIDs, IList<PackingItem> items);86 protected abstract PackingPosition FindPositionForItem(BinPacking2D bp, PackingItem item); 87 protected abstract BinPacking2D CreatePacking(Solution partialSolution, ref IList<int> remainingIDs, IList<PackingItem> items); 88 88 } 89 89 }
Note: See TracChangeset
for help on using the changeset viewer.