Ignore:
Timestamp:
03/06/12 01:43:06 (8 years ago)
Author:
abeham
Message:

#1782: trunk integration of problem instance development

  • Adapted TSP and QAP to use the new feature
  • Moved the TSPLIB importer dialog from the TSP plugin to the TSPLIB instances plugin (created a view for that provider)
  • Created it as a default view for IHeuristicOptimizationProblem in order not to interfere with other problems do not yet work with this
Location:
trunk/sources/HeuristicLab.Problems.Instances.QAPLIB
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3

    • Property svn:ignore
      •  

        old new  
        22obj
        33Plugin.cs
         4bin
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/HeuristicLab.Problems.Instances.QAPLIB-3.3.csproj

    r7548 r7558  
    3737    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
    3838  </PropertyGroup>
     39  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
     40    <DebugSymbols>true</DebugSymbols>
     41    <OutputPath>..\..\bin\</OutputPath>
     42    <DefineConstants>DEBUG;TRACE</DefineConstants>
     43    <DebugType>full</DebugType>
     44    <PlatformTarget>x64</PlatformTarget>
     45    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     46    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     47    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     48    <ErrorReport>prompt</ErrorReport>
     49    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     50    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     51    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     52    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     53    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     54  </PropertyGroup>
     55  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
     56    <OutputPath>..\..\bin\</OutputPath>
     57    <DefineConstants>TRACE</DefineConstants>
     58    <Optimize>true</Optimize>
     59    <DebugType>pdbonly</DebugType>
     60    <PlatformTarget>x64</PlatformTarget>
     61    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     62    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     63    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     64    <ErrorReport>prompt</ErrorReport>
     65    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     66    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     67    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     68    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     69    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     70  </PropertyGroup>
     71  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
     72    <DebugSymbols>true</DebugSymbols>
     73    <OutputPath>..\..\bin\</OutputPath>
     74    <DefineConstants>DEBUG;TRACE</DefineConstants>
     75    <DebugType>full</DebugType>
     76    <PlatformTarget>x86</PlatformTarget>
     77    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     78    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     79    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     80    <ErrorReport>prompt</ErrorReport>
     81    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     82    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     83    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     84    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     85    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     86  </PropertyGroup>
     87  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
     88    <OutputPath>..\..\bin\</OutputPath>
     89    <DefineConstants>TRACE</DefineConstants>
     90    <Optimize>true</Optimize>
     91    <DebugType>pdbonly</DebugType>
     92    <PlatformTarget>x86</PlatformTarget>
     93    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
     94    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
     95    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
     96    <ErrorReport>prompt</ErrorReport>
     97    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
     98    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
     99    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
     100    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
     101    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
     102  </PropertyGroup>
    39103  <ItemGroup>
    40     <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
    41       <Private>False</Private>
    42     </Reference>
    43     <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    44       <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    45       <Private>False</Private>
    46     </Reference>
    47104    <Reference Include="System" />
    48105    <Reference Include="System.Core" />
     
    323380  </ItemGroup>
    324381  <ItemGroup>
     382    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
     383      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
     384      <Name>HeuristicLab.Common-3.3</Name>
     385    </ProjectReference>
     386    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
     387      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
     388      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
     389    </ProjectReference>
    325390    <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
    326391      <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/Plugin.cs.frame

    r7538 r7558  
    2525  [Plugin("HeuristicLab.Problems.Instances.QAPLIB", "3.3.6.$WCREV$")]
    2626  [PluginFile("HeuristicLab.Problems.Instances.QAPLIB-3.3.dll", PluginFileType.Assembly)]
    27   [PluginDependency("HeuristicLab.Common", "3.3")]
    2827  [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
    2928  public class HeuristicLabProblemsInstancesQAPLIBPlugin : PluginBase {
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs

    r7548 r7558  
    2929namespace HeuristicLab.Problems.Instances.QAPLIB {
    3030  public class QAPLIBInstanceProvider : ProblemInstanceProvider<QAPData> {
     31    #region Reversed instances
     32    // These instances specified their best known solution in the wrong order
     33    private static HashSet<string> reversedSolutions = new HashSet<string>(new string[] {
     34      "bur26a",
     35      "bur26b",
     36      "bur26c",
     37      "bur26d",
     38      "bur26e",
     39      "bur26f",
     40      "bur26g",
     41      "bur26h",
     42      "chr12a",
     43      "chr12b",
     44      "chr12c",
     45      "chr15a",
     46      "chr15b",
     47      "chr15c",
     48      "chr18a",
     49      "chr18b",
     50      "chr20a",
     51      "chr20b",
     52      "chr20c",
     53      "chr22a",
     54      "chr22b",
     55      "chr25a",
     56      "esc16a",
     57      "esc16b",
     58      "esc16c",
     59      "esc16d",
     60      "esc16e",
     61      "esc16g",
     62      "esc16h",
     63      "esc16i",
     64      "esc16j",
     65      "esc32a",
     66      "esc32e",
     67      "esc32f",
     68      "esc32g",
     69      "had12",
     70      "had14",
     71      "had16",
     72      "had18",
     73      "had20",
     74      "kra32",
     75      "lipa20a",
     76      "lipa30a",
     77      "lipa40a",
     78      "lipa50a",
     79      "lipa60a",
     80      "lipa70a",
     81      "lipa80a",
     82      "lipa90a",
     83      "nug12",
     84      "nug14",
     85      "nug15",
     86      "nug16a",
     87      "nug16b",
     88      "nug17",
     89      "nug18",
     90      "nug20",
     91      "nug21",
     92      "nug22",
     93      "nug24",
     94      "nug25",
     95      "nug27",
     96      "nug28",
     97      "rou12",
     98      "rou15",
     99      "rou20",
     100      "scr12",
     101      "scr15",
     102      "scr20",
     103      "sko100a",
     104      "sko100b",
     105      "sko100c",
     106      "sko100d",
     107      "sko100e",
     108      "sko100f",
     109      "sko49",
     110      "sko81",
     111      "sko90",
     112      "ste36a",
     113      "ste36b",
     114      "tai100a",
     115      "tai100b",
     116      "tai12a",
     117      "tai12b",
     118      "tai150b",
     119      "tai15a",
     120      "tai15b",
     121      "tai17a",
     122      "tai20a",
     123      "tai20b",
     124      "tai256c",
     125      "tai25a",
     126      "tai25b",
     127      "tai30b",
     128      "tai35b",
     129      "tai40b",
     130      "tai50a",
     131      "tai50b",
     132      "tai60a",
     133      "tai60b",
     134      "tai64c",
     135      "tai80a",
     136      "tai80b",
     137      "wil100"
     138    });
     139    #endregion
     140
    31141    public override string Name {
    32142      get { return "QAPLIB"; }
     
    79189            if (slnParser.Error != null) throw slnParser.Error;
    80190
    81             instance.BestKnownAssignment = slnParser.Assignment;
     191            int[] assignment = slnParser.Assignment;
     192            if (reversedSolutions.Contains(instance.Name)) {
     193              assignment = (int[])slnParser.Assignment.Clone();
     194              for (int i = 0; i < assignment.Length; i++)
     195                assignment[slnParser.Assignment[i]] = i;
     196            }
     197            instance.BestKnownAssignment = assignment;
    82198            instance.BestKnownQuality = slnParser.Quality;
    83199          }
  • trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBParser.cs

    r7538 r7558  
    6060      char[] delim = new char[] { ' ' };
    6161
     62      Weights = ParseMatrix(reader, delim);
    6263      Distances = ParseMatrix(reader, delim);
    63       Weights = ParseMatrix(reader, delim);
    6464    }
    6565
     
    7373        string[] vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
    7474        foreach (string val in vals) {
    75           Distances[k, read++] = double.Parse(val);
     75          result[k, read++] = double.Parse(val);
    7676          if (read == Size) {
    7777            read = 0;
Note: See TracChangeset for help on using the changeset viewer.