Index: trunk/sources/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj	(revision 3633)
+++ trunk/sources/HeuristicLab.Parameters/3.3/HeuristicLab.Parameters-3.3.csproj	(revision 3634)
@@ -86,4 +86,5 @@
     <None Include="HeuristicLabParametersPlugin.cs.frame" />
     <Compile Include="ConstrainedValueParameter.cs" />
+    <Compile Include="SubScopesSubScopesLookupParameter.cs" />
     <Compile Include="OptionalConstrainedValueParameter.cs" />
     <Compile Include="ValueParameter.cs" />
Index: trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs
===================================================================
--- trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs	(revision 3633)
+++ trunk/sources/HeuristicLab.Parameters/3.3/SubScopesLookupParameter.cs	(revision 3634)
@@ -27,5 +27,5 @@
 namespace HeuristicLab.Parameters {
   /// <summary>
-  /// A generic parameter representing instances of type T which are collected from the sub-scopes of the current scope.
+  /// A generic parameter representing instances of type T which are collected from or written to the sub-scopes of the current scope.
   /// </summary>
   [Item("SubScopesLookupParameter<T>", "A generic parameter representing instances of type T which are collected from or written to the sub-scopes of the current scope.")]
Index: trunk/sources/HeuristicLab.Parameters/3.3/SubScopesSubScopesLookupParameter.cs
===================================================================
--- trunk/sources/HeuristicLab.Parameters/3.3/SubScopesSubScopesLookupParameter.cs	(revision 3634)
+++ trunk/sources/HeuristicLab.Parameters/3.3/SubScopesSubScopesLookupParameter.cs	(revision 3634)
@@ -0,0 +1,85 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Parameters {
+  /// <summary>
+  /// A generic parameter representing instances of type T which are collected from or written to the sub-scopes of the sub-scopes of the current scope.
+  /// </summary>
+  [Item("SubScopesSubScopesLookupParameter<T>", "A generic parameter representing instances of type T which are collected from or written to the sub-scopes of the sub-scopes of the current scope.")]
+  [StorableClass]
+  public class SubScopesSubScopesLookupParameter<T> : LookupParameter<ItemArray<ItemArray<T>>> where T : class, IItem {
+    public SubScopesSubScopesLookupParameter() : base() { }
+    public SubScopesSubScopesLookupParameter(string name) : base(name) { }
+    public SubScopesSubScopesLookupParameter(string name, string description) : base(name, description) { }
+    public SubScopesSubScopesLookupParameter(string name, string description, string actualName) : base(name, description, actualName) { }
+
+    protected override IItem GetActualValue() {
+      string name = LookupParameter<ItemArray<ItemArray<T>>>.TranslateName(Name, ExecutionContext);
+      IScope scope = ExecutionContext.Scope;
+      ItemArray<ItemArray<T>> values = new ItemArray<ItemArray<T>>(scope.SubScopes.Count);
+      IVariable var;
+      T value;
+
+      for (int i = 0; i < values.Length; i++) {
+        values[i] = new ItemArray<T>(scope.SubScopes[i].SubScopes.Count);
+        for (int j = 0; j < values[i].Length; j++) {
+          scope.SubScopes[i].SubScopes[j].Variables.TryGetValue(name, out var);
+          if (var != null) {
+            value = var.Value as T;
+            if ((var.Value != null) && (value == null))
+              throw new InvalidOperationException(
+                string.Format("Type mismatch. Variable \"{0}\" does not contain a \"{1}\".",
+                              name,
+                              typeof(T).GetPrettyName())
+              );
+            values[i][j] = value;
+          }
+        }
+      }
+      return values;
+    }
+    protected override void SetActualValue(IItem value) {
+      ItemArray<ItemArray<T>> values = value as ItemArray<ItemArray<T>>;
+      if (values == null)
+        throw new InvalidOperationException(
+          string.Format("Type mismatch. Value is not a \"{0}\".",
+                        typeof(ItemArray<T>).GetPrettyName())
+        );
+
+      string name = LookupParameter<ItemArray<ItemArray<T>>>.TranslateName(Name, ExecutionContext);
+      IScope scope = ExecutionContext.Scope;
+      IVariable var;
+
+      for (int i = 0; i < values.Length; i++) {
+        for (int j = 0; j < values[i].Length; j++) {
+          scope.SubScopes[i].SubScopes[j].Variables.TryGetValue(name, out var);
+          if (var != null) var.Value = values[i][j];
+          else scope.SubScopes[i].SubScopes[j].Variables.Add(new Variable(name, values[i][j]));
+        }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs	(revision 3633)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/BestTSPSolutionAnalyzer.cs	(revision 3634)
@@ -36,13 +36,13 @@
   [Item("BestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
   [StorableClass]
-  public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, IPopulationAnalyzer {
+  public sealed class BestTSPSolutionAnalyzer : SingleSuccessorOperator, ISolutionAnalyzer {
     public LookupParameter<DoubleMatrix> CoordinatesParameter {
       get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
     }
-    public SubScopesLookupParameter<Permutation> PermutationParameter {
-      get { return (SubScopesLookupParameter<Permutation>)Parameters["Permutation"]; }
+    public LookupParameter<Permutation> PermutationParameter {
+      get { return (LookupParameter<Permutation>)Parameters["Permutation"]; }
     }
-    public SubScopesLookupParameter<DoubleValue> QualityParameter {
-      get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    public LookupParameter<DoubleValue> QualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; }
     }
     public LookupParameter<PathTSPTour> BestSolutionParameter {
@@ -56,28 +56,26 @@
       : base() {
       Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
-      Parameters.Add(new SubScopesLookupParameter<Permutation>("Permutation", "The TSP solutions given in path representation from which the best solution should be analyzed."));
-      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the TSP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<Permutation>("Permutation", "The TSP solution given in path representation which should be analyzed."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the TSP solution which should be analyzed."));
       Parameters.Add(new LookupParameter<PathTSPTour>("BestSolution", "The best TSP solution."));
-      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best TSP solution should be stored."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the TSP solution should be stored."));
     }
 
     public override IOperation Apply() {
       DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
-      ItemArray<Permutation> permutations = PermutationParameter.ActualValue;
-      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      Permutation permutation = PermutationParameter.ActualValue;
+      DoubleValue quality = QualityParameter.ActualValue;
       ResultCollection results = ResultsParameter.ActualValue;
-
-      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
 
       PathTSPTour tour = BestSolutionParameter.ActualValue;
       if (tour == null) {
-        tour = new PathTSPTour(coordinates, permutations[i], qualities[i]);
+        tour = new PathTSPTour(coordinates, permutation, quality);
         BestSolutionParameter.ActualValue = tour;
         results.Add(new Result("Best TSP Solution", tour));
       } else {
-        if (tour.Quality.Value > qualities[i].Value) {
+        if (tour.Quality.Value > quality.Value) {
           tour.Coordinates = coordinates;
-          tour.Permutation = permutations[i];
-          tour.Quality = qualities[i];
+          tour.Permutation = permutation;
+          tour.Quality = quality;
           results["Best TSP Solution"].Value = tour;
         }
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/MultiPopulationBestTSPSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/MultiPopulationBestTSPSolutionAnalyzer.cs	(revision 3634)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/MultiPopulationBestTSPSolutionAnalyzer.cs	(revision 3634)
@@ -0,0 +1,101 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.TravelingSalesman {
+  /// <summary>
+  /// An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.
+  /// </summary>
+  [Item("MultiPopulationBestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
+  [StorableClass]
+  public sealed class MultiPopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IMultiPopulationAnalyzer {
+    public LookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public SubScopesSubScopesLookupParameter<Permutation> PermutationParameter {
+      get { return (SubScopesSubScopesLookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public SubScopesSubScopesLookupParameter<DoubleValue> QualityParameter {
+      get { return (SubScopesSubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public LookupParameter<PathTSPTour> BestSolutionParameter {
+      get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public MultiPopulationBestTSPSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
+      Parameters.Add(new SubScopesSubScopesLookupParameter<Permutation>("Permutation", "The TSP solutions given in path representation from which the best solution should be analyzed."));
+      Parameters.Add(new SubScopesSubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the TSP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<PathTSPTour>("BestSolution", "The best TSP solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best TSP solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      ItemArray<ItemArray<Permutation>> permutations = PermutationParameter.ActualValue;
+      ItemArray<ItemArray<DoubleValue>> qualities = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      DoubleValue bestQuality = new DoubleValue(double.MaxValue);
+      Permutation bestPermutation = null;
+
+      for (int i = 0; i < qualities.Length; i++) {
+        for (int j = 0; j < qualities[i].Length; j++) {
+          if (qualities[i][j].Value < bestQuality.Value) {
+            bestQuality = qualities[i][j];
+            bestPermutation = permutations[i][j];
+          }
+        }
+      }
+
+      PathTSPTour tour = BestSolutionParameter.ActualValue;
+      if (tour == null) {
+        tour = new PathTSPTour(coordinates, bestPermutation, bestQuality);
+        BestSolutionParameter.ActualValue = tour;
+        results.Add(new Result("Best TSP Solution", tour));
+      } else {
+        if (tour.Quality.Value > bestQuality.Value) {
+          tour.Coordinates = coordinates;
+          tour.Permutation = bestPermutation;
+          tour.Quality = bestQuality;
+          results["Best TSP Solution"].Value = tour;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/PopulationBestTSPSolutionAnalyzer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/PopulationBestTSPSolutionAnalyzer.cs	(revision 3634)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/Analyzers/PopulationBestTSPSolutionAnalyzer.cs	(revision 3634)
@@ -0,0 +1,89 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.TravelingSalesman {
+  /// <summary>
+  /// An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.
+  /// </summary>
+  [Item("PopulationBestTSPSolutionAnalyzer", "An operator for analyzing the best solution of Traveling Salesman Problems given in path representation using city coordinates.")]
+  [StorableClass]
+  public sealed class PopulationBestTSPSolutionAnalyzer : SingleSuccessorOperator, IPopulationAnalyzer {
+    public LookupParameter<DoubleMatrix> CoordinatesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Coordinates"]; }
+    }
+    public SubScopesLookupParameter<Permutation> PermutationParameter {
+      get { return (SubScopesLookupParameter<Permutation>)Parameters["Permutation"]; }
+    }
+    public SubScopesLookupParameter<DoubleValue> QualityParameter {
+      get { return (SubScopesLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public LookupParameter<PathTSPTour> BestSolutionParameter {
+      get { return (LookupParameter<PathTSPTour>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public PopulationBestTSPSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
+      Parameters.Add(new SubScopesLookupParameter<Permutation>("Permutation", "The TSP solutions given in path representation from which the best solution should be analyzed."));
+      Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the TSP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<PathTSPTour>("BestSolution", "The best TSP solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best TSP solution should be stored."));
+    }
+
+    public override IOperation Apply() {
+      DoubleMatrix coordinates = CoordinatesParameter.ActualValue;
+      ItemArray<Permutation> permutations = PermutationParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;
+
+      PathTSPTour tour = BestSolutionParameter.ActualValue;
+      if (tour == null) {
+        tour = new PathTSPTour(coordinates, permutations[i], qualities[i]);
+        BestSolutionParameter.ActualValue = tour;
+        results.Add(new Result("Best TSP Solution", tour));
+      } else {
+        if (tour.Quality.Value > qualities[i].Value) {
+          tour.Coordinates = coordinates;
+          tour.Permutation = permutations[i];
+          tour.Quality = qualities[i];
+          results["Best TSP Solution"].Value = tour;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 3633)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/HeuristicLab.Problems.TravelingSalesman-3.3.csproj	(revision 3634)
@@ -84,4 +84,6 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Analyzers\MultiPopulationBestTSPSolutionAnalyzer.cs" />
+    <Compile Include="Analyzers\PopulationBestTSPSolutionAnalyzer.cs" />
     <Compile Include="Analyzers\BestTSPSolutionAnalyzer.cs" />
     <Compile Include="Evaluators\TSPEuclideanPathEvaluator.cs" />
