Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/GeneticAlgorithmView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/GeneticAlgorithmView.Designer.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm.Views/3.3/GeneticAlgorithmView.Designer.cs	(revision 3262)
@@ -55,5 +55,5 @@
       // createUserDefinedAlgorithmButton
       // 
-      this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(90, 552);
+      this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(150, 552);
       this.toolTip.SetToolTip(this.createUserDefinedAlgorithmButton, "Create User Defined Algorithm from this Algorithm");
       // 
@@ -105,12 +105,15 @@
       // 
       this.startButton.Location = new System.Drawing.Point(0, 552);
+      this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm");
       // 
-      // stopButton
+      // pauseButton
       // 
-      this.stopButton.Location = new System.Drawing.Point(30, 552);
+      this.pauseButton.Location = new System.Drawing.Point(30, 552);
+      this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm");
       // 
       // resetButton
       // 
-      this.resetButton.Location = new System.Drawing.Point(60, 552);
+      this.resetButton.Location = new System.Drawing.Point(90, 552);
+      this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm");
       // 
       // executionTimeLabel
@@ -129,4 +132,9 @@
       // 
       this.resultsView.Size = new System.Drawing.Size(724, 456);
+      // 
+      // stopButton
+      // 
+      this.stopButton.Location = new System.Drawing.Point(60, 552);
+      this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm");
       // 
       // nameTextBox
Index: /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs	(revision 3262)
@@ -179,6 +179,6 @@
     }
 
