Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBParser.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBParser.cs	(revision 5641)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBParser.cs	(revision 5648)
@@ -41,8 +41,9 @@
         Distances = new double[Size, Size];
         Weights = new double[Size, Size];
-        reader.ReadLine();
+        string valLine = reader.ReadLine();
         char[] delim = new char[] { ' ' };
         for (int i = 0; i < Size; i++) {
-          string valLine = reader.ReadLine();
+          if (i > 0 || String.IsNullOrWhiteSpace(valLine))
+            valLine = reader.ReadLine();
           string[] vals = new string[Size];
           string[] partVals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
@@ -59,9 +60,10 @@
           }
         }
-        reader.ReadLine();
+        valLine = reader.ReadLine();
         int read = 0;
         int k = 0;
         while (!reader.EndOfStream) {
-          string valLine = reader.ReadLine();
+          if (read > 0 || String.IsNullOrWhiteSpace(valLine))
+            valLine = reader.ReadLine();
           string[] vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
           for (int j = 0; j < vals.Length; j++) {
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs	(revision 5641)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs	(revision 5648)
@@ -38,5 +38,5 @@
       try {
         StreamReader reader = new StreamReader(stream);
-        char[] delim = new char[] { ' ' };
+        char[] delim = new char[] { ' ', ',' }; // comma is added for nug30.sln which is the only file that separates the permutation with commas
         string[] firstline = reader.ReadLine().Split(delim, StringSplitOptions.RemoveEmptyEntries);
         Size = int.Parse(firstline[0]);
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs	(revision 5641)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QAPAssignment.cs	(revision 5648)
@@ -18,15 +18,4 @@
         coordinates = value;
         if (changed) OnPropertyChanged("Coordinates");
-      }
-    }
-
-    [Storable]
-    private DoubleMatrix viewCoordinates;
-    public DoubleMatrix ViewCoordinates {
-      get { return viewCoordinates; }
-      set {
-        bool changed = (viewCoordinates != value);
-        viewCoordinates = value;
-        if (changed) OnPropertyChanged("ViewCoordinates");
       }
     }
@@ -85,5 +74,4 @@
       assignment = cloner.Clone(original.assignment);
       quality = cloner.Clone(original.quality);
-      viewCoordinates = cloner.Clone(original.viewCoordinates);
     }
     public QAPAssignment(DoubleMatrix weights, Permutation assignment) {
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 5641)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/QuadraticAssignmentProblem.cs	(revision 5648)
@@ -103,5 +103,5 @@
     public QuadraticAssignmentProblem()
       : base() {
-      Parameters.Add(new ValueParameter<Permutation>("BestKnownSolution", "The best known solution which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
+      Parameters.Add(new OptionalValueParameter<Permutation>("BestKnownSolution", "The best known solution which is updated whenever a new better solution is found or may be the optimal solution if it is known beforehand.", null));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Coordinates", "The coordinates of the locations. If this is changed the distance matrix is calculated automatically using the euclidean distance."));
       Parameters.Add(new ValueParameter<DoubleMatrix>("Weights", "The strength of the connection between the facilities.", new DoubleMatrix(5, 5)));
@@ -272,13 +272,14 @@
     private void UpdateDistanceMatrix() {
       if (Coordinates != null && Coordinates.Columns == 2 && Coordinates.Rows > 1) {
-        DistanceMatrix = new DoubleMatrix(Coordinates.Rows, Coordinates.Rows);
+        DoubleMatrix distance = new DoubleMatrix(Coordinates.Rows, Coordinates.Rows);
         for (int i = 0; i < Coordinates.Rows - 1; i++) {
           for (int j = i + 1; j < Coordinates.Rows; j++) {
             double dx = Coordinates[i, 0] - Coordinates[j, 0];
             double dy = Coordinates[i, 1] - Coordinates[j, 1];
-            DistanceMatrix[i, j] = Math.Sqrt(dx * dx + dy * dy);
-            DistanceMatrix[j, i] = DistanceMatrix[i, j];
+            distance[i, j] = Math.Sqrt(dx * dx + dy * dy);
+            distance[j, i] = DistanceMatrix[i, j];
           }
         }
+        DistanceMatrix = distance;
       }
     }
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj	(revision 5648)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/HeuristicLab.Problems.QuadraticAssignment.Tests-3.3.csproj	(revision 5648)
@@ -0,0 +1,145 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{00E73394-D41B-4C4F-963F-A59341FA1791}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.QuadraticAssignment.Tests_33</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.QuadraticAssignment.Tests-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Problems.QuadraticAssignment.Tests-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>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Problems.QuadraticAssignment.Tests-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>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Debug\HeuristicLab.Problems.QuadraticAssignment.Tests-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>true</CodeAnalysisIgnoreBuiltInRuleSets>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+    <CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <CodeAnalysisLogFile>bin\Release\HeuristicLab.Problems.QuadraticAssignment.Tests-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>
+    <CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="HeuristicLab.Common-3.3">
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Core-3.3">
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="HeuristicLab.Optimization-3.3">
+      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <None Include="Properties\AssemblyInfo.frame" />
+    <Compile Include="QAPLIBInstancesTest.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.Problems.QuadraticAssignment-3.3.csproj">
+      <Project>{79271BC8-4446-40E2-BB89-9BE4E17174FE}</Project>
+      <Name>HeuristicLab.Problems.QuadraticAssignment-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\Properties\AssemblyInfo.frame" "%25ProjectDir%25\Properties\AssemblyInfo.cs"</PreBuildEvent>
+  </PropertyGroup>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/Properties/AssemblyInfo.frame
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/Properties/AssemblyInfo.frame	(revision 5648)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/Properties/AssemblyInfo.frame	(revision 5648)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.QuadraticAssignment.Tests")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HEAL")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2011 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("67263025-2123-432c-bd79-69ee125bcaaa")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.3.$WCREV$")]
Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs	(revision 5648)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Tests/QAPLIBInstancesTest.cs	(revision 5648)
@@ -0,0 +1,23 @@
+﻿using System;
+using System.Text;
+using HeuristicLab.Problems.QuadraticAssignment;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Tests {
+  [TestClass]
+  public class QAPLIBInstancesTest {
+    [TestMethod]
+    public void LoadAllEmbeddedInstances() {
+      QuadraticAssignmentProblem qap = new QuadraticAssignmentProblem();
+      StringBuilder failedInstances = new StringBuilder();
+      foreach (string instance in qap.EmbeddedInstances) {
+        try {
+          qap.LoadEmbeddedInstance(instance);
+        } catch (Exception ex) {
+          failedInstances.AppendLine(instance + ": " + ex.Message);
+        }
+      }
+      Assert.IsTrue(failedInstances.Length == 0, "Following instances failed to load: " + Environment.NewLine + failedInstances.ToString());
+    }
+  }
+}
