Free cookie consent management tool by TermsFeed Policy Generator

Changeset 15418 for branches


Ignore:
Timestamp:
10/11/17 16:17:13 (7 years ago)
Author:
rhanghof
Message:

#2817:

  • New RandomInstanceProvider added for testing the EP-algorithm with the same instances as Silvano Martello, David Pisinger, Daniele Vigo in their paper.
  • Added some Unit Tests for the BinPacking-3D EP-algorithm
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  
    2626using System.IO;
    2727using System.Linq;
     28using HeuristicLab.Common;
    2829using HeuristicLab.Core;
    2930using HeuristicLab.Problems.Instances;
     
    8384
    8485  // class 9 from the paper (all-fill) is not implemented
     86
     87
    8588  public abstract class RandomInstanceProvider : ProblemInstanceProvider<BPPData>, IProblemInstanceProvider<BPPData> {
     89
     90
    8691
    8792    protected int @class;
     
    122127    public override BPPData LoadData(IDataDescriptor dd) {
    123128      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);
    125131
    126132      var data = new BPPData() {
     
    161167      switch (type) {
    162168        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;
    166175            break;
    167176          }
    168177        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;
    172184            break;
    173185          }
    174186        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;
    178193            break;
    179194          }
    180195        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;
    184202            break;
    185203          }
    186204        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;
    190211            break;
    191212          }
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj

    r15233 r15418  
    106106    <Compile Include="3D\Evaluators\BinUtilizationEvaluator.cs" />
    107107    <Compile Include="3D\Evaluators\PackingRatioEvaluator.cs" />
     108    <Compile Include="3D\Instances\RandomInstanceProviderWithSRand.cs" />
    108109    <Compile Include="Algorithms\3D\ExtremePointAlgorithm.cs" />
    109110    <Compile Include="3D\Instances\ThreeDInstanceDescriptor.cs" />
  • branches/2817-BinPackingSpeedup/HeuristicLab.Tests/HeuristicLab.Tests.csproj

    r15287 r15418  
    583583    <Compile Include="HeuristicLab.PluginInfraStructure-3.3\InstallationManagerTest.cs" />
    584584    <Compile Include="HeuristicLab.PluginInfraStructure-3.3\TypeExtensionsTest.cs" />
     585    <Compile Include="HeuristicLab.Problems.Bin-Packing-3.3\AlgorithmTest.cs" />
    585586    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\ThresholdCalculatorsTest.cs" />
    586587    <Compile Include="HeuristicLab.Problems.DataAnalysis-3.4\OnlineCalculatorPerformanceTest.cs" />
Note: See TracChangeset for help on using the changeset viewer.