Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.Designer.cs	(revision 7246)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.Designer.cs	(revision 7246)
@@ -0,0 +1,40 @@
+#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
+
+namespace HeuristicLab.Algorithms.Benchmarks.Views {
+  partial class BenchmarkAlgorithmView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.cs	(revision 7246)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkAlgorithmView.cs	(revision 7246)
@@ -0,0 +1,39 @@
+#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.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.Optimization.Views;
+
+namespace HeuristicLab.Algorithms.Benchmarks.Views {
+  [View("BenchmarkAlgorithm View")]
+  [Content(typeof(BenchmarkAlgorithm), true)]
+  public partial class BenchmarkAlgorithmView : AlgorithmView {
+    public new BenchmarkAlgorithm Content {
+      get { return (BenchmarkAlgorithm)base.Content; }
+      set { base.Content = value; }
+    }
+    public BenchmarkAlgorithmView() {
+      InitializeComponent();
+      tabControl.TabPages.Remove(this.problemTabPage);
+    }
+  }
+}
Index: unk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkView.Designer.cs	(revision 7245)
+++ 	(revision )
@@ -1,40 +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
-
-namespace HeuristicLab.Algorithms.Benchmarks.Views {
-  partial class BenchmarkView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-
-    }
-
-    #endregion
-  }
-}
Index: unk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/BenchmarkView.cs	(revision 7245)
+++ 	(revision )
@@ -1,39 +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.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.Optimization.Views;
-
-namespace HeuristicLab.Algorithms.Benchmarks.Views {
-  [View("Benchmark View")]
-  [Content(typeof(Benchmark), true)]
-  public partial class BenchmarkView : AlgorithmView {
-    public new Benchmark Content {
-      get { return (Benchmark)base.Content; }
-      set { base.Content = value; }
-    }
-    public BenchmarkView() {
-      InitializeComponent();
-      tabControl.TabPages.Remove(this.problemTabPage);
-    }
-  }
-}
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/HeuristicLab.Algorithms.Benchmarks.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/HeuristicLab.Algorithms.Benchmarks.Views-3.3.csproj	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/HeuristicLab.Algorithms.Benchmarks.Views-3.3.csproj	(revision 7246)
@@ -84,24 +84,14 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Drawing" />
+    <Reference Include="System.Data" />
     <Reference Include="System.Windows.Forms" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="BenchmarkView.cs">
+    <Compile Include="BenchmarkAlgorithmView.cs">
       <SubType>UserControl</SubType>
     </Compile>
-    <Compile Include="BenchmarkView.Designer.cs">
-      <DependentUpon>BenchmarkView.cs</DependentUpon>
-    </Compile>
-    <Compile Include="IBenchmarkView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="IBenchmarkView.Designer.cs">
-      <DependentUpon>IBenchmarkView.cs</DependentUpon>
+    <Compile Include="BenchmarkAlgorithmView.Designer.cs">
+      <DependentUpon>BenchmarkAlgorithmView.cs</DependentUpon>
     </Compile>
     <Compile Include="Plugin.cs" />
@@ -117,9 +107,4 @@
       <Project>{068C70A7-8CAF-4AB6-8721-4564D62292BC}</Project>
       <Name>HeuristicLab.Algorithms.Benchmarks-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
