Index: branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs
===================================================================
--- branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs	(revision 5648)
+++ branches/QAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Parsers/QAPLIBSolutionParser.cs	(revision 5814)
@@ -1,3 +1,4 @@
 ﻿using System;
+using System.Globalization;
 using System.IO;
 
@@ -6,5 +7,5 @@
     public int Size { get; private set; }
     public int[] Assignment { get; private set; }
-    public double Qualiy { get; private set; }
+    public double Quality { get; private set; }
     public Exception Error { get; private set; }
 
@@ -16,16 +17,33 @@
       Size = 0;
       Assignment = null;
-      Qualiy = double.NaN;
+      Quality = double.NaN;
       Error = null;
     }
 
-    public bool Parse(string file) {
+    /// <summary>
+    /// Reads from the given stream data which is expected to be in the QAPLIB solution format.
+    /// 
+    /// The QAPLIB solution file format (.sln) is as follows:
+    /// First line: Size of the permutation followed by a blank followed by the quality formatted using no thousands separator and if a fractional number with the "." as decimal symbol
+    /// Remaining lines: The values of the permutation separated by blanks. Values must lie in the range [1;size of the permutation].
+    /// </summary>
+    /// <param name="file">The file to read data from.</param>
+    /// <param name="valueAsLocation">The numbers can be interpreted either as facilities or locations.
+    /// HeuristicLab always encodes the permutation such that the index denotes the facility and the value the location.
+    /// If this parameter is true, then the permutation is expected to follow this encoding.
+    /// If this parameter is false, the meaning of value and index will be swapped when reading the permutation.</param>
+    /// <returns></returns>
+    public bool Parse(string file, bool valueAsLocation) {
       using (Stream stream = new FileStream(file, FileMode.Open, FileAccess.Read)) {
-        return Parse(stream);
+        return Parse(stream, valueAsLocation);
       }
     }
 
     /// <summary>
-    /// Reads from the given stream data which is expected to be in the QAPLIB format.
+    /// Reads from the given stream data which is expected to be in the QAPLIB solution format.
+    /// 
+    /// The QAPLIB solution file format (.sln) is as follows:
+    /// First line: Size of the permutation followed by a blank followed by the quality formatted using no thousands separator and if a fractional number with the "." as decimal symbol
+    /// Remaining lines: The values of the permutation separated by blanks. Values must lie in the range [1;size of the permutation].
     /// </summary>
     /// <remarks>
@@ -33,6 +51,10 @@
     /// </remarks>
     /// <param name="stream">The stream to read data from.</param>
+    /// <param name="valueAsLocation">The numbers can be interpreted either as facilities or locations.
+    /// HeuristicLab always encodes the permutation such that the index denotes the facility and the value the location.
+    /// If this parameter is true, then the permutation is expected to follow this encoding.
+    /// If this parameter is false, the meaning of value and index will be swapped when reading the permutation.</param>
     /// <returns>True if the file was successfully read or false otherwise.</returns>
-    public bool Parse(Stream stream) {
+    public bool Parse(Stream stream, bool valueAsLocation) {
       Error = null;
       try {
@@ -41,5 +63,5 @@
         string[] firstline = reader.ReadLine().Split(delim, StringSplitOptions.RemoveEmptyEntries);
         Size = int.Parse(firstline[0]);
-        Qualiy = double.Parse(firstline[1]);
+        Quality = double.Parse(firstline[1], CultureInfo.InvariantCulture.NumberFormat);
         Assignment = new int[Size];
         int read = 0;
@@ -48,5 +70,7 @@
           string[] vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
           for (int j = 0; j < vals.Length; j++) {
-            Assignment[read++] = int.Parse(vals[j]);
+            if (valueAsLocation)
+              Assignment[int.Parse(vals[j]) - 1] = read++;
+            else Assignment[read++] = int.Parse(vals[j]) - 1;
           }
         }
