Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 6657)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs	(revision 6657)
@@ -0,0 +1,126 @@
+﻿#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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  /// <summary>
+  /// An operator for analyzing the best solution of Generalized Quadratic Assignment Problems.
+  /// </summary>
+  [Item("Best GeneralizedQAP Solution Analyzer", "An operator for analyzing the best solution of Generalized Quadratic Assignment Problems.")]
+  [StorableClass]
+  public sealed class BestGQAPSolutionAnalyzer : SingleSuccessorOperator, IAnalyzer {
+    public LookupParameter<BoolValue> MaximizationParameter {
+      get { return (LookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    public LookupParameter<DoubleMatrix> DistancesParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Distances"]; }
+    }
+    public LookupParameter<DoubleMatrix> WeightsParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Weights"]; }
+    }
+    public ScopeTreeLookupParameter<IntegerVector> AssignmentParameter {
+      get { return (ScopeTreeLookupParameter<IntegerVector>)Parameters["Assignment"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public LookupParameter<GQAPAssignment> BestSolutionParameter {
+      get { return (LookupParameter<GQAPAssignment>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+    public LookupParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    public LookupParameter<IntegerVector> BestKnownSolutionParameter {
+      get { return (LookupParameter<IntegerVector>)Parameters["BestKnownSolution"]; }
+    }
+
+    [StorableConstructor]
+    private BestGQAPSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    private BestGQAPSolutionAnalyzer(BestGQAPSolutionAnalyzer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestGQAPSolutionAnalyzer(this, cloner);
+    }
+    public BestGQAPSolutionAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Distances", "The distances between the locations."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Weights", "The weights between the facilities."));
+      Parameters.Add(new ScopeTreeLookupParameter<IntegerVector>("Assignment", "The GQAP solutions from which the best solution should be analyzed."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the GQAP solutions which should be analyzed."));
+      Parameters.Add(new LookupParameter<GQAPAssignment>("BestSolution", "The best GQAP solution."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best GQAP solution should be stored."));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this GQAP instance."));
+      Parameters.Add(new LookupParameter<IntegerVector>("BestKnownSolution", "The best known solution of this GQAP instance."));
+    }
+
+    public override IOperation Apply() {
+      DoubleMatrix distances = DistancesParameter.ActualValue;
+      DoubleMatrix weights = WeightsParameter.ActualValue;
+      ItemArray<IntegerVector> assignments = AssignmentParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+      bool max = MaximizationParameter.ActualValue.Value;
+      DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue;
+
+      var sorted = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).ToArray();
+      if (max) sorted = sorted.Reverse().ToArray();
+      int i = sorted.First().index;
+
+      if (bestKnownQuality == null
+          || max && qualities[i].Value > bestKnownQuality.Value
+          || !max && qualities[i].Value < bestKnownQuality.Value) {
+        // if there isn't a best-known quality or we improved the best-known quality we'll add the current solution as best-known
+        BestKnownQualityParameter.ActualValue = new DoubleValue(qualities[i].Value);
+        BestKnownSolutionParameter.ActualValue = (IntegerVector)assignments[i].Clone();
+      }
+
+      GQAPAssignment assignment = BestSolutionParameter.ActualValue;
+      if (assignment == null) {
+        assignment = new GQAPAssignment(weights, (IntegerVector)assignments[i].Clone(), new DoubleValue(qualities[i].Value));
+        assignment.Distances = distances;
+        BestSolutionParameter.ActualValue = assignment;
+        results.Add(new Result("Best GQAP Solution", assignment));
+      } else {
+        if (max && assignment.Quality.Value < qualities[i].Value ||
+          !max && assignment.Quality.Value > qualities[i].Value) {
+          assignment.Distances = distances;
+          assignment.Weights = weights;
+          assignment.Assignment = (IntegerVector)assignments[i].Clone();
+          assignment.Quality.Value = qualities[i].Value;
+        }
+      }
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 6657)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GQAPAssignment.cs	(revision 6657)
@@ -0,0 +1,106 @@
+﻿#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.ComponentModel;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
+  [Item("Generalized QAP Assignment", "Represents a solution to the generalized QAP.")]
+  [StorableClass]
+  public sealed class GQAPAssignment : Item, INotifyPropertyChanged {
+
+    [Storable]
+    private DoubleMatrix distances;
+    public DoubleMatrix Distances {
+      get { return distances; }
+      set {
+        bool changed = (distances != value);
+        distances = value;
+        if (changed) OnPropertyChanged("Distances");
+      }
+    }
+
+    [Storable]
+    private DoubleMatrix weights;
+    public DoubleMatrix Weights {
+      get { return weights; }
+      set {
+        bool changed = (weights != value);
+        weights = value;
+        if (changed) OnPropertyChanged("Weights");
+      }
+    }
+
+    [Storable]
+    private IntegerVector assignment;
+    public IntegerVector Assignment {
+      get { return assignment; }
+      set {
+        bool changed = (assignment != value);
+        assignment = value;
+        if (changed) OnPropertyChanged("Assignment");
+      }
+    }
+
+    [Storable]
+    private DoubleValue quality;
+    public DoubleValue Quality {
+      get { return quality; }
+      set {
+        bool changed = (quality != value);
+        quality = value;
+        if (changed) OnPropertyChanged("Quality");
+      }
+    }
+
+    [StorableConstructor]
+    private GQAPAssignment(bool deserializing) : base(deserializing) { }
+    private GQAPAssignment(GQAPAssignment original, Cloner cloner)
+      : base(original, cloner) {
+      distances = cloner.Clone(original.distances);
+      weights = cloner.Clone(original.weights);
+      assignment = cloner.Clone(original.assignment);
+      quality = cloner.Clone(original.quality);
+    }
+    public GQAPAssignment(DoubleMatrix weights, IntegerVector assignment) {
+      this.weights = weights;
+      this.assignment = assignment;
+    }
+    public GQAPAssignment(DoubleMatrix weights, IntegerVector assignment, DoubleValue quality)
+      : this(weights, assignment) {
+      this.quality = quality;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new GQAPAssignment(this, cloner);
+    }
+
+    public event PropertyChangedEventHandler PropertyChanged;
+    private void OnPropertyChanged(string propertyName) {
+      var handler = PropertyChanged;
+      if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
+    }
+  }
+}
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 6651)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/GeneralizedQuadraticAssignmentProblem.cs	(revision 6657)
@@ -21,4 +21,5 @@
 
 using System.Drawing;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -28,4 +29,5 @@
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
 
 namespace HeuristicLab.Problems.GeneralizedQuadraticAssignment {
@@ -91,8 +93,16 @@
     #endregion
 
+    [Storable]
+    private BestGQAPSolutionAnalyzer bestSolutionAnalyzer;
+    public BestGQAPSolutionAnalyzer BestSolutionAnalyzer {
+      get { return bestSolutionAnalyzer; }
+      set { bestSolutionAnalyzer = value; }
+    }
+
     [StorableConstructor]
     private GeneralizedQuadraticAssignmentProblem(bool deserializing) : base(deserializing) { }
     private GeneralizedQuadraticAssignmentProblem(GeneralizedQuadraticAssignmentProblem original, Cloner cloner)
       : base(original, cloner) {
+      bestSolutionAnalyzer = cloner.Clone(original.bestSolutionAnalyzer);
       AttachEventHandlers();
     }
@@ -107,5 +117,25 @@
       Parameters.Add(new OptionalValueParameter<IItem>("BestKnownSolution", "The best known solution (if available)", null));
 
-      Wei
+      Weights = new DoubleMatrix(5, 5);
+      Weights[0, 0] = Weights[1, 1] = Weights[2, 2] = Weights[3, 3] = Weights[4, 4] = 0;
+      Weights[0, 1] = Weights[1, 0] = Weights[0, 2] = Weights[2, 0] = Weights[0, 3] = Weights[3, 0] = Weights[0, 4] = Weights[4, 0] = 10;
+      Weights[1, 2] = Weights[2, 1] = Weights[1, 3] = Weights[3, 1] = Weights[1, 4] = Weights[4, 1] = 5;
+      Weights[2, 3] = Weights[3, 2] = Weights[2, 4] = Weights[4, 2] = 7.5;
+      Weights[3, 4] = Weights[4, 3] = 2.5;
+
+      Distances = new DoubleMatrix(3, 3);
+      Distances[0, 0] = Distances[1, 1] = Distances[2, 2] = 0;
+      Distances[0, 1] = Distances[1, 0] = Distances[1, 2] = Distances[2, 1] = 1;
+      Distances[0, 2] = Distances[2, 0] = 2;
+
+      InstallationCosts = new DoubleMatrix(3, 3);
+
+      TransportationCosts = new DoubleValue(1);
+
+      Demands = new DoubleArray(5);
+      Demands[0] = 2; Demands[1] = 1; Demands[2] = 3; Demands[3] = 1; Demands[4] = 1;
+
+      Capacities = new DoubleArray(3);
+      Capacities[0] = 4; Capacities[1] = 1; Capacities[2] = 4;
 
       ParameterizeSolutionCreator();
@@ -135,12 +165,44 @@
 
     private void InitializeOperators() {
-      // TODO: Add custom problem analyzer to the list
-      // TODO: Add operators from the representation either by direct instantiation, or by using ApplicationManager.Manger.GetInstances<T>().Cast<IOperator>()
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<IIntegerVectorOperator>());
+      Operators.RemoveAll(x => x is ISingleObjectiveMoveEvaluator);
+      Operators.Add(new BestGQAPSolutionAnalyzer());
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    private void ParameterizeAnalyzers() {
+      if (BestSolutionAnalyzer != null) {
+        BestSolutionAnalyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        BestSolutionAnalyzer.DistancesParameter.ActualName = DistancesParameter.Name;
+        BestSolutionAnalyzer.WeightsParameter.ActualName = WeightsParameter.Name;
+        BestSolutionAnalyzer.AssignmentParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        BestSolutionAnalyzer.ResultsParameter.ActualName = "Results";
+        BestSolutionAnalyzer.BestKnownQualityParameter.ActualName = BestKnownQualityParameter.Name;
+        BestSolutionAnalyzer.MaximizationParameter.ActualName = MaximizationParameter.Name;
+      }
+    }
+    private void ParameterizeOperators() {
+      foreach (IIntegerVectorCrossover op in Operators.OfType<IIntegerVectorCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
+      foreach (IIntegerVectorManipulator op in Operators.OfType<IIntegerVectorManipulator>()) {
+        op.IntegerVectorParameter.ActualName = SolutionCreator.IntegerVectorParameter.ActualName;
+      }
     }
     private void ParameterizeSolutionCreator() {
-      // TODO: Set the parameters of the solution creator
+      SolutionCreator.LengthParameter.Value = new IntValue(Demands.Length);
+      SolutionCreator.MinimumParameter.Value = new IntValue(0);
+      SolutionCreator.MaximumParameter.Value = new IntValue(Capacities.Length);
+      SolutionCreator.IntegerVectorParameter.ActualName = "Assignment";
     }
     private void ParameterizeEvaluator() {
-      // TODO: Set the parameters of the evaluator
+      Evaluator.WeightsParameter.ActualName = WeightsParameter.Name;
+      Evaluator.DistancesParameter.ActualName = DistancesParameter.Name;
+      Evaluator.InstallationCostsParameter.ActualName = InstallationCostsParameter.Name;
+      Evaluator.TransportationCostsParameter.ActualName = TransportationCostsParameter.Name;
+      Evaluator.DemandsParameter.ActualName = DemandsParameter.Name;
+      Evaluator.CapacitiesParameter.ActualName = CapacitiesParameter.Name;
+      Evaluator.AssignmentParameter.ActualName = "Assignment";
     }
     #endregion
Index: branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs
===================================================================
--- branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs	(revision 6651)
+++ branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Interfaces/IGQAPEvaluator.cs	(revision 6657)
@@ -22,4 +22,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
 using HeuristicLab.Optimization;
 
@@ -32,4 +33,5 @@
     ILookupParameter<DoubleArray> DemandsParameter { get; }
     ILookupParameter<DoubleArray> CapacitiesParameter { get; }
+    ILookupParameter<IntegerVector> AssignmentParameter { get; }
   }
 }
