Changeset 13612
- Timestamp:
- 02/08/16 21:38:13 (9 years ago)
- Location:
- branches/HeuristicLab.BinPacking
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/BinPacking2D.cs
r13606 r13612 37 37 public BinPacking2D(RectangularPackingBin binMeasures) 38 38 : base(binMeasures) { 39 //ExtremePoints = new HashSet<TwoDimensionalPacking>();40 39 ExtremePoints = new SortedSet<TwoDimensionalPacking>(new EPComparer2D()); 41 40 ExtremePoints.Add(binMeasures.Origin); … … 50 49 return new BinPacking2D(this, cloner); 51 50 } 52 51 53 52 protected override void GenerateNewExtremePointsForNewItem(RectangularPackingItem newItem, TwoDimensionalPacking position) { 54 53 … … 73 72 if (sourcePointY.X < BinMeasures.Width && sourcePointY.Y < BinMeasures.Height) { 74 73 //Traversing down the x-axis 75 while (sourcePointY.X > 0 && !IsPointOccupied(new TwoDimensionalPacking (0,sourcePointY.X - 1, sourcePointY.Y))) {74 while (sourcePointY.X > 0 && !IsPointOccupied(new TwoDimensionalPacking(0, sourcePointY.X - 1, sourcePointY.Y))) { 76 75 sourcePointY.X--; 77 76 } … … 111 110 || IsPositionFeasible(measures, TwoDimensionalPacking.MoveDown(currentPosition))) { 112 111 //Slide the item as far as possible to the bottom 113 114 115 } 116 112 while (IsPositionFeasible(measures, TwoDimensionalPacking.MoveDown(currentPosition))) { 113 currentPosition = TwoDimensionalPacking.MoveDown(currentPosition); 114 } 115 if (IsPositionFeasible(measures, TwoDimensionalPacking.MoveLeft(currentPosition))) 117 116 currentPosition = TwoDimensionalPacking.MoveLeft(currentPosition); 118 117 } … … 120 119 return IsPositionFeasible(measures, currentPosition) ? currentPosition : null; 121 120 } 122 121 123 122 public override void SlidingBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures) { 124 123 var temp = new List<int>(sequence); … … 193 192 194 193 protected override void InitializeOccupationLayers() { 195 for (int i = 0; i *10 <= BinMeasures.Width; i += 1) {194 for (int i = 0; i * 10 <= BinMeasures.Width; i += 1) { 196 195 OccupationLayers[i] = new List<int>(); 197 196 } … … 207 206 return OccupationLayers[position.X / 10]; 208 207 } 209 protected override List<int> GetLayerItemIDs(RectangularPackingItem measures, TwoDimensionalPacking position) { 210 List<int> result = new List<int> 208 protected override List<int> GetLayerItemIDs(RectangularPackingItem measures, TwoDimensionalPacking position) { 209 List<int> result = new List<int>(); 211 210 int x1 = position.X / 10; 212 211 int x2 = (position.X + (position.Rotated ? measures.Height : measures.Width)) / 10; -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/BinPacking3D.cs
r13608 r13612 36 36 public BinPacking3D(CuboidPackingBin binMeasures) 37 37 : base(binMeasures) { 38 //ExtremePoints = new HashSet<ThreeDimensionalPacking>();39 38 ExtremePoints = new SortedSet<ThreeDimensionalPacking>(new EPComparer3D()); 40 39 ExtremePoints.Add(binMeasures.Origin); -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/HeuristicLab.Problems.BinPacking.Views-3.3.csproj
r13605 r13612 173 173 </ItemGroup> 174 174 <ItemGroup> 175 <ProjectReference Include="..\..\HeuristicLab.Problems.BinPacking.2D\3.3\HeuristicLab.Problems.BinPacking2D-3.3.csproj"> 176 <Project>{56dd7f51-3164-4c26-a97a-add6fe4b4e86}</Project> 177 <Name>HeuristicLab.Problems.BinPacking2D-3.3</Name> 178 </ProjectReference> 179 <ProjectReference Include="..\..\HeuristicLab.Problems.BinPacking.3D\3.3\HeuristicLab.Problems.BinPacking3D-3.3.csproj"> 180 <Project>{95680c63-1e06-4e66-b33b-272a772321c7}</Project> 181 <Name>HeuristicLab.Problems.BinPacking3D-3.3</Name> 182 </ProjectReference> 175 183 <ProjectReference Include="..\..\HeuristicLab.Problems.BinPacking\3.3\HeuristicLab.Problems.BinPacking-3.3.csproj"> 176 184 <Project>{F8A55094-3CD5-4034-B0CA-5BD7FFB016D4}</Project> -
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.cs
r13578 r13612 24 24 using HeuristicLab.MainForm; 25 25 using HeuristicLab.Encodings.PackingEncoding.PackingPlan; 26 using HeuristicLab.Problems.BinPacking.PackingItem;27 using HeuristicLab.Problems.BinPacking.PackingBin;28 using HeuristicLab.Problems.BinPacking.Dimensions;29 26 30 27 namespace HeuristicLab.Problems.BinPacking.Views {
Note: See TracChangeset
for help on using the changeset viewer.