Index: trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs	(revision 5953)
+++ 	(revision )
@@ -1,317 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-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.VSImageLibrary.ExecutablePrepared;
-        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted;
-        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused;
-        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;
-        else return HeuristicLab.Common.Resources.VSImageLibrary.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();
-        }
-      }
-    }
-
-    public virtual IEnumerable<IOptimizer> NestedOptimizers {
-      get { return Enumerable.Empty<IOptimizer>(); }
-    }
-
-    protected Algorithm()
-      : base() {
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-    }
-    protected Algorithm(string name)
-      : base(name) {
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-    }
-    protected Algorithm(string name, ParameterCollection parameters)
-      : base(name, parameters) {
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-    }
-    protected Algorithm(string name, string description)
-      : base(name, description) {
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-    }
-    protected Algorithm(string name, string description, ParameterCollection parameters)
-      : base(name, description, parameters) {
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-    }
-    [StorableConstructor]
-    protected Algorithm(bool deserializing) : base(deserializing) { }
-    [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));
-      CollectResultsRecursively("", Results, values);
-    }
-
-    private void CollectResultsRecursively(string path, ResultCollection results, IDictionary<string, IItem> values) {
-      foreach (IResult result in results) {
-        values.Add(path + result.Name, result.Value);
-        ResultCollection childCollection = result.Value as ResultCollection;
-        if (childCollection != null) {
-          CollectResultsRecursively(path + result.Name + ".", childCollection, values);
-        }
-      }
-    }
-
-    #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.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
-      problem.Reset -= new EventHandler(Problem_Reset);
-    }
-    protected virtual void RegisterProblemEvents() {
-      problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
-      problem.Reset += new EventHandler(Problem_Reset);
-    }
-    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: trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/Algorithm.cs	(revision 5954)
@@ -0,0 +1,317 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+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.VSImageLibrary.ExecutablePrepared;
+        else if (ExecutionState == ExecutionState.Started) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStarted;
+        else if (ExecutionState == ExecutionState.Paused) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutablePaused;
+        else if (ExecutionState == ExecutionState.Stopped) return HeuristicLab.Common.Resources.VSImageLibrary.ExecutableStopped;
+        else return HeuristicLab.Common.Resources.VSImageLibrary.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();
+        }
+      }
+    }
+
+    public virtual IEnumerable<IOptimizer> NestedOptimizers {
+      get { return Enumerable.Empty<IOptimizer>(); }
+    }
+
+    protected Algorithm()
+      : base() {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name)
+      : base(name) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, ParameterCollection parameters)
+      : base(name, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, string description)
+      : base(name, description) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    protected Algorithm(string name, string description, ParameterCollection parameters)
+      : base(name, description, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+    }
+    [StorableConstructor]
+    protected Algorithm(bool deserializing) : base(deserializing) { }
+    [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));
+      CollectResultsRecursively("", Results, values);
+    }
+
+    private void CollectResultsRecursively(string path, ResultCollection results, IDictionary<string, IItem> values) {
+      foreach (IResult result in results) {
+        values.Add(path + result.Name, result.Value);
+        ResultCollection childCollection = result.Value as ResultCollection;
+        if (childCollection != null) {
+          CollectResultsRecursively(path + result.Name + ".", childCollection, values);
+        }
+      }
+    }
+
+    #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.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
+      problem.Reset -= new EventHandler(Problem_Reset);
+    }
+    protected virtual void RegisterProblemEvents() {
+      problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
+      problem.Reset += new EventHandler(Problem_Reset);
+    }
+    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: trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/EngineAlgorithm.cs	(revision 5954)
@@ -0,0 +1,235 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.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();
+
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      // clear global scope if it contains any sub-scopes or additional variables
+      if ((ExecutionState == Core.ExecutionState.Stopped) && ((globalScope.SubScopes.Count > 0) || (globalScope.Variables.Count > 1))) {
+        ResultCollection results = Results;
+        globalScope.Clear();
+        globalScope.Variables.Add(new Variable("Results", results));
+      }
+      #endregion
+    }
+
+    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) {
+      ResultCollection results = Results;
+      globalScope.Clear();
+      globalScope.Variables.Add(new Variable("Results", results));
+      OnStopped();
+    }
+
+    private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
+      Prepare();
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationAlgorithm.cs	(revision 5954)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A base class for heuristic optimization algorithms.
+  /// </summary>
+  [Item("Heuristic Optimization Algorithm", "A base class for heuristic optimization algorithms.")]
+  [StorableClass]
+  public abstract class HeuristicOptimizationAlgorithm : Algorithm {
+    public new IHeuristicOptimizationProblem Problem {
+      get { return (IHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+
+    protected HeuristicOptimizationAlgorithm() : base() { }
+    protected HeuristicOptimizationAlgorithm(string name) : base(name) { }
+    protected HeuristicOptimizationAlgorithm(string name, ParameterCollection parameters) : base(name, parameters) { }
+    protected HeuristicOptimizationAlgorithm(string name, string description) : base(name, description) { }
+    protected HeuristicOptimizationAlgorithm(string name, string description, ParameterCollection parameters) : base(name, description, parameters) { }
+
+    [StorableConstructor]
+    protected HeuristicOptimizationAlgorithm(bool deserializing) : base(deserializing) { }
+    protected HeuristicOptimizationAlgorithm(HeuristicOptimizationAlgorithm original, Cloner cloner) : base(original, cloner) { }
+
+    #region Events
+    protected override void DeregisterProblemEvents() {
+      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
+      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
+      base.DeregisterProblemEvents();
+    }
+    protected override void RegisterProblemEvents() {
+      base.RegisterProblemEvents();
+      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
+      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
+    }
+
+    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
+    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/HeuristicOptimizationEngineAlgorithm.cs	(revision 5954)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// A base class for heuristic optimization algorithms using an execution engine.
+  /// </summary>
+  [Item("Heuristic Optimization Enigne Algorithm", "A base class for heuristic optimization algorithms using an execution engine.")]
+  [StorableClass]
+  public abstract class HeuristicOptimizationEngineAlgorithm : EngineAlgorithm {
+    public new IHeuristicOptimizationProblem Problem {
+      get { return (IHeuristicOptimizationProblem)base.Problem; }
+      set { base.Problem = value; }
+    }
+
+    protected HeuristicOptimizationEngineAlgorithm() : base() { }
+    protected HeuristicOptimizationEngineAlgorithm(string name) : base(name) { }
+    protected HeuristicOptimizationEngineAlgorithm(string name, ParameterCollection parameters) : base(name, parameters) { }
+    protected HeuristicOptimizationEngineAlgorithm(string name, string description) : base(name, description) { }
+    protected HeuristicOptimizationEngineAlgorithm(string name, string description, ParameterCollection parameters) : base(name, description, parameters) { }
+
+    [StorableConstructor]
+    protected HeuristicOptimizationEngineAlgorithm(bool deserializing) : base(deserializing) { }
+    protected HeuristicOptimizationEngineAlgorithm(HeuristicOptimizationEngineAlgorithm original, Cloner cloner) : base(original, cloner) { }
+
+    #region Events
+    protected override void DeregisterProblemEvents() {
+      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
+      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
+      base.DeregisterProblemEvents();
+    }
+    protected override void RegisterProblemEvents() {
+      base.RegisterProblemEvents();
+      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
+      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
+    }
+
+    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
+    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Algorithms/UserDefinedAlgorithm.cs	(revision 5954)
@@ -0,0 +1,115 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.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 {
+        IParameter param;
+        if (Parameters.TryGetValue("Analyzer", out param))
+          return param as IValueParameter;
+        return null;
+      }
+    }
+    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: trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs	(revision 5953)
+++ 	(revision )
@@ -1,235 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.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();
-
-      // BackwardsCompatibility3.3
-      #region Backwards compatible code (remove with 3.4)
-      // clear global scope if it contains any sub-scopes or additional variables
-      if ((ExecutionState == Core.ExecutionState.Stopped) && ((globalScope.SubScopes.Count > 0) || (globalScope.Variables.Count > 1))) {
-        ResultCollection results = Results;
-        globalScope.Clear();
-        globalScope.Variables.Add(new Variable("Results", results));
-      }
-      #endregion
-    }
-
-    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) {
-      ResultCollection results = Results;
-      globalScope.Clear();
-      globalScope.Variables.Add(new Variable("Results", results));
-      OnStopped();
-    }
-
-    private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
-      Prepare();
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 5953)
+++ trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 5954)
@@ -112,15 +112,15 @@
   <ItemGroup>
     <None Include="HeuristicLabOptimizationPlugin.cs.frame" />
