Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/ESContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/ESContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/ESContext.cs	(revision 15572)
@@ -28,5 +28,5 @@
   [Item("Evolution Strategy (GQAP) Context", "Context for Evolution Strategies (GQAP).")]
   [StorableClass]
-  public sealed class ESContext : SingleObjectivePopulationContext<ISingleObjectiveSolutionScope<ESGQAPSolution>> {
+  public sealed class ESContext : PopulationContext<ISingleObjectiveSolutionScope<ESGQAPSolution>> {
     
     [Storable]
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/EvolutionStrategy.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/EvolutionStrategy.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/EvolutionStrategy.cs	(revision 15572)
@@ -39,5 +39,5 @@
   [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms)]
   [StorableClass]
-  public sealed class EvolutionStrategy : StochasticAlgorithm<ESContext> {
+  public sealed class EvolutionStrategy : StochasticAlgorithm<ESContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGA.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGA.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGA.cs	(revision 15572)
@@ -35,5 +35,5 @@
   [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms)]
   [StorableClass]
-  public sealed class OSGA : StochasticAlgorithm<OSGAContext> {
+  public sealed class OSGA : StochasticAlgorithm<OSGAContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
@@ -127,5 +127,5 @@
         
         while (!StoppingCriterion() && Context.NextGeneration.Count < PopulationSize
-          && Context.SelectionPressure < 1000) {
+          && Context.SelectionPressure < 500) {
 
           var idx1 = Context.Random.Next(PopulationSize);
@@ -160,6 +160,6 @@
           Context.SelectionPressure += 1.0 / PopulationSize;
           Context.Attempts++;
-          if (Context.SelectionPressure > 10
-            && Context.NextGeneration.Count / (double)PopulationSize < Context.SelectionPressure / 1000)
+          if (Context.SelectionPressure > 1
+            && Context.NextGeneration.Count / (double)PopulationSize < Context.SelectionPressure / 500)
             break;
           if (cancellationToken.IsCancellationRequested) return;
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGAContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGAContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Evolutionary/OSGAContext.cs	(revision 15572)
@@ -30,5 +30,5 @@
   [Item("OSGA (GQAP) Context", "Context for OSGA (GQAP).")]
   [StorableClass]
-  public sealed class OSGAContext : SingleObjectivePopulationContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
+  public sealed class OSGAContext : PopulationContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
     
     [Storable]
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASP.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASP.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASP.cs	(revision 15572)
@@ -36,8 +36,11 @@
   /// This is an implementation of the algorithm described in Mateus, G.R., Resende, M.G.C. & Silva, R.M.A. J Heuristics (2011) 17: 527. https://doi.org/10.1007/s10732-010-9144-0
   /// </summary>
+  /// <remarks>
+  /// A fine distinction to the described algorithm is that newly found best solutions are always accepted into the elite set. This is reasonable, but not mentioned in the paper by Mateus et al.
+  /// </remarks>
   [Item("GRASP+PR (GQAP)", "The algorithm implements the Greedy Randomized Adaptive Search Procedure (GRASP) with Path Relinking as described in Mateus, G., Resende, M., and Silva, R. 2011. GRASP with path-relinking for the generalized quadratic assignment problem. Journal of Heuristics 17, Springer Netherlands, pp. 527-565.")]
   [Creatable(CreatableAttribute.Categories.PopulationBasedAlgorithms)]
   [StorableClass]
-  public sealed class GRASP : StochasticAlgorithm<GRASPContext> {
+  public sealed class GRASP : StochasticAlgorithm<GRASPContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
@@ -175,5 +178,5 @@
           GQAPSolution pi_prime;
           if (!Problem.ProblemInstance.IsFeasible(pi_prime_vec)) // line 5 in Algorithm 1
-            pi_prime = Context.AtPopulation(Context.Random.Next(Context.PopulationCount)).Solution; // line 6 in Algorithm 1
+            pi_prime = (GQAPSolution)Context.AtPopulation(Context.Random.Next(Context.PopulationCount)).Solution.Clone(); // line 6 in Algorithm 1
           else {
             // This is necessary, because pi_prime has not been evaluated yet and such details are not covered in Algorithm 1
@@ -188,5 +191,6 @@
           var fitness = Problem.ProblemInstance.ToSingleObjective(pi_prime.Evaluation);
           // Book-keeping
-          if (Context.BestQuality > fitness) {
+          var newBest = Context.BestQuality > fitness;
+          if (newBest) {
             Context.BestQuality = fitness;
             Context.BestSolution = (GQAPSolution)pi_prime.Clone();
@@ -194,16 +198,19 @@
 
           if (Context.PopulationCount == EliteSetSize) { // line 12 in Algorithm 1
-            var fit = Problem.ProblemInstance.ToSingleObjective(pi_prime.Evaluation);
             double[] similarities = Context.Population.Select(x => HammingSimilarityCalculator.CalculateSimilarity(x.Solution.Assignment, pi_prime.Assignment)).ToArray();
-            if (similarities.Max() <= 1.0 - (MinimumDifference / (double)pi_prime.Assignment.Length)) { // cond. 2 of line 13 in Algorithm 1
-              var replacement = Context.Population.Select((v, i) => new { V = v, Index = i })
-                                          .Where(x => x.V.Fitness >= fit).ToArray();
-              if (replacement.Length > 0) { // cond. 1 of line 13 in Algorithm 1
-                // next two lines: line 14 in Algorithm 1
-                replacement = replacement.OrderBy(x => similarities[x.Index]).ToArray();
-                Context.ReplaceAtPopulation(replacement.Last().Index, Context.ToScope(pi_prime, fit));
+            // NOTE: In the original paper it is not described that new best solutions are accepted regardless of difference
+            // in this implementation a new best solution is always accepted into the elite set
+            if (newBest || similarities.Max() <= 1.0 - (MinimumDifference / (double)pi_prime.Assignment.Length)) { // cond. 2 of line 13 in Algorithm 1
+              var replacement = Context.Population.Select((v, i) => new { Scope = v, Index = i })
+                                          .Where(x => x.Scope.Fitness >= fitness) // cond. 1 of line 13 in Algorithm 1
+                                          .OrderByDescending(x => similarities[x.Index]) // line 14 in Algorithm 1
+                                          .FirstOrDefault();
+              if (replacement != null) { 
+                Context.ReplaceAtPopulation(replacement.Index, Context.ToScope(pi_prime, fitness)); // line 14 in Algorithm 1
               }
             }
-          } else if (IsSufficientlyDifferent(pi_prime.Assignment)) { // line 17 in Algorithm 1
+            // NOTE: In the original paper it is not described that new best solutions are accepted regardless of difference
+            // in this implementation a new best solution is always accepted into the elite set
+          } else if (newBest || IsSufficientlyDifferent(pi_prime.Assignment)) { // line 17 in Algorithm 1
             Context.AddToPopulation(Context.ToScope(pi_prime, Problem.ProblemInstance.ToSingleObjective(pi_prime.Evaluation))); // line 18 in Algorithm 1
           }
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASPContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASPContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/GRASP/GRASPContext.cs	(revision 15572)
@@ -29,5 +29,5 @@
   [Item("GRASP+PR (GQAP) Context", "Context for GRASP+PR (GQAP).")]
   [StorableClass]
-  public sealed class GRASPContext : SingleObjectivePopulationContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
+  public sealed class GRASPContext : PopulationContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
     
     [Storable]
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms-3.3.csproj
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms-3.3.csproj	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms-3.3.csproj	(revision 15572)
@@ -105,6 +105,4 @@
     <Compile Include="Evolutionary\OSGA.cs" />
     <Compile Include="Infrastructure\Algorithms\StochasticAlgorithm.cs" />
-    <Compile Include="Infrastructure\Contexts\SingleObjectiveSingleSolutionContext.cs" />
-    <Compile Include="Infrastructure\Contexts\SingleObjectivePopulationContext.cs" />
     <Compile Include="Infrastructure\Contexts\StochasticContext.cs" />
     <Compile Include="Infrastructure\Contexts\BasicContext.cs" />
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/ContextAlgorithm.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/ContextAlgorithm.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/ContextAlgorithm.cs	(revision 15572)
@@ -33,6 +33,16 @@
   [Item("Context-based Algorithm", "Algorithms that make use of contexts to facilitate applying operators.")]
   [StorableClass]
-  public abstract class ContextAlgorithm<TContext> : BasicAlgorithm
-    where TContext : class, IContext, new() {
+  public abstract class ContextAlgorithm<TContext, TEncoding> : BasicAlgorithm
+    where TContext : class, IContext, new()
+    where TEncoding : class, IEncoding {
+
+    public override Type ProblemType {
+      get { return typeof(SingleObjectiveBasicProblem<TEncoding>); }
+    }
+
+    public new SingleObjectiveBasicProblem<TEncoding> Problem {
+      get { return (SingleObjectiveBasicProblem<TEncoding>)base.Problem; }
+      set { base.Problem = value; }
+    }
 
     [Storable]
@@ -62,4 +72,9 @@
       get { return maximumRuntimeParameter; }
     }
+    [Storable]
+    private FixedValueParameter<BoolValue> stopAtBestKnownQualityParameter;
+    public IFixedValueParameter<BoolValue> StopAtBestKnownQualityParameter {
+      get { return stopAtBestKnownQualityParameter; }
+    }
 
     public IAnalyzer Analyzer {
@@ -79,8 +94,12 @@
       set { maximumRuntimeParameter.Value.Value = value; }
     }
+    public bool StopAtBestKnownQuality {
+      get { return stopAtBestKnownQualityParameter.Value.Value; }
+      set { stopAtBestKnownQualityParameter.Value.Value = value; }
+    }
 
     [StorableConstructor]
     protected ContextAlgorithm(bool deserializing) : base(deserializing) { }
-    protected ContextAlgorithm(ContextAlgorithm<TContext> original, Cloner cloner)
+    protected ContextAlgorithm(ContextAlgorithm<TContext, TEncoding> original, Cloner cloner)
       : base(original, cloner) {
       context = cloner.Clone(original.context);
@@ -89,4 +108,5 @@
       maximumEvaluationsParameter = cloner.Clone(original.maximumEvaluationsParameter);
       maximumRuntimeParameter = cloner.Clone(original.maximumRuntimeParameter);
+      stopAtBestKnownQualityParameter = cloner.Clone(original.stopAtBestKnownQualityParameter);
     }
     protected ContextAlgorithm()
@@ -96,4 +116,5 @@
       Parameters.Add(maximumEvaluationsParameter = new FixedValueParameter<IntValue>("MaximumEvaluations", "The number of evaluated solutions that the algorithm should perform or < 1 to ignore.", new IntValue(0)));
       Parameters.Add(maximumRuntimeParameter = new FixedValueParameter<TimeSpanValue>("MaximumRuntime", "The timespan that the algorithm is allowed to run.", new TimeSpanValue(TimeSpan.FromMinutes(1))));
+      Parameters.Add(stopAtBestKnownQualityParameter = new FixedValueParameter<BoolValue>("StopAtBestKnownQuality", "Whether the algorithm should terminate if the best known quality has been found.", new BoolValue(true)));
     }
 
@@ -121,5 +142,7 @@
       return MaximumIterations > 0 && Context.Iterations > MaximumIterations
         || MaximumEvaluations > 0 && Context.EvaluatedSolutions > MaximumEvaluations
-        || MaximumRuntime > TimeSpan.Zero && ExecutionTime > MaximumRuntime;
+        || MaximumRuntime > TimeSpan.Zero && ExecutionTime > MaximumRuntime
+        || StopAtBestKnownQuality && !double.IsNaN(Problem.BestKnownQuality)
+          && Context.BestQuality.IsAlmost(Problem.BestKnownQuality);
     }
   }
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/StochasticAlgorithm.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/StochasticAlgorithm.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Algorithms/StochasticAlgorithm.cs	(revision 15572)
@@ -24,4 +24,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -31,6 +32,7 @@
   [Item("Stochastic Algorithm", "Stochastic context-based algorithms to facilitate applying operators.")]
   [StorableClass]
-  public abstract class StochasticAlgorithm<TContext> : ContextAlgorithm<TContext>
-    where TContext : class, IStochasticContext, new() {
+  public abstract class StochasticAlgorithm<TContext, TEncoding> : ContextAlgorithm<TContext, TEncoding>
+    where TContext : class, IStochasticContext, new()
+    where TEncoding : class, IEncoding {
     
     [Storable]
@@ -56,5 +58,5 @@
     [StorableConstructor]
     protected StochasticAlgorithm(bool deserializing) : base(deserializing) { }
-    protected StochasticAlgorithm(StochasticAlgorithm<TContext> original, Cloner cloner)
+    protected StochasticAlgorithm(StochasticAlgorithm<TContext, TEncoding> original, Cloner cloner)
       : base(original, cloner) {
       setSeedRandomlyParameter = cloner.Clone(original.setSeedRandomlyParameter);
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/BasicContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/BasicContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/BasicContext.cs	(revision 15572)
@@ -63,4 +63,11 @@
     }
 
+    [Storable]
+    private IValueParameter<DoubleValue> bestQuality;
+    public double BestQuality {
+      get { return bestQuality.Value.Value; }
+      set { bestQuality.Value.Value = value; }
+    }
+
     [StorableConstructor]
     protected BasicContext(bool deserializing) : base(deserializing) { }
@@ -70,4 +77,5 @@
       iterations = cloner.Clone(original.iterations);
       evaluatedSolutions = cloner.Clone(original.evaluatedSolutions);
+      bestQuality = cloner.Clone(original.bestQuality);
     }
     protected BasicContext() : base() {
@@ -75,4 +83,5 @@
       Parameters.Add(iterations = new FixedValueParameter<IntValue>("Iterations", new IntValue(0)));
       Parameters.Add(evaluatedSolutions = new FixedValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
+      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
     }
     protected BasicContext(string name) : base(name) {
@@ -80,4 +89,5 @@
       Parameters.Add(iterations = new FixedValueParameter<IntValue>("Iterations", new IntValue(0)));
       Parameters.Add(evaluatedSolutions = new FixedValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
+      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
     }
     protected BasicContext(string name, ParameterCollection parameters) : base(name, parameters) {
@@ -85,4 +95,5 @@
       Parameters.Add(iterations = new FixedValueParameter<IntValue>("Iterations", new IntValue(0)));
       Parameters.Add(evaluatedSolutions = new FixedValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
+      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
     }
     protected BasicContext(string name, string description) : base(name, description) {
@@ -90,4 +101,5 @@
       Parameters.Add(iterations = new FixedValueParameter<IntValue>("Iterations", new IntValue(0)));
       Parameters.Add(evaluatedSolutions = new FixedValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
+      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
     }
     protected BasicContext(string name, string description, ParameterCollection parameters) : base(name, description, parameters) {
@@ -95,4 +107,5 @@
       Parameters.Add(iterations = new FixedValueParameter<IntValue>("Iterations", new IntValue(0)));
       Parameters.Add(evaluatedSolutions = new FixedValueParameter<IntValue>("EvaluatedSolutions", new IntValue(0)));
+      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
     }
 
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/SingleObjectivePopulationContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/SingleObjectivePopulationContext.cs	(revision 15564)
+++ 	(revision )
@@ -1,66 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2017 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms {
-  [Item("Single-objective Population Context", "A context for single-objective population-based algorithms.")]
-  public abstract class SingleObjectivePopulationContext<TSolutionScope> : PopulationContext<TSolutionScope>
-    where TSolutionScope: class, IScope {
-
-    [Storable]
-    private IValueParameter<DoubleValue> bestQuality;
-    public double BestQuality {
-      get { return bestQuality.Value.Value; }
-      set { bestQuality.Value.Value = value; }
-    }
-
-    [StorableConstructor]
-    protected SingleObjectivePopulationContext(bool deserializing) : base(deserializing) { }
-    protected SingleObjectivePopulationContext(SingleObjectivePopulationContext<TSolutionScope> original, Cloner cloner)
-      : base(original, cloner) {
-      bestQuality = cloner.Clone(original.bestQuality);
-    }
-    protected SingleObjectivePopulationContext()
-      : base() {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectivePopulationContext(string name) : base(name) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectivePopulationContext(string name, ParameterCollection parameters)
-      : base(name, parameters) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectivePopulationContext(string name, string description)
-      : base(name, description) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectivePopulationContext(string name, string description, ParameterCollection parameters)
-      : base(name, description, parameters) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-  }
-}
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/SingleObjectiveSingleSolutionContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Contexts/SingleObjectiveSingleSolutionContext.cs	(revision 15564)
+++ 	(revision )
@@ -1,66 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2017 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms {
-  [Item("Single-objective Single Solution Context", "A context for single-objective single solution algorithms.")]
-  public abstract class SingleObjectiveSingleSolutionContext<TSolutionScope> : SingleSolutionContext<TSolutionScope>
-    where TSolutionScope: class, IScope {
-
-    [Storable]
-    private IValueParameter<DoubleValue> bestQuality;
-    public double BestQuality {
-      get { return bestQuality.Value.Value; }
-      set { bestQuality.Value.Value = value; }
-    }
-
-    [StorableConstructor]
-    protected SingleObjectiveSingleSolutionContext(bool deserializing) : base(deserializing) { }
-    protected SingleObjectiveSingleSolutionContext(SingleObjectiveSingleSolutionContext<TSolutionScope> original, Cloner cloner)
-      : base(original, cloner) {
-      bestQuality = cloner.Clone(original.bestQuality);
-    }
-    protected SingleObjectiveSingleSolutionContext()
-      : base() {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectiveSingleSolutionContext(string name) : base(name) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectiveSingleSolutionContext(string name, ParameterCollection parameters)
-      : base(name, parameters) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectiveSingleSolutionContext(string name, string description)
-      : base(name, description) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-    protected SingleObjectiveSingleSolutionContext(string name, string description, ParameterCollection parameters)
-      : base(name, description, parameters) {
-      Parameters.Add(bestQuality = new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(double.NaN)));
-    }
-  }
-}
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Interfaces.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Interfaces.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/Interfaces.cs	(revision 15572)
@@ -26,6 +26,4 @@
     TSolution Solution { get; set; }
     double Fitness { get; set; }
-
-    void Adopt(ISingleObjectiveSolutionScope<TSolution> orphan);
   }
 
@@ -34,4 +32,5 @@
     int Iterations { get; set; }
     int EvaluatedSolutions { get; set; }
+    double BestQuality { get; set; }
   }
 
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/SingleObjectiveSolutionScope.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/SingleObjectiveSolutionScope.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/Infrastructure/SingleObjectiveSolutionScope.cs	(revision 15572)
@@ -134,9 +134,4 @@
     }
     #endregion
-
-    public void Adopt(ISingleObjectiveSolutionScope<T> orphan) {
-      Solution = orphan.Solution;
-      Fitness = orphan.Fitness;
-    }
   }
 }
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHC.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHC.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHC.cs	(revision 15572)
@@ -35,5 +35,5 @@
   [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)]
   [StorableClass]
-  public sealed class LAHC : StochasticAlgorithm<LAHCContext> {
+  public sealed class LAHC : StochasticAlgorithm<LAHCContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHCContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHCContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/LAHCContext.cs	(revision 15572)
@@ -27,5 +27,5 @@
 
 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.LAHC {
-  public sealed class LAHCContext : SingleObjectiveSingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
+  public sealed class LAHCContext : SingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
     [Storable]
     private IValueParameter<GQAP> problem;
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHC.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHC.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHC.cs	(revision 15572)
@@ -34,5 +34,5 @@
   [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)]
   [StorableClass]
-  public sealed class PLAHCS : StochasticAlgorithm<PLAHCContext> {
+  public sealed class PLAHCS : StochasticAlgorithm<PLAHCContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHCContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHCContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LAHC/pLAHCContext.cs	(revision 15572)
@@ -27,5 +27,5 @@
 
 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.LAHC {
-  public sealed class PLAHCContext : SingleObjectiveSingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
+  public sealed class PLAHCContext : SingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
     [Storable]
     private IValueParameter<GQAP> problem;
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/IteratedLS.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/IteratedLS.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/IteratedLS.cs	(revision 15572)
@@ -25,4 +25,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
@@ -33,5 +34,5 @@
   [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)]
   [StorableClass]
-  public sealed class IteratedLS : StochasticAlgorithm<LocalSearchContext> {
+  public sealed class IteratedLS : StochasticAlgorithm<LocalSearchContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/LocalSearchContext.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/LocalSearchContext.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/LocalSearchContext.cs	(revision 15572)
@@ -26,5 +26,5 @@
 
 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms.LocalSearch {
-  public sealed class LocalSearchContext : SingleObjectiveSingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
+  public sealed class LocalSearchContext : SingleSolutionContext<ISingleObjectiveSolutionScope<GQAPSolution>> {
     [Storable]
     private IValueParameter<GQAP> problem;
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/MultistartLS.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/MultistartLS.cs	(revision 15564)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment.Algorithms/3.3/LocalSearch/MultistartLS.cs	(revision 15572)
@@ -33,5 +33,5 @@
   [Creatable(CreatableAttribute.Categories.SingleSolutionAlgorithms)]
   [StorableClass]
-  public sealed class MultistartLS : StochasticAlgorithm<LocalSearchContext> {
+  public sealed class MultistartLS : StochasticAlgorithm<LocalSearchContext, IntegerVectorEncoding> {
 
     public override bool SupportsPause {