-    protected override void OnPrepared() {
-      base.OnPrepared();
+    public override void Prepare() {
+      base.Prepare();
       if (Engine != null) {
         if (Problem == null) Engine.Prepare(null);
Index: /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Algorithms.LocalSearch/3.3/LocalSearch.cs	(revision 3262)
@@ -154,6 +154,6 @@
     }
 
-    protected override void OnPrepared() {
-      base.OnPrepared();
+    public override void Prepare() {
+      base.Prepare();
       if (Engine != null) {
         if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null)
Index: /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Algorithms.SimulatedAnnealing/3.3/SimulatedAnnealing.cs	(revision 3262)
@@ -182,6 +182,6 @@
     }
 
-    protected override void OnPrepared() {
-      base.OnPrepared();
+    public override void Prepare() {
+      base.Prepare();
       if (Engine != null) {
         if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null)
Index: /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs
===================================================================
--- /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Algorithms.TabuSearch/3.3/TabuSearch.cs	(revision 3262)
@@ -176,6 +176,6 @@
     }
 
-    protected override void OnPrepared() {
-      base.OnPrepared();
+    public override void Prepare() {
+      base.Prepare();
       if (Engine != null) {
         if (Problem == null || MoveGenerator == null || MoveMaker == null || MoveEvaluator == null
Index: /trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Core.Views/3.3/EngineView.cs	(revision 3262)
@@ -32,6 +32,4 @@
   [Content(typeof(IEngine), false)]
   public partial class EngineView : ItemView {
-    private int executionTimeCounter;
-
     /// <summary>
     /// Gets or sets the current engine.
@@ -59,6 +57,5 @@
     /// <remarks>Calls <see cref="ViewBase.RemoveItemEvents"/> of base class <see cref="ViewBase"/>.</remarks>
     protected override void DeregisterContentEvents() {
-      Content.Prepared -= new EventHandler(Content_Prepared);
-      Content.RunningChanged -= new EventHandler(Content_RunningChanged);
+      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
       Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
       Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
@@ -72,6 +69,5 @@
     protected override void RegisterContentEvents() {
       base.RegisterContentEvents();
-      Content.Prepared += new EventHandler(Content_Prepared);
-      Content.RunningChanged += new EventHandler(Content_RunningChanged);
+      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
       Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
       Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
@@ -87,8 +83,9 @@
       if (Content == null) {
         logTextBox.Enabled = false;
+        executionTimeTextBox.Text = "-";
         executionTimeTextBox.Enabled = false;
       } else {
         logTextBox.Enabled = true;
-        UpdateExecutionTimeTextBox();
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
         executionTimeTextBox.Enabled = true;
       }
@@ -96,29 +93,19 @@
 
     #region Content Events
-    protected virtual void Content_Prepared(object sender, EventArgs e) {
+    protected virtual void Content_ExecutionStateChanged(object sender, EventArgs e) {
       if (InvokeRequired)
-        Invoke(new EventHandler(Content_Prepared), sender, e);
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
       else {
-        executionTimeCounter = 0;
-        UpdateExecutionTimeTextBox();
-        Log("Engine prepared");
-      }
-    }
-    protected virtual void Content_RunningChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_RunningChanged), sender, e);
-      else {
-        UpdateExecutionTimeTextBox();
-        if (Content.Running) Log("Engine started");
-        else if (Content.Finished) Log("Engine finished");
-        else Log("Engine stopped");
+        if (Content.ExecutionState == ExecutionState.Prepared) Log("Engine prepared");
+        else if (Content.ExecutionState == ExecutionState.Started) Log("Engine started");
+        else if (Content.ExecutionState == ExecutionState.Paused) Log("Engine paused");
+        else if (Content.ExecutionState == ExecutionState.Stopped) Log("Engine stopped");
       }
     }
     protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) {
-      executionTimeCounter++;
-      if ((executionTimeCounter >= 100) || !Content.Running) {
-        executionTimeCounter = 0;
-        UpdateExecutionTimeTextBox();
-      }
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
+      else
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     }
     protected virtual void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
@@ -131,10 +118,4 @@
 
     #region Helpers
-    protected virtual void UpdateExecutionTimeTextBox() {
-      if (InvokeRequired)
-        Invoke(new Action(UpdateExecutionTimeTextBox));
-      else
-        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
-    }
     protected virtual void Log(string message) {
       if (InvokeRequired)
Index: /trunk/sources/HeuristicLab.Core/3.3/Engine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Engine.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Core/3.3/Engine.cs	(revision 3262)
@@ -22,115 +22,47 @@
 using System;
 using System.Collections.Generic;
-using System.Drawing;
 using System.Threading;
-using HeuristicLab.Common;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Core {
-  /// <summary>
-  /// Base class to represent an engine, which is an interpreter, holding the code, the data and 
-  /// the actual state, which is the runtime stack and a pointer onto the next operation. It represents
-  /// one execution and can handle parallel executions.
-  /// </summary>
   [Item("Engine", "A base class for engines.")]
   [StorableClass]
-  public abstract class Engine : Item, IEngine {
-    public override Image ItemImage {
-      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event; }
-    }
-
-    [Storable]
-    private TimeSpan executionTime;
-    /// <summary>
-    /// Gets or sets the execution time.
-    /// </summary>
-    /// <remarks>Calls <see cref="OnExecutionTimeChanged"/> in the setter.</remarks>
-    public TimeSpan ExecutionTime {
-      get { return executionTime; }
-      protected set {
-        executionTime = value;
-        OnExecutionTimeChanged();
-      }
-    }
-
-    /// <summary>
-    /// Field of the current instance that represent the execution stack.
-    /// </summary>
+  public abstract class Engine : Executable, IEngine {
     [Storable]
     private Stack<IOperation> executionStack;
-    /// <summary>
-    /// Gets the current execution stack.
-    /// </summary>
     protected Stack<IOperation> ExecutionStack {
       get { return executionStack; }
     }
 
-    /// <summary>
-    /// Flag of the current instance whether it is currently running.
-    /// </summary>
-    private bool running;
-    /// <summary>
-    /// Gets information whether the instance is currently running.
-    /// </summary>
-    public bool Running {
-      get { return running; }
-      private set {
-        if (running != value) {
-          running = value;
-          OnRunningChanged();
-        }
-      }
+    private bool pausePending, stopPending;
+    private DateTime lastUpdateTime;
+    private System.Timers.Timer timer;
+
+    protected Engine()
+      : base() {
+      executionStack = new Stack<IOperation>();
+      pausePending = stopPending = false;
+      timer = new System.Timers.Timer(100);
+      timer.AutoReset = true;
+      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
     }
 
-    /// <summary>
-    /// Flag of the current instance whether it is canceled.
-    /// </summary>
-    private bool canceled;
-    /// <summary>
-    /// Gets information whether the instance is currently canceled.
-    /// </summary>
-    protected bool Canceled {
-      get { return canceled; }
-      private set {
-        if (canceled != value) {
-          canceled = value;
-          OnCanceledChanged();
-        }
-      }
-    }
-    /// <summary>
-    /// Gets information whether the instance has already terminated.
-    /// </summary>
-    public bool Finished {
-      get { return executionStack.Count == 0; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="EngineBase"/> with a new global scope.
-    /// </summary>
-    protected Engine() {
-      executionStack = new Stack<IOperation>();
-    }
-
-    /// <summary>
-    /// Clones the current instance (deep clone).
-    /// </summary>
-    /// <remarks>Deep clone through <see cref="cloner.Clone"/> method of helper class 
-    /// <see cref="Auxiliary"/>.</remarks>
-    /// <param name="clonedObjects">Dictionary of all already clone objects. (Needed to avoid cycles.)</param>
-    /// <returns>The cloned object as <see cref="EngineBase"/>.</returns>
     public override IDeepCloneable Clone(Cloner cloner) {
       Engine clone = (Engine)base.Clone(cloner);
-      clone.executionTime = executionTime;
       IOperation[] contexts = executionStack.ToArray();
       for (int i = contexts.Length - 1; i >= 0; i--)
         clone.executionStack.Push((IOperation)cloner.Clone(contexts[i]));
-      clone.running = running;
-      clone.canceled = canceled;
+      clone.pausePending = pausePending;
+      clone.stopPending = stopPending;
       return clone;
     }
 
+    public sealed override void Prepare() {
+      base.Prepare();
+      executionStack.Clear();
+      OnPrepared();
+    }
     public void Prepare(IOperation initialOperation) {
-      ExecutionTime = new TimeSpan();
+      base.Prepare();
       executionStack.Clear();
       if (initialOperation != null)
@@ -138,124 +70,45 @@
       OnPrepared();
     }
-    /// <inheritdoc/>
-    /// <remarks>Calls <see cref="ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback, object)"/> 
-    /// of class <see cref="ThreadPool"/>.</remarks>
-    public void Start() {
+    public override void Start() {
+      base.Start();
       ThreadPool.QueueUserWorkItem(new WaitCallback(Run), null);
     }
-    /// <inheritdoc/>
-    /// <remarks>Calls <see cref="ThreadPool.QueueUserWorkItem(System.Threading.WaitCallback, object)"/> 
-    /// of class <see cref="ThreadPool"/>.</remarks>
-    public void Step() {
-      ThreadPool.QueueUserWorkItem(new WaitCallback(RunStep), null);
+    public override void Pause() {
+      base.Pause();
+      pausePending = true;
     }
-    /// <inheritdoc/>
-    /// <remarks>Sets the protected flag <c>myCanceled</c> to <c>true</c>.</remarks>
-    public void Stop() {
-      Canceled = true;
+    public override void Stop() {
+      base.Stop();
+      stopPending = true;
+      if (ExecutionState == ExecutionState.Paused) OnStopped();
     }
 
     private void Run(object state) {
       OnStarted();
-      Running = true;
-      Canceled = false;
-      DateTime start = DateTime.Now;
-      DateTime end;
-      while ((!Canceled) && (!Finished)) {
+      pausePending = stopPending = false;
+
+      lastUpdateTime = DateTime.Now;
+      timer.Start();
+      while (!pausePending && !stopPending && (executionStack.Count > 0)) {
         ProcessNextOperator();
-        end = DateTime.Now;
-        ExecutionTime += end - start;
-        start = end;
       }
-      ExecutionTime += DateTime.Now - start;
-      Canceled = false;
-      Running = false;
-      OnStopped();
-    }
-    private void RunStep(object state) {
-      OnStarted();
-      Running = true;
-      Canceled = false;
-      DateTime start = DateTime.Now;
-      if ((!Canceled) && (!Finished))
-        ProcessNextOperator();
-      ExecutionTime += DateTime.Now - start;
-      Canceled = false;
-      Running = false;
-      OnStopped();
+      timer.Stop();
+      ExecutionTime += DateTime.Now - lastUpdateTime;
+
+      if (pausePending) OnPaused();
+      else OnStopped();
     }
 
-    /// <summary>
-    /// Performs the next operation.
-    /// </summary>
     protected abstract void ProcessNextOperator();
 
-    /// <summary>
-    /// Occurs when the execution time changed.
-    /// </summary>
-    public event EventHandler ExecutionTimeChanged;
-    /// <summary>
-    /// Fires a new <c>ExecutionTimeChanged</c> event.
-    /// </summary>
-    protected virtual void OnExecutionTimeChanged() {
-      if (ExecutionTimeChanged != null)
-        ExecutionTimeChanged(this, EventArgs.Empty);
+    protected override void OnPrepared() {
+      if (executionStack.Count > 0) base.OnPrepared();
+      else base.OnStopped();
     }
-    /// <summary>
-    /// Occurs when the running flag changed.
-    /// </summary>
-    public event EventHandler RunningChanged;
-    /// <summary>
-    /// Fires a new <c>RunningChanged</c> event.
-    /// </summary>
-    protected virtual void OnRunningChanged() {
-      if (RunningChanged != null)
-        RunningChanged(this, EventArgs.Empty);
-    }
-    /// <summary>
-    /// Occurs when the execution is prepared for a new run.
-    /// </summary>
-    public event EventHandler Prepared;
-    /// <summary>
-    /// Fires a new <c>Prepared</c> event.
-    /// </summary>
-    protected virtual void OnPrepared() {
-      if (Prepared != null)
-        Prepared(this, EventArgs.Empty);
-    }
-    /// <summary>
-    /// Occurs when the execution is executed.
-    /// </summary>
-    public event EventHandler Started;
-    /// <summary>
-    /// Fires a new <c>Started</c> event.
-    /// </summary>
-    protected virtual void OnStarted() {
-      if (Started != null)
-        Started(this, EventArgs.Empty);
-    }
-    /// <summary>
-    /// Occurs when the execution is finished.
-    /// </summary>
-    public event EventHandler Stopped;
-    /// <summary>
-    /// Fires a new <c>Stopped</c> event.
-    /// </summary>
-    protected virtual void OnStopped() {
-      if (Stopped != null)
-        Stopped(this, EventArgs.Empty);
-    }
-    protected virtual void OnCanceledChanged() { }
-    /// <summary>
-    /// Occurs when an exception occured during the execution.
-    /// </summary>
-    public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
-    /// <summary>
-    /// Aborts the execution and fires a new <c>ExceptionOccurred</c> event.
-    /// </summary>
-    /// <param name="exception">The exception that was thrown.</param>
-    protected virtual void OnExceptionOccurred(Exception exception) {
-      if (ExceptionOccurred != null)
-        ExceptionOccurred(this, new EventArgs<Exception>(exception));
+
+    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
+      DateTime now = DateTime.Now;
+      ExecutionTime += now - lastUpdateTime;
+      lastUpdateTime = now;
     }
   }
Index: /trunk/sources/HeuristicLab.Core/3.3/Executable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Executable.cs	(revision 3262)
+++ /trunk/sources/HeuristicLab.Core/3.3/Executable.cs	(revision 3262)
@@ -0,0 +1,127 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Core {
+  [Item("Executable", "A base class for executables.")]
+  [StorableClass]
+  public abstract class Executable : Item, IExecutable {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event; }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get { return executionTime; }
+      protected set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
+    }
+
+    protected Executable() {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      Executable clone = (Executable)base.Clone(cloner);
+      clone.executionState = executionState;
+      clone.executionTime = executionTime;
+      return clone;
+    }
+
+    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));
+      ExecutionTime = TimeSpan.Zero;
+    }
+    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 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 Prepared;
+    protected virtual void OnPrepared() {
+      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;
+      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));
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Core/3.3/ExecutionState.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/ExecutionState.cs	(revision 3262)
+++ /trunk/sources/HeuristicLab.Core/3.3/ExecutionState.cs	(revision 3262)
@@ -0,0 +1,29 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Core {
+  public enum ExecutionState {
+    Prepared,
+    Started,
+    Paused,
+    Stopped
+  }
+}
Index: /trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 3261)
+++ /trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 3262)
@@ -103,4 +103,7 @@
     <Compile Include="Attributes\CreatableAttribute.cs" />
     <None Include="HeuristicLabCorePlugin.cs.frame" />
+    <Compile Include="Executable.cs" />
+    <Compile Include="ExecutionState.cs" />
+    <Compile Include="Interfaces\IExecutable.cs" />
     <Compile Include="Interfaces\IParameterizedNamedItem.cs" />
     <Compile Include="Interfaces\IParameterizedItem.cs" />
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs	(revision 3262)
@@ -24,65 +24,6 @@
 
 namespace HeuristicLab.Core {
-  /// <summary>
-  /// Interface to represent one run. (An engine is an interpreter, holding the code, 
-  /// the data and the actual state, which is the runtime stack and a pointer onto the next operation.).
-  /// It is responsible for operator execution and able to deal with parallelism.
-  /// </summary>
-  public interface IEngine : IItem {
-    /// <summary>
-    /// Gets the execution time of the current instance.
-    /// </summary>
-    TimeSpan ExecutionTime { get; }
-
-    /// <summary>
-    /// Gets information whether the engine is currently running.
-    /// </summary>
-    bool Running { get; }
-    /// <summary>
-    /// Gets information whether the engine has already terminated.
-    /// </summary>
-    bool Finished { get; }
-
-    /// <summary>
-    /// Prepares the engine with a given initial operation.
-    /// </summary>
+  public interface IEngine : IExecutable {
     void Prepare(IOperation initialOperation);
-    /// <summary>
-    /// Executes the whole run.
-    /// </summary>
-    void Start();
-    /// <summary>
-    /// Executes one step (one operation).
-    /// </summary>
-    void Step();
-    /// <summary>
-    /// Aborts the engine run.
-    /// </summary>
-    void Stop();
-
-    /// <summary>
-    /// Occurs when the execution time was changed.
-    /// </summary>
-    event EventHandler ExecutionTimeChanged;
-    /// <summary>
-    /// Occurs when the running flag was changed.
-    /// </summary>
-    event EventHandler RunningChanged;
-    /// <summary>
-    /// Occurs when the engine is prepared for a new run.
-    /// </summary>
-    event EventHandler Prepared;
-    /// <summary>
-    /// Occurs when the engine is executed.
-    /// </summary>
-    event EventHandler Started;
-    /// <summary>
-    /// Occurs when the engine is finished.
-    /// </summary>
-    event EventHandler Stopped;
-    /// <summary>
-    /// Occurs when an exception was thrown.
-    /// </summary>
-    event EventHandler<EventArgs<Exception>> ExceptionOccurred;
   }
 }
Index: /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutable.cs
===================================================================
--- /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutable.cs	(revision 3262)
+++ /trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutable.cs	(revision 3262)
@@ -0,0 +1,43 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Core {
+  public interface IExecutable : IItem {
+    ExecutionState ExecutionState { get; }
+    TimeSpan ExecutionTime { get; }
+
+    void Prepare();
+    void Start();
+    void Pause();
+    void Stop();
+
+    event EventHandler ExecutionStateChanged;
+    event EventHandler ExecutionTimeChanged;
+    event EventHandler Prepared;
+    event EventHandler Started;
+    event EventHandler Paused;
+    event EventHandler Stopped;
+    event EventHandler<EventArgs<Exception>> ExceptionOccurred;
+  }
+}
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.Designer.cs	(revision 3262)
@@ -57,5 +57,5 @@
       this.resultsView = new HeuristicLab.Optimization.Views.ResultCollectionView();
       this.startButton = new System.Windows.Forms.Button();
-      this.stopButton = new System.Windows.Forms.Button();
+      this.pauseButton = new System.Windows.Forms.Button();
       this.resetButton = new System.Windows.Forms.Button();
       this.executionTimeLabel = new System.Windows.Forms.Label();
@@ -63,4 +63,5 @@
       this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
       this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
+      this.stopButton = new System.Windows.Forms.Button();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.tabControl.SuspendLayout();
@@ -211,15 +212,15 @@
       this.startButton.Click += new System.EventHandler(this.startButton_Click);
       // 
-      // stopButton
-      // 
-      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Pause;
-      this.stopButton.Location = new System.Drawing.Point(30, 458);
-      this.stopButton.Name = "stopButton";
-      this.stopButton.Size = new System.Drawing.Size(24, 24);
-      this.stopButton.TabIndex = 6;
-      this.toolTip.SetToolTip(this.stopButton, "Pause Algorithm");
-      this.stopButton.UseVisualStyleBackColor = true;
-      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
+      // pauseButton
+      // 
+      this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.pauseButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Pause;
+      this.pauseButton.Location = new System.Drawing.Point(30, 458);
+      this.pauseButton.Name = "pauseButton";
+      this.pauseButton.Size = new System.Drawing.Size(24, 24);
+      this.pauseButton.TabIndex = 6;
+      this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm");
+      this.pauseButton.UseVisualStyleBackColor = true;
+      this.pauseButton.Click += new System.EventHandler(this.pauseButton_Click);
       // 
       // resetButton
@@ -227,8 +228,8 @@
       this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
       this.resetButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Restart;
-      this.resetButton.Location = new System.Drawing.Point(60, 458);
+      this.resetButton.Location = new System.Drawing.Point(90, 458);
       this.resetButton.Name = "resetButton";
       this.resetButton.Size = new System.Drawing.Size(24, 24);
-      this.resetButton.TabIndex = 7;
+      this.resetButton.TabIndex = 8;
       this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm");
       this.resetButton.UseVisualStyleBackColor = true;
@@ -242,5 +243,5 @@
       this.executionTimeLabel.Name = "executionTimeLabel";
       this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
-      this.executionTimeLabel.TabIndex = 8;
+      this.executionTimeLabel.TabIndex = 9;
       this.executionTimeLabel.Text = "&Execution Time:";
       // 
@@ -252,5 +253,5 @@
       this.executionTimeTextBox.ReadOnly = true;
       this.executionTimeTextBox.Size = new System.Drawing.Size(137, 20);
-      this.executionTimeTextBox.TabIndex = 9;
+      this.executionTimeTextBox.TabIndex = 10;
       // 
       // openFileDialog
@@ -269,4 +270,16 @@
       this.saveFileDialog.Title = "Save Problem";
       // 
+      // stopButton
+      // 
+      this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.stopButton.Image = HeuristicLab.Common.Resources.VS2008ImageLibrary.Stop;
+      this.stopButton.Location = new System.Drawing.Point(60, 458);
+      this.stopButton.Name = "stopButton";
+      this.stopButton.Size = new System.Drawing.Size(24, 24);
+      this.stopButton.TabIndex = 7;
+      this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm");
+      this.stopButton.UseVisualStyleBackColor = true;
+      this.stopButton.Click += new System.EventHandler(this.stopButton_Click);
+      // 
       // AlgorithmView
       // 
@@ -275,14 +288,16 @@
       this.Controls.Add(this.tabControl);
       this.Controls.Add(this.startButton);
-      this.Controls.Add(this.stopButton);
+      this.Controls.Add(this.pauseButton);
       this.Controls.Add(this.executionTimeTextBox);
       this.Controls.Add(this.executionTimeLabel);
+      this.Controls.Add(this.stopButton);
       this.Controls.Add(this.resetButton);
       this.Name = "AlgorithmView";
       this.Size = new System.Drawing.Size(679, 482);
       this.Controls.SetChildIndex(this.resetButton, 0);
+      this.Controls.SetChildIndex(this.stopButton, 0);
       this.Controls.SetChildIndex(this.executionTimeLabel, 0);
       this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
-      this.Controls.SetChildIndex(this.stopButton, 0);
+      this.Controls.SetChildIndex(this.pauseButton, 0);
       this.Controls.SetChildIndex(this.startButton, 0);
       this.Controls.SetChildIndex(this.tabControl, 0);
@@ -312,5 +327,5 @@
     protected System.Windows.Forms.Button openProblemButton;
     protected System.Windows.Forms.Button startButton;
-    protected System.Windows.Forms.Button stopButton;
+    protected System.Windows.Forms.Button pauseButton;
     protected System.Windows.Forms.Button resetButton;
     protected System.Windows.Forms.Label executionTimeLabel;
@@ -320,4 +335,5 @@
     protected System.Windows.Forms.TabPage resultsTabPage;
     protected HeuristicLab.Optimization.Views.ResultCollectionView resultsView;
+    protected System.Windows.Forms.Button stopButton;
 
   }
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/AlgorithmView.cs	(revision 3262)
@@ -24,4 +24,5 @@
 using System.Windows.Forms;
 using HeuristicLab.Common;
+using HeuristicLab.Core;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
@@ -37,5 +38,4 @@
   public partial class AlgorithmView : NamedItemView {
     private TypeSelectorDialog problemTypeSelectorDialog;
-    private int executionTimeCounter;
 
     public new IAlgorithm Content {
@@ -75,8 +75,8 @@
     protected override void DeregisterContentEvents() {
       Content.ExceptionOccurred -= new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
       Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
       Content.Prepared -= new EventHandler(Content_Prepared);
       Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
-      Content.RunningChanged -= new EventHandler(Content_RunningChanged);
       base.DeregisterContentEvents();
     }
@@ -84,13 +84,12 @@
       base.RegisterContentEvents();
       Content.ExceptionOccurred += new EventHandler<EventArgs<Exception>>(Content_ExceptionOccurred);
+      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
       Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
       Content.Prepared += new EventHandler(Content_Prepared);
       Content.ProblemChanged += new EventHandler(Content_ProblemChanged);
-      Content.RunningChanged += new EventHandler(Content_RunningChanged);
     }
 
     protected override void OnContentChanged() {
       base.OnContentChanged();
-      stopButton.Enabled = false;
       if (Content == null) {
         parameterCollectionView.Content = null;
@@ -98,5 +97,5 @@
         resultsView.Content = null;
         tabControl.Enabled = false;
-        startButton.Enabled = resetButton.Enabled = false;
+        startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
         executionTimeTextBox.Text = "-";
         executionTimeTextBox.Enabled = false;
@@ -108,7 +107,6 @@
         resultsView.Content = Content.Results.AsReadOnly();
         tabControl.Enabled = true;
-        startButton.Enabled = !Content.Finished;
-        resetButton.Enabled = true;
-        UpdateExecutionTimeTextBox();
+        EnableDisableButtons();
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
         executionTimeTextBox.Enabled = true;
       }
@@ -116,19 +114,9 @@
 
     protected override void OnClosed(FormClosedEventArgs e) {
-      if (Content != null) Content.Stop();
+      if ((Content != null) && (Content.ExecutionState == ExecutionState.Started)) Content.Stop();
       base.OnClosed(e);
     }
 
     #region Content Events
-    protected virtual void Content_Prepared(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_Prepared), sender, e);
-      else {
-        executionTimeCounter = 0;
-        resultsView.Content = Content.Results.AsReadOnly();
-        startButton.Enabled = !Content.Finished;
-        UpdateExecutionTimeTextBox();
-      }
-    }
     protected virtual void Content_ProblemChanged(object sender, EventArgs e) {
       if (InvokeRequired)
@@ -140,25 +128,27 @@
       }
     }
-    protected virtual void Content_RunningChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_RunningChanged), sender, e);
+    protected virtual void Content_Prepared(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_Prepared), sender, e);
+      else
+        resultsView.Content = Content.Results.AsReadOnly();
+    }
+    protected virtual void Content_ExecutionStateChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
       else {
-        SaveEnabled = !Content.Running;
-        parameterCollectionView.Enabled = !Content.Running;
-        newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = !Content.Running;
-        problemViewHost.Enabled = !Content.Running;
-        resultsView.Enabled = !Content.Running;
-        startButton.Enabled = !Content.Running && !Content.Finished;
-        stopButton.Enabled = Content.Running;
-        resetButton.Enabled = !Content.Running;
-        UpdateExecutionTimeTextBox();
+        SaveEnabled = Content.ExecutionState != ExecutionState.Started;
+        parameterCollectionView.Enabled = Content.ExecutionState != ExecutionState.Started;
+        newProblemButton.Enabled = openProblemButton.Enabled = saveProblemButton.Enabled = Content.ExecutionState != ExecutionState.Started;
+        problemViewHost.Enabled = Content.ExecutionState != ExecutionState.Started;
+        resultsView.Enabled = Content.ExecutionState != ExecutionState.Started;
+        EnableDisableButtons();
       }
     }
     protected virtual void Content_ExecutionTimeChanged(object sender, EventArgs e) {
-      executionTimeCounter++;
-      if ((executionTimeCounter >= 100) || !Content.Running) {
-        executionTimeCounter = 0;
-        UpdateExecutionTimeTextBox();
-      }
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_ExecutionTimeChanged), sender, e);
+      else
+        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     }
     protected virtual void Content_ExceptionOccurred(object sender, EventArgs<Exception> e) {
@@ -238,4 +228,7 @@
       Content.Start();
     }
+    protected virtual void pauseButton_Click(object sender, EventArgs e) {
+      Content.Pause();
+    }
     protected virtual void stopButton_Click(object sender, EventArgs e) {
       Content.Stop();
@@ -247,9 +240,9 @@
 
     #region Helpers
-    protected virtual void UpdateExecutionTimeTextBox() {
-      if (InvokeRequired)
-        Invoke(new Action(UpdateExecutionTimeTextBox));
-      else
-        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
+    private void EnableDisableButtons() {
+      startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
+      pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
+      stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
+      resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
     }
     #endregion
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.Designer.cs	(revision 3262)
@@ -98,30 +98,38 @@
       // 
       this.startButton.Location = new System.Drawing.Point(0, 525);
+      this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm");
+      // 
+      // pauseButton
+      // 
+      this.pauseButton.Location = new System.Drawing.Point(30, 525);
+      this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm");
+      // 
+      // resetButton
+      // 
+      this.resetButton.Location = new System.Drawing.Point(90, 525);
+      this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm");
+      // 
+      // executionTimeLabel
+      // 
+      this.executionTimeLabel.Location = new System.Drawing.Point(487, 532);
+      this.executionTimeLabel.TabIndex = 10;
+      // 
+      // executionTimeTextBox
+      // 
+      this.executionTimeTextBox.Location = new System.Drawing.Point(576, 529);
+      this.executionTimeTextBox.TabIndex = 11;
+      // 
+      // resultsTabPage
+      // 
+      this.resultsTabPage.Size = new System.Drawing.Size(705, 441);
+      // 
+      // resultsView
+      // 
+      this.resultsView.Size = new System.Drawing.Size(693, 429);
       // 
       // stopButton
       // 
-      this.stopButton.Location = new System.Drawing.Point(30, 525);
-      // 
-      // resetButton
-      // 
-      this.resetButton.Location = new System.Drawing.Point(60, 525);
-      // 
-      // executionTimeLabel
-      // 
-      this.executionTimeLabel.Location = new System.Drawing.Point(487, 532);
-      this.executionTimeLabel.TabIndex = 9;
-      // 
-      // executionTimeTextBox
-      // 
-      this.executionTimeTextBox.Location = new System.Drawing.Point(576, 529);
-      this.executionTimeTextBox.TabIndex = 10;
-      // 
-      // resultsTabPage
-      // 
-      this.resultsTabPage.Size = new System.Drawing.Size(705, 441);
-      // 
-      // resultsView
-      // 
-      this.resultsView.Size = new System.Drawing.Size(693, 429);
+      this.stopButton.Location = new System.Drawing.Point(60, 525);
+      this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm");
       // 
       // nameTextBox
@@ -147,8 +155,8 @@
       // 
       this.createUserDefinedAlgorithmButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
-      this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(90, 525);
+      this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(150, 525);
       this.createUserDefinedAlgorithmButton.Name = "createUserDefinedAlgorithmButton";
       this.createUserDefinedAlgorithmButton.Size = new System.Drawing.Size(254, 24);
-      this.createUserDefinedAlgorithmButton.TabIndex = 8;
+      this.createUserDefinedAlgorithmButton.TabIndex = 9;
       this.createUserDefinedAlgorithmButton.Text = "&Create User Defined Algorithm";
       this.toolTip.SetToolTip(this.createUserDefinedAlgorithmButton, "Create User Defined Algorithm from this Algorithm");
@@ -164,5 +172,5 @@
       this.engineComboBox.Location = new System.Drawing.Point(55, 6);
       this.engineComboBox.Name = "engineComboBox";
-      this.engineComboBox.Size = new System.Drawing.Size(644, 21);
+      this.engineComboBox.Size = new System.Drawing.Size(610, 21);
       this.engineComboBox.TabIndex = 1;
       this.engineComboBox.SelectedIndexChanged += new System.EventHandler(this.engineComboBox_SelectedIndexChanged);
@@ -189,5 +197,5 @@
       this.engineViewHost.Location = new System.Drawing.Point(6, 33);
       this.engineViewHost.Name = "engineViewHost";
-      this.engineViewHost.Size = new System.Drawing.Size(693, 402);
+      this.engineViewHost.Size = new System.Drawing.Size(659, 335);
       this.engineViewHost.TabIndex = 2;
       this.engineViewHost.ViewType = null;
@@ -200,9 +208,10 @@
       this.Name = "EngineAlgorithmView";
       this.Size = new System.Drawing.Size(713, 549);
+      this.Controls.SetChildIndex(this.stopButton, 0);
       this.Controls.SetChildIndex(this.createUserDefinedAlgorithmButton, 0);
       this.Controls.SetChildIndex(this.resetButton, 0);
+      this.Controls.SetChildIndex(this.pauseButton, 0);
       this.Controls.SetChildIndex(this.executionTimeLabel, 0);
       this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
-      this.Controls.SetChildIndex(this.stopButton, 0);
       this.Controls.SetChildIndex(this.startButton, 0);
       this.Controls.SetChildIndex(this.tabControl, 0);
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/EngineAlgorithmView.cs	(revision 3262)
@@ -98,12 +98,12 @@
     }
 
-    protected override void Content_RunningChanged(object sender, EventArgs e) {
+    protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {
       if (InvokeRequired)
-        Invoke(new EventHandler(Content_RunningChanged), sender, e);
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
       else {
-        createUserDefinedAlgorithmButton.Enabled = !Content.Running;
-        engineComboBox.Enabled = !Content.Running;
-        engineViewHost.Enabled = !Content.Running;
-        base.Content_RunningChanged(sender, e);
+        createUserDefinedAlgorithmButton.Enabled = Content.ExecutionState != ExecutionState.Started;
+        engineComboBox.Enabled = Content.ExecutionState != ExecutionState.Started;
+        engineViewHost.Enabled = Content.ExecutionState != ExecutionState.Started;
+        base.Content_ExecutionStateChanged(sender, e);
       }
     }
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/HeuristicLab.Optimization.Views-3.3.csproj	(revision 3262)
@@ -92,10 +92,4 @@
       <DependentUpon>AlgorithmView.cs</DependentUpon>
     </Compile>
-    <Compile Include="BatchRunView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="BatchRunView.Designer.cs">
-      <DependentUpon>BatchRunView.cs</DependentUpon>
-    </Compile>
     <Compile Include="RunCollectionView.cs">
       <SubType>UserControl</SubType>
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.Designer.cs	(revision 3262)
@@ -45,5 +45,4 @@
     /// </summary>
     private void InitializeComponent() {
-      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserDefinedAlgorithmView));
       this.operatorGraphTabPage = new System.Windows.Forms.TabPage();
       this.saveOperatorGraphButton = new System.Windows.Forms.Button();
@@ -66,4 +65,6 @@
       // 
       this.createUserDefinedAlgorithmButton.Enabled = false;
+      this.createUserDefinedAlgorithmButton.Location = new System.Drawing.Point(150, 525);
+      this.createUserDefinedAlgorithmButton.TabIndex = 9;
       this.toolTip.SetToolTip(this.createUserDefinedAlgorithmButton, "Create User Defined Algorithm from this Algorithm");
       this.createUserDefinedAlgorithmButton.Visible = false;
@@ -91,4 +92,30 @@
       // 
       this.toolTip.SetToolTip(this.openProblemButton, "Open Problem");
+      // 
+      // startButton
+      // 
+      this.toolTip.SetToolTip(this.startButton, "Start/Resume Algorithm");
+      // 
+      // pauseButton
+      // 
+      this.toolTip.SetToolTip(this.pauseButton, "Pause Algorithm");
+      // 
+      // resetButton
+      // 
+      this.resetButton.Location = new System.Drawing.Point(90, 525);
+      this.toolTip.SetToolTip(this.resetButton, "Reset Algorithm");
+      // 
+      // executionTimeLabel
+      // 
+      this.executionTimeLabel.TabIndex = 10;
+      // 
+      // executionTimeTextBox
+      // 
+      this.executionTimeTextBox.TabIndex = 11;
+      // 
+      // stopButton
+      // 
+      this.stopButton.Location = new System.Drawing.Point(60, 525);
+      this.toolTip.SetToolTip(this.stopButton, "Stop Algorithm");
       // 
       // nameTextBox
Index: /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs	(revision 3262)
@@ -75,12 +75,12 @@
     }
 
-    protected override void Content_RunningChanged(object sender, EventArgs e) {
+    protected override void Content_ExecutionStateChanged(object sender, EventArgs e) {
       if (InvokeRequired)
-        Invoke(new EventHandler(Content_RunningChanged), sender, e);
+        Invoke(new EventHandler(Content_ExecutionStateChanged), sender, e);
       else {
-        newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = !Content.Running;
-        operatorGraphViewHost.Enabled = !Content.Running;
-        globalScopeView.Enabled = !Content.Running;
-        base.Content_RunningChanged(sender, e);
+        newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = saveOperatorGraphButton.Enabled = Content.ExecutionState != ExecutionState.Started;
+        operatorGraphViewHost.Enabled = Content.ExecutionState != ExecutionState.Started;
+        globalScopeView.Enabled = Content.ExecutionState != ExecutionState.Started;
+        base.Content_ExecutionStateChanged(sender, e);
       }
     }
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Algorithm.cs	(revision 3262)
@@ -36,4 +36,26 @@
     public override Image ItemImage {
       get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Event; }
+    }
+
+    [Storable]
+    private ExecutionState executionState;
+    public ExecutionState ExecutionState {
+      get { return executionState; }
+      private set {
+        if (executionState != value) {
+          executionState = value;
+          OnExecutionStateChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private TimeSpan executionTime;
+    public TimeSpan ExecutionTime {
+      get { return executionTime; }
+      protected set {
+        executionTime = value;
+        OnExecutionTimeChanged();
+      }
     }
 
@@ -68,54 +90,54 @@
     public abstract ResultCollection Results { get; }
 
-    public abstract TimeSpan ExecutionTime { get; }
-
-    private bool running;
-    public bool Running {
-      get { return running; }
-      protected set {
-        if (running != value) {
-          running = value;
-          OnRunningChanged();
-        }
-      }
-    }
-
-    public abstract bool Finished { get; }
-
-    private bool canceled;
-    protected bool Canceled {
-      get { return canceled; }
-      private set {
-        if (canceled != value) {
-          canceled = value;
-          OnCanceledChanged();
-        }
-      }
-    }
-
-    protected Algorithm() : base() { }
-    protected Algorithm(string name) : base(name) { }
-    protected Algorithm(string name, ParameterCollection parameters) : base(name, parameters) { }
-    protected Algorithm(string name, string description) : base(name, description) { }
-    protected Algorithm(string name, string description, ParameterCollection parameters) : base(name, description, parameters) { }
+    protected Algorithm()
+      : base() {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
+    protected Algorithm(string name)
+      : base(name) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
+    protected Algorithm(string name, ParameterCollection parameters)
+      : base(name, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
+    protected Algorithm(string name, string description)
+      : base(name, description) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
+    protected Algorithm(string name, string description, ParameterCollection parameters)
+      : base(name, description, parameters) {
+      executionState = ExecutionState.Stopped;
+      executionTime = TimeSpan.Zero;
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
       Algorithm clone = (Algorithm)base.Clone(cloner);
+      clone.executionState = executionState;
+      clone.executionTime = executionTime;
       clone.Problem = (IProblem)cloner.Clone(problem);
-      clone.running = running;
-      clone.canceled = canceled;
       return clone;
     }
 
-    public void Prepare() {
-      OnPrepared();
-    }
-    public void Start() {
-      OnStarted();
-      Running = true;
-      Canceled = false;
-    }
-    public void Stop() {
-      Canceled = true;
+    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));
+      ExecutionTime = TimeSpan.Zero;
+    }
+    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));
     }
 
@@ -130,41 +152,47 @@
 
     #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() {
-      if (ProblemChanged != null)
-        ProblemChanged(this, EventArgs.Empty);
-    }
-    public event EventHandler ExecutionTimeChanged;
-    protected virtual void OnExecutionTimeChanged() {
-      if (ExecutionTimeChanged != null)
-        ExecutionTimeChanged(this, EventArgs.Empty);
-    }
-    public event EventHandler RunningChanged;
-    protected virtual void OnRunningChanged() {
-      if (RunningChanged != null)
-        RunningChanged(this, EventArgs.Empty);
+      EventHandler handler = ProblemChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
     }
     public event EventHandler Prepared;
     protected virtual void OnPrepared() {
-      if (Prepared != null)
-        Prepared(this, EventArgs.Empty);
+      ExecutionState = ExecutionState.Prepared;
+      EventHandler handler = Prepared;
+      if (handler != null) handler(this, EventArgs.Empty);
     }
     public event EventHandler Started;
     protected virtual void OnStarted() {
-      if (Started != null)
-        Started(this, EventArgs.Empty);
+      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() {
-      Canceled = false;
-      Running = false;
-      if (Stopped != null)
-        Stopped(this, EventArgs.Empty);
-    }
-    protected virtual void OnCanceledChanged() { }
+      ExecutionState = ExecutionState.Stopped;
+      EventHandler handler = Stopped;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
     public event EventHandler<EventArgs<Exception>> ExceptionOccurred;
     protected virtual void OnExceptionOccurred(Exception exception) {
-      if (ExceptionOccurred != null)
-        ExceptionOccurred(this, new EventArgs<Exception>(exception));
+      EventHandler<EventArgs<Exception>> handler = ExceptionOccurred;
+      if (handler != null) handler(this, new EventArgs<Exception>(exception));
     }
 
Index: /trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/EngineAlgorithm.cs	(revision 3262)
@@ -94,18 +94,4 @@
     }
 
-    public override TimeSpan ExecutionTime {
-      get {
-        if (engine == null) return TimeSpan.Zero;
-        else return engine.ExecutionTime;
-      }
-    }
-
-    public override bool Finished {
-      get {
-        if (engine == null) return true;
-        else return engine.Finished;
-      }
-    }
-
     protected EngineAlgorithm()
       : base() {
@@ -172,9 +158,6 @@
     }
 
-    protected override void OnCanceledChanged() {
-      if (Canceled && (engine != null))
-        engine.Stop();
-    }
-    protected override void OnPrepared() {
+    public override void Prepare() {
+      base.Prepare();
       globalScope.Clear();
       globalScope.Variables.Add(new Variable("Results", new ResultCollection()));
@@ -195,13 +178,19 @@
         engine.Prepare(context);
       }
-      base.OnPrepared();
-    }
-    protected override void OnStarted() {
+    }
+    public override void Start() {
+      base.Start();
       if (engine != null) engine.Start();
-      base.OnStarted();
-    }
-
-    protected virtual void OnOperatorGraphChanged() { }
-
+    }
+    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() {
@@ -209,29 +198,45 @@
         EngineChanged(this, EventArgs.Empty);
     }
-
-    private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
-      Prepare();
-    }
+    protected virtual void OnOperatorGraphChanged() { }
+
     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) {
-      OnExecutionTimeChanged();
+      ExecutionTime = Engine.ExecutionTime;
+    }
+    private void Engine_Paused(object sender, EventArgs e) {
+      OnPaused();
+    }
+    private void Engine_Prepared(object sender, EventArgs e) {
+      OnPrepared();
+    }
+    private void Engine_Started(object sender, EventArgs e) {
+      OnStarted();
     }
     private void Engine_Stopped(object sender, EventArgs e) {
       OnStopped();
     }