-    <Compile Include="Algorithm.cs" />
+    <Compile Include="Algorithms\Algorithm.cs" />
     <Compile Include="BatchRun.cs" />
     <Compile Include="Interfaces\IDiscreteDoubleMatrixModifier.cs" />
-    <Compile Include="HeuristicOptimizationEngineAlgorithm.cs" />
+    <Compile Include="Algorithms\HeuristicOptimizationEngineAlgorithm.cs" />
     <Compile Include="Interfaces\IGlobalParticleUpdater.cs" />
     <Compile Include="Interfaces\ILocalImprovementOperator.cs" />
     <Compile Include="Interfaces\ILocalParticleUpdater.cs" />
-    <Compile Include="HeuristicOptimizationAlgorithm.cs" />
-    <Compile Include="MultiObjectiveHeuristicOptimizationProblem.cs" />
-    <Compile Include="HeuristicOptimizationProblem.cs" />
-    <Compile Include="SingleObjectiveHeuristicOptimizationProblem.cs" />
+    <Compile Include="Algorithms\HeuristicOptimizationAlgorithm.cs" />
+    <Compile Include="Problems\MultiObjectiveHeuristicOptimizationProblem.cs" />
+    <Compile Include="Problems\HeuristicOptimizationProblem.cs" />
+    <Compile Include="Problems\SingleObjectiveHeuristicOptimizationProblem.cs" />
     <Compile Include="Interfaces\IHeuristicOptimizationProblem.cs" />
     <Compile Include="Interfaces\IMultiAnalyzer.cs" />
