Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Algorithm.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Algorithm.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Algorithm.cs	(revision 5123)
@@ -0,0 +1,312 @@
+#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.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A base class for algorithms.
+  /// </summary>
+  [Item("Algorithm", "A base class for algorithms.")]
+  [StorableClass]
+  public abstract class Algorithm : ParameterizedNamedItem, IAlgorithm {
+    public override Image ItemImage {
+      get {
+        if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
+        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePaused;
+        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+        else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event;
+      }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get { return executionTime; }
+      protected set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
+    }
+
+    public virtual Type ProblemType {
+      get { return typeof(IProblem); }
+    }
+
+    [Storable]
+    private IProblem problem;
+    public IProblem Problem {
+      get { return problem; }
+      set {
+        if (problem != value) {
+          if ((value != null) && !ProblemType.IsInstanceOfType(value)) throw new ArgumentException("Invalid problem type.");
+          if (problem != null) DeregisterProblemEvents();
+          problem = value;
+          if (problem != null) RegisterProblemEvents();
+          OnProblemChanged();
+          Prepare();
+        }
+      }
+    }
+
+    public abstract ResultCollection Results { get; }
+
+    [Storable]
+    private bool storeAlgorithmInEachRun;
+    public bool StoreAlgorithmInEachRun {
+      get { return storeAlgorithmInEachRun; }
+      set {
+        if (storeAlgorithmInEachRun != value) {
+          storeAlgorithmInEachRun = value;
+          OnStoreAlgorithmInEachRunChanged();
+        }
+      }
+    }
+
+    [Storable]
+    protected int runsCounter;
+
+    [Storable]
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+      protected set {
+        if (value == null) throw new ArgumentNullException();
+        if (runs != value) {
+          if (runs != null) DeregisterRunsEvents();
+          runs = value;
+          if (runs != null) RegisterRunsEvents();
+        }
+      }
+    }
+
+    protected Algorithm()
+      : base() {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = true;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name)
+      : base(name) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = true;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, ParameterCollection parameters)
+      : base(name, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = true;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, string description)
+      : base(name, description) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = true;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, string description, ParameterCollection parameters)
+      : base(name, description, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = true;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    [StorableConstructor]
+    protected Algorithm(bool deserializing)
+      : base(deserializing) {
+      storeAlgorithmInEachRun = true;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    protected Algorithm(Algorithm original, Cloner cloner)
+      : base(original, cloner) {
+      if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
+      executionState = original.executionState;
+      executionTime = original.executionTime;
+      problem = cloner.Clone(original.problem);
+      storeAlgorithmInEachRun = original.storeAlgorithmInEachRun;
+      runsCounter = original.runsCounter;
+      runs = cloner.Clone(original.runs);
+      Initialize();
+    }
+
+    private void Initialize() {
+      if (problem != null) RegisterProblemEvents();
+      if (runs != null) RegisterRunsEvents();
+    }
+
+    public virtual void Prepare() {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused) && (ExecutionState != ExecutionState.Stopped))
+        throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
+    }
+    public void Prepare(bool clearRuns) {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused) && (ExecutionState != ExecutionState.Stopped))
+        throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
+      if (clearRuns) runs.Clear();
+      Prepare();
+    }
+    public virtual void Start() {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
+    }
+    public virtual void Pause() {
+      if (ExecutionState != ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
+    }
+    public virtual void Stop() {
+      if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
+    }
+
+    public override void CollectParameterValues(IDictionary<string, IItem> values) {
+      base.CollectParameterValues(values);
+      values.Add("Algorithm Name", new StringValue(Name));
+      values.Add("Algorithm Type", new StringValue(this.GetType().GetPrettyName()));
+      if (Problem != null) {
+        Problem.CollectParameterValues(values);
+        values.Add("Problem Name", new StringValue(Problem.Name));
+        values.Add("Problem Type", new StringValue(Problem.GetType().GetPrettyName()));
+      }
+    }
+    public virtual void CollectResultValues(IDictionary<string, IItem> values) {
+      values.Add("Execution Time", new TimeSpanValue(ExecutionTime));
+      foreach (IResult result in Results)
+        values.Add(result.Name, result.Value);
+    }
+
+    #region Events
+    public event EventHandler ExecutionStateChanged;
+    protected virtual void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    protected virtual void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ProblemChanged;
+    protected virtual void OnProblemChanged() {
+      EventHandler handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler StoreAlgorithmInEachRunChanged;
+    protected virtual void OnStoreAlgorithmInEachRunChanged() {
+      EventHandler handler = StoreAlgorithmInEachRunChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    protected virtual void OnPrepared() {
+      ExecutionTime = TimeSpan.Zero;
+      ExecutionState = ExecutionState.Prepared;
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    protected virtual void OnStarted() {
+      ExecutionState = ExecutionState.Started;
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    protected virtual void OnPaused() {
+      ExecutionState = ExecutionState.Paused;
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    protected virtual void OnStopped() {
+      ExecutionState = ExecutionState.Stopped;
+      runsCounter++;
+      runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this));
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    protected virtual void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+
+    protected virtual void DeregisterProblemEvents() {
+      problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
+      problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
+      problem.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
+      problem.Reset -= new EventHandler(Problem_Reset);
+    }
+    protected virtual void RegisterProblemEvents() {
+      problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
+      problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
+      problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
+      problem.Reset += new EventHandler(Problem_Reset);
+    }
+    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
+    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
+    protected virtual void Problem_OperatorsChanged(object sender, EventArgs e) { }
+    protected virtual void Problem_Reset(object sender, EventArgs e) {
+      Prepare();
+    }
+
+    protected virtual void DeregisterRunsEvents() {
+      runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+    }
+    protected virtual void RegisterRunsEvents() {
+      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+    }
+    protected virtual void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      runsCounter = runs.Count;
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/BatchRun.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/BatchRun.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/BatchRun.cs	(revision 5123)
@@ -0,0 +1,384 @@
+#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.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A run in which an algorithm is executed a given number of times.
+  /// </summary>
+  [Item("Batch Run", "A run in which an algorithm is executed a given number of times.")]
+  [Creatable("Testing & Analysis")]
+  [StorableClass]
+  public sealed class BatchRun : NamedItem, IOptimizer, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get {
+        if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
+        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePaused;
+        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+        else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event;
+      }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get {
+        if ((Algorithm != null) && (Algorithm.ExecutionState != ExecutionState.Stopped))
+          return executionTime + Algorithm.ExecutionTime;
+        else
+          return executionTime;
+      }
+      private set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
+    }
+
+    [Storable]
+    private IAlgorithm algorithm;
+    public IAlgorithm Algorithm {
+      get { return algorithm; }
+      set {
+        if (algorithm != value) {
+          if (algorithm != null) {
+            DeregisterAlgorithmEvents();
+            IEnumerable<IRun> runs = algorithm.Runs;
+            algorithm = null; //necessary to avoid removing the runs from the old algorithm
+            Runs.RemoveRange(runs);
+          }
+          algorithm = value;
+          if (algorithm != null) {
+            RegisterAlgorithmEvents();
+            Runs.AddRange(algorithm.Runs);
+          }
+          OnAlgorithmChanged();
+          Prepare();
+        }
+      }
+    }
+
+    [Storable]
+    private int repetitions;
+    public int Repetitions {
+      get { return repetitions; }
+      set {
+        if (repetitions != value) {
+          repetitions = value;
+          OnRepetitionsChanged();
+          if ((Algorithm != null) && (Algorithm.ExecutionState == ExecutionState.Stopped))
+            Prepare();
+        }
+      }
+    }
+    [Storable]
+    private int repetitionsCounter;
+
+    [Storable]
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+      private set {
+        if (value == null) throw new ArgumentNullException();
+        if (runs != value) {
+          if (runs != null) DeregisterRunsEvents();
+          runs = value;
+          if (runs != null) RegisterRunsEvents();
+        }
+      }
+    }
+
+    private bool stopPending;
+
+    public BatchRun()
+      : base() {
+      name = ItemName;
+      description = ItemDescription;
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      repetitions = 10;
+      repetitionsCounter = 0;
+      Runs = new RunCollection();
+      stopPending = false;
+    }
+    public BatchRun(string name)
+      : base(name) {
+      description = ItemDescription;
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      repetitions = 10;
+      repetitionsCounter = 0;
+      Runs = new RunCollection();
+      stopPending = false;
+    }
+    public BatchRun(string name, string description)
+      : base(name, description) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      repetitions = 10;
+      repetitionsCounter = 0;
+      Runs = new RunCollection();
+      stopPending = false;
+    }
+    [StorableConstructor]
+    private BatchRun(bool deserializing)
+      : base(deserializing) {
+      stopPending = false;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    private BatchRun(BatchRun original, Cloner cloner)
+      : base(original, cloner) {
+      executionState = original.executionState;
+      executionTime = original.executionTime;
+      algorithm = cloner.Clone(original.algorithm);
+      repetitions = original.repetitions;
+      repetitionsCounter = original.repetitionsCounter;
+      runs = cloner.Clone(original.runs);
+      stopPending = original.stopPending;
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
+      return new BatchRun(this, cloner);
+    }
+
+    private void Initialize() {
+      if (algorithm != null) RegisterAlgorithmEvents();
+      if (runs != null) RegisterRunsEvents();
+    }
+
+    public void Prepare() {
+      Prepare(false);
+    }
+    public void Prepare(bool clearRuns) {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused) && (ExecutionState != ExecutionState.Stopped))
+        throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
+      if (Algorithm != null) {
+        repetitionsCounter = 0;
+        if (clearRuns) runs.Clear();
+        Algorithm.Prepare(clearRuns);
+      }
+    }
+    public void Start() {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
+      if (Algorithm != null) Algorithm.Start();
+    }
+    public void Pause() {
+      if (ExecutionState != ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
+      if ((Algorithm != null) && (Algorithm.ExecutionState == ExecutionState.Started))
+        Algorithm.Pause();
+    }
+    public void Stop() {
+      if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
+      stopPending = true;
+      if ((Algorithm != null) &&
+          ((Algorithm.ExecutionState == ExecutionState.Started) || (Algorithm.ExecutionState == ExecutionState.Paused)))
+        Algorithm.Stop();
+    }
+
+    #region Events
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler AlgorithmChanged;
+    private void OnAlgorithmChanged() {
+      EventHandler handler = AlgorithmChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler RepetitionsChanged;
+    private void OnRepetitionsChanged() {
+      EventHandler handler = RepetitionsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      ExecutionState = ExecutionState.Prepared;
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      ExecutionState = ExecutionState.Started;
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      ExecutionState = ExecutionState.Paused;
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      ExecutionState = ExecutionState.Stopped;
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    private void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+
+    private void RegisterAlgorithmEvents() {
+      algorithm.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
+      algorithm.ExecutionTimeChanged += new EventHandler(Algorithm_ExecutionTimeChanged);
+      algorithm.Paused += new EventHandler(Algorithm_Paused);
+      algorithm.Prepared += new EventHandler(Algorithm_Prepared);
+      algorithm.Started += new EventHandler(Algorithm_Started);
+      algorithm.Stopped += new EventHandler(Algorithm_Stopped);
+      algorithm.Runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_CollectionReset);
+      algorithm.Runs.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_ItemsAdded);
+      algorithm.Runs.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_ItemsRemoved);
+    }
+    private void DeregisterAlgorithmEvents() {
+      algorithm.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Algorithm_ExceptionOccurred);
+      algorithm.ExecutionTimeChanged -= new EventHandler(Algorithm_ExecutionTimeChanged);
+      algorithm.Paused -= new EventHandler(Algorithm_Paused);
+      algorithm.Prepared -= new EventHandler(Algorithm_Prepared);
+      algorithm.Started -= new EventHandler(Algorithm_Started);
+      algorithm.Stopped -= new EventHandler(Algorithm_Stopped);
+      algorithm.Runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_CollectionReset);
+      algorithm.Runs.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_ItemsAdded);
+      algorithm.Runs.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Algorithm_Runs_ItemsRemoved);
+    }
+    private void Algorithm_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+    private void Algorithm_ExecutionTimeChanged(object sender, EventArgs e) {
+      OnExecutionTimeChanged();
+    }
+    private void Algorithm_Paused(object sender, EventArgs e) {
+      OnPaused();
+    }
+    private void Algorithm_Prepared(object sender, EventArgs e) {
+      if ((ExecutionState == ExecutionState.Paused) || (ExecutionState == ExecutionState.Stopped))
+        OnPrepared();
+    }
+    private void Algorithm_Started(object sender, EventArgs e) {
+      stopPending = false;
+      if (ExecutionState != ExecutionState.Started)
+        OnStarted();
+    }
+    private void Algorithm_Stopped(object sender, EventArgs e) {
+      repetitionsCounter++;
+
+      if (!stopPending && (repetitionsCounter < repetitions)) {
+        Algorithm.Prepare();
+        Algorithm.Start();
+      } else {
+        OnStopped();
+      }
+    }
+    private void Algorithm_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.RemoveRange(e.OldItems);
+      Runs.AddRange(e.Items);
+    }
+    private void Algorithm_Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.AddRange(e.Items);
+    }
+    private void Algorithm_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.RemoveRange(e.Items);
+    }
+
+    private void RegisterRunsEvents() {
+      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+      runs.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsAdded);
+      runs.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
+    }
+
+    private void DeregisterRunsEvents() {
+      runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+      runs.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsAdded);
+      runs.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
+    }
+    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      foreach (IRun run in e.OldItems) {
+        IItem item;
+        run.Results.TryGetValue("Execution Time", out item);
+        TimeSpanValue executionTime = item as TimeSpanValue;
+        if (executionTime != null) ExecutionTime -= executionTime.Value;
+      }
+      if (Algorithm != null) Algorithm.Runs.RemoveRange(e.OldItems);
+      foreach (IRun run in e.Items) {
+        IItem item;
+        run.Results.TryGetValue("Execution Time", out item);
+        TimeSpanValue executionTime = item as TimeSpanValue;
+        if (executionTime != null) ExecutionTime += executionTime.Value;
+      }
+    }
+    private void Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      foreach (IRun run in e.Items) {
+        IItem item;
+        run.Results.TryGetValue("Execution Time", out item);
+        TimeSpanValue executionTime = item as TimeSpanValue;
+        if (executionTime != null) ExecutionTime += executionTime.Value;
+      }
+    }
+    private void Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      foreach (IRun run in e.Items) {
+        IItem item;
+        run.Results.TryGetValue("Execution Time", out item);
+        TimeSpanValue executionTime = item as TimeSpanValue;
+        if (executionTime != null) ExecutionTime -= executionTime.Value;
+      }
+      if (Algorithm != null) Algorithm.Runs.RemoveRange(e.Items);
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs	(revision 5123)
@@ -0,0 +1,222 @@
+#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.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A base class for algorithms which use an engine for execution.
+  /// </summary>
+  [Item("EngineAlgorithm", "A base class for algorithms which use an engine for execution.")]
+  [StorableClass]
+  public abstract class EngineAlgorithm : Algorithm {
+    [Storable]
+    private OperatorGraph operatorGraph;
+    public OperatorGraph OperatorGraph {
+      get { return operatorGraph; }
+      protected set {
+        if (value == null) throw new ArgumentNullException();
+        if (value != operatorGraph) {
+          operatorGraph.InitialOperatorChanged -= new EventHandler(OperatorGraph_InitialOperatorChanged);
+          operatorGraph = value;
+          operatorGraph.InitialOperatorChanged += new EventHandler(OperatorGraph_InitialOperatorChanged);
+          OnOperatorGraphChanged();
+          Prepare();
+        }
+      }
+    }
+
+    [Storable]
+    private IScope globalScope;
+    protected IScope GlobalScope {
+      get { return globalScope; }
+    }
+
+    [Storable]
+    private IEngine engine;
+    public IEngine Engine {
+      get { return engine; }
+      set {
+        if (engine != value) {
+          if (engine != null) DeregisterEngineEvents();
+          engine = value;
+          if (engine != null) RegisterEngineEvents();
+          OnEngineChanged();
+          Prepare();
+        }
+      }
+    }
+
+    public override ResultCollection Results {
+      get {
+        return (ResultCollection)globalScope.Variables["Results"].Value;
+      }
+    }
+
+    protected EngineAlgorithm()
+      : base() {
+      globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+      operatorGraph = new OperatorGraph();
+      Initialize();
+    }
+    protected EngineAlgorithm(string name)
+      : base(name) {
+      globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+      operatorGraph = new OperatorGraph();
+      Initialize();
+    }
+    protected EngineAlgorithm(string name, ParameterCollection parameters)
+      : base(name, parameters) {
+      globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+      operatorGraph = new OperatorGraph();
+      Initialize();
+    }
+    protected EngineAlgorithm(string name, string description)
+      : base(name, description) {
+      globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+      operatorGraph = new OperatorGraph();
+      Initialize();
+    }
+    protected EngineAlgorithm(string name, string description, ParameterCollection parameters)
+      : base(name, description, parameters) {
+      globalScope = new Scope("Global Scope");
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+      operatorGraph = new OperatorGraph();
+      Initialize();
+    }
+    [StorableConstructor]
+    protected EngineAlgorithm(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    protected EngineAlgorithm(EngineAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+      globalScope = cloner.Clone(original.globalScope);
+      engine = cloner.Clone(original.engine);
+      operatorGraph = cloner.Clone(original.operatorGraph);
+      Initialize();
+    }
+
+    private void Initialize() {
+      operatorGraph.InitialOperatorChanged += new EventHandler(OperatorGraph_InitialOperatorChanged);
+      if (engine == null) {
+        var types = ApplicationManager.Manager.GetTypes(typeof(IEngine));
+        Type t = types.FirstOrDefault(x => x.Name.Equals("SequentialEngine"));
+        if (t == null) t = types.FirstOrDefault();
+        if (t != null) engine = (IEngine)Activator.CreateInstance(t);
+      }
+      if (engine != null) RegisterEngineEvents();
+    }
+
+    public virtual IAlgorithm CreateUserDefinedAlgorithm() {
+      return new UserDefinedAlgorithm(this, new Cloner());
+    }
+
+    public override void Prepare() {
+      base.Prepare();
+      globalScope.Clear();
+      globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
+
+      if ((engine != null) && (operatorGraph.InitialOperator != null)) {
+        ExecutionContext context = null;
+        if (Problem != null) context = new ExecutionContext(context, Problem, globalScope);
+        context = new ExecutionContext(context, this, globalScope);
+        context = new ExecutionContext(context, operatorGraph.InitialOperator, globalScope);
+        engine.Prepare(context);
+      }
+    }
+    public override void Start() {
+      base.Start();
+      if (engine != null) engine.Start();
+    }
+    public override void Pause() {
+      base.Pause();
+      if (engine != null) engine.Pause();
+    }
+    public override void Stop() {
+      base.Stop();
+      if (engine != null) engine.Stop();
+    }
+
+    #region Events
+    public event EventHandler EngineChanged;
+    protected virtual void OnEngineChanged() {
+      EventHandler handler = EngineChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler OperatorGraphChanged;
+    protected virtual void OnOperatorGraphChanged() {
+      EventHandler handler = OperatorGraphChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    private void RegisterEngineEvents() {
+      Engine.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
+      Engine.ExecutionTimeChanged += new EventHandler(Engine_ExecutionTimeChanged);
+      Engine.Paused += new EventHandler(Engine_Paused);
+      Engine.Prepared += new EventHandler(Engine_Prepared);
+      Engine.Started += new EventHandler(Engine_Started);
+      Engine.Stopped += new EventHandler(Engine_Stopped);
+    }
+    private void DeregisterEngineEvents() {
+      Engine.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Engine_ExceptionOccurred);
+      Engine.ExecutionTimeChanged -= new EventHandler(Engine_ExecutionTimeChanged);
+      Engine.Paused -= new EventHandler(Engine_Paused);
+      Engine.Prepared -= new EventHandler(Engine_Prepared);
+      Engine.Started -= new EventHandler(Engine_Started);
+      Engine.Stopped -= new EventHandler(Engine_Stopped);
+    }
+    private void Engine_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+    private void Engine_ExecutionTimeChanged(object sender, EventArgs e) {
+      ExecutionTime = Engine.ExecutionTime;
+    }
+    private void Engine_Paused(object sender, EventArgs e) {
+      OnPaused();
+    }
+    private void Engine_Prepared(object sender, EventArgs e) {
+      OnPrepared();
+    }
+    private void Engine_Started(object sender, EventArgs e) {
+      OnStarted();
+    }
+    private void Engine_Stopped(object sender, EventArgs e) {
+      OnStopped();
+    }
+
+    private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
+      Prepare();
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Experiment.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Experiment.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Experiment.cs	(revision 5123)
@@ -0,0 +1,360 @@
+#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.Drawing;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An experiment which contains multiple batch runs of algorithms.
+  /// </summary>
+  [Item("Experiment", "An experiment which contains multiple batch runs of algorithms.")]
+  [Creatable("Testing & Analysis")]
+  [StorableClass]
+  public sealed class Experiment : NamedItem, IOptimizer, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get {
+        if (ExecutionState == ExecutionState.Prepared) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePrepared;
+        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStarted;
+        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutablePaused;
+        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VS2008ImageLibrary.ExecutableStopped;
+        else return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event;
+      }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get { return executionTime; }
+      private set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
+    }
+
+    [Storable]
+    private OptimizerList optimizers;
+    public OptimizerList Optimizers {
+      get { return optimizers; }
+    }
+
+    [Storable]
+    private RunCollection runs;
+    public RunCollection Runs {
+      get { return runs; }
+      private set {
+        if (value == null) throw new ArgumentNullException();
+        if (runs != value) {
+          if (runs != null) DeregisterRunsEvents();
+          runs = value;
+          if (runs != null) RegisterRunsEvents();
+        }
+      }
+    }
+
+    private bool stopPending;
+
+    public Experiment()
+      : base() {
+      name = ItemName;
+      description = ItemDescription;
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      optimizers = new OptimizerList();
+      Runs = new RunCollection();
+      stopPending = false;
+      Initialize();
+    }
+    public Experiment(string name)
+      : base(name) {
+      description = ItemDescription;
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      optimizers = new OptimizerList();
+      Runs = new RunCollection();
+      stopPending = false;
+      Initialize();
+    }
+    public Experiment(string name, string description)
+      : base(name, description) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      optimizers = new OptimizerList();
+      Runs = new RunCollection();
+      stopPending = false;
+      Initialize();
+    }
+    [StorableConstructor]
+    private Experiment(bool deserializing)
+      : base(deserializing) {
+      stopPending = false;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+    private Experiment(Experiment original, Cloner cloner)
+      : base(original, cloner) {
+      executionState = original.executionState;
+      executionTime = original.executionTime;
+      optimizers = cloner.Clone(original.optimizers);
+      runs = cloner.Clone(original.runs);
+      stopPending = original.stopPending;
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
+      return new Experiment(this, cloner);
+    }
+
+    private void Initialize() {
+      RegisterOptimizersEvents();
+      foreach (IOptimizer optimizer in optimizers)
+        RegisterOptimizerEvents(optimizer);
+      if (runs != null) RegisterRunsEvents();
+    }
+
+    public void Prepare() {
+      Prepare(false);
+    }
+    public void Prepare(bool clearRuns) {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused) && (ExecutionState != ExecutionState.Stopped))
+        throw new InvalidOperationException(string.Format("Prepare not allowed in execution state \"{0}\".", ExecutionState));
+      if (Optimizers.Count > 0) {
+        if (clearRuns) runs.Clear();
+        foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState != ExecutionState.Started))
+          optimizer.Prepare(clearRuns);
+      }
+    }
+    public void Start() {
+      if ((ExecutionState != ExecutionState.Prepared) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Start not allowed in execution state \"{0}\".", ExecutionState));
+      stopPending = false;
+      if (Optimizers.Count > 0) {
+        IOptimizer optimizer = Optimizers.FirstOrDefault(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused));
+        if (optimizer != null) optimizer.Start();
+      }
+    }
+    public void Pause() {
+      if (ExecutionState != ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
+      if (Optimizers.Count > 0) {
+        foreach (IOptimizer optimizer in Optimizers.Where(x => x.ExecutionState == ExecutionState.Started))
+          optimizer.Pause();
+      }
+    }
+    public void Stop() {
+      if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
+      stopPending = true;
+      if (Optimizers.Count > 0) {
+        foreach (IOptimizer optimizer in Optimizers.Where(x => (x.ExecutionState == ExecutionState.Started) || (x.ExecutionState == ExecutionState.Paused)))
+          optimizer.Stop();
+      }
+    }
+
+    #region Events
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      ExecutionState = ExecutionState.Prepared;
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      ExecutionState = ExecutionState.Started;
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      ExecutionState = ExecutionState.Paused;
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      ExecutionState = ExecutionState.Stopped;
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+    private void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+
+    private void RegisterOptimizersEvents() {
+      Optimizers.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_CollectionReset);
+      Optimizers.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsAdded);
+      Optimizers.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsRemoved);
+      Optimizers.ItemsReplaced += new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsReplaced);
+    }
+    private void DeregisterOptimizersEvents() {
+      Optimizers.CollectionReset -= new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_CollectionReset);
+      Optimizers.ItemsAdded -= new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsAdded);
+      Optimizers.ItemsRemoved -= new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsRemoved);
+      Optimizers.ItemsReplaced -= new CollectionItemsChangedEventHandler<IndexedItem<IOptimizer>>(Optimizers_ItemsReplaced);
+    }
+    private void Optimizers_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<IOptimizer>> e) {
+      foreach (IndexedItem<IOptimizer> item in e.OldItems)
+        RemoveOptimizer(item.Value);
+      foreach (IndexedItem<IOptimizer> item in e.Items)
+        AddOptimizer(item.Value);
+    }
+    private void Optimizers_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IOptimizer>> e) {
+      foreach (IndexedItem<IOptimizer> item in e.Items)
+        AddOptimizer(item.Value);
+    }
+    private void Optimizers_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IOptimizer>> e) {
+      foreach (IndexedItem<IOptimizer> item in e.Items)
+        RemoveOptimizer(item.Value);
+    }
+    private void Optimizers_ItemsReplaced(object sender, CollectionItemsChangedEventArgs<IndexedItem<IOptimizer>> e) {
+      foreach (IndexedItem<IOptimizer> item in e.OldItems)
+        RemoveOptimizer(item.Value);
+      foreach (IndexedItem<IOptimizer> item in e.Items)
+        AddOptimizer(item.Value);
+    }
+    private void AddOptimizer(IOptimizer optimizer) {
+      RegisterOptimizerEvents(optimizer);
+      Runs.AddRange(optimizer.Runs);
+      optimizer.Prepare();
+      if (ExecutionState == ExecutionState.Stopped && optimizer.ExecutionState == ExecutionState.Prepared)
+        OnPrepared();
+    }
+    private void RemoveOptimizer(IOptimizer optimizer) {
+      DeregisterOptimizerEvents(optimizer);
+      Runs.RemoveRange(optimizer.Runs);
+      if (ExecutionState == ExecutionState.Prepared && !optimizers.Any(opt => opt.ExecutionState == ExecutionState.Prepared))
+        OnStopped();
+    }
+
+    private void RegisterOptimizerEvents(IOptimizer optimizer) {
+      optimizer.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(optimizer_ExceptionOccurred);
+      optimizer.ExecutionTimeChanged += new EventHandler(optimizer_ExecutionTimeChanged);
+      optimizer.Paused += new EventHandler(optimizer_Paused);
+      optimizer.Prepared += new EventHandler(optimizer_Prepared);
+      optimizer.Started += new EventHandler(optimizer_Started);
+      optimizer.Stopped += new EventHandler(optimizer_Stopped);
+      optimizer.Runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_CollectionReset);
+      optimizer.Runs.ItemsAdded += new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_ItemsAdded);
+      optimizer.Runs.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_ItemsRemoved);
+    }
+    private void DeregisterOptimizerEvents(IOptimizer optimizer) {
+      optimizer.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(optimizer_ExceptionOccurred);
+      optimizer.ExecutionTimeChanged -= new EventHandler(optimizer_ExecutionTimeChanged);
+      optimizer.Paused -= new EventHandler(optimizer_Paused);
+      optimizer.Prepared -= new EventHandler(optimizer_Prepared);
+      optimizer.Started -= new EventHandler(optimizer_Started);
+      optimizer.Stopped -= new EventHandler(optimizer_Stopped);
+      optimizer.Runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_CollectionReset);
+      optimizer.Runs.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_ItemsAdded);
+      optimizer.Runs.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(optimizer_Runs_ItemsRemoved);
+    }
+    private void optimizer_ExceptionOccurred(object sender, EventArgs<Exception> e) {
+      OnExceptionOccurred(e.Value);
+    }
+    private void optimizer_ExecutionTimeChanged(object sender, EventArgs e) {
+      ExecutionTime = Optimizers.Aggregate(TimeSpan.Zero, (t, o) => t + o.ExecutionTime);
+    }
+    private void optimizer_Paused(object sender, EventArgs e) {
+      if (Optimizers.All(x => x.ExecutionState != ExecutionState.Started))
+        OnPaused();
+    }
+    private void optimizer_Prepared(object sender, EventArgs e) {
+      if (ExecutionState == ExecutionState.Stopped)
+        OnPrepared();
+    }
+    private void optimizer_Started(object sender, EventArgs e) {
+      if (ExecutionState != ExecutionState.Started)
+        OnStarted();
+    }
+    private void optimizer_Stopped(object sender, EventArgs e) {
+      if (!stopPending && Optimizers.Any(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused))) {
+        Optimizers.First(x => (x.ExecutionState == ExecutionState.Prepared) || (x.ExecutionState == ExecutionState.Paused)).Start();
+      } else {
+        if (Optimizers.All(x => (x.ExecutionState != ExecutionState.Started) && (x.ExecutionState != ExecutionState.Paused))) {
+          stopPending = false;
+          OnStopped();
+        }
+      }
+    }
+    private void optimizer_Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.RemoveRange(e.OldItems);
+      Runs.AddRange(e.Items);
+    }
+    private void optimizer_Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.AddRange(e.Items);
+    }
+    private void optimizer_Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      Runs.RemoveRange(e.Items);
+    }
+
+    private void RegisterRunsEvents() {
+      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+      runs.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
+    }
+    private void DeregisterRunsEvents() {
+      runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+      runs.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
+    }
+    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      foreach (IOptimizer optimizer in Optimizers)
+        optimizer.Runs.RemoveRange(e.OldItems);
+    }
+    private void Runs_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      foreach (IOptimizer optimizer in Optimizers)
+        optimizer.Runs.RemoveRange(e.Items);
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 5123)
@@ -0,0 +1,247 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{14AB8D24-25BC-400C-A846-4627AA945192}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Optimization</RootNamespace>
+    <AssemblyName>HeuristicLab.Optimization-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Release\HeuristicLab.Optimization-3.3.XML</DocumentationFile>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x86\Release\HeuristicLab.Optimization-3.3.XML</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <DocumentationFile>bin\x64\Release\HeuristicLab.Optimization-3.3.XML</DocumentationFile>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLabOptimizationPlugin.cs.frame" />
+    <Compile Include="Algorithm.cs" />
+    <Compile Include="BatchRun.cs" />
+    <Compile Include="Interfaces\IMultiAnalyzer.cs" />
+    <Compile Include="Interfaces\IIterationBasedOperator.cs" />
+    <Compile Include="Interfaces\IRealVectorDecoder.cs" />
+    <Compile Include="Interfaces\IRealVectorEncoder.cs" />
+    <Compile Include="Problem.cs" />
+    <Compile Include="RunCollectionConstraints\RunCollectionComparisonConstraint.cs" />
+    <Compile Include="RunCollectionConstraints\RunCollectionConstraintCollection.cs" />
+    <Compile Include="RunCollectionConstraints\RunCollectionTypeCompatiblityConstraint.cs" />
+    <Compile Include="RunCollectionConstraints\RunCollectionEqualityConstraint.cs" />
+    <Compile Include="Interfaces\IAnalyzer.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveReplacer.cs" />
+    <Compile Include="Interfaces\IMigrator.cs" />
+    <Compile Include="Interfaces\IReplacer.cs" />
+    <Compile Include="Interfaces\ISubScopesQualityComparator.cs" />
+    <Compile Include="Interfaces\IQualityComparator.cs" />
+    <Compile Include="Interfaces\ISelfAdaptiveManipulator.cs" />
+    <Compile Include="Interfaces\IStrategyParameterCrossover.cs" />
+    <Compile Include="Interfaces\IStrategyParameterManipulator.cs" />
+    <Compile Include="Interfaces\IStrategyParameterCreator.cs" />
+    <Compile Include="Interfaces\IRun.cs" />
+    <Compile Include="RunCollectionConstraints\IRunCollectionConstraint.cs" />
+    <Compile Include="OptimizerList.cs" />
+    <Compile Include="Experiment.cs" />
+    <Compile Include="Interfaces\IOptimizer.cs" />
+    <Compile Include="RunCollection.cs" />
+    <Compile Include="Run.cs" />
+    <Compile Include="Interfaces\IResult.cs" />
+    <Compile Include="Interfaces\IDiscreteDoubleValueModifier.cs" />
+    <Compile Include="Interfaces\IExhaustiveMoveGenerator.cs" />
+    <Compile Include="Interfaces\IMoveOperator.cs" />
+    <Compile Include="Interfaces\IMultiMoveGenerator.cs" />
+    <Compile Include="Interfaces\ISingleMoveGenerator.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveMoveEvaluator.cs" />
+    <Compile Include="Interfaces\IMoveGenerator.cs" />
+    <Compile Include="Interfaces\IMoveMaker.cs" />
+    <Compile Include="Interfaces\IMultiObjectiveSelector.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveSelector.cs" />
+    <Compile Include="Interfaces\IReducer.cs" />
+    <Compile Include="Interfaces\ISelector.cs" />
+    <Compile Include="Interfaces\IMultiObjectiveProblem.cs" />
+    <Compile Include="Interfaces\IMultiObjectiveEvaluator.cs" />
+    <Compile Include="Interfaces\IAlgorithm.cs" />
+    <Compile Include="Interfaces\ICrossover.cs" />
+    <Compile Include="Interfaces\IEvaluator.cs" />
+    <Compile Include="Interfaces\IManipulator.cs" />
+    <Compile Include="Interfaces\IProblem.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveEvaluator.cs" />
+    <Compile Include="Interfaces\ISingleObjectiveProblem.cs" />
+    <Compile Include="Interfaces\ISolutionCreator.cs" />
+    <Compile Include="Interfaces\IStochasticOperator.cs" />
+    <Compile Include="Interfaces\ITabuChecker.cs" />
+    <Compile Include="Interfaces\ITabuMaker.cs" />
+    <Compile Include="Result.cs" />
+    <Compile Include="SingleObjectiveProblem.cs" />
+    <Compile Include="UserDefinedAlgorithm.cs" />
+    <Compile Include="EngineAlgorithm.cs" />
+    <Compile Include="HeuristicLabOptimizationPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ResultCollection.cs" />
+    <Compile Include="UserDefinedProblem.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabOptimizationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabOptimizationPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLabOptimizationPlugin.cs.frame
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLabOptimizationPlugin.cs.frame	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/HeuristicLabOptimizationPlugin.cs.frame	(revision 5123)
@@ -0,0 +1,39 @@
+#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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Plugin class for HeuristicLab.Optimization plugin.
+  /// </summary>
+  [Plugin("HeuristicLab.Optimization", "3.3.2.$WCREV$")]
+  [PluginFile("HeuristicLab.Optimization-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabOptimizationPlugin : PluginBase {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 5123)
@@ -0,0 +1,41 @@
+#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.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Interface to represent an algorithm.
+  /// </summary>
+  public interface IAlgorithm : IParameterizedNamedItem, IOptimizer {
+    Type ProblemType { get; }
+    IProblem Problem { get; set; }
+    ResultCollection Results { get; }
+    bool StoreAlgorithmInEachRun { get; set; }
+
+    void CollectResultValues(IDictionary<string, IItem> values);
+
+    event EventHandler ProblemChanged;
+    event EventHandler StoreAlgorithmInEachRunChanged;
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAnalyzer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAnalyzer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IAnalyzer.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an analysis operator.
+  /// </summary>
+  public interface IAnalyzer : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ICrossover.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an operator for crossing solutions.
+  /// </summary>
+  public interface ICrossover : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IDiscreteDoubleValueModifier.cs	(revision 5123)
@@ -0,0 +1,49 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IDiscreteDoubleValueModifier : IOperator {
+    ILookupParameter<DoubleValue> ValueParameter { get; }
+    /// <summary>
+    /// The start value of the parameter, will be assigned to <see cref="ValueParameter"/> as soon as <see cref="IndexParamter"/> equals <see cref="StartIndexParameter"/>.
+    /// </summary>
+    IValueLookupParameter<DoubleValue> StartValueParameter { get; }
+    /// <summary>
+    /// The end value of the parameter, will be assigned to <see cref="ValueParameter"/> as soon as <see cref="IndexParamter"/> equals <see cref="EndIndexParameter"/>.
+    /// </summary>
+    IValueLookupParameter<DoubleValue> EndValueParameter { get; }
+    /// <summary>
+    /// The index that denotes from which point in the function (relative to <see cref="StartIndexParameter"/> and <see cref="EndIndexParameter"/> the value should be assigned.
+    /// </summary>
+    ILookupParameter<IntValue> IndexParameter { get; }
+    /// <summary>
+    /// As soon as <see cref="IndexParameter"/> is &gt;= this parameter the value will start to be modified.
+    /// </summary>
+    IValueLookupParameter<IntValue> StartIndexParameter { get; }
+    /// <summary>
+    /// As long as <see cref="IndexParameter"/> is &lt;= this parameter the value will start to be modified.
+    /// </summary>
+    IValueLookupParameter<IntValue> EndIndexParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IEvaluator.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an evaluation operator for optimization problems.
+  /// </summary>
+  public interface IEvaluator : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IExhaustiveMoveGenerator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IExhaustiveMoveGenerator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IExhaustiveMoveGenerator.cs	(revision 5123)
@@ -0,0 +1,25 @@
+﻿#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
+
+namespace HeuristicLab.Optimization {
+  public interface IExhaustiveMoveGenerator : IMoveGenerator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IIterationBasedOperator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IIterationBasedOperator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IIterationBasedOperator.cs	(revision 5123)
@@ -0,0 +1,30 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IIterationBasedOperator : IOperator {
+    ILookupParameter<IntValue> IterationsParameter { get; }
+    IValueLookupParameter<IntValue> MaximumIterationsParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IManipulator.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an operator for manipulating solutions.
+  /// </summary>
+  public interface IManipulator : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMigrator.cs	(revision 5123)
@@ -0,0 +1,26 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IMigrator : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveGenerator.cs	(revision 5123)
@@ -0,0 +1,30 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an operator for generating moves.
+  /// </summary>
+  public interface IMoveGenerator : IOperator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveMaker.cs	(revision 5123)
@@ -0,0 +1,30 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IMoveMaker : IOperator {
+    ILookupParameter<DoubleValue> QualityParameter { get; }
+    ILookupParameter<DoubleValue> MoveQualityParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMoveOperator.cs	(revision 5123)
@@ -0,0 +1,54 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// The basic interface that marks all move operators.
+  /// </summary>
+  /// <remarks>
+  /// A group of move operators that belong together should derive an interface from this one
+  /// and implement the interface in each operator.<br />
+  /// In an algorithm one can thus find out all move operators that belong together, by grouping operators
+  /// according to the most specific interface derived from this interface that they implement.<br /><br />
+  /// A concrete example:<br />
+  /// You have a solution representation <c>MyRep</c> and there you have a move <c>MyRepMove</c> that you want
+  /// to make available to the friendly GUIs. So in <c>MyRep</c> you derive an interface <c>IMyRepMoveOperator</c>.<br />
+  /// Now you need to implement at least three operators that handle these moves: A MoveGenerator, a MoveMaker, and a MoveEvaluator.
+  /// Note: The MoveEvaluator should be implemented in the problem plugin if you choose to separate representation and problem.<br />
+  /// In each of these operators you implement <c>IMyRepMoveOperator</c> as well as the appropriate operator specific interface.
+  /// For a MoveGenerator that would be one of <c>IExhaustiveMoveGenerator</c>, <c>ISingleMoveGenerator</c>,
+  /// or <c>IMultiMoveGenerator</c>, for a MoveMaker that would be <c>IMoveMaker</c>, and for a MoveEvaluator that would
+  /// either be <c>ISingleObjectiveMoveEvaluator</c> or <c>IMultiObjectiveMoveEvaluator</c>.<br />
+  /// If you have this you need to make sure that an instance of all your operators are loaded in the Operators collection of your IProblem
+  /// and you can select them in the respective algorithms.<br /><br />
+  /// For Tabu Search support you will need two additional operators: A TabuChecker (e.g. derived from <see cref="TabuChecker" />),
+  /// and a TabuMaker.<br /><br />
+  /// If you decide later that you want another move, e.g. <c>MyRepMove2</c>, you would do as before and group them under
+  /// the interface <c>IMyRepMove2Operator</c>.<br /><br />
+  /// If you want to make use of multiple different moves, all your operators would need to know about all the moves that you plan
+  /// to use.<br /><br />
+  /// Take a look at the Permutation and TSP plugin to see how this looks like in real code.
+  /// </remarks>
+  public interface IMoveOperator : IOperator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiAnalyzer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiAnalyzer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiAnalyzer.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an multi analysis operator.
+  /// </summary>
+  public interface IMultiAnalyzer : IMultiOperator<IAnalyzer>, IAnalyzer { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiMoveGenerator.cs	(revision 5123)
@@ -0,0 +1,29 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IMultiMoveGenerator : IMoveGenerator {
+    IValueLookupParameter<IntValue> SampleSizeParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveEvaluator.cs	(revision 5123)
@@ -0,0 +1,32 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an evaluation operator for multi-objective optimization problems.
+  /// </summary>
+  public interface IMultiObjectiveEvaluator : IEvaluator {
+    ILookupParameter<DoubleArray> QualitiesParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveProblem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveProblem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveProblem.cs	(revision 5123)
@@ -0,0 +1,32 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface to represent a multi-objective optimization problem.
+  /// </summary>
+  public interface IMultiObjectiveProblem : IProblem {
+    IParameter MaximizationParameter { get; }
+    new IMultiObjectiveEvaluator Evaluator { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IMultiObjectiveSelector.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a selection operator for selecting solutions of multi-objective optimization problems.
+  /// </summary>
+  public interface IMultiObjectiveSelector : ISelector {
+    ILookupParameter<BoolArray> MaximizationParameter { get; }
+    ILookupParameter<ItemArray<DoubleArray>> QualitiesParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IOptimizer.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Interface to represent optimizers such as algorithms, batch runs, or experiments.
+  /// </summary>
+  public interface IOptimizer : INamedItem, IExecutable {
+    RunCollection Runs { get; }
+
+    void Prepare(bool clearRuns);
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IProblem.cs	(revision 5123)
@@ -0,0 +1,42 @@
+#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.Collections.Generic;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Interface to represent an optimization problem.
+  /// </summary>
+  public interface IProblem : IParameterizedNamedItem {
+    IParameter SolutionCreatorParameter { get; }
+    ISolutionCreator SolutionCreator { get; }
+    IParameter EvaluatorParameter { get; }
+    IEvaluator Evaluator { get; }
+    IEnumerable<IOperator> Operators { get; }
+
+    event EventHandler SolutionCreatorChanged;
+    event EventHandler EvaluatorChanged;
+    event EventHandler OperatorsChanged;
+    event EventHandler Reset;
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IQualityComparator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IQualityComparator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IQualityComparator.cs	(revision 5123)
@@ -0,0 +1,32 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IQualityComparator {
+    ILookupParameter<DoubleValue> LeftSideParameter { get; }
+    IValueLookupParameter<DoubleValue> RightSideParameter { get; }
+    ILookupParameter<BoolValue> ResultParameter { get; }
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorDecoder.cs	(revision 5123)
@@ -0,0 +1,31 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IRealVectorDecoder {
+    IParameter RealVectorParameter { get; }
+    ILookupParameter<IntValue> LengthParameter { get; }
+    IValueParameter<DoubleMatrix> BoundsParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRealVectorEncoder.cs	(revision 5123)
@@ -0,0 +1,31 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface IRealVectorEncoder : IOperator {
+    IParameter RealVectorParameter { get; }
+    ILookupParameter<IntValue> LengthParameter { get; }
+    IValueLookupParameter<DoubleMatrix> BoundsParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReducer.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a reduction opertor.
+  /// </summary>
+  public interface IReducer : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReplacer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReplacer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IReplacer.cs	(revision 5123)
@@ -0,0 +1,33 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Interface to mark operators that can be used as replacers.
+  /// Replacers are merging a remaining and a selected branch in several special ways.
+  /// </summary>
+  public interface IReplacer : IOperator {
+    IValueLookupParameter<ISelector> ReplacedSelectorParameter { get; }
+    IValueLookupParameter<ISelector> SelectedSelectorParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs	(revision 5123)
@@ -0,0 +1,36 @@
+#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.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents a result which has a name and a data type and holds an IItem.
+  /// </summary>
+  public interface IResult : INamedItem {
+    Type DataType { get; }
+    IItem Value { get; set; }
+
+    /// <inheritdoc/>
+    event EventHandler ValueChanged;
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IRun.cs	(revision 5123)
@@ -0,0 +1,40 @@
+#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.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents the parameters and results of an algorithm run.
+  /// </summary>
+  public interface IRun : INamedItem {
+    IAlgorithm Algorithm { get; }
+    IDictionary<string, IItem> Parameters { get; }
+    IDictionary<string, IItem> Results { get; }
+
+    Color Color { get; set; }
+    bool Visible { get; set; }
+    event EventHandler Changed;
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelector.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a selection operator.
+  /// </summary>
+  public interface ISelector : IOperator {
+    BoolValue CopySelected { get; set; }
+    IValueLookupParameter<IntValue> NumberOfSelectedSubScopesParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISelfAdaptiveManipulator.cs	(revision 5123)
@@ -0,0 +1,33 @@
+﻿#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.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an operator for manipulating solutions, given a strategy parameter.
+  /// </summary>
+  public interface ISelfAdaptiveManipulator : IManipulator {
+    Type StrategyParameterType { get; }
+    IParameter StrategyParameterParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleMoveGenerator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleMoveGenerator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleMoveGenerator.cs	(revision 5123)
@@ -0,0 +1,25 @@
+﻿#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
+
+namespace HeuristicLab.Optimization {
+  public interface ISingleMoveGenerator : IMoveGenerator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveEvaluator.cs	(revision 5123)
@@ -0,0 +1,32 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an evaluation operator for single-objective optimization problems.
+  /// </summary>
+  public interface ISingleObjectiveEvaluator : IEvaluator {
+    ILookupParameter<DoubleValue> QualityParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveMoveEvaluator.cs	(revision 5123)
@@ -0,0 +1,30 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface ISingleObjectiveMoveEvaluator : IOperator {
+    ILookupParameter<DoubleValue> QualityParameter { get; }
+    ILookupParameter<DoubleValue> MoveQualityParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveProblem.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface to represent a single-objective optimization problem.
+  /// </summary>
+  public interface ISingleObjectiveProblem : IProblem {
+    IParameter MaximizationParameter { get; }
+    IParameter BestKnownQualityParameter { get; }
+    new ISingleObjectiveEvaluator Evaluator { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveReplacer.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a replacement operator for replacing solutions of single-objective optimization problems.
+  /// </summary>
+  public interface ISingleObjectiveReplacer : IReplacer {
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+    ILookupParameter<ItemArray<DoubleValue>> QualityParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISingleObjectiveSelector.cs	(revision 5123)
@@ -0,0 +1,33 @@
+#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a selection operator for selecting solutions of single-objective optimization problems.
+  /// </summary>
+  public interface ISingleObjectiveSelector : ISelector {
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+    ILookupParameter<ItemArray<DoubleValue>> QualityParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISolutionCreator.cs	(revision 5123)
@@ -0,0 +1,29 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents an operator for creating new solutions.
+  /// </summary>
+  public interface ISolutionCreator : IOperator { }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStochasticOperator.cs	(revision 5123)
@@ -0,0 +1,31 @@
+#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An interface which represents a stochastic operator.
+  /// </summary>
+  public interface IStochasticOperator : IOperator {
+    ILookupParameter<IRandom> RandomParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCreator.cs	(revision 5123)
@@ -0,0 +1,27 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IStrategyParameterCreator : IOperator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterCrossover.cs	(revision 5123)
@@ -0,0 +1,27 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IStrategyParameterCrossover : IOperator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/IStrategyParameterManipulator.cs	(revision 5123)
@@ -0,0 +1,27 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IStrategyParameterManipulator : IOperator {
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISubScopesQualityComparator.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISubScopesQualityComparator.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ISubScopesQualityComparator.cs	(revision 5123)
@@ -0,0 +1,32 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface ISubScopesQualityComparator {
+    ILookupParameter<DoubleValue> LeftSideParameter { get; }
+    ILookupParameter<ItemArray<DoubleValue>> RightSideParameter { get; }
+    ILookupParameter<BoolValue> ResultParameter { get; }
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuChecker.cs	(revision 5123)
@@ -0,0 +1,31 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface ITabuChecker : IOperator {
+    ILookupParameter<BoolValue> MoveTabuParameter { get; }
+    ILookupParameter<DoubleValue> MoveQualityParameter { get; }
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Interfaces/ITabuMaker.cs	(revision 5123)
@@ -0,0 +1,31 @@
+﻿#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 HeuristicLab.Core;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Optimization {
+  public interface ITabuMaker : IOperator {
+    ILookupParameter<DoubleValue> MoveQualityParameter { get; }
+    ILookupParameter<DoubleValue> QualityParameter { get; }
+    IValueLookupParameter<BoolValue> MaximizationParameter { get; }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/OptimizerList.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/OptimizerList.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/OptimizerList.cs	(revision 5123)
@@ -0,0 +1,43 @@
+#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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Optimizer List", "Represents a list of optimizers.")]
+  [StorableClass]
+  public class OptimizerList : ItemList<IOptimizer> {
+    public OptimizerList() : base() { }
+    public OptimizerList(int capacity) : base(capacity) { }
+    public OptimizerList(IEnumerable<IOptimizer> collection) : base(collection) { }
+    [StorableConstructor]
+    protected OptimizerList(bool deserializing) : base(deserializing) { }
+    protected OptimizerList(OptimizerList original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new OptimizerList(this, cloner);
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Problem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Problem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Problem.cs	(revision 5123)
@@ -0,0 +1,146 @@
+﻿#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.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Problem", "Represents the base class for a problem.")]
+  [StorableClass]
+  public abstract class Problem<T, U> : ParameterizedNamedItem, IProblem
+    where T : class,IEvaluator
+    where U : class,ISolutionCreator {
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string SolutionCreateParameterName = "SolutionCreator";
+
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
+    }
+
+    [StorableConstructor]
+    protected Problem(bool deserializing) : base(deserializing) { }
+    protected Problem(Problem<T, U> original, Cloner cloner)
+      : base(original, cloner) {
+      operators = cloner.Clone(original.operators);
+      RegisterEventHandlers();
+    }
+
+    protected Problem()
+      : base() {
+      operators = new OperatorCollection();
+      Parameters.Add(new ValueParameter<T>(EvaluatorParameterName, "The operator used to evaluate a solution."));
+      Parameters.Add(new ValueParameter<U>(SolutionCreateParameterName, "The operator to create a solution."));
+      RegisterEventHandlers();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    private void RegisterEventHandlers() {
+      Operators.ItemsAdded += new CollectionItemsChangedEventHandler<IOperator>(Operators_Changed);
+      Operators.ItemsRemoved += new CollectionItemsChangedEventHandler<IOperator>(Operators_Changed);
+      Operators.CollectionReset += new CollectionItemsChangedEventHandler<IOperator>(Operators_Changed);
+
+      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
+    }
+
+    #region properties
+    private OperatorCollection operators;
+    [Storable(Name = "Operators")]
+    private IEnumerable<IOperator> StorableOperators {
+      get { return operators; }
+      set { operators = new OperatorCollection(value); }
+    }
+    protected OperatorCollection Operators {
+      get { return this.operators; }
+    }
+    IEnumerable<IOperator> IProblem.Operators { get { return operators; } }
+
+    public T Evaluator {
+      get { return EvaluatorParameter.Value; }
+      protected set { EvaluatorParameter.Value = value; }
+    }
+    public ValueParameter<T> EvaluatorParameter {
+      get { return (ValueParameter<T>)Parameters[EvaluatorParameterName]; }
+    }
+    IEvaluator IProblem.Evaluator { get { return Evaluator; } }
+    IParameter IProblem.EvaluatorParameter { get { return EvaluatorParameter; } }
+
+    public U SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+      protected set { SolutionCreatorParameter.Value = value; }
+    }
+    public ValueParameter<U> SolutionCreatorParameter {
+      get { return (ValueParameter<U>)Parameters[SolutionCreateParameterName]; }
+    }
+    ISolutionCreator IProblem.SolutionCreator { get { return SolutionCreator; } }
+    IParameter IProblem.SolutionCreatorParameter { get { return SolutionCreatorParameter; } }
+    #endregion
+
+    #region events
+    private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      OnEvaluatorChanged();
+    }
+    public event EventHandler EvaluatorChanged;
+    protected virtual void OnEvaluatorChanged() {
+      EventHandler handler = EvaluatorChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
+      OnSolutionCreatorChanged();
+    }
+    public event EventHandler SolutionCreatorChanged;
+    protected virtual void OnSolutionCreatorChanged() {
+      EventHandler handler = SolutionCreatorChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    private void Operators_Changed(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    public event EventHandler OperatorsChanged;
+    protected virtual void OnOperatorsChanged() {
+      EventHandler handler = OperatorsChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    public event EventHandler Reset;
+    protected virtual void OnReset() {
+      EventHandler handler = Reset;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Properties/AssemblyInfo.frame
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Properties/AssemblyInfo.frame	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Properties/AssemblyInfo.frame	(revision 5123)
@@ -0,0 +1,56 @@
+#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.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Optimization")]
+[assembly: AssemblyDescription("HeuristicLab optimization classes")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4b3c29b7-1df7-41d2-aebf-b20fab8de1ee")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.2.$WCREV$")]
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Result.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Result.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Result.cs	(revision 5123)
@@ -0,0 +1,157 @@
+#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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents a result which has a name and a data type and holds an IItem.
+  /// </summary>
+  [Item("Result", "A result which has a name and a data type and holds an IItem.")]
+  [StorableClass]
+  public sealed class Result : NamedItem, IResult, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get {
+        if (value != null) return value.ItemImage;
+        else return base.ItemImage;
+      }
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [Storable]
+    private Type dataType;
+    public Type DataType {
+      get { return dataType; }
+    }
+
+    [Storable]
+    private IItem value;
+    public IItem Value {
+      get { return value; }
+      set {
+        if (this.value != value) {
+          if ((value != null) && (!dataType.IsInstanceOfType(value)))
+            throw new ArgumentException(
+              string.Format("Type mismatch. Value is not a \"{0}\".",
+                            dataType.GetPrettyName())
+            );
+
+          DeregisterValueEvents();
+          this.value = value;
+          RegisterValueEvents();
+          OnValueChanged();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    private Result(bool deserializing) : base(deserializing) { }
+    private Result(Result original, Cloner cloner)
+      : base(original, cloner) {
+      dataType = original.dataType;
+      value = cloner.Clone(original.value);
+      Initialize();
+    }
+    public Result()
+      : base("Anonymous") {
+      this.dataType = typeof(IItem);
+      this.value = null;
+    }
+    public Result(string name, Type dataType)
+      : base(name) {
+      this.dataType = dataType;
+      this.value = null;
+    }
+    public Result(string name, string description, Type dataType)
+      : base(name, description) {
+      this.dataType = dataType;
+      this.value = null;
+    }
+    public Result(string name, IItem value)
+      : base(name) {
+      this.dataType = value == null ? typeof(IItem) : value.GetType();
+      this.value = value;
+      Initialize();
+    }
+    public Result(string name, string description, IItem value)
+      : base(name, description) {
+      this.dataType = value == null ? typeof(IItem) : value.GetType();
+      this.value = value;
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Result(this, cloner);
+    }
+
+    private void Initialize() {
+      RegisterValueEvents();
+    }
+
+    public override string ToString() {
+      return string.Format("{0}: {1}", Name, Value == null ? "null" : Value.ToString());
+    }
+
+    public event EventHandler ValueChanged;
+    private void OnValueChanged() {
+      var handler = ValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+      OnToStringChanged();
+    }
+
+    private void RegisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged += new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void DeregisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged -= new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void Value_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Value_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/ResultCollection.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/ResultCollection.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/ResultCollection.cs	(revision 5123)
@@ -0,0 +1,43 @@
+#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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("ResultCollection", "Represents a collection of results.")]
+  public class ResultCollection : NamedItemCollection<IResult> {
+    public ResultCollection() : base() { }
+    public ResultCollection(int capacity) : base(capacity) { }
+    public ResultCollection(IEnumerable<IResult> collection) : base(collection) { }
+    [StorableConstructor]
+    protected ResultCollection(bool deserializing) : base(deserializing) { }
+    protected ResultCollection(ResultCollection original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ResultCollection(this, cloner);
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/Run.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/Run.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/Run.cs	(revision 5123)
@@ -0,0 +1,156 @@
+#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.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents the parameters and results of an algorithm run.
+  /// </summary>
+  [Item("Run", "The parameters and results of an algorithm run.")]
+  [StorableClass]
+  public sealed class Run : NamedItem, IRun, IStorableContent {
+    public string Filename { get; set; }
+
+    [StorableConstructor]
+    private Run(bool deserializing) : base(deserializing) { }
+    private Run(Run original, Cloner cloner)
+      : base(original, cloner) {
+      color = original.color;
+      algorithm = cloner.Clone(original.algorithm);
+
+      parameters = new Dictionary<string, IItem>();
+      foreach (string key in original.parameters.Keys)
+        parameters.Add(key, cloner.Clone(original.parameters[key]));
+
+      results = new Dictionary<string, IItem>();
+      foreach (string key in original.results.Keys)
+        results.Add(key, cloner.Clone(original.results[key]));
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Run(this, cloner);
+    }
+
+    public Run()
+      : base() {
+      name = ItemName;
+      description = ItemDescription;
+      color = Color.Black;
+      algorithm = null;
+      parameters = new Dictionary<string, IItem>();
+      results = new Dictionary<string, IItem>();
+    }
+    public Run(IAlgorithm algorithm)
+      : base() {
+      if (algorithm == null) throw new ArgumentNullException();
+      name = algorithm.Name + " Run (" + algorithm.ExecutionTime.ToString() + ")";
+      description = ItemDescription;
+      color = Color.Black;
+      Initialize(algorithm);
+    }
+    public Run(string name, IAlgorithm algorithm)
+      : base(name) {
+      if (algorithm == null) throw new ArgumentNullException();
+      color = Color.Black;
+      description = ItemDescription;
+      Initialize(algorithm);
+    }
+    public Run(string name, string description, IAlgorithm algorithm)
+      : base(name, description) {
+      if (algorithm == null) throw new ArgumentNullException();
+      color = Color.Black;
+      Initialize(algorithm);
+    }
+
+    private void Initialize(IAlgorithm algorithm) {
+      parameters = new Dictionary<string, IItem>();
+      results = new Dictionary<string, IItem>();
+
+      if (algorithm.StoreAlgorithmInEachRun) {
+        IAlgorithm clone = (IAlgorithm)algorithm.Clone();
+        clone.CollectParameterValues(parameters);
+        clone.CollectResultValues(results);
+        clone.Prepare(true);
+        this.algorithm = clone;
+      } else {
+        algorithm.CollectParameterValues(parameters);
+        algorithm.CollectResultValues(results);
+        Cloner cloner = new Cloner();
+        parameters = parameters.Select(x => new KeyValuePair<string, IItem>(x.Key, cloner.Clone(x.Value))).ToDictionary(x => x.Key, x => x.Value);
+        results = results.Select(x => new KeyValuePair<string, IItem>(x.Key, cloner.Clone(x.Value))).ToDictionary(x => x.Key, x => x.Value);
+      }
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (color == Color.Empty) color = Color.Black;
+    }
+
+    [Storable]
+    private IAlgorithm algorithm;
+    public IAlgorithm Algorithm {
+      get { return algorithm; }
+    }
+    [Storable]
+    private Dictionary<string, IItem> parameters;
+    public IDictionary<string, IItem> Parameters {
+      get { return parameters; }
+    }
+    [Storable]
+    private Dictionary<string, IItem> results;
+    public IDictionary<string, IItem> Results {
+      get { return results; }
+    }
+
+    [Storable]
+    private Color color;
+    public Color Color {
+      get { return this.color; }
+      set {
+        if (color != value) {
+          this.color = value;
+          this.OnChanged();
+        }
+      }
+    }
+    private bool visible = true;
+    public bool Visible {
+      get { return this.visible; }
+      set {
+        if (visible != value) {
+          this.visible = value;
+          this.OnChanged();
+        }
+      }
+    }
+    public event EventHandler Changed;
+    private void OnChanged() {
+      EventHandler handler = Changed;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollection.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 5123)
@@ -0,0 +1,376 @@
+#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.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Run Collection", "Represents a collection of runs.")]
+  [Creatable("Testing & Analysis")]
+  [StorableClass]
+  public class RunCollection : ItemCollection<IRun>, IStringConvertibleMatrix, IStorableContent {
+    public string Filename { get; set; }
+
+    [StorableConstructor]
+    protected RunCollection(bool deserializing)
+      : base(deserializing) {
+      updateOfRunsInProgress = false;
+    }
+    protected RunCollection(RunCollection original, Cloner cloner)
+      : base(original, cloner) {
+      updateOfRunsInProgress = false;
+      resultNames = new List<string>(original.resultNames);
+      parameterNames = new List<string>(original.parameterNames);
+      dataTypes = new Dictionary<string, HashSet<Type>>();
+      foreach (string s in original.dataTypes.Keys)
+        dataTypes[s] = new HashSet<Type>(original.dataTypes[s]);
+
+      constraints = new RunCollectionConstraintCollection(original.constraints.Select(x => cloner.Clone(x)));
+      foreach (IRunCollectionConstraint constraint in constraints)
+        constraint.ConstrainedValue = this;
+      RegisterConstraintsEvents();
+      RegisterConstraintEvents(constraints);
+
+      UpdateFiltering(true);
+    }
+    public RunCollection() : base() { Initialize(); }
+    public RunCollection(int capacity) : base(capacity) { Initialize(); }
+    public RunCollection(IEnumerable<IRun> collection) : base(collection) { Initialize(); this.OnItemsAdded(collection); }
+    private void Initialize() {
+      updateOfRunsInProgress = false;
+      parameterNames = new List<string>();
+      resultNames = new List<string>();
+      dataTypes = new Dictionary<string, HashSet<Type>>();
+      constraints = new RunCollectionConstraintCollection();
+      RegisterConstraintsEvents();
+    }
+
+    [Storable]
+    private Dictionary<string, HashSet<Type>> dataTypes;
+    public IEnumerable<Type> GetDataType(string columnName) {
+      if (!dataTypes.ContainsKey(columnName))
+        return new Type[0];
+      return dataTypes[columnName];
+    }
+
+    [Storable]
+    private RunCollectionConstraintCollection constraints;
+    public RunCollectionConstraintCollection Constraints {
+      get { return constraints; }
+    }
+
+    private bool updateOfRunsInProgress;
+    public bool UpdateOfRunsInProgress {
+      get { return updateOfRunsInProgress; }
+      set {
+        if (updateOfRunsInProgress != value) {
+          updateOfRunsInProgress = value;
+          OnUpdateOfRunsInProgressChanged();
+        }
+      }
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (constraints == null) constraints = new RunCollectionConstraintCollection();
+      RegisterConstraintsEvents();
+      RegisterConstraintEvents(constraints);
+      UpdateFiltering(true);
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollection(this, cloner);
+    }
+
+    public event EventHandler UpdateOfRunsInProgressChanged;
+    protected virtual void OnUpdateOfRunsInProgressChanged() {
+      var handler = UpdateOfRunsInProgressChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnCollectionReset(IEnumerable<IRun> items, IEnumerable<IRun> oldItems) {
+      parameterNames.Clear();
+      resultNames.Clear();
+      foreach (IRun run in items) {
+        foreach (KeyValuePair<string, IItem> parameter in run.Parameters)
+          AddParameter(parameter.Key, parameter.Value);
+        foreach (KeyValuePair<string, IItem> result in run.Results)
+          AddResult(result.Key, result.Value);
+      }
+      columnNameCache = null;
+      OnColumnNamesChanged();
+      rowNamesCache = null;
+      base.OnCollectionReset(items, oldItems);
+      OnRowNamesChanged();
+      OnReset();
+      UpdateFiltering(false);
+    }
+    protected override void OnItemsAdded(IEnumerable<IRun> items) {
+      bool columnNamesChanged = false;
+      foreach (IRun run in items) {
+        foreach (KeyValuePair<string, IItem> parameter in run.Parameters)
+          columnNamesChanged |= AddParameter(parameter.Key, parameter.Value);
+        foreach (KeyValuePair<string, IItem> result in run.Results)
+          columnNamesChanged |= AddResult(result.Key, result.Value);
+      }
+      if (columnNamesChanged) columnNameCache = null;
+      rowNamesCache = null;
+      base.OnItemsAdded(items);
+      OnReset();
+      OnRowNamesChanged();
+      if (columnNamesChanged) OnColumnNamesChanged();
+      UpdateFiltering(false);
+    }
+    protected override void OnItemsRemoved(IEnumerable<IRun> items) {
+      bool columnNamesChanged = false;
+      foreach (IRun run in items) {
+        foreach (string parameterName in run.Parameters.Keys)
+          columnNamesChanged |= RemoveParameterName(parameterName);
+        foreach (string resultName in run.Results.Keys)
+          columnNamesChanged |= RemoveResultName(resultName);
+      }
+      if (columnNamesChanged) columnNameCache = null;
+      rowNamesCache = null;
+      base.OnItemsRemoved(items);
+      OnReset();
+      OnRowNamesChanged();
+      if (columnNamesChanged) OnColumnNamesChanged();
+    }
+
+    private bool AddParameter(string name, IItem value) {
+      if (value == null)
+        return false;
+      if (!parameterNames.Contains(name)) {
+        parameterNames.Add(name);
+        dataTypes[name] = new HashSet<Type>();
+        dataTypes[name].Add(value.GetType());
+        return true;
+      }
+      dataTypes[name].Add(value.GetType());
+      return false;
+    }
+    private bool AddResult(string name, IItem value) {
+      if (value == null)
+        return false;
+      if (!resultNames.Contains(name)) {
+        resultNames.Add(name);
+        dataTypes[name] = new HashSet<Type>();
+        dataTypes[name].Add(value.GetType());
+        return true;
+      }
+      dataTypes[name].Add(value.GetType());
+      return false;
+    }
+    private bool RemoveParameterName(string name) {
+      if (!list.Any(x => x.Parameters.ContainsKey(name))) {
+        parameterNames.Remove(name);
+        return true;
+      }
+      return false;
+    }
+    private bool RemoveResultName(string name) {
+      if (!list.Any(x => x.Results.ContainsKey(name))) {
+        resultNames.Remove(name);
+        return true;
+      }
+      return false;
+    }
+
+    public IItem GetValue(int rowIndex, int columnIndex) {
+      IRun run = this.list[rowIndex];
+      return GetValue(run, columnIndex);
+    }
+
+    public IItem GetValue(IRun run, int columnIndex) {
+      string name = ((IStringConvertibleMatrix)this).ColumnNames.ElementAt(columnIndex);
+      return GetValue(run, name);
+    }
+
+    public IItem GetValue(IRun run, string columnName) {
+      IItem value = null;
+      if (run.Parameters.ContainsKey(columnName))
+        value = run.Parameters[columnName];
+      else if (run.Results.ContainsKey(columnName))
+        value = run.Results[columnName];
+      return value;
+    }
+
+    #region IStringConvertibleMatrix Members
+    [Storable]
+    private List<string> parameterNames;
+    public IEnumerable<string> ParameterNames {
+      get { return this.parameterNames; }
+    }
+    [Storable]
+    private List<string> resultNames;
+    public IEnumerable<string> ResultNames {
+      get { return this.resultNames; }
+    }
+    int IStringConvertibleMatrix.Rows {
+      get { return this.Count; }
+      set { throw new NotSupportedException(); }
+    }
+    int IStringConvertibleMatrix.Columns {
+      get { return parameterNames.Count + resultNames.Count; }
+      set { throw new NotSupportedException(); }
+    }
+    private List<string> columnNameCache;
+    IEnumerable<string> IStringConvertibleMatrix.ColumnNames {
+      get {
+        if (columnNameCache == null) {
+          columnNameCache = new List<string>(parameterNames);
+          columnNameCache.AddRange(resultNames);
+          columnNameCache.Sort();
+        }
+        return columnNameCache;
+      }
+      set { throw new NotSupportedException(); }
+    }
+    private List<string> rowNamesCache;
+    IEnumerable<string> IStringConvertibleMatrix.RowNames {
+      get {
+        if (rowNamesCache == null)
+          rowNamesCache = list.Select(x => x.Name).ToList();
+        return rowNamesCache;
+      }
+      set { throw new NotSupportedException(); }
+    }
+    bool IStringConvertibleMatrix.SortableView {
+      get { return true; }
+      set { throw new NotSupportedException(); }
+    }
+    bool IStringConvertibleMatrix.ReadOnly {
+      get { return true; }
+    }
+
+    string IStringConvertibleMatrix.GetValue(int rowIndex, int columnIndex) {
+      IItem value = GetValue(rowIndex, columnIndex);
+      if (value == null)
+        return string.Empty;
+      return value.ToString();
+    }
+
+    public event EventHandler<EventArgs<int, int>> ItemChanged;
+    protected virtual void OnItemChanged(int rowIndex, int columnIndex) {
+      EventHandler<EventArgs<int, int>> handler = ItemChanged;
+      if (handler != null) handler(this, new EventArgs<int, int>(rowIndex, columnIndex));
+      OnToStringChanged();
+    }
+    public event EventHandler Reset;
+    protected virtual void OnReset() {
+      EventHandler handler = Reset;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnToStringChanged();
+    }
+    public event EventHandler ColumnNamesChanged;
+    protected virtual void OnColumnNamesChanged() {
+      EventHandler handler = ColumnNamesChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler RowNamesChanged;
+    protected virtual void OnRowNamesChanged() {
+      EventHandler handler = RowNamesChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler SortableViewChanged;
+    protected virtual void OnSortableViewChanged() {
+      EventHandler handler = SortableViewChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public bool Validate(string value, out string errorMessage) { throw new NotSupportedException(); }
+    public bool SetValue(string value, int rowIndex, int columnIndex) { throw new NotSupportedException(); }
+    #endregion
+
+    #region Filtering
+    private void UpdateFiltering(bool reset) {
+      UpdateOfRunsInProgress = true;
+      if (reset)
+        list.ForEach(r => r.Visible = true);
+      foreach (IRunCollectionConstraint constraint in this.constraints)
+        constraint.Check();
+      UpdateOfRunsInProgress = false;
+    }
+
+    private void RegisterConstraintsEvents() {
+      constraints.ItemsAdded += new CollectionItemsChangedEventHandler<IRunCollectionConstraint>(Constraints_ItemsAdded);
+      constraints.ItemsRemoved += new CollectionItemsChangedEventHandler<IRunCollectionConstraint>(Constraints_ItemsRemoved);
+      constraints.CollectionReset += new CollectionItemsChangedEventHandler<IRunCollectionConstraint>(Constraints_CollectionReset);
+    }
+
+    protected virtual void RegisterConstraintEvents(IEnumerable<IRunCollectionConstraint> constraints) {
+      foreach (IRunCollectionConstraint constraint in constraints) {
+        constraint.ActiveChanged += new EventHandler(Constraint_ActiveChanged);
+        constraint.ConstrainedValueChanged += new EventHandler(Constraint_ConstrainedValueChanged);
+        constraint.ConstraintOperationChanged += new EventHandler(Constraint_ConstraintOperationChanged);
+        constraint.ConstraintDataChanged += new EventHandler(Constraint_ConstraintDataChanged);
+      }
+    }
+    protected virtual void DeregisterConstraintEvents(IEnumerable<IRunCollectionConstraint> constraints) {
+      foreach (IRunCollectionConstraint constraint in constraints) {
+        constraint.ActiveChanged -= new EventHandler(Constraint_ActiveChanged);
+        constraint.ConstrainedValueChanged -= new EventHandler(Constraint_ConstrainedValueChanged);
+        constraint.ConstraintOperationChanged -= new EventHandler(Constraint_ConstraintOperationChanged);
+        constraint.ConstraintDataChanged -= new EventHandler(Constraint_ConstraintDataChanged);
+      }
+    }
+
+    protected virtual void Constraints_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRunCollectionConstraint> e) {
+      DeregisterConstraintEvents(e.OldItems);
+      RegisterConstraintEvents(e.Items);
+      this.UpdateFiltering(true);
+    }
+    protected virtual void Constraints_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRunCollectionConstraint> e) {
+      RegisterConstraintEvents(e.Items);
+      foreach (IRunCollectionConstraint constraint in e.Items)
+        constraint.ConstrainedValue = this;
+      this.UpdateFiltering(false);
+    }
+    protected virtual void Constraints_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IRunCollectionConstraint> e) {
+      DeregisterConstraintEvents(e.Items);
+      this.UpdateFiltering(true);
+    }
+    protected virtual void Constraint_ActiveChanged(object sender, EventArgs e) {
+      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
+      this.UpdateFiltering(!constraint.Active);
+    }
+    protected virtual void Constraint_ConstrainedValueChanged(object sender, EventArgs e) {
+      //mkommend: this method is intentionally left empty, because the constrainedValue is set in the ItemsAdded method
+    }
+    protected virtual void Constraint_ConstraintOperationChanged(object sender, EventArgs e) {
+      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
+      if (constraint.Active)
+        this.UpdateFiltering(true);
+    }
+    protected virtual void Constraint_ConstraintDataChanged(object sender, EventArgs e) {
+      IRunCollectionConstraint constraint = (IRunCollectionConstraint)sender;
+      if (constraint.Active)
+        this.UpdateFiltering(true);
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 5123)
@@ -0,0 +1,31 @@
+﻿#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.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IRunCollectionConstraint : IConstraint {
+    new RunCollection ConstrainedValue { get; set; }
+    string ConstraintColumn { get; set; }
+    event EventHandler ConstraintColumnChanged;
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 5123)
@@ -0,0 +1,139 @@
+﻿#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.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("RunCollectionComparisonConstraint", "A constraint which compares the members of the contained runs with the constraint data.")]
+  public class RunCollectionComparisonConstraint : ComparisonConstraint, IRunCollectionConstraint {
+    [StorableConstructor]
+    protected RunCollectionComparisonConstraint(bool deserializing) : base(deserializing) { }
+
+    protected RunCollectionComparisonConstraint(RunCollectionComparisonConstraint original, Cloner cloner)
+      : base(original, cloner) {
+      constraintColumn = original.constraintColumn;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionComparisonConstraint(this, cloner);
+    }
+
+    public RunCollectionComparisonConstraint() : base() { }
+    public RunCollectionComparisonConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, object constraintData)
+      : base(constrainedValue, constraintOperation, constraintData) {
+    }
+    public RunCollectionComparisonConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, object constraintData, bool active)
+      : base(constrainedValue, constraintOperation, constraintData, active) {
+    }
+
+    public new RunCollection ConstrainedValue {
+      get { return (RunCollection)base.ConstrainedValue; }
+      set { base.ConstrainedValue = value; }
+    }
+
+    public new IStringConvertibleValue ConstraintData {
+      get { return (IStringConvertibleValue)base.ConstraintData; }
+      set {
+        if (!(value is IComparable))
+          throw new ArgumentException("Only IComparables allowed for ConstraintData");
+        base.ConstraintData = value;
+      }
+    }
+
+    [Storable]
+    private string constraintColumn;
+    public string ConstraintColumn {
+      get { return constraintColumn; }
+      set {
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
+          throw new ArgumentException("Could not set ConstraintData to not existing column index.");
+        if (constraintColumn != value) {
+          constraintColumn = value;
+          this.OnConstraintColumnChanged();
+          this.OnToStringChanged();
+        }
+      }
+    }
+
+    public event EventHandler ConstraintColumnChanged;
+    protected virtual void OnConstraintColumnChanged() {
+      EventHandler handler = ConstraintColumnChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
+    }
+
+    protected override bool Check(object constrainedMember) {
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (!base.Check(item))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    protected override bool Check(object constrainedMember, out string errorMessage) {
+      errorMessage = string.Empty;
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (!base.Check(item))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    public override string ToString() {
+      string s = string.Empty;
+      IStringConvertibleMatrix matrix = ConstrainedValue;
+      if (matrix != null && matrix.ColumnNames.Count() != 0)
+        s += constraintColumn + " ";
+      else
+        return "ComparisonConstraint";
+
+      if (ConstraintOperation != null)
+        s += ConstraintOperation.ToString() + " ";
+
+      if (ConstraintData != null)
+        s += ConstraintData.GetValue();
+      else
+        s += "null";
+
+      return s;
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionConstraintCollection.cs	(revision 5123)
@@ -0,0 +1,42 @@
+﻿#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.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("RunCollectionConstraintCollection", "Represents a collection of constraints.")]
+  public class RunCollectionConstraintCollection : ItemCollection<IRunCollectionConstraint> {
+    public RunCollectionConstraintCollection() : base() { }
+    public RunCollectionConstraintCollection(int capacity) : base(capacity) { }
+    public RunCollectionConstraintCollection(IEnumerable<IRunCollectionConstraint> collection) : base(collection) { }
+    [StorableConstructor]
+    protected RunCollectionConstraintCollection(bool deserializing) : base(deserializing) { }
+    protected RunCollectionConstraintCollection(RunCollectionConstraintCollection original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionConstraintCollection(this, cloner);
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 5123)
@@ -0,0 +1,140 @@
+﻿#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.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("RunCollectionEqualityConstraint", "A constraint which checks the members of the contained runs for equality to the constraint data.")]
+  public class RunCollectionEqualityConstraint : EqualityConstraint, IRunCollectionConstraint {
+    [StorableConstructor]
+    protected RunCollectionEqualityConstraint(bool deserializing) : base(deserializing) { }
+
+    protected RunCollectionEqualityConstraint(RunCollectionEqualityConstraint original, Cloner cloner)
+      : base(original, cloner) {
+      ConstraintData = original.ConstraintData;
+      ConstraintOperation = original.ConstraintOperation;
+      constraintColumn = original.constraintColumn;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionEqualityConstraint(this, cloner);
+    }
+
+    public RunCollectionEqualityConstraint()
+      : base() {
+      this.ConstraintData = string.Empty;
+    }
+    public RunCollectionEqualityConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, string constraintData)
+      : base(constrainedValue, constraintOperation, constraintData) {
+    }
+    public RunCollectionEqualityConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, string constraintData, bool active)
+      : base(constrainedValue, constraintOperation, constraintData, active) {
+    }
+
+    public new RunCollection ConstrainedValue {
+      get { return (RunCollection)base.ConstrainedValue; }
+      set { base.ConstrainedValue = value; }
+    }
+
+    public new string ConstraintData {
+      get { return (string)base.ConstraintData; }
+      set { base.ConstraintData = value; }
+    }
+
+    [Storable]
+    private string constraintColumn;
+    public string ConstraintColumn {
+      get { return constraintColumn; }
+      set {
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
+          throw new ArgumentException("Could not set ConstraintData to not existing column index.");
+        if (constraintColumn != value) {
+          constraintColumn = value;
+          this.OnConstraintColumnChanged();
+          this.OnToStringChanged();
+        }
+      }
+    }
+
+    public event EventHandler ConstraintColumnChanged;
+    protected virtual void OnConstraintColumnChanged() {
+      EventHandler handler = ConstraintColumnChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
+    }
+
+    protected override bool Check(object constrainedMember) {
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (!base.Check(item.ToString()))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    protected override bool Check(object constrainedMember, out string errorMessage) {
+      errorMessage = string.Empty;
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (!base.Check(item))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    public override string ToString() {
+      string s = string.Empty;
+      IStringConvertibleMatrix matrix = ConstrainedValue;
+      if (matrix != null && matrix.ColumnNames.Count() != 0)
+        s += constraintColumn + " ";
+      else
+        return "EqualityConstraint";
+
+      if (ConstraintOperation != null)
+        s += ConstraintOperation.ToString() + " ";
+
+      if (!string.IsNullOrEmpty(ConstraintData))
+        s += ConstraintData;
+      else
+        s += "null";
+
+      return s;
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 5123)
@@ -0,0 +1,133 @@
+﻿#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.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("RunCollectionTypeCompatibilityConstraint", "A constraint which checks the members of the contained runs for type compabitiliby to the constraint data.")]
+  public class RunCollectionTypeCompatibilityConstraint : TypeCompatibilityConstraint, IRunCollectionConstraint {
+    [StorableConstructor]
+    protected RunCollectionTypeCompatibilityConstraint(bool deserializing) {
+    }
+    protected RunCollectionTypeCompatibilityConstraint(RunCollectionTypeCompatibilityConstraint original, Cloner cloner)
+      : base(original, cloner) {
+      ConstraintData = original.ConstraintData;
+      ConstraintOperation = original.ConstraintOperation;
+      constraintColumn = original.constraintColumn;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new RunCollectionTypeCompatibilityConstraint(this, cloner);
+    }
+
+    public RunCollectionTypeCompatibilityConstraint()
+      : base() {
+    }
+    public RunCollectionTypeCompatibilityConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, Type constraintData)
+      : base(constrainedValue, constraintOperation, constraintData) {
+    }
+    public RunCollectionTypeCompatibilityConstraint(RunCollection constrainedValue, ConstraintOperation constraintOperation, Type constraintData, bool active)
+      : base(constrainedValue, constraintOperation, constraintData, active) {
+    }
+
+    public new RunCollection ConstrainedValue {
+      get { return (RunCollection)base.ConstrainedValue; }
+      set { base.ConstrainedValue = value; }
+    }
+    [Storable]
+    private string constraintColumn;
+    public string ConstraintColumn {
+      get { return constraintColumn; }
+      set {
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
+          throw new ArgumentException("Could not set ConstraintData to not existing column index.");
+        if (constraintColumn != value) {
+          constraintColumn = value;
+          this.OnConstraintColumnChanged();
+          this.OnToStringChanged();
+        }
+      }
+    }
+
+    public event EventHandler ConstraintColumnChanged;
+    protected virtual void OnConstraintColumnChanged() {
+      EventHandler handler = ConstraintColumnChanged;
+      if (handler != null)
+        handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
+    }
+
+    protected override bool Check(object constrainedMember) {
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (item == null || !base.Check(item))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    protected override bool Check(object constrainedMember, out string errorMessage) {
+      errorMessage = string.Empty;
+      if (!Active)
+        return true;
+
+      foreach (IRun run in ConstrainedValue.Where(r => r.Visible)) {
+        IItem item = ConstrainedValue.GetValue(run, constraintColumn);
+        if (!base.Check(item))
+          run.Visible = false;
+      }
+      return true;
+    }
+
+    public override string ToString() {
+      string s = string.Empty;
+      IStringConvertibleMatrix matrix = ConstrainedValue;
+      if (matrix != null && matrix.ColumnNames.Count() != 0)
+        s += constraintColumn + " ";
+      else
+        return "TypeCompabitilityConstraint";
+
+      if (ConstraintOperation != null)
+        s += ConstraintOperation.ToString() + " ";
+
+      if (ConstraintData != null)
+        s += ConstraintData;
+      else
+        s += "null";
+
+      return s;
+    }
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/SingleObjectiveProblem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/SingleObjectiveProblem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/SingleObjectiveProblem.cs	(revision 5123)
@@ -0,0 +1,76 @@
+﻿#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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Single Objective Problem", "Represents the base class for a single objective problem.")]
+  [StorableClass]
+  public abstract class SingleObjectiveProblem<T, U> : Problem<T, U>, ISingleObjectiveProblem
+    where T : class, ISingleObjectiveEvaluator
+    where U : class, ISolutionCreator {
+    private const string MaximizationParameterName = "Maximization";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    [StorableConstructor]
+    protected SingleObjectiveProblem(bool deserializing) : base(deserializing) { }
+    protected SingleObjectiveProblem(SingleObjectiveProblem<T, U> original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected SingleObjectiveProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized."));
+      Parameters.Add(new ValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem."));
+    }
+
+
+    #region properties
+    ISingleObjectiveEvaluator ISingleObjectiveProblem.Evaluator { get { return Evaluator; } }
+
+    public BoolValue Maximization {
+      get { return MaximizationParameter.Value; }
+      protected set { MaximizationParameter.Value = value; }
+    }
+    public ValueParameter<BoolValue> MaximizationParameter {
+      get { return (ValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter ISingleObjectiveProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+      protected set { BestKnownQualityParameter.Value = value; }
+    }
+    public ValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    IParameter ISingleObjectiveProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 5123)
@@ -0,0 +1,110 @@
+#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.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// An algorithm which can be defined by the user.
+  /// </summary>
+  [Item("User-Defined Algorithm", "An algorithm which can be defined by the user.")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class UserDefinedAlgorithm : EngineAlgorithm, IParameterizedItem, IStorableContent {
+    public string Filename { get; set; }
+
+    public new ParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
+      get { return Parameters; }
+    }
+
+    public new OperatorGraph OperatorGraph {
+      get { return base.OperatorGraph; }
+      set { base.OperatorGraph = value; }
+    }
+
+    public new IScope GlobalScope {
+      get { return base.GlobalScope; }
+    }
+
+    private IValueParameter AnalyzerParameter {
+      get { return (IValueParameter)Parameters["Analyzer"]; }
+    }
+    private IMultiAnalyzer Analyzer {
+      get {
+        if (AnalyzerParameter != null)
+          return AnalyzerParameter.Value as IMultiAnalyzer;
+        return null;
+      }
+    }
+
+    public UserDefinedAlgorithm() : base() { }
+    public UserDefinedAlgorithm(string name) : base(name) { }
+    public UserDefinedAlgorithm(string name, string description) : base(name, description) { }
+    [StorableConstructor]
+    private UserDefinedAlgorithm(bool deserializing) : base(deserializing) { }
+    private UserDefinedAlgorithm(UserDefinedAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    internal UserDefinedAlgorithm(EngineAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new UserDefinedAlgorithm(this, cloner);
+    }
+
+    #region update of problem specific analyzers
+    protected override void OnProblemChanged() {
+      AddProblemAnalyzer();
+      base.OnProblemChanged();
+    }
+    protected override void Problem_OperatorsChanged(object sender, System.EventArgs e) {
+      RemoveProblemAnalyzers();
+      AddProblemAnalyzer();
+      base.Problem_OperatorsChanged(sender, e);
+    }
+
+    protected override void DeregisterProblemEvents() {
+      RemoveProblemAnalyzers();
+      base.DeregisterProblemEvents();
+    }
+
+    private void RemoveProblemAnalyzers() {
+      if (Analyzer != null) {
+        foreach (var analyzer in Problem.Operators.OfType<IAnalyzer>())
+          Analyzer.Operators.Remove(analyzer);
+      }
+    }
+    private void AddProblemAnalyzer() {
+      if (Analyzer != null && Problem != null) {
+        foreach (IAnalyzer analyzer in Problem.Operators.OfType<IAnalyzer>()) {
+          Analyzer.Operators.Add(analyzer);
+        }
+      }
+    }
+    #endregion
+  }
+}
Index: branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs
===================================================================
--- branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs	(revision 5123)
+++ branches/TSMemory/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs	(revision 5123)
@@ -0,0 +1,271 @@
+﻿#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.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A problem which can be defined by the user.
+  /// </summary>
+  [Item("User-Defined Problem", "A problem which can be defined by the user.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class UserDefinedProblem : ParameterizedNamedItem, ISingleObjectiveProblem, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
+    }
+    public new ParameterCollection Parameters {
+      get { return base.Parameters; }
+    }
+    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
+      get { return Parameters; }
+    }
+
+    #region Parameters
+    public IValueParameter<ISingleObjectiveEvaluator> EvaluatorParameter {
+      get { return (IValueParameter<ISingleObjectiveEvaluator>)Parameters["Evaluator"]; }
+    }
+    public ValueParameter<BoolValue> MaximizationParameter {
+      get { return (ValueParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    IParameter ISingleObjectiveProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public ValueParameter<ISolutionCreator> SolutionCreatorParameter {
+      get { return (ValueParameter<ISolutionCreator>)Parameters["SolutionCreator"]; }
+    }
+    IParameter IProblem.SolutionCreatorParameter {
+      get { return SolutionCreatorParameter; }
+    }
+    IParameter IProblem.EvaluatorParameter {
+      get { return EvaluatorParameter; }
+    }
+    public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    IParameter ISingleObjectiveProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    public OptionalValueParameter<IScope> BestKnownSolutionParameter {
+      get { return (OptionalValueParameter<IScope>)Parameters["BestKnownSolution"]; }
+    }
+    public ValueParameter<ItemList<IOperator>> OperatorsParameter {
+      get { return (ValueParameter<ItemList<IOperator>>)Parameters["Operators"]; }
+    }
+    #endregion
+
+    #region Properties
+    public BoolValue Maximization {
+      get { return MaximizationParameter.Value; }
+      set { MaximizationParameter.Value = value; }
+    }
+    public ISolutionCreator SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+      set { SolutionCreatorParameter.Value = value; }
+    }
+    ISolutionCreator IProblem.SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+    }
+    public ISingleObjectiveEvaluator Evaluator {
+      get { return EvaluatorParameter.Value; }
+      set { EvaluatorParameter.Value = value; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    IEvaluator IProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+      set { BestKnownQualityParameter.Value = value; }
+    }
+    public IEnumerable<IOperator> Operators {
+      get { return OperatorsParameter.Value; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private UserDefinedProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      AttachEventHandlers();
+    }
+    public UserDefinedProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<ISingleObjectiveEvaluator>("Evaluator", "The evaluator that collects the values to exchange.", new EmptyUserDefinedProblemEvaluator()));
+      Parameters.Add(new ValueParameter<ISolutionCreator>("SolutionCreator", "An operator to create the solution components."));
+      Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to false as most test functions are minimization problems.", new BoolValue(false)));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>("BestKnownQuality", "The quality of the best known solution of this problem."));
+      Parameters.Add(new OptionalValueParameter<IScope>("BestKnownSolution", "The best known solution for this external evaluation problem."));
+      Parameters.Add(new ValueParameter<ItemList<IOperator>>("Operators", "The operators that are passed to the algorithm.", new ItemList<IOperator>()));
+
+      AttachEventHandlers();
+    }
+
+    private UserDefinedProblem(UserDefinedProblem original, Cloner cloner)
+      : base(original, cloner) {
+      AttachEventHandlers();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new UserDefinedProblem(this, cloner);
+    }
+
+    #region Events
+    public event EventHandler SolutionCreatorChanged;
+    private void OnSolutionCreatorChanged() {
+      EventHandler handler = SolutionCreatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler EvaluatorChanged;
+    private void OnEvaluatorChanged() {
+      EventHandler handler = EvaluatorChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler OperatorsChanged;
+    private void OnOperatorsChanged() {
+      EventHandler handler = OperatorsChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Reset;
+    private void OnReset() {
+      EventHandler handler = Reset;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    #endregion
+
+    #region Event handlers
+    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs e) {
+      OnSolutionCreatorChanged();
+    }
+    private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      if (Evaluator != null)
+        Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      ParameterizeOperators();
+      OnEvaluatorChanged();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeOperators();
+    }
+    private void OperatorsParameter_ValueChanged(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    private void OperatorsParameter_Value_ItemsAdded(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    private void OperatorsParameter_Value_ItemsRemoved(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    private void OperatorsParameter_Value_CollectionReset(object sender, EventArgs e) {
+      OnOperatorsChanged();
+    }
+    #endregion
+
+    #region Helpers
+    private void AttachEventHandlers() {
+      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
+      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+      if (Evaluator != null)
+        Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      OperatorsParameter.ValueChanged += new EventHandler(OperatorsParameter_ValueChanged);
+      OperatorsParameter.Value.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<IOperator>>(OperatorsParameter_Value_ItemsAdded);
+      OperatorsParameter.Value.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<IOperator>>(OperatorsParameter_Value_ItemsRemoved);
+      OperatorsParameter.Value.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<IOperator>>(OperatorsParameter_Value_CollectionReset);
+    }
+
+    private void ParameterizeOperators() {
+      // A best effort approach to wiring
+      if (Evaluator != null) {
+        string qualityName = Evaluator.QualityParameter.ActualName;
+        foreach (IOperator op in OperatorsParameter.Value) {
+          foreach (ILookupParameter<DoubleValue> param in op.Parameters.OfType<ILookupParameter<DoubleValue>>()) {
+            if (param.Name.Equals("Quality")) param.ActualName = qualityName;
+          }
+          foreach (IScopeTreeLookupParameter<DoubleValue> param in op.Parameters.OfType<IScopeTreeLookupParameter<DoubleValue>>()) {
+            if (param.Name.Equals("Quality")) param.ActualName = qualityName;
+          }
+        }
+      }
+    }
+    #endregion
+
+    [Item("EmptyUserDefinedProblemEvaluator", "A dummy evaluator that will throw an exception when executed.")]
+    [StorableClass]
+    private sealed class EmptyUserDefinedProblemEvaluator : ParameterizedNamedItem, ISingleObjectiveEvaluator {
+
+      [StorableConstructor]
+      private EmptyUserDefinedProblemEvaluator(bool deserializing) : base(deserializing) { }
+      private EmptyUserDefinedProblemEvaluator(EmptyUserDefinedProblemEvaluator original, Cloner cloner)
+        : base(original, cloner) {
+      }
+      public override IDeepCloneable Clone(Cloner cloner) {
+        return new EmptyUserDefinedProblemEvaluator(this, cloner);
+      }
+
+      #region ISingleObjectiveEvaluator Members
+
+      public ILookupParameter<DoubleValue> QualityParameter {
+        get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+      }
+
+      #endregion
+
+      public EmptyUserDefinedProblemEvaluator() {
+        Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The solution quality."));
+      }
+
+      #region IOperator Members
+
+      public bool Breakpoint { get; set; }
+
+      public IOperation Execute(IExecutionContext context) {
+        throw new InvalidOperationException("Please choose an appropriate evaluation operator.");
+      }
+
+      public void Abort() {
+        throw new InvalidOperationException("Please choose an appropriate evaluation operator.");
+      }
+
+#pragma warning disable 67
+      public event EventHandler BreakpointChanged;
+
+      public event EventHandler Executed;
+#pragma warning restore 67
+
+      #endregion
+
+      public override Image ItemImage {
+        get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Method; }
+      }
+    }
+  }
+}
