Index: trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/HeuristicLab.Problems.Instances.QAPLIB-3.3.csproj
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/HeuristicLab.Problems.Instances.QAPLIB-3.3.csproj	(revision 7548)
+++ trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/HeuristicLab.Problems.Instances.QAPLIB-3.3.csproj	(revision 7558)
@@ -37,12 +37,69 @@
     <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
   </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>..\..\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances.QAPLIB-3.3.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile>
+    <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression>
+    <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
+    <CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories>
+    <CodeAnalysisIgnoreBuiltInRuleSets>false</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>false</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
   <ItemGroup>
-    <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
-      <Private>False</Private>
-    </Reference>
-    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
-      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
-      <Private>False</Private>
-    </Reference>
     <Reference Include="System" />
     <Reference Include="System.Core" />
@@ -323,4 +380,12 @@
   </ItemGroup>
   <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">
       <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>
Index: trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/Plugin.cs.frame
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/Plugin.cs.frame	(revision 7548)
+++ trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/Plugin.cs.frame	(revision 7558)
@@ -25,5 +25,4 @@
   [Plugin("HeuristicLab.Problems.Instances.QAPLIB", "3.3.6.$WCREV$")]
   [PluginFile("HeuristicLab.Problems.Instances.QAPLIB-3.3.dll", PluginFileType.Assembly)]
-  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.Problems.Instances", "3.3")]
   public class HeuristicLabProblemsInstancesQAPLIBPlugin : PluginBase {
Index: trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs	(revision 7548)
+++ trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs	(revision 7558)
@@ -29,4 +29,114 @@
 namespace HeuristicLab.Problems.Instances.QAPLIB {
   public class QAPLIBInstanceProvider : ProblemInstanceProvider<QAPData> {
+    #region Reversed instances
+    // These instances specified their best known solution in the wrong order
+    private static HashSet<string> reversedSolutions = new HashSet<string>(new string[] {
+      "bur26a",
+      "bur26b",
+      "bur26c",
+      "bur26d",
+      "bur26e",
+      "bur26f",
+      "bur26g",
+      "bur26h",
+      "chr12a",
+      "chr12b",
+      "chr12c",
+      "chr15a",
+      "chr15b",
+      "chr15c",
+      "chr18a",
+      "chr18b",
+      "chr20a",
+      "chr20b",
+      "chr20c",
+      "chr22a",
+      "chr22b",
+      "chr25a",
+      "esc16a",
+      "esc16b",
+      "esc16c",
+      "esc16d",
+      "esc16e",
+      "esc16g",
+      "esc16h",
+      "esc16i",
+      "esc16j",
+      "esc32a",
+      "esc32e",
+      "esc32f",
+      "esc32g",
+      "had12",
+      "had14",
+      "had16",
+      "had18",
+      "had20",
+      "kra32",
+      "lipa20a",
+      "lipa30a",
+      "lipa40a",
+      "lipa50a",
+      "lipa60a",
+      "lipa70a",
+      "lipa80a",
+      "lipa90a",
+      "nug12",
+      "nug14",
+      "nug15",
+      "nug16a",
+      "nug16b",
+      "nug17",
+      "nug18",
+      "nug20",
+      "nug21",
+      "nug22",
+      "nug24",
+      "nug25",
+      "nug27",
+      "nug28",
+      "rou12",
+      "rou15",
+      "rou20",
+      "scr12",
+      "scr15",
+      "scr20",
+      "sko100a",
+      "sko100b",
+      "sko100c",
+      "sko100d",
+      "sko100e",
+      "sko100f",
+      "sko49",
+      "sko81",
+      "sko90",
+      "ste36a",
+      "ste36b",
+      "tai100a",
+      "tai100b",
+      "tai12a",
+      "tai12b",
+      "tai150b",
+      "tai15a",
+      "tai15b",
+      "tai17a",
+      "tai20a",
+      "tai20b",
+      "tai256c",
+      "tai25a",
+      "tai25b",
+      "tai30b",
+      "tai35b",
+      "tai40b",
+      "tai50a",
+      "tai50b",
+      "tai60a",
+      "tai60b",
+      "tai64c",
+      "tai80a",
+      "tai80b",
+      "wil100"
+    });
+    #endregion
+
     public override string Name {
       get { return "QAPLIB"; }
@@ -79,5 +189,11 @@
             if (slnParser.Error != null) throw slnParser.Error;
 
-            instance.BestKnownAssignment = slnParser.Assignment;
+            int[] assignment = slnParser.Assignment;
+            if (reversedSolutions.Contains(instance.Name)) {
+              assignment = (int[])slnParser.Assignment.Clone();
+              for (int i = 0; i < assignment.Length; i++)
+                assignment[slnParser.Assignment[i]] = i;
+            }
+            instance.BestKnownAssignment = assignment;
             instance.BestKnownQuality = slnParser.Quality;
           }
Index: trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBParser.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBParser.cs	(revision 7548)
+++ trunk/sources/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBParser.cs	(revision 7558)
@@ -60,6 +60,6 @@
       char[] delim = new char[] { ' ' };
 
+      Weights = ParseMatrix(reader, delim);
       Distances = ParseMatrix(reader, delim);
-      Weights = ParseMatrix(reader, delim);
     }
 
@@ -73,5 +73,5 @@
         string[] vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
         foreach (string val in vals) {
-          Distances[k, read++] = double.Parse(val);
+          result[k, read++] = double.Parse(val);
           if (read == Size) {
             read = 0;
