- Timestamp:
- 07/14/17 00:04:58 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs
r15240 r15241 50 50 [Storable] 51 51 protected Dictionary<int, List<int>> OccupationLayers { get; set; } 52 53 [Storable] 54 public Dictionary<TPos, Tuple<int,int,int>> ResidualSpace { get; protected set; } 55 52 56 53 #endregion Properties 57 54 … … 65 62 Items = new ObservableDictionary<int, TItem>(); 66 63 BinShape = (TBin)binShape.Clone(); 64 ExtremePoints = new SortedSet<TPos>(); 67 65 OccupationLayers = new Dictionary<int, List<int>>(); 68 66 } … … 81 79 } 82 80 this.BinShape = (TBin)original.BinShape.Clone(cloner); 81 this.ExtremePoints = new SortedSet<TPos>(original.ExtremePoints.Select(p => cloner.Clone(p))); 83 82 this.OccupationLayers = new Dictionary<int, List<int>>(); 84 83 foreach (var kvp in original.OccupationLayers) { 85 84 OccupationLayers.Add(kvp.Key, new List<int>(kvp.Value)); 86 85 } 87 }88 89 [StorableHook(HookType.AfterDeserialization)]90 private void AfterDeserialization() {91 // BackwardsCompatibility3.392 #region Backwards compatible code, remove with 3.493 if (ResidualSpace == null)94 ResidualSpace = new Dictionary<TPos, Tuple<int, int, int>>();95 #endregion96 86 } 97 87 … … 110 100 Positions[itemID] = position; 111 101 ExtremePoints.Remove(position); 112 if (ResidualSpace != null) ResidualSpace.Remove(position);113 102 foreach (int id in Items.Select(x => x.Key)) 114 103 GenerateNewExtremePointsForNewItem(Items[id], Positions[id]);
Note: See TracChangeset
for help on using the changeset viewer.