-      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
-      <Name>HeuristicLab.Collections-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: unk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/IBenchmarkView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/IBenchmarkView.Designer.cs	(revision 7245)
+++ 	(revision )
@@ -1,40 +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
-
-namespace HeuristicLab.Algorithms.Benchmarks.Views {
-  partial class IBenchmarkView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-
-    }
-
-    #endregion
-  }
-}
Index: unk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/IBenchmarkView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/IBenchmarkView.cs	(revision 7245)
+++ 	(revision )
@@ -1,40 +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.Windows.Forms;
-using HeuristicLab.MainForm;
-using HeuristicLab.MainForm.WindowsForms;
-
-namespace HeuristicLab.Algorithms.Benchmarks.Views {
-  [View("IBenchmark View")]
-  [Content(typeof(IBenchmark), true)]
-  public partial class IBenchmarkView : AsynchronousContentView {
-    public new IBenchmark Content {
-      get { return (IBenchmark)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public IBenchmarkView() {
-      InitializeComponent();
-    }
-
-  }
-}
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Plugin.cs.frame	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Plugin.cs.frame	(revision 7246)
@@ -26,11 +26,12 @@
   /// Plugin class for HeuristicLab.Algorithms.Benchmarks plugin.
   /// </summary>
-  [Plugin("HeuristicLab.Algorithms.Benchmarks.Views", "Provides views for benchmarking algorithms.", "3.3.6.$WCREV$")]
-  [PluginFile("HeuristicLab.Algorithms.Benchmarks.Views-3.3.dll", PluginFileType.Assembly)]  
+  [Plugin("HeuristicLab.Algorithms.Benchmarks.Views", "Provides views for performance benchmark algorithms.", "3.3.6.$WCREV$")]
+  [PluginFile("HeuristicLab.Algorithms.Benchmarks.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Algorithms.Benchmarks", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
   [PluginDependency("HeuristicLab.MainForm", "3.3")]
-  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
   [PluginDependency("HeuristicLab.Optimization.Views", "3.3")]
-  [PluginDependency("HeuristicLab.Algorithms.Benchmarks", "3.3")] 
   public class HeuristicLabAlgorithmsBenchmarksViewsPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Properties/AssemblyInfo.cs.frame	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks.Views/3.3/Properties/AssemblyInfo.cs.frame	(revision 7246)
@@ -27,5 +27,5 @@
 // associated with an assembly.
 [assembly: AssemblyTitle("HeuristicLab.Algorithms.Benchmarks.Views")]
-[assembly: AssemblyDescription("Benchmarking")]
+[assembly: AssemblyDescription("Views of the HeuristicLab performance benchmark algorithms")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
@@ -41,5 +41,5 @@
 
 // The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3E422463-0CE0-400D-9544-5C11D5818769")]
+[assembly: Guid("E4BF5E27-BFA8-4402-9B75-4BE3B91E012C")]
 
 // Version information for an assembly consists of the following four values:
Index: unk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Benchmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Benchmark.cs	(revision 7245)
+++ 	(revision )
@@ -1,565 +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 System.Threading.Tasks;
-using HeuristicLab.Collections;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Optimization;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.PluginInfrastructure;
-
-namespace HeuristicLab.Algorithms.Benchmarks {
-  /// <summary>
-  /// A base class for benchmarks.
-  /// </summary>
-  [Item("Benchmark", "A wrapper for benchmark algorithms.")]
-  [Creatable("Algorithms")]
-  [StorableClass]
-  public class Benchmark : IAlgorithm {
-    private Random random = new Random();
-
-    [Storable]
-    private DateTime lastUpdateTime;
-
-    [Storable]
-    private IBenchmark benchmarkAlgorithm;
-    public IBenchmark BenchmarkAlgorithm {
-      get { return benchmarkAlgorithm; }
-      set {
-        if (value == null) throw new ArgumentNullException();
-        benchmarkAlgorithm = value;
-      }
-    }
-
-    private CancellationTokenSource cancellationTokenSource;
-
-    [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();
-      }
-    }
-
-    [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 = new RunCollection();
-    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();
-        }
-      }
-    }
-
-    [Storable]
-    private ResultCollection results;
-    public ResultCollection Results {
-      get { return results; }
-    }
-
-    [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 Type ProblemType {
-      get { return typeof(IProblem); }
-    }
-
-    [Storable]
-    protected string name;
-
-    public string Name {
-      get { return name; }
-      set {
-        if (!CanChangeName) throw new NotSupportedException("Name cannot be changed.");
-        if (!(name.Equals(value) || (value == null) && (name == string.Empty))) {
-          CancelEventArgs<string> e = value == null ? new CancelEventArgs<string>(string.Empty) : new CancelEventArgs<string>(value);
-          OnNameChanging(e);
-          if (!e.Cancel) {
-            name = value == null ? string.Empty : value;
-            OnNameChanged();
-          }
-        }
-      }
-    }
-
-    public bool CanChangeName {
-      get { return false; }
-    }
-
-    [Storable]
-    protected string description;
-    public string Description {
-      get { return description; }
-      set {
-        if (!CanChangeDescription) throw new NotSupportedException("Description cannot be changed.");
-        if (!(description.Equals(value) || (value == null) && (description == string.Empty))) {
-          description = value == null ? string.Empty : value;
-          OnDescriptionChanged();
-        }
-      }
-    }
-
-    public bool CanChangeDescription {
-      get { return false; }
-    }
-
-    public string ItemName {
-      get { return ItemAttribute.GetName(this.GetType()); }
-    }
-
-    public string ItemDescription {
-      get { return ItemAttribute.GetDescription(this.GetType()); }
-    }
-
-    public Version ItemVersion {
-      get { return ItemAttribute.GetVersion(this.GetType()); }
-    }
-
-    public static Image StaticItemImage {
-      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
-    }
-    public 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 ItemAttribute.GetImage(this.GetType());
-      }
-    }
-
-    [Storable]
-    private ParameterCollection parameters = new ParameterCollection();
-
-    public IKeyedItemCollection<string, IParameter> Parameters {
-      get { return parameters; }
-    }
-
-    private ReadOnlyKeyedItemCollection<string, IParameter> readOnlyParameters;
-
-    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
-      get {
-        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
-        return readOnlyParameters;
-      }
-    }
-
-    public IEnumerable<IOptimizer> NestedOptimizers {
-      get { return Enumerable.Empty<IOptimizer>(); }
-    }
-
-    #region Parameter Properties
-
-    public ConstrainedValueParameter<IBenchmark> BenchmarkAlgorithmParameter {
-      get { return (ConstrainedValueParameter<IBenchmark>)Parameters["BenchmarkAlgorithm"]; }
-    }
-
-    private ValueParameter<IntValue> ChunkSizeParameter {
-      get { return (ValueParameter<IntValue>)Parameters["ChunkSize"]; }
-    }
-
-    private ValueParameter<DoubleValue> TimeLimitParameter {
-      get { return (ValueParameter<DoubleValue>)Parameters["TimeLimit"]; }
-    }
-
-    #endregion
-
-    #region Constructors
-
-    [StorableConstructor]
-    public Benchmark(bool deserializing) { }
-
-    public Benchmark() {
-      name = ItemName;
-      description = ItemDescription;
-      parameters = new ParameterCollection();
-      readOnlyParameters = null;
-      executionState = ExecutionState.Stopped;
-      executionTime = TimeSpan.Zero;
-      storeAlgorithmInEachRun = false;
-      runsCounter = 0;
-      Runs = new RunCollection();
-      results = new ResultCollection();
-      CreateParameters();
-      DiscoverBenchmarks();
-      Prepare();
-    }
-
-    public Benchmark(Benchmark original, Cloner cloner) {
-      cloner.RegisterClonedObject(original, this);
-      name = original.name;
-      description = original.description;
-      parameters = cloner.Clone(original.parameters);
-      readOnlyParameters = null;
-      if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
-      executionState = original.executionState;
-      executionTime = original.executionTime;
-      storeAlgorithmInEachRun = original.storeAlgorithmInEachRun;
-      runsCounter = original.runsCounter;
-      runs = cloner.Clone(original.runs);
-      Initialize();
-
-      results = cloner.Clone(original.results);
-      DiscoverBenchmarks();
-      Prepare();
-    }
-
-    #endregion
-
-    private void CreateParameters() {
-      Parameters.Add(new ValueParameter<IntValue>("ChunkSize", "The size (MB) of the chunk array that gets generated", new IntValue(0)));
-      Parameters.Add(new ValueParameter<DoubleValue>("TimeLimit", "The time limit (in minutes) for a benchmark run. Zero means a fixed number of iterations", new DoubleValue(0)));
-    }
-
-    private void DiscoverBenchmarks() {
-      var benchmarks = from t in ApplicationManager.Manager.GetTypes(typeof(IBenchmark))
-                       select t;
-      ItemSet<IBenchmark> values = new ItemSet<IBenchmark>();
-      foreach (var benchmark in benchmarks) {
-        IBenchmark b = (IBenchmark)Activator.CreateInstance(benchmark);
-        values.Add(b);
-      }
-      string paramName = "BenchmarkAlgorithm";
-      if (!Parameters.ContainsKey(paramName)) {
-        if (values.Count > 0) {
-          Parameters.Add(new ConstrainedValueParameter<IBenchmark>(paramName, values, values.First(a => a is IBenchmark)));
-        } else {
-          Parameters.Add(new ConstrainedValueParameter<IBenchmark>(paramName, values));
-        }
-      }
-    }
-
-    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));
-      results.Clear();
-      OnPrepared();
-    }
-
-    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 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));
-      cancellationTokenSource.Cancel();
-    }
-
-    public virtual void Start() {
-      cancellationTokenSource = new CancellationTokenSource();
-      OnStarted();
-      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
-      task.ContinueWith(t => {
-        try {
-          t.Wait();
-        }
-        catch (AggregateException ex) {
-          try {
-            ex.Flatten().Handle(x => x is OperationCanceledException);
-          }
-          catch (AggregateException remaining) {
-            if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
-            else OnExceptionOccurred(remaining);
-          }
-        }
-
-        cancellationTokenSource.Dispose();
-        cancellationTokenSource = null;
-        OnStopped();
-      });
-    }
-
-    protected virtual void Run(object state) {
-      CancellationToken cancellationToken = (CancellationToken)state;
-      lastUpdateTime = DateTime.Now;
-      System.Timers.Timer timer = new System.Timers.Timer(250);
-      timer.AutoReset = true;
-      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
-      timer.Start();
-      try {
-        BenchmarkAlgorithm = (IBenchmark)BenchmarkAlgorithmParameter.ActualValue;
-        int chunkSize = ((IntValue)ChunkSizeParameter.ActualValue).Value;
-        if (chunkSize > 0) {
-          BenchmarkAlgorithm.ChunkData = CreateDataChuck(chunkSize);
-        } else if (chunkSize < 0) {
-          throw new ArgumentException("ChunkSize must not be negativ.");
-        }
-        TimeSpan timelimit = TimeSpan.FromMinutes(((DoubleValue)TimeLimitParameter.ActualValue).Value);
-        if (timelimit.TotalMilliseconds < 0) {
-          throw new ArgumentException("TimeLimit must not be negativ. ");
-        }
-        BenchmarkAlgorithm.TimeLimit = timelimit;
-        BenchmarkAlgorithm.Run(cancellationToken, results);
-      }
-      catch (OperationCanceledException) {
-      }
-      finally {
-        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
-        timer.Stop();
-        ExecutionTime += DateTime.Now - lastUpdateTime;
-      }
-    }
-
-    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
-      System.Timers.Timer timer = (System.Timers.Timer)sender;
-      timer.Enabled = false;
-      DateTime now = DateTime.Now;
-      ExecutionTime += now - lastUpdateTime;
-      lastUpdateTime = now;
-      timer.Enabled = true;
-    }
-
-    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);
-        }
-      }
-    }
-
-    public virtual void CollectParameterValues(IDictionary<string, IItem> values) {
-      foreach (IValueParameter param in parameters.OfType<IValueParameter>()) {
-        if (param.GetsCollected && param.Value != null) values.Add(param.Name, param.Value);
-        if (param.Value is IParameterizedItem) {
-          Dictionary<string, IItem> children = new Dictionary<string, IItem>();
-          ((IParameterizedItem)param.Value).CollectParameterValues(children);
-          foreach (string key in children.Keys)
-            values.Add(param.Name + "." + key, children[key]);
-        }
-      }
-    }
-
-    private byte[][] CreateDataChuck(int megaBytes) {
-      if (megaBytes <= 0) {
-        throw new ArgumentException("MegaBytes must be greater than zero", "megaBytes");
-      }
-      byte[][] chunk = new byte[megaBytes][];
-      for (int i = 0; i < chunk.Length; i++) {
-        chunk[i] = new byte[1024 * 1024];
-        random.NextBytes(chunk[i]);
-      }
-      return chunk;
-    }
-
-    #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() {
-      ExecutionState = ExecutionState.Prepared;
-      ExecutionTime = TimeSpan.Zero;
-      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
-        statefulObject.InitializeState();
-      }
-      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;
-      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
-        statefulObject.ClearState();
-      }
-      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));
-    }
-
-    public event EventHandler<CancelEventArgs<string>> NameChanging;
-    protected virtual void OnNameChanging(CancelEventArgs<string> e) {
-      var handler = NameChanging;
-      if (handler != null) handler(this, e);
-    }
-
-    public event EventHandler NameChanged;
-    protected virtual void OnNameChanged() {
-      var handler = NameChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-      OnToStringChanged();
-    }
-
-    public event EventHandler DescriptionChanged;
-    protected virtual void OnDescriptionChanged() {
-      var handler = DescriptionChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    public event EventHandler ItemImageChanged;
-    protected virtual void OnItemImageChanged() {
-      EventHandler handler = ItemImageChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler ToStringChanged;
-    protected virtual void OnToStringChanged() {
-      EventHandler handler = ToStringChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    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
-
-    #region Clone
-
-    public IDeepCloneable Clone(Cloner cloner) {
-      return new Benchmark(this, cloner);
-    }
-
-    public object Clone() {
-      return Clone(new Cloner());
-    }
-
-    #endregion
-  }
-}
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs	(revision 7246)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/BenchmarkAlgorithm.cs	(revision 7246)
@@ -0,0 +1,560 @@
+﻿#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 System.Threading.Tasks;
+using HeuristicLab.Collections;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Algorithms.Benchmarks {
+  [Item("Benchmark Algorithm", "An algorithm to execute performance benchmarks (Linpack, Dhrystone, Whetstone, etc.).")]
+  [Creatable("Algorithms")]
+  [StorableClass]
+  public sealed class BenchmarkAlgorithm : IAlgorithm {
+    private Random random = new Random();
+    private CancellationTokenSource cancellationTokenSource;
+
+    [Storable]
+    private DateTime lastUpdateTime;
+
+    [Storable]
+    private IBenchmark benchmark;
+    public IBenchmark Benchmark {
+      get { return benchmark; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        benchmark = value;
+      }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+          OnItemImageChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get { return executionTime; }
+      private set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
+    }
+
+    [Storable]
+    private bool storeAlgorithmInEachRun;
+    public bool StoreAlgorithmInEachRun {
+      get { return storeAlgorithmInEachRun; }
+      set {
+        if (storeAlgorithmInEachRun != value) {
+          storeAlgorithmInEachRun = value;
+          OnStoreAlgorithmInEachRunChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private int runsCounter;
+
+    [Storable]
+    private RunCollection runs = new RunCollection();
+    public RunCollection Runs {
+      get { return runs; }
+      private set {
+        if (value == null) throw new ArgumentNullException();
+        if (runs != value) {
+          if (runs != null) DeregisterRunsEvents();
+          runs = value;
+          if (runs != null) RegisterRunsEvents();
+        }
+      }
+    }
+
+    [Storable]
+    private ResultCollection results;
+    public ResultCollection Results {
+      get { return results; }
+    }
+
+    public 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();
+        }
+      }
+    }
+
+    [Storable]
+    private string name;
+    public string Name {
+      get { return name; }
+      set {
+        if (!CanChangeName) throw new NotSupportedException("Name cannot be changed.");
+        if (!(name.Equals(value) || (value == null) && (name == string.Empty))) {
+          CancelEventArgs<string> e = value == null ? new CancelEventArgs<string>(string.Empty) : new CancelEventArgs<string>(value);
+          OnNameChanging(e);
+          if (!e.Cancel) {
+            name = value == null ? string.Empty : value;
+            OnNameChanged();
+          }
+        }
+      }
+    }
+
+    public bool CanChangeName {
+      get { return false; }
+    }
+
+    [Storable]
+    private string description;
+    public string Description {
+      get { return description; }
+      set {
+        if (!CanChangeDescription) throw new NotSupportedException("Description cannot be changed.");
+        if (!(description.Equals(value) || (value == null) && (description == string.Empty))) {
+          description = value == null ? string.Empty : value;
+          OnDescriptionChanged();
+        }
+      }
+    }
+
+    public bool CanChangeDescription {
+      get { return false; }
+    }
+
+    public string ItemName {
+      get { return ItemAttribute.GetName(this.GetType()); }
+    }
+
+    public string ItemDescription {
+      get { return ItemAttribute.GetDescription(this.GetType()); }
+    }
+
+    public Version ItemVersion {
+      get { return ItemAttribute.GetVersion(this.GetType()); }
+    }
+
+    public static Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
+    }
+    public 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 ItemAttribute.GetImage(this.GetType());
+      }
+    }
+
+    [Storable]
+    private ParameterCollection parameters = new ParameterCollection();
+
+    public IKeyedItemCollection<string, IParameter> Parameters {
+      get { return parameters; }
+    }
+
+    private ReadOnlyKeyedItemCollection<string, IParameter> readOnlyParameters;
+
+    IKeyedItemCollection<string, IParameter> IParameterizedItem.Parameters {
+      get {
+        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
+        return readOnlyParameters;
+      }
+    }
+
+    public IEnumerable<IOptimizer> NestedOptimizers {
+      get { return Enumerable.Empty<IOptimizer>(); }
+    }
+
+    #region Parameter Properties
+
+    public ConstrainedValueParameter<IBenchmark> BenchmarkParameter {
+      get { return (ConstrainedValueParameter<IBenchmark>)Parameters["Benchmark"]; }
+    }
+
+    private ValueParameter<IntValue> ChunkSizeParameter {
+      get { return (ValueParameter<IntValue>)Parameters["ChunkSize"]; }
+    }
+
+    private ValueParameter<DoubleValue> TimeLimitParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["TimeLimit"]; }
+    }
+
+    #endregion
+
+    #region Constructors
+
+    [StorableConstructor]
+    public BenchmarkAlgorithm(bool deserializing) { }
+
+    public BenchmarkAlgorithm() {
+      name = ItemName;
+      description = ItemDescription;
+      parameters = new ParameterCollection();
+      readOnlyParameters = null;
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+      storeAlgorithmInEachRun = false;
+      runsCounter = 0;
+      Runs = new RunCollection();
+      results = new ResultCollection();
+      CreateParameters();
+      DiscoverBenchmarks();
+      Prepare();
+    }
+
+    public BenchmarkAlgorithm(BenchmarkAlgorithm original, Cloner cloner) {
+      cloner.RegisterClonedObject(original, this);
+      name = original.name;
+      description = original.description;
+      parameters = cloner.Clone(original.parameters);
+      readOnlyParameters = null;
+      if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
+      executionState = original.executionState;
+      executionTime = original.executionTime;
+      storeAlgorithmInEachRun = original.storeAlgorithmInEachRun;
+      runsCounter = original.runsCounter;
+      runs = cloner.Clone(original.runs);
+      Initialize();
+
+      results = cloner.Clone(original.results);
+      DiscoverBenchmarks();
+      Prepare();
+    }
+
+    #endregion
+
+    private void CreateParameters() {
+      Parameters.Add(new ValueParameter<IntValue>("ChunkSize", "The size (MB) of the chunk array that gets generated", new IntValue(0)));
+      Parameters.Add(new ValueParameter<DoubleValue>("TimeLimit", "The time limit (in minutes) for a benchmark run. Zero means a fixed number of iterations", new DoubleValue(0)));
+    }
+
+    private void DiscoverBenchmarks() {
+      var benchmarks = from t in ApplicationManager.Manager.GetTypes(typeof(IBenchmark))
+                       select t;
+      ItemSet<IBenchmark> values = new ItemSet<IBenchmark>();
+      foreach (var benchmark in benchmarks) {
+        IBenchmark b = (IBenchmark)Activator.CreateInstance(benchmark);
+        values.Add(b);
+      }
+      string paramName = "Benchmark";
+      if (!Parameters.ContainsKey(paramName)) {
+        if (values.Count > 0) {
+          Parameters.Add(new ConstrainedValueParameter<IBenchmark>(paramName, values, values.First(a => a is IBenchmark)));
+        } else {
+          Parameters.Add(new ConstrainedValueParameter<IBenchmark>(paramName, values));
+        }
+      }
+    }
+
+    private void Initialize() {
+      if (problem != null) RegisterProblemEvents();
+      if (runs != null) RegisterRunsEvents();
+    }
+
+    public 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));
+      results.Clear();
+      OnPrepared();
+    }
+
+    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 void Pause() {
+      if (ExecutionState != ExecutionState.Started)
+        throw new InvalidOperationException(string.Format("Pause not allowed in execution state \"{0}\".", ExecutionState));
+    }
+    public void Stop() {
+      if ((ExecutionState != ExecutionState.Started) && (ExecutionState != ExecutionState.Paused))
+        throw new InvalidOperationException(string.Format("Stop not allowed in execution state \"{0}\".", ExecutionState));
+      cancellationTokenSource.Cancel();
+    }
+
+    public void Start() {
+      cancellationTokenSource = new CancellationTokenSource();
+      OnStarted();
+      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
+      task.ContinueWith(t => {
+        try {
+          t.Wait();
+        }
+        catch (AggregateException ex) {
+          try {
+            ex.Flatten().Handle(x => x is OperationCanceledException);
+          }
+          catch (AggregateException remaining) {
+            if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
+            else OnExceptionOccurred(remaining);
+          }
+        }
+
+        cancellationTokenSource.Dispose();
+        cancellationTokenSource = null;
+        OnStopped();
+      });
+    }
+
+    private void Run(object state) {
+      CancellationToken cancellationToken = (CancellationToken)state;
+      lastUpdateTime = DateTime.Now;
+      System.Timers.Timer timer = new System.Timers.Timer(250);
+      timer.AutoReset = true;
+      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
+      timer.Start();
+      try {
+        Benchmark = (IBenchmark)BenchmarkParameter.ActualValue;
+        int chunkSize = ((IntValue)ChunkSizeParameter.ActualValue).Value;
+        if (chunkSize > 0) {
+          Benchmark.ChunkData = CreateDataChuck(chunkSize);
+        } else if (chunkSize < 0) {
+          throw new ArgumentException("ChunkSize must not be negativ.");
+        }
+        TimeSpan timelimit = TimeSpan.FromMinutes(((DoubleValue)TimeLimitParameter.ActualValue).Value);
+        if (timelimit.TotalMilliseconds < 0) {
+          throw new ArgumentException("TimeLimit must not be negativ. ");
+        }
+        Benchmark.TimeLimit = timelimit;
+        Benchmark.Run(cancellationToken, results);
+      }
+      catch (OperationCanceledException) {
+      }
+      finally {
+        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
+        timer.Stop();
+        ExecutionTime += DateTime.Now - lastUpdateTime;
+      }
+    }
+
+    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
+      System.Timers.Timer timer = (System.Timers.Timer)sender;
+      timer.Enabled = false;
+      DateTime now = DateTime.Now;
+      ExecutionTime += now - lastUpdateTime;
+      lastUpdateTime = now;
+      timer.Enabled = true;
+    }
+
+    public 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);
+        }
+      }
+    }
+
+    public void CollectParameterValues(IDictionary<string, IItem> values) {
+      foreach (IValueParameter param in parameters.OfType<IValueParameter>()) {
+        if (param.GetsCollected && param.Value != null) values.Add(param.Name, param.Value);
+        if (param.Value is IParameterizedItem) {
+          Dictionary<string, IItem> children = new Dictionary<string, IItem>();
+          ((IParameterizedItem)param.Value).CollectParameterValues(children);
+          foreach (string key in children.Keys)
+            values.Add(param.Name + "." + key, children[key]);
+        }
+      }
+    }
+
+    private byte[][] CreateDataChuck(int megaBytes) {
+      if (megaBytes <= 0) {
+        throw new ArgumentException("MegaBytes must be greater than zero", "megaBytes");
+      }
+      byte[][] chunk = new byte[megaBytes][];
+      for (int i = 0; i < chunk.Length; i++) {
+        chunk[i] = new byte[1024 * 1024];
+        random.NextBytes(chunk[i]);
+      }
+      return chunk;
+    }
+
+    #region Events
+
+    public event EventHandler ExecutionStateChanged;
+    private void OnExecutionStateChanged() {
+      EventHandler handler = ExecutionStateChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ExecutionTimeChanged;
+    private void OnExecutionTimeChanged() {
+      EventHandler handler = ExecutionTimeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ProblemChanged;
+    private void OnProblemChanged() {
+      EventHandler handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler StoreAlgorithmInEachRunChanged;
+    private void OnStoreAlgorithmInEachRunChanged() {
+      EventHandler handler = StoreAlgorithmInEachRunChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Prepared;
+    private void OnPrepared() {
+      ExecutionState = ExecutionState.Prepared;
+      ExecutionTime = TimeSpan.Zero;
+      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
+        statefulObject.InitializeState();
+      }
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Started;
+    private void OnStarted() {
+      ExecutionState = ExecutionState.Started;
+      EventHandler handler = Started;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Paused;
+    private void OnPaused() {
+      ExecutionState = ExecutionState.Paused;
+      EventHandler handler = Paused;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler Stopped;
+    private void OnStopped() {
+      ExecutionState = ExecutionState.Stopped;
+      foreach (IStatefulItem statefulObject in this.GetObjectGraphObjects().OfType<IStatefulItem>()) {
+        statefulObject.ClearState();
+      }
+      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;
+    private void OnExceptionOccurred(Exception exception) {
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
+    }
+
+    public event EventHandler<CancelEventArgs<string>> NameChanging;
+    private void OnNameChanging(CancelEventArgs<string> e) {
+      var handler = NameChanging;
+      if (handler != null) handler(this, e);
+    }
+
+    public event EventHandler NameChanged;
+    private void OnNameChanged() {
+      var handler = NameChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnToStringChanged();
+    }
+
+    public event EventHandler DescriptionChanged;
+    private void OnDescriptionChanged() {
+      var handler = DescriptionChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    public event EventHandler ItemImageChanged;
+    private void OnItemImageChanged() {
+      EventHandler handler = ItemImageChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ToStringChanged;
+    private void OnToStringChanged() {
+      EventHandler handler = ToStringChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+
+    private void DeregisterProblemEvents() {
+      problem.OperatorsChanged -= new EventHandler(Problem_OperatorsChanged);
+      problem.Reset -= new EventHandler(Problem_Reset);
+    }
+    private void RegisterProblemEvents() {
+      problem.OperatorsChanged += new EventHandler(Problem_OperatorsChanged);
+      problem.Reset += new EventHandler(Problem_Reset);
+    }
+    private void Problem_OperatorsChanged(object sender, EventArgs e) { }
+    private void Problem_Reset(object sender, EventArgs e) {
+      Prepare();
+    }
+
+    private void DeregisterRunsEvents() {
+      runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+    }
+    private void RegisterRunsEvents() {
+      runs.CollectionReset += new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
+    }
+    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
+      runsCounter = runs.Count;
+    }
+
+    #endregion
+
+    #region Clone
+
+    public IDeepCloneable Clone(Cloner cloner) {
+      return new BenchmarkAlgorithm(this, cloner);
+    }
+
+    public object Clone() {
+      return Clone(new Cloner());
+    }
+
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/DhrystoneBenchmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/DhrystoneBenchmark.cs	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/DhrystoneBenchmark.cs	(revision 7246)
@@ -31,7 +31,26 @@
 
 namespace HeuristicLab.Algorithms.Benchmarks {
-  [Item("Dhrystone Algorithm", "Dhrystone benchmarking algorithm.")]
+  [Item("Dhrystone Benchmark", "Dhrystone performance benchmark algorithm.")]
   [StorableClass]
   public class DhrystoneBenchmark : IBenchmark {
+    private bool stopBenchmark;
+    private CancellationToken cancellationToken;
+
+    public string ItemName {
+      get { return ItemAttribute.GetName(this.GetType()); }
+    }
+    public string ItemDescription {
+      get { return ItemAttribute.GetDescription(this.GetType()); }
+    }
+    public Version ItemVersion {
+      get { return ItemAttribute.GetVersion(this.GetType()); }
+    }
+    public static Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
+    }
+    public Image ItemImage {
+      get { return ItemAttribute.GetImage(this.GetType()); }
+    }
+
     [Storable]
     private byte[][] chunk;
@@ -48,26 +67,4 @@
     }
 
-    private bool stopBenchmark;
-
-    private CancellationToken cancellationToken;
-
-    public string ItemName {
-      get { return ItemAttribute.GetName(this.GetType()); }
-    }
-
-    public string ItemDescription {
-      get { return ItemAttribute.GetDescription(this.GetType()); }
-    }
-
-    public Version ItemVersion {
-      get { return ItemAttribute.GetVersion(this.GetType()); }
-    }
-
-    public static Image StaticItemImage {
-      get { return HeuristicLab.Common.Resources.VSImageLibrary.Event; }
-    }
-    public Image ItemImage {
-      get { return ItemAttribute.GetImage(this.GetType()); }
-    }
 
     #region Benchmark Fields
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/HeuristicLab.Algorithms.Benchmarks-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/HeuristicLab.Algorithms.Benchmarks-3.3.csproj	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/HeuristicLab.Algorithms.Benchmarks-3.3.csproj	(revision 7246)
@@ -84,15 +84,10 @@
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Data" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
-    <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="Benchmark.cs">
-      <SubType>Code</SubType>
-    </Compile>
+    <Compile Include="BenchmarkAlgorithm.cs" />
     <Compile Include="DhrystoneBenchmark.cs" />
     <Compile Include="IBenchmark.cs" />
@@ -131,9 +126,4 @@
       <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
       <Name>HeuristicLab.Data-3.3</Name>
-      <Private>False</Private>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
-      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
-      <Name>HeuristicLab.Operators-3.3</Name>
       <Private>False</Private>
     </ProjectReference>
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/IBenchmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/IBenchmark.cs	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/IBenchmark.cs	(revision 7246)
@@ -24,9 +24,10 @@
 using HeuristicLab.Core;
 using HeuristicLab.Optimization;
+
 namespace HeuristicLab.Algorithms.Benchmarks {
   public interface IBenchmark : IItem {
     byte[][] ChunkData { get; set; }
     TimeSpan TimeLimit { get; set; }
-    void Run(CancellationToken cancellationToken, ResultCollection resuls);
+    void Run(CancellationToken cancellationToken, ResultCollection results);
   }
 }
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/LinpackBenchmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/LinpackBenchmark.cs	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/LinpackBenchmark.cs	(revision 7246)
@@ -31,5 +31,5 @@
 
 namespace HeuristicLab.Algorithms.Benchmarks {
-  [Item("Linpack Algorithm", "Linpack benchmarking algorithm.")]
+  [Item("Linpack Benchmark", "Linpack performance benchmark algorithm.")]
   [StorableClass]
   public class LinpackBenchmark : IBenchmark {
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Plugin.cs.frame	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Plugin.cs.frame	(revision 7246)
@@ -26,5 +26,5 @@
   /// Plugin class for HeuristicLab.Algorithms.Benchmark plugin.
   /// </summary>
-  [Plugin("HeuristicLab.Algorithms.Benchmarks", "Provides different benchmarking algorithms", "3.3.6.$WCREV$")]
+  [Plugin("HeuristicLab.Algorithms.Benchmarks", "Provides different performance benchmark algorithms.", "3.3.6.$WCREV$")]
   [PluginFile("HeuristicLab.Algorithms.Benchmarks-3.3.dll", PluginFileType.Assembly)]
   [PluginDependency("HeuristicLab.Collections", "3.3")]
@@ -32,8 +32,8 @@
   [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
   [PluginDependency("HeuristicLab.Core", "3.3")]
-  [PluginDependency("HeuristicLab.Data", "3.3")]   
+  [PluginDependency("HeuristicLab.Data", "3.3")]
   [PluginDependency("HeuristicLab.Optimization", "3.3")]
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
-  [PluginDependency("HeuristicLab.Persistence", "3.3")] 
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
   public class HeuristicLabAlgorithmsBenchmarksPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Properties/AssemblyInfo.cs.frame	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/Properties/AssemblyInfo.cs.frame	(revision 7246)
@@ -27,5 +27,5 @@
 // associated with an assembly.
 [assembly: AssemblyTitle("HeuristicLab.Algorithms.Benchmarks")]
-[assembly: AssemblyDescription("Benchmarking")]
+[assembly: AssemblyDescription("HeuristicLab performance benchmark algorithms")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
@@ -41,5 +41,5 @@
 
 // The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3E422463-0CE0-400D-9544-5C11D5818769")]
+[assembly: Guid("2C246561-1750-4770-BDB9-0FD89D844068")]
 
 // Version information for an assembly consists of the following four values:
Index: /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/WhetstoneBenchmark.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/WhetstoneBenchmark.cs	(revision 7245)
+++ /trunk/sources/HeuristicLab.Algorithms.Benchmarks/3.3/WhetstoneBenchmark.cs	(revision 7246)
@@ -31,5 +31,5 @@
 
 namespace HeuristicLab.Algorithms.Benchmarks {
-  [Item("Whetstone Algorithm", "Whetstone benchmarking algorithm.")]
+  [Item("Whetstone Benchmark", "Whetstone performance benchmark algorithm.")]
   [StorableClass]
   public class WhetstoneBenchmark : IBenchmark {