+
+    private void OperatorGraph_InitialOperatorChanged(object sender, EventArgs e) {
+      Prepare();
+    }
+    #endregion
   }
 }
Index: /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 3262)
@@ -86,5 +86,4 @@
     <None Include="HeuristicLabOptimizationPlugin.cs.frame" />
     <Compile Include="Algorithm.cs" />
-    <Compile Include="BatchRun.cs" />
     <Compile Include="RunCollection.cs" />
     <Compile Include="Run.cs" />
Index: /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/Interfaces/IAlgorithm.cs	(revision 3262)
@@ -29,25 +29,12 @@
   /// Interface to represent an algorithm.
   /// </summary>
-  public interface IAlgorithm : IParameterizedNamedItem {
+  public interface IAlgorithm : IParameterizedNamedItem, IExecutable {
     Type ProblemType { get; }
     IProblem Problem { get; set; }
     ResultCollection Results { get; }
-    TimeSpan ExecutionTime { get; }
-    bool Running { get; }
-    bool Finished { get; }
-
-    void Prepare();
-    void Start();
-    void Stop();
 
     void CollectResultValues(IDictionary<string, IItem> values);
 
     event EventHandler ProblemChanged;
-    event EventHandler ExecutionTimeChanged;
-    event EventHandler RunningChanged;
-    event EventHandler Prepared;
-    event EventHandler Started;
-    event EventHandler Stopped;
-    event EventHandler<EventArgs<Exception>> ExceptionOccurred;
   }
 }
