Changeset 9495 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans
- Timestamp:
- 05/15/13 22:23:36 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingPlans/PackingPlan.cs
r9440 r9495 60 60 [Storable] 61 61 public ObservableDictionary<int, D> PackingItemPositions { get; set; } 62 [Storable] 63 public ObservableDictionary<int, B> PackingBinMeasures { get; set; } 62 64 63 //[Storable]64 //public ItemList<BoolValue> PackingItemsRotated { get; set; }65 66 [Storable]67 public B PackingBinMeasures {68 get;69 set;70 }71 65 [Storable] 72 66 public ItemList<I> PackingItemMeasures { … … 89 83 #endregion 90 84 91 public PackingPlan(B binMeasures, ItemList<I> itemMeasures) : base() { 85 public PackingPlan(B binMeasures, ItemList<I> itemMeasures) 86 : base() { 87 this.PackingItemMeasures = itemMeasures; 88 this.PackingBinMeasures = new ObservableDictionary<int, B>(); 89 this.PackingBinMeasures[0] = binMeasures; 90 } 91 public PackingPlan(ObservableDictionary<int, B> binMeasures, ItemList<I> itemMeasures) 92 : base() { 93 this.PackingItemMeasures = itemMeasures; 92 94 this.PackingBinMeasures = binMeasures; 93 this.PackingItemMeasures = itemMeasures;94 95 } 95 96 … … 98 99 protected PackingPlan(PackingPlan<D,B,I> original, Cloner cloner) 99 100 : base(original, cloner) { 100 101 PackingBinMeasures = original.PackingBinMeasures;101 PackingItemPositions = new ObservableDictionary<int, D>(original.PackingItemPositions); 102 PackingBinMeasures = new ObservableDictionary<int, B>(original.PackingBinMeasures); 102 103 PackingItemMeasures = original.PackingItemMeasures; 103 //PackingItemsRotated = cloner.Clone(original.PackingItemsRotated); 104 } 105 public override IDeepCloneable Clone(Cloner cloner) { 106 return new PackingPlan<D,B,I>(this, cloner); 104 107 } 105 108 106 public override IDeepCloneable Clone(Cloner cloner) { 107 return new PackingPlan<D,B,I>(this, cloner); 109 public B GetPackingBinMeasuresForBinNr(int binNr) { 110 if (PackingBinMeasures.ContainsKey(binNr)) 111 return PackingBinMeasures[binNr]; 112 else 113 return PackingBinMeasures[0]; 108 114 } 109 115
Note: See TracChangeset
for help on using the changeset viewer.