Changeset 15418
- Timestamp:
- 10/11/17 16:17:13 (7 years ago)
- Location:
- branches/2817-BinPackingSpeedup
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Instances/RandomInstanceProvider.cs
r14185 r15418 26 26 using System.IO; 27 27 using System.Linq; 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Core; 29 30 using HeuristicLab.Problems.Instances; … … 83 84 84 85 // class 9 from the paper (all-fill) is not implemented 86 87 85 88 public abstract class RandomInstanceProvider : ProblemInstanceProvider<BPPData>, IProblemInstanceProvider<BPPData> { 89 90 86 91 87 92 protected int @class; … … 122 127 public override BPPData LoadData(IDataDescriptor dd) { 123 128 var randDd = dd as RandomDataDescriptor; 124 if (randDd == null) throw new NotSupportedException("Cannot load data descriptor " + dd); 129 if (randDd == null) 130 throw new NotSupportedException("Cannot load data descriptor " + dd); 125 131 126 132 var data = new BPPData() { … … 161 167 switch (type) { 162 168 case 1: { 163 minW = 1; maxW = w / 2; // integer division on purpose (see paper) 164 minH = h * 2 / 3; maxH = h; 165 minD = d * 2 / 3; maxD = d; 169 minW = 1; 170 maxW = w / 2; // integer division on purpose (see paper) 171 minH = h * 2 / 3; 172 maxH = h; 173 minD = d * 2 / 3; 174 maxD = d; 166 175 break; 167 176 } 168 177 case 2: { 169 minW = w * 2 / 3; maxW = w; 170 minH = 1; maxH = h / 2; 171 minD = d * 2 / 3; maxD = d; 178 minW = w * 2 / 3; 179 maxW = w; 180 minH = 1; 181 maxH = h / 2; 182 minD = d * 2 / 3; 183 maxD = d; 172 184 break; 173 185 } 174 186 case 3: { 175 minW = w * 2 / 3; maxW = w; 176 minH = h * 2 / 3; maxH = h; 177 minD = 1; maxD = d / 2; 187 minW = w * 2 / 3; 188 maxW = w; 189 minH = h * 2 / 3; 190 maxH = h; 191 minD = 1; 192 maxD = d / 2; 178 193 break; 179 194 } 180 195 case 4: { 181 minW = w / 2; maxW = w; 182 minH = h / 2; maxH = h; 183 minD = d / 2; maxD = d; 196 minW = w / 2; 197 maxW = w; 198 minH = h / 2; 199 maxH = h; 200 minD = d / 2; 201 maxD = d; 184 202 break; 185 203 } 186 204 case 5: { 187 minW = 1; maxW = w / 2; 188 minH = 1; maxH = h / 2; 189 minD = 1; maxD = d / 2; 205 minW = 1; 206 maxW = w / 2; 207 minH = 1; 208 maxH = h / 2; 209 minD = 1; 210 maxD = d / 2; 190 211 break; 191 212 } -
branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
r15233 r15418 106 106 <Compile Include="3D\Evaluators\BinUtilizationEvaluator.cs" /> 107 107 <Compile Include="3D\Evaluators\PackingRatioEvaluator.cs" /> 108 <Compile Include="3D\Instances\RandomInstanceProviderWithSRand.cs" /> 108 109 <Compile Include="Algorithms\3D\ExtremePointAlgorithm.cs" /> 109 110 <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" /> -
branches/2817-BinPackingSpeedup/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r15287 r15418 583 583 <Compile Include="HeuristicLab.PluginInfraStructure-3.3\InstallationManagerTest.cs" /> 584 584 <Compile Include="HeuristicLab.PluginInfraStructure-3.3\TypeExtensionsTest.cs" /> 585 <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\AlgorithmTest.cs" /> 585 586 <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\ThresholdCalculatorsTest.cs" /> 586 587 <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\OnlineCalculatorPerformanceTest.cs" />
Note: See TracChangeset
for help on using the changeset viewer.