Index: /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/UserDefinedAlgorithm.cs	(revision 3262)
@@ -55,6 +55,6 @@
     public event EventHandler OperatorGraphChanged;
     protected override void OnOperatorGraphChanged() {
-      if (OperatorGraphChanged != null)
-        OperatorGraphChanged(this, EventArgs.Empty);
+      EventHandler handler = OperatorGraphChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
     }
   }
Index: /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs
===================================================================
--- /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs	(revision 3261)
+++ /trunk/sources/HeuristicLab.SequentialEngine/3.3/SequentialEngine.cs	(revision 3262)
@@ -56,19 +56,22 @@
           currentOperator = operation.Operator;
           ExecutionStack.Push(operation.Operator.Execute((IExecutionContext)operation));
-          currentOperator = null;
         }
         catch (Exception ex) {
           ExecutionStack.Push(operation);
           OnExceptionOccurred(ex);
-          Stop();
+          Pause();
         }
         if (operation.Operator.Breakpoint)
-          Stop();
+          Pause();
       }
     }
 
-    protected override void OnCanceledChanged() {
-      if (Canceled && (currentOperator != null))
-        currentOperator.Abort();
+    public override void Pause() {
+      base.Pause();
+      if (currentOperator != null) currentOperator.Abort();
+    }
+    public override void Stop() {
+      base.Stop();
+      if (currentOperator != null) currentOperator.Abort();
     }
   }
