Index: /branches/GeneralizedQAP/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.MainForm.WindowsForms/3.3/HeuristicLab.MainForm.WindowsForms-3.3.csproj	(revision 6936)
@@ -140,7 +140,5 @@
     <None Include="Plugin.cs.frame" />
     <Compile Include="Controls\ControlExtensions.cs" />
-    <Compile Include="MainForms\DockForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
+    <Compile Include="MainForms\DockForm.cs" />
     <Compile Include="MainForms\DockForm.Designer.cs">
       <DependentUpon>DockForm.cs</DependentUpon>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSearch.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSearch.cs	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Algorithms/3.3/RobustTabooSearch.cs	(revision 6936)
@@ -51,29 +51,29 @@
 
     #region Parameter Properties
-    private FixedValueParameter<MultiAnalyzer> AnalyzerParameter {
+    public FixedValueParameter<MultiAnalyzer> AnalyzerParameter {
       get { return (FixedValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
     }
-    private FixedValueParameter<IntValue> SeedParameter {
+    public FixedValueParameter<IntValue> SeedParameter {
       get { return (FixedValueParameter<IntValue>)Parameters["Seed"]; }
     }
-    private FixedValueParameter<BoolValue> SetSeedRandomlyParameter {
+    public FixedValueParameter<BoolValue> SetSeedRandomlyParameter {
       get { return (FixedValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
     }
-    private FixedValueParameter<IntValue> MaximumIterationsParameter {
+    public FixedValueParameter<IntValue> MaximumIterationsParameter {
       get { return (FixedValueParameter<IntValue>)Parameters["MaximumIterations"]; }
     }
-    private FixedValueParameter<IntValue> MinimumTabuTenureParameter {
+    public FixedValueParameter<IntValue> MinimumTabuTenureParameter {
       get { return (FixedValueParameter<IntValue>)Parameters["MinimumTabuTenure"]; }
     }
-    private FixedValueParameter<IntValue> MaximumTabuTenureParameter {
+    public FixedValueParameter<IntValue> MaximumTabuTenureParameter {
       get { return (FixedValueParameter<IntValue>)Parameters["MaximumTabuTenure"]; }
     }
-    private FixedValueParameter<BoolValue> UseAlternativeAspirationParameter {
+    public FixedValueParameter<BoolValue> UseAlternativeAspirationParameter {
       get { return (FixedValueParameter<BoolValue>)Parameters["UseAlternativeAspiration"]; }
     }
-    private FixedValueParameter<IntValue> AlternativeAspirationTenureParameter {
+    public FixedValueParameter<IntValue> AlternativeAspirationTenureParameter {
       get { return (FixedValueParameter<IntValue>)Parameters["AlternativeAspirationTenure"]; }
     }
-    private FixedValueParameter<BoolValue> UseNewTabuTenureAdaptionSchemeParameter {
+    public FixedValueParameter<BoolValue> UseNewTabuTenureAdaptionSchemeParameter {
       get { return (FixedValueParameter<BoolValue>)Parameters["UseNewTabuTenureAdaptionScheme"]; }
     }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment.Views/3.3/QuadraticAssignmentProblemView.cs	(revision 6936)
@@ -23,11 +23,7 @@
 using System.ComponentModel;
 using System.Drawing;
-using System.Linq;
 using System.Windows.Forms;
 using HeuristicLab.Common.Resources;
-using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.PermutationEncoding;
 using HeuristicLab.MainForm;
 using HeuristicLab.MainForm.WindowsForms;
@@ -38,4 +34,6 @@
   [Content(typeof(QuadraticAssignmentProblem), IsDefaultView = true)]
   public sealed partial class QuadraticAssignmentProblemView : ParameterizedNamedItemView {
+    private QAPService qapService;
+
     public new QuadraticAssignmentProblem Content {
       get { return (QuadraticAssignmentProblem)base.Content; }
@@ -52,4 +50,5 @@
       parameterCollectionView.Dock = DockStyle.Fill;
       problemTabPage.Controls.Add(parameterCollectionView);
+      qapService = new QAPService();
     }
 
@@ -150,38 +149,5 @@
       if (String.IsNullOrEmpty(instance)) return;
       using (var client = new QAPClient()) {
-        loadInstanceWorker.ReportProgress(10);
-        var data = client.GetProblemInstanceData(instance);
-        loadInstanceWorker.ReportProgress(60);
-        DoubleMatrix weights = new DoubleMatrix(data.Weights.Length, data.Weights.Length);
-        DoubleMatrix distances = new DoubleMatrix(data.Weights.Length, data.Weights.Length);
-        try {
-          for (int i = 0; i < data.Weights.Length; i++)
-            for (int j = 0; j < data.Weights.Length; j++) {
-              weights[i, j] = data.Weights[i][j];
-              distances[i, j] = data.Distances[i][j];
-            }
-        } catch (IndexOutOfRangeException) {
-          MessageBox.Show("The problem data is malformed, the problem could not be loaded.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
-        }
-        loadInstanceWorker.ReportProgress(65);
-        Content.Name = data.Name;
-        Content.Description = data.Description;
-        Content.Maximization.Value = data.Maximization;
-        Content.Weights = weights;
-        Content.Distances = distances;
-
-        Content.BestKnownQualityParameter.Value = null;
-        Content.BestKnownSolution = null;
-        Content.BestKnownSolutions = new ItemSet<Permutation>();
-        var solutions = client.GetBestSolutionsData(instance);
-        loadInstanceWorker.ReportProgress(90);
-        if (solutions.Any()) {
-          Content.BestKnownQualityParameter.Value = new DoubleValue(solutions.First().Quality);
-          Content.BestKnownSolution = new Permutation(PermutationTypes.Absolute, solutions.First().Assignment);
-          foreach (var solution in solutions) {
-            Content.BestKnownSolutions.Add(new Permutation(PermutationTypes.Absolute, solution.Assignment));
-          }
-        }
-        loadInstanceWorker.ReportProgress(100);
+        qapService.Configure(Content, client, instance, (x) => { if (!Disposing && !IsDisposed) loadInstanceWorker.ReportProgress(x); });
       }
     }
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/HeuristicLab.Problems.QuadraticAssignment-3.3.csproj	(revision 6936)
@@ -140,4 +140,5 @@
       <DependentUpon>Reference.svcmap</DependentUpon>
     </Compile>
+    <Compile Include="Services\QAPService.cs" />
     <None Include="app.config" />
     <None Include="Plugin.cs.frame" />
@@ -251,4 +252,5 @@
     </None>
   </ItemGroup>
+  <ItemGroup />
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP.wsdl
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP.wsdl	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP.wsdl	(revision 6936)
@@ -14,4 +14,10 @@
   <wsdl:message name="IQAP_GetProblemInstances_OutputMessage">
     <wsdl:part name="parameters" element="tns:GetProblemInstancesResponse" />
+  </wsdl:message>
+  <wsdl:message name="IQAP_GetProblemInstancesOfSize_InputMessage">
+    <wsdl:part name="parameters" element="tns:GetProblemInstancesOfSize" />
+  </wsdl:message>
+  <wsdl:message name="IQAP_GetProblemInstancesOfSize_OutputMessage">
+    <wsdl:part name="parameters" element="tns:GetProblemInstancesOfSizeResponse" />
   </wsdl:message>
   <wsdl:message name="IQAP_GetProblemInstanceData_InputMessage">
@@ -32,4 +38,8 @@
       <wsdl:output wsaw:Action="http://tempuri.org/IQAP/GetProblemInstancesResponse" message="tns:IQAP_GetProblemInstances_OutputMessage" />
     </wsdl:operation>
+    <wsdl:operation name="GetProblemInstancesOfSize">
+      <wsdl:input wsaw:Action="http://tempuri.org/IQAP/GetProblemInstancesOfSize" message="tns:IQAP_GetProblemInstancesOfSize_InputMessage" />
+      <wsdl:output wsaw:Action="http://tempuri.org/IQAP/GetProblemInstancesOfSizeResponse" message="tns:IQAP_GetProblemInstancesOfSize_OutputMessage" />
+    </wsdl:operation>
     <wsdl:operation name="GetProblemInstanceData">
       <wsdl:input wsaw:Action="http://tempuri.org/IQAP/GetProblemInstanceData" message="tns:IQAP_GetProblemInstanceData_InputMessage" />
@@ -45,4 +55,13 @@
     <wsdl:operation name="GetProblemInstances">
       <soap:operation soapAction="http://tempuri.org/IQAP/GetProblemInstances" style="document" />
+      <wsdl:input>
+        <soap:body use="literal" />
+      </wsdl:input>
+      <wsdl:output>
+        <soap:body use="literal" />
+      </wsdl:output>
+    </wsdl:operation>
+    <wsdl:operation name="GetProblemInstancesOfSize">
+      <soap:operation soapAction="http://tempuri.org/IQAP/GetProblemInstancesOfSize" style="document" />
       <wsdl:input>
         <soap:body use="literal" />
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP1.xsd
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP1.xsd	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/QAP1.xsd	(revision 6936)
@@ -15,4 +15,19 @@
     </xs:complexType>
   </xs:element>
+  <xs:element name="GetProblemInstancesOfSize">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element minOccurs="0" name="minSize" type="xs:int" />
+        <xs:element minOccurs="0" name="maxSize" type="xs:int" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="GetProblemInstancesOfSizeResponse">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element xmlns:q2="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="GetProblemInstancesOfSizeResult" nillable="true" type="q2:ArrayOfstring" />
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
   <xs:element name="GetProblemInstanceData">
     <xs:complexType>
@@ -25,5 +40,5 @@
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.ProblemInstances" minOccurs="0" name="GetProblemInstanceDataResult" nillable="true" type="q2:QAPInstanceDto" />
+        <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.ProblemInstances" minOccurs="0" name="GetProblemInstanceDataResult" nillable="true" type="q3:QAPInstanceDto" />
       </xs:sequence>
     </xs:complexType>
@@ -39,5 +54,5 @@
     <xs:complexType>
       <xs:sequence>
-        <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.ProblemInstances" minOccurs="0" name="GetBestSolutionsDataResult" nillable="true" type="q3:ArrayOfQAPSolutionDto" />
+        <xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.ProblemInstances" minOccurs="0" name="GetBestSolutionsDataResult" nillable="true" type="q4:ArrayOfQAPSolutionDto" />
       </xs:sequence>
     </xs:complexType>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/Reference.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/Reference.cs	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/Reference.cs	(revision 6936)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:4.0.30319.431
+//     Runtime Version:4.0.30319.237
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -239,4 +239,7 @@
         string[] GetProblemInstances();
         
+        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IQAP/GetProblemInstancesOfSize", ReplyAction="http://tempuri.org/IQAP/GetProblemInstancesOfSizeResponse")]
+        string[] GetProblemInstancesOfSize(int minSize, int maxSize);
+        
         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IQAP/GetProblemInstanceData", ReplyAction="http://tempuri.org/IQAP/GetProblemInstanceDataResponse")]
         HeuristicLab.Problems.QuadraticAssignment.QAPInstanceService.QAPInstanceDto GetProblemInstanceData(string instance);
@@ -277,4 +280,8 @@
         }
         
+        public string[] GetProblemInstancesOfSize(int minSize, int maxSize) {
+            return base.Channel.GetProblemInstancesOfSize(minSize, maxSize);
+        }
+        
         public HeuristicLab.Problems.QuadraticAssignment.QAPInstanceService.QAPInstanceDto GetProblemInstanceData(string instance) {
             return base.Channel.GetProblemInstanceData(instance);
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration.svcinfo
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration.svcinfo	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration.svcinfo	(revision 6936)
@@ -3,8 +3,8 @@
   <behaviors />
   <bindings>
-    <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data hostNameComparisonMode=&quot;StrongWildcard&quot; maxBufferSize=&quot;65536&quot; messageEncoding=&quot;Text&quot; name=&quot;BasicHttpBinding_IQAP&quot; textEncoding=&quot;utf-8&quot; transferMode=&quot;Buffered&quot;&gt;&lt;readerQuotas maxArrayLength=&quot;16384&quot; maxBytesPerRead=&quot;4096&quot; maxDepth=&quot;32&quot; maxNameTableCharCount=&quot;16384&quot; maxStringContentLength=&quot;8192&quot; /&gt;&lt;security mode=&quot;None&quot;&gt;&lt;message algorithmSuite=&quot;Default&quot; clientCredentialType=&quot;UserName&quot; /&gt;&lt;transport clientCredentialType=&quot;None&quot; proxyCredentialType=&quot;None&quot; realm=&quot;&quot; /&gt;&lt;/security&gt;&lt;/Data&gt;" bindingType="basicHttpBinding" name="BasicHttpBinding_IQAP" />
+    <binding digest="System.ServiceModel.Configuration.BasicHttpBindingElement, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089:&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data hostNameComparisonMode=&quot;StrongWildcard&quot; maxBufferSize=&quot;65536&quot; messageEncoding=&quot;Text&quot; name=&quot;BasicHttpBinding_IQAP1&quot; textEncoding=&quot;utf-8&quot; transferMode=&quot;Buffered&quot;&gt;&lt;readerQuotas maxArrayLength=&quot;16384&quot; maxBytesPerRead=&quot;4096&quot; maxDepth=&quot;32&quot; maxNameTableCharCount=&quot;16384&quot; maxStringContentLength=&quot;8192&quot; /&gt;&lt;security mode=&quot;None&quot;&gt;&lt;message algorithmSuite=&quot;Default&quot; clientCredentialType=&quot;UserName&quot; /&gt;&lt;transport clientCredentialType=&quot;None&quot; proxyCredentialType=&quot;None&quot; realm=&quot;&quot; /&gt;&lt;/security&gt;&lt;/Data&gt;" bindingType="basicHttpBinding" name="BasicHttpBinding_IQAP1" />
   </bindings>
   <endpoints>
-    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IQAP&quot; contract=&quot;QAPInstanceService.IQAP&quot; name=&quot;BasicHttpBinding_IQAP&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IQAP&quot; contract=&quot;QAPInstanceService.IQAP&quot; name=&quot;BasicHttpBinding_IQAP&quot; /&gt;" contractName="QAPInstanceService.IQAP" name="BasicHttpBinding_IQAP" />
+    <endpoint normalizedDigest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IQAP1&quot; contract=&quot;QAPInstanceService.IQAP&quot; name=&quot;BasicHttpBinding_IQAP1&quot; /&gt;" digest="&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-16&quot;?&gt;&lt;Data address=&quot;http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc&quot; binding=&quot;basicHttpBinding&quot; bindingConfiguration=&quot;BasicHttpBinding_IQAP1&quot; contract=&quot;QAPInstanceService.IQAP&quot; name=&quot;BasicHttpBinding_IQAP1&quot; /&gt;" contractName="QAPInstanceService.IQAP" name="BasicHttpBinding_IQAP1" />
   </endpoints>
 </configurationSnapshot>
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration91.svcinfo
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration91.svcinfo	(revision 6935)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Service References/QAPInstanceService/configuration91.svcinfo	(revision 6936)
@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
-<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="QeiWFCVcLTWEHWNKCNg2gVsn4EY=">
+<SavedWcfConfigurationInformation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="9.1" CheckSum="skUfyVwhB3jeStxrxUEPaRKKcK8=">
   <bindingConfigurations>
-    <bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IQAP">
+    <bindingConfiguration bindingType="basicHttpBinding" name="BasicHttpBinding_IQAP1">
       <properties>
         <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>BasicHttpBinding_IQAP</serializedValue>
+          <serializedValue>BasicHttpBinding_IQAP1</serializedValue>
         </property>
         <property path="/closeTimeout" isComplexType="false" isExplicitlyDefined="true" clrType="System.TimeSpan, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -113,5 +113,5 @@
   </bindingConfigurations>
   <endpoints>
-    <endpoint name="BasicHttpBinding_IQAP" contract="QAPInstanceService.IQAP" bindingType="basicHttpBinding" address="http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc" bindingConfiguration="BasicHttpBinding_IQAP">
+    <endpoint name="BasicHttpBinding_IQAP1" contract="QAPInstanceService.IQAP" bindingType="basicHttpBinding" address="http://services.heuristiclab.com/ProblemInstances-3.3/QAP/QAP.svc" bindingConfiguration="BasicHttpBinding_IQAP1">
       <properties>
         <property path="/address" isComplexType="false" isExplicitlyDefined="true" clrType="System.Uri, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -125,5 +125,5 @@
         </property>
         <property path="/bindingConfiguration" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>BasicHttpBinding_IQAP</serializedValue>
+          <serializedValue>BasicHttpBinding_IQAP1</serializedValue>
         </property>
         <property path="/contract" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -188,5 +188,5 @@
         </property>
         <property path="/name" isComplexType="false" isExplicitlyDefined="true" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
-          <serializedValue>BasicHttpBinding_IQAP</serializedValue>
+          <serializedValue>BasicHttpBinding_IQAP1</serializedValue>
         </property>
         <property path="/kind" isComplexType="false" isExplicitlyDefined="false" clrType="System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
Index: /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Services/QAPService.cs
===================================================================
--- /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Services/QAPService.cs	(revision 6936)
+++ /branches/GeneralizedQAP/HeuristicLab.Problems.QuadraticAssignment/3.3/Services/QAPService.cs	(revision 6936)
@@ -0,0 +1,100 @@
+﻿#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;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.QuadraticAssignment.QAPInstanceService;
+
+namespace HeuristicLab.Problems.QuadraticAssignment {
+  public class QAPService {
+    private Dictionary<string, QAPInstanceDto> instanceCache;
+    private Dictionary<string, QAPSolutionDto[]> solutionsCache;
+
+    private void Initialize() {
+      instanceCache = new Dictionary<string, QAPInstanceDto>();
+      solutionsCache = new Dictionary<string, QAPSolutionDto[]>();
+    }
+
+    public bool IsCached(string instance) {
+      return instanceCache != null && instanceCache.ContainsKey(instance);
+    }
+
+    public void ClearCache() {
+      instanceCache.Clear();
+      solutionsCache.Clear();
+    }
+
+    public void Configure(QuadraticAssignmentProblem problem, QAPClient client, string instance, Action<int> progressReporter) {
+      if (string.IsNullOrEmpty(instance)) return;
+      if (progressReporter != null) progressReporter(10);
+      QAPInstanceDto data;
+      if (instanceCache == null) Initialize();
+      if (instanceCache.ContainsKey(instance)) data = instanceCache[instance];
+      else {
+        data = client.GetProblemInstanceData(instance);
+        instanceCache.Add(instance, data);
+      }
+      if (progressReporter != null) progressReporter(50);
+      DoubleMatrix weights = new DoubleMatrix(data.Weights.Length, data.Weights.Length);
+      DoubleMatrix distances = new DoubleMatrix(data.Weights.Length, data.Weights.Length);
+      try {
+        for (int i = 0; i < data.Weights.Length; i++)
+          for (int j = 0; j < data.Weights.Length; j++) {
+            weights[i, j] = data.Weights[i][j];
+            distances[i, j] = data.Distances[i][j];
+          }
+      } catch (IndexOutOfRangeException) {
+        throw new InvalidOperationException("The problem data is malformed, the problem could not be loaded.");
+      }
+      if (progressReporter != null) progressReporter(65);
+      problem.Name = data.Name;
+      problem.Description = data.Description;
+      problem.Maximization.Value = data.Maximization;
+      problem.Weights = weights;
+      problem.Distances = distances;
+
+      problem.BestKnownQualityParameter.Value = null;
+      problem.BestKnownSolution = null;
+      problem.BestKnownSolutions = new ItemSet<Permutation>();
+      QAPSolutionDto[] solutions;
+      if (solutionsCache.ContainsKey(instance)) solutions = solutionsCache[instance];
+      else {
+        solutions = client.GetBestSolutionsData(instance);
+        solutionsCache.Add(instance, solutions);
+      }
+      if (progressReporter != null) progressReporter(90);
+      if (solutions.Any()) {
+        problem.BestKnownQualityParameter.Value = new DoubleValue(solutions.First().Quality);
+        if (solutions.First().Assignment != null && solutions.First().Assignment.Length > 0)
+          problem.BestKnownSolution = new Permutation(PermutationTypes.Absolute, solutions.First().Assignment);
+        foreach (var solution in solutions) {
+          if (solution.Assignment != null && solution.Assignment.Length > 0)
+            problem.BestKnownSolutions.Add(new Permutation(PermutationTypes.Absolute, solution.Assignment));
+        }
+      }
+      if (progressReporter != null) progressReporter(100);
+    }
+  }
+}