@@ -133,5 +133,5 @@
     <Compile Include="Interfaces\IMultiObjectiveHeuristicOptimizationProblem.cs" />
     <Compile Include="Interfaces\ISingleObjectiveHeuristicOptimizationProblem.cs" />
-    <Compile Include="Problem.cs" />
+    <Compile Include="Problems\Problem.cs" />
     <Compile Include="RunCollectionConstraints\RunCollectionComparisonConstraint.cs" />
     <Compile Include="RunCollectionConstraints\RunCollectionConstraintCollection.cs" />
@@ -180,10 +180,10 @@
     <Compile Include="Interfaces\ITabuMaker.cs" />
     <Compile Include="Result.cs" />
-    <Compile Include="UserDefinedAlgorithm.cs" />
-    <Compile Include="EngineAlgorithm.cs" />
+    <Compile Include="Algorithms\UserDefinedAlgorithm.cs" />
+    <Compile Include="Algorithms\EngineAlgorithm.cs" />
     <Compile Include="HeuristicLabOptimizationPlugin.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ResultCollection.cs" />
-    <Compile Include="UserDefinedProblem.cs" />
+    <Compile Include="Problems\UserDefinedProblem.cs" />
   </ItemGroup>
   <ItemGroup>
Index: trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationAlgorithm.cs	(revision 5953)
+++ 	(revision )
@@ -1,65 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  /// <summary>
-  /// A base class for heuristic optimization algorithms.
-  /// </summary>
-  [Item("Heuristic Optimization Algorithm", "A base class for heuristic optimization algorithms.")]
-  [StorableClass]
-  public abstract class HeuristicOptimizationAlgorithm : Algorithm {
-    public new IHeuristicOptimizationProblem Problem {
-      get { return (IHeuristicOptimizationProblem)base.Problem; }
-      set { base.Problem = value; }
-    }
-
-    protected HeuristicOptimizationAlgorithm() : base() { }
-    protected HeuristicOptimizationAlgorithm(string name) : base(name) { }
-    protected HeuristicOptimizationAlgorithm(string name, ParameterCollection parameters) : base(name, parameters) { }
-    protected HeuristicOptimizationAlgorithm(string name, string description) : base(name, description) { }
-    protected HeuristicOptimizationAlgorithm(string name, string description, ParameterCollection parameters) : base(name, description, parameters) { }
-
-    [StorableConstructor]
-    protected HeuristicOptimizationAlgorithm(bool deserializing) : base(deserializing) { }
-    protected HeuristicOptimizationAlgorithm(HeuristicOptimizationAlgorithm original, Cloner cloner) : base(original, cloner) { }
-
-    #region Events
-    protected override void DeregisterProblemEvents() {
-      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
-      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
-      base.DeregisterProblemEvents();
-    }
-    protected override void RegisterProblemEvents() {
-      base.RegisterProblemEvents();
-      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
-      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
-    }
-
-    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
-    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationEngineAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationEngineAlgorithm.cs	(revision 5953)
+++ 	(revision )
@@ -1,65 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  /// <summary>
-  /// A base class for heuristic optimization algorithms using an execution engine.
-  /// </summary>
-  [Item("Heuristic Optimization Enigne Algorithm", "A base class for heuristic optimization algorithms using an execution engine.")]
-  [StorableClass]
-  public abstract class HeuristicOptimizationEngineAlgorithm : EngineAlgorithm {
-    public new IHeuristicOptimizationProblem Problem {
-      get { return (IHeuristicOptimizationProblem)base.Problem; }
-      set { base.Problem = value; }
-    }
-
-    protected HeuristicOptimizationEngineAlgorithm() : base() { }
-    protected HeuristicOptimizationEngineAlgorithm(string name) : base(name) { }
-    protected HeuristicOptimizationEngineAlgorithm(string name, ParameterCollection parameters) : base(name, parameters) { }
-    protected HeuristicOptimizationEngineAlgorithm(string name, string description) : base(name, description) { }
-    protected HeuristicOptimizationEngineAlgorithm(string name, string description, ParameterCollection parameters) : base(name, description, parameters) { }
-
-    [StorableConstructor]
-    protected HeuristicOptimizationEngineAlgorithm(bool deserializing) : base(deserializing) { }
-    protected HeuristicOptimizationEngineAlgorithm(HeuristicOptimizationEngineAlgorithm original, Cloner cloner) : base(original, cloner) { }
-
-    #region Events
-    protected override void DeregisterProblemEvents() {
-      Problem.SolutionCreatorChanged -= new EventHandler(Problem_SolutionCreatorChanged);
-      Problem.EvaluatorChanged -= new EventHandler(Problem_EvaluatorChanged);
-      base.DeregisterProblemEvents();
-    }
-    protected override void RegisterProblemEvents() {
-      base.RegisterProblemEvents();
-      Problem.SolutionCreatorChanged += new EventHandler(Problem_SolutionCreatorChanged);
-      Problem.EvaluatorChanged += new EventHandler(Problem_EvaluatorChanged);
-    }
-
-    protected virtual void Problem_SolutionCreatorChanged(object sender, EventArgs e) { }
-    protected virtual void Problem_EvaluatorChanged(object sender, EventArgs e) { }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/HeuristicOptimizationProblem.cs	(revision 5953)
+++ 	(revision )
@@ -1,112 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  [Item("Heuristic Optimization Problem", "Represents the base class for a heuristic optimization problem.")]
-  [StorableClass]
-  public abstract class HeuristicOptimizationProblem<T, U> : Problem, IHeuristicOptimizationProblem
-    where T : class,IEvaluator
-    where U : class,ISolutionCreator {
-    private const string EvaluatorParameterName = "Evaluator";
-    private const string SolutionCreateParameterName = "SolutionCreator";
-
-    [StorableConstructor]
-    protected HeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
-    protected HeuristicOptimizationProblem(HeuristicOptimizationProblem<T, U> original, Cloner cloner)
-      : base(original, cloner) {
-      RegisterEventHandlers();
-    }
-
-    protected HeuristicOptimizationProblem()
-      : base() {
-      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();
-    }
-
-    protected HeuristicOptimizationProblem(T evaluator, U solutionCreator)
-      : base() {
-      Parameters.Add(new ValueParameter<T>(EvaluatorParameterName, "The operator used to evaluate a solution.", evaluator));
-      Parameters.Add(new ValueParameter<U>(SolutionCreateParameterName, "The operator to create a solution.", solutionCreator));
-      RegisterEventHandlers();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      RegisterEventHandlers();
-    }
-
-    private void RegisterEventHandlers() {
-      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
-      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
-    }
-
-    #region properties
-    public T Evaluator {
-      get { return EvaluatorParameter.Value; }
-      protected set { EvaluatorParameter.Value = value; }
-    }
-    public ValueParameter<T> EvaluatorParameter {
-      get { return (ValueParameter<T>)Parameters[EvaluatorParameterName]; }
-    }
-    IEvaluator IHeuristicOptimizationProblem.Evaluator { get { return Evaluator; } }
-    IParameter IHeuristicOptimizationProblem.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 IHeuristicOptimizationProblem.SolutionCreator { get { return SolutionCreator; } }
-    IParameter IHeuristicOptimizationProblem.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);
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/MultiObjectiveHeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/MultiObjectiveHeuristicOptimizationProblem.cs	(revision 5953)
+++ 	(revision )
@@ -1,64 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  [Item("Multi-Objective Heuristic Optimization Problem", "A base class for multi-objective heuristic optimization problems.")]
-  [StorableClass]
-  public abstract class MultiObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, IMultiObjectiveHeuristicOptimizationProblem
-    where T : class, IMultiObjectiveEvaluator
-    where U : class, ISolutionCreator {
-    private const string MaximizationParameterName = "Maximization";
-
-    [StorableConstructor]
-    protected MultiObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
-    protected MultiObjectiveHeuristicOptimizationProblem(MultiObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
-    protected MultiObjectiveHeuristicOptimizationProblem()
-      : base() {
-      Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Determines for each objective whether it should be maximized or minimized."));
-    }
-
-    protected MultiObjectiveHeuristicOptimizationProblem(T evaluator, U solutionCreator)
-      : base(evaluator, solutionCreator) {
-      Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Determines for each objective whether it should be maximized or minimized."));
-    }
-
-    public ValueParameter<BoolArray> MaximizationParameter {
-      get { return (ValueParameter<BoolArray>)Parameters[MaximizationParameterName]; }
-    }
-    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
-      get { return MaximizationParameter; }
-    }
-    public BoolArray Maximization {
-      get { return MaximizationParameter.Value; }
-      protected set { MaximizationParameter.Value = value; }
-    }
-
-    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
-      get { return Evaluator; }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problem.cs	(revision 5953)
+++ 	(revision )
@@ -1,95 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  [Item("Problem", "Represents the base class for a problem.")]
-  [StorableClass]
-  public abstract class Problem : ParameterizedNamedItem, IProblem {
-    public override Image ItemImage {
-      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
-    }
-
-    [StorableConstructor]
-    protected Problem(bool deserializing) : base(deserializing) { }
-    protected Problem(Problem original, Cloner cloner)
-      : base(original, cloner) {
-      operators = cloner.Clone(original.operators);
-      RegisterEventHandlers();
-    }
-
-    protected Problem()
-      : base() {
-      operators = new OperatorCollection();
-      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);
-    }
-
-    #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; } }
-    #endregion
-
-    #region events
-    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: trunk/sources/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Problems/HeuristicOptimizationProblem.cs	(revision 5954)
@@ -0,0 +1,112 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Heuristic Optimization Problem", "Represents the base class for a heuristic optimization problem.")]
+  [StorableClass]
+  public abstract class HeuristicOptimizationProblem<T, U> : Problem, IHeuristicOptimizationProblem
+    where T : class,IEvaluator
+    where U : class,ISolutionCreator {
+    private const string EvaluatorParameterName = "Evaluator";
+    private const string SolutionCreateParameterName = "SolutionCreator";
+
+    [StorableConstructor]
+    protected HeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
+    protected HeuristicOptimizationProblem(HeuristicOptimizationProblem<T, U> original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+
+    protected HeuristicOptimizationProblem()
+      : base() {
+      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();
+    }
+
+    protected HeuristicOptimizationProblem(T evaluator, U solutionCreator)
+      : base() {
+      Parameters.Add(new ValueParameter<T>(EvaluatorParameterName, "The operator used to evaluate a solution.", evaluator));
+      Parameters.Add(new ValueParameter<U>(SolutionCreateParameterName, "The operator to create a solution.", solutionCreator));
+      RegisterEventHandlers();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    private void RegisterEventHandlers() {
+      EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
+      SolutionCreatorParameter.ValueChanged += new EventHandler(SolutionCreatorParameter_ValueChanged);
+    }
+
+    #region properties
+    public T Evaluator {
+      get { return EvaluatorParameter.Value; }
+      protected set { EvaluatorParameter.Value = value; }
+    }
+    public ValueParameter<T> EvaluatorParameter {
+      get { return (ValueParameter<T>)Parameters[EvaluatorParameterName]; }
+    }
+    IEvaluator IHeuristicOptimizationProblem.Evaluator { get { return Evaluator; } }
+    IParameter IHeuristicOptimizationProblem.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 IHeuristicOptimizationProblem.SolutionCreator { get { return SolutionCreator; } }
+    IParameter IHeuristicOptimizationProblem.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);
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Problems/MultiObjectiveHeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problems/MultiObjectiveHeuristicOptimizationProblem.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Problems/MultiObjectiveHeuristicOptimizationProblem.cs	(revision 5954)
@@ -0,0 +1,64 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Multi-Objective Heuristic Optimization Problem", "A base class for multi-objective heuristic optimization problems.")]
+  [StorableClass]
+  public abstract class MultiObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, IMultiObjectiveHeuristicOptimizationProblem
+    where T : class, IMultiObjectiveEvaluator
+    where U : class, ISolutionCreator {
+    private const string MaximizationParameterName = "Maximization";
+
+    [StorableConstructor]
+    protected MultiObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
+    protected MultiObjectiveHeuristicOptimizationProblem(MultiObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
+    protected MultiObjectiveHeuristicOptimizationProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Determines for each objective whether it should be maximized or minimized."));
+    }
+
+    protected MultiObjectiveHeuristicOptimizationProblem(T evaluator, U solutionCreator)
+      : base(evaluator, solutionCreator) {
+      Parameters.Add(new ValueParameter<BoolArray>(MaximizationParameterName, "Determines for each objective whether it should be maximized or minimized."));
+    }
+
+    public ValueParameter<BoolArray> MaximizationParameter {
+      get { return (ValueParameter<BoolArray>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter IMultiObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public BoolArray Maximization {
+      get { return MaximizationParameter.Value; }
+      protected set { MaximizationParameter.Value = value; }
+    }
+
+    IMultiObjectiveEvaluator IMultiObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Problems/Problem.cs	(revision 5954)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Problem", "Represents the base class for a problem.")]
+  [StorableClass]
+  public abstract class Problem : ParameterizedNamedItem, IProblem {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Type; }
+    }
+
+    [StorableConstructor]
+    protected Problem(bool deserializing) : base(deserializing) { }
+    protected Problem(Problem original, Cloner cloner)
+      : base(original, cloner) {
+      operators = cloner.Clone(original.operators);
+      RegisterEventHandlers();
+    }
+
+    protected Problem()
+      : base() {
+      operators = new OperatorCollection();
+      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);
+    }
+
+    #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; } }
+    #endregion
+
+    #region events
+    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: trunk/sources/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Problems/SingleObjectiveHeuristicOptimizationProblem.cs	(revision 5954)
@@ -0,0 +1,88 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("Single-Objective Heuristic OptimizationProblem", "A base class for single-objective heuristic optimization problems.")]
+  [StorableClass]
+  public abstract class SingleObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, ISingleObjectiveHeuristicOptimizationProblem
+    where T : class, ISingleObjectiveEvaluator
+    where U : class, ISolutionCreator {
+    private const string MaximizationParameterName = "Maximization";
+    private const string BestKnownQualityParameterName = "BestKnownQuality";
+
+    [StorableConstructor]
+    protected SingleObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
+    protected SingleObjectiveHeuristicOptimizationProblem(SingleObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
+    protected SingleObjectiveHeuristicOptimizationProblem()
+      : base() {
+      Parameters.Add(new ValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized.", new BoolValue()));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem.", new DoubleValue()));
+    }
+
+    protected SingleObjectiveHeuristicOptimizationProblem(T evaluator, U solutionCreator)
+      : base(evaluator, solutionCreator) {
+      Parameters.Add(new ValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized.", new BoolValue()));
+      Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem.", new DoubleValue()));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // BackwardsCompatibility3.3
+      #region Backwards compatible code (remove with 3.4)
+      if (BestKnownQualityParameter is ValueParameter<DoubleValue>) {
+        Parameters.Remove(BestKnownQualityParameterName);
+        Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem."));
+      }
+      #endregion
+    }
+    public ValueParameter<BoolValue> MaximizationParameter {
+      get { return (ValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public BoolValue Maximization {
+      get { return MaximizationParameter.Value; }
+      protected set { MaximizationParameter.Value = value; }
+    }
+
+    public IValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (IValueParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
+      get { return BestKnownQualityParameter; }
+    }
+    public DoubleValue BestKnownQuality {
+      get { return BestKnownQualityParameter.Value; }
+      protected set { BestKnownQualityParameter.Value = value; }
+    }
+
+    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return Evaluator; }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs	(revision 5954)
+++ trunk/sources/HeuristicLab.Optimization/3.3/Problems/UserDefinedProblem.cs	(revision 5954)
@@ -0,0 +1,270 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Linq;
+using System.Threading;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+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, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.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 ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
+      get { return MaximizationParameter; }
+    }
+    public ValueParameter<ISolutionCreator> SolutionCreatorParameter {
+      get { return (ValueParameter<ISolutionCreator>)Parameters["SolutionCreator"]; }
+    }
+    IParameter IHeuristicOptimizationProblem.SolutionCreatorParameter {
+      get { return SolutionCreatorParameter; }
+    }
+    IParameter IHeuristicOptimizationProblem.EvaluatorParameter {
+      get { return EvaluatorParameter; }
+    }
+    public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
+      get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
+    }
+    IParameter ISingleObjectiveHeuristicOptimizationProblem.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 IHeuristicOptimizationProblem.SolutionCreator {
+      get { return SolutionCreatorParameter.Value; }
+    }
+    public ISingleObjectiveEvaluator Evaluator {
+      get { return EvaluatorParameter.Value; }
+      set { EvaluatorParameter.Value = value; }
+    }
+    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
+      get { return EvaluatorParameter.Value; }
+    }
+    IEvaluator IHeuristicOptimizationProblem.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]
+    [NonDiscoverableType]
+    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, CancellationToken cancellationToken) {
+        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.VSImageLibrary.Method; }
+      }
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Optimization/3.3/SingleObjectiveHeuristicOptimizationProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/SingleObjectiveHeuristicOptimizationProblem.cs	(revision 5953)
+++ 	(revision )
@@ -1,88 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  [Item("Single-Objective Heuristic OptimizationProblem", "A base class for single-objective heuristic optimization problems.")]
-  [StorableClass]
-  public abstract class SingleObjectiveHeuristicOptimizationProblem<T, U> : HeuristicOptimizationProblem<T, U>, ISingleObjectiveHeuristicOptimizationProblem
-    where T : class, ISingleObjectiveEvaluator
-    where U : class, ISolutionCreator {
-    private const string MaximizationParameterName = "Maximization";
-    private const string BestKnownQualityParameterName = "BestKnownQuality";
-
-    [StorableConstructor]
-    protected SingleObjectiveHeuristicOptimizationProblem(bool deserializing) : base(deserializing) { }
-    protected SingleObjectiveHeuristicOptimizationProblem(SingleObjectiveHeuristicOptimizationProblem<T, U> original, Cloner cloner) : base(original, cloner) { }
-    protected SingleObjectiveHeuristicOptimizationProblem()
-      : base() {
-      Parameters.Add(new ValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized.", new BoolValue()));
-      Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem.", new DoubleValue()));
-    }
-
-    protected SingleObjectiveHeuristicOptimizationProblem(T evaluator, U solutionCreator)
-      : base(evaluator, solutionCreator) {
-      Parameters.Add(new ValueParameter<BoolValue>(MaximizationParameterName, "Set to false if the problem should be minimized.", new BoolValue()));
-      Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem.", new DoubleValue()));
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      // BackwardsCompatibility3.3
-      #region Backwards compatible code (remove with 3.4)
-      if (BestKnownQualityParameter is ValueParameter<DoubleValue>) {
-        Parameters.Remove(BestKnownQualityParameterName);
-        Parameters.Add(new OptionalValueParameter<DoubleValue>(BestKnownQualityParameterName, "The quality of the best known solution of this problem."));
-      }
-      #endregion
-    }
-    public ValueParameter<BoolValue> MaximizationParameter {
-      get { return (ValueParameter<BoolValue>)Parameters[MaximizationParameterName]; }
-    }
-    IParameter ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
-      get { return MaximizationParameter; }
-    }
-    public BoolValue Maximization {
-      get { return MaximizationParameter.Value; }
-      protected set { MaximizationParameter.Value = value; }
-    }
-
-    public IValueParameter<DoubleValue> BestKnownQualityParameter {
-      get { return (IValueParameter<DoubleValue>)Parameters[BestKnownQualityParameterName]; }
-    }
-    IParameter ISingleObjectiveHeuristicOptimizationProblem.BestKnownQualityParameter {
-      get { return BestKnownQualityParameter; }
-    }
-    public DoubleValue BestKnownQuality {
-      get { return BestKnownQualityParameter.Value; }
-      protected set { BestKnownQualityParameter.Value = value; }
-    }
-
-    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
-      get { return Evaluator; }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 5953)
+++ 	(revision )
@@ -1,115 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.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 {
-        IParameter param;
-        if (Parameters.TryGetValue("Analyzer", out param))
-          return param as IValueParameter;
-        return null;
-      }
-    }
-    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: trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedProblem.cs	(revision 5953)
+++ 	(revision )
@@ -1,270 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Drawing;
-using System.Linq;
-using System.Threading;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-
-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, ISingleObjectiveHeuristicOptimizationProblem, IStorableContent {
-    public string Filename { get; set; }
-
-    public override Image ItemImage {
-      get { return HeuristicLab.Common.Resources.VSImageLibrary.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 ISingleObjectiveHeuristicOptimizationProblem.MaximizationParameter {
-      get { return MaximizationParameter; }
-    }
-    public ValueParameter<ISolutionCreator> SolutionCreatorParameter {
-      get { return (ValueParameter<ISolutionCreator>)Parameters["SolutionCreator"]; }
-    }
-    IParameter IHeuristicOptimizationProblem.SolutionCreatorParameter {
-      get { return SolutionCreatorParameter; }
-    }
-    IParameter IHeuristicOptimizationProblem.EvaluatorParameter {
-      get { return EvaluatorParameter; }
-    }
-    public OptionalValueParameter<DoubleValue> BestKnownQualityParameter {
-      get { return (OptionalValueParameter<DoubleValue>)Parameters["BestKnownQuality"]; }
-    }
-    IParameter ISingleObjectiveHeuristicOptimizationProblem.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 IHeuristicOptimizationProblem.SolutionCreator {
-      get { return SolutionCreatorParameter.Value; }
-    }
-    public ISingleObjectiveEvaluator Evaluator {
-      get { return EvaluatorParameter.Value; }
-      set { EvaluatorParameter.Value = value; }
-    }
-    ISingleObjectiveEvaluator ISingleObjectiveHeuristicOptimizationProblem.Evaluator {
-      get { return EvaluatorParameter.Value; }
-    }
-    IEvaluator IHeuristicOptimizationProblem.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]
-    [NonDiscoverableType]
-    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, CancellationToken cancellationToken) {
-        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.VSImageLibrary.Method; }
-      }
-    }
-  }
-}
