Index: trunk/sources/HeuristicLab.Core/3.3/Engine.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Engine.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/Engine.cs	(revision 2834)
@@ -71,21 +71,4 @@
 
     [Storable]
-    private IProblem problem;
-    /// <summary>
-    /// Gets or sets the current problem.
-    /// </summary>
-    public IProblem Problem {
-      get { return problem; }
-      set {
-        if (value == null) throw new ArgumentNullException();
-        if (value != problem) {
-          problem = value;
-          OnProblemChanged();
-          Prepare();
-        }
-      }
-    }
-
-    [Storable]
     private TimeSpan executionTime;
     /// <summary>
@@ -105,9 +88,9 @@
     /// </summary>
     [Storable]
-    private Stack<IExecutionSequence> executionStack;
+    private Stack<IOperation> executionStack;
     /// <summary>
     /// Gets the current execution stack.
     /// </summary>
-    protected Stack<IExecutionSequence> ExecutionStack {
+    protected Stack<IOperation> ExecutionStack {
       get { return executionStack; }
     }
@@ -146,6 +129,5 @@
     protected Engine() {
       globalScope = new Scope("Global");
-      problem = null;
-      executionStack = new Stack<IExecutionSequence>();
+      executionStack = new Stack<IOperation>();
       OperatorGraph = new OperatorGraph();
     }
@@ -162,9 +144,8 @@
       clone.OperatorGraph = (OperatorGraph)cloner.Clone(operatorGraph);
       clone.globalScope = (Scope)cloner.Clone(globalScope);
-      clone.problem = (IProblem)cloner.Clone(problem);
       clone.executionTime = executionTime;
-      IExecutionSequence[] contexts = executionStack.ToArray();
+      IOperation[] contexts = executionStack.ToArray();
       for (int i = contexts.Length - 1; i >= 0; i--)
-        clone.executionStack.Push((IExecutionSequence)cloner.Clone(contexts[i]));
+        clone.executionStack.Push((IOperation)cloner.Clone(contexts[i]));
       clone.running = running;
       clone.canceled = canceled;
@@ -172,4 +153,14 @@
     }
 
+    public void Prepare(IOperation initialOperation) {
+      canceled = false;
+      running = false;
+      globalScope.Clear();
+      ExecutionTime = new TimeSpan();
+      executionStack.Clear();
+      if (initialOperation != null)
+        executionStack.Push(initialOperation);
+      OnPrepared();
+    }
     /// <inheritdoc/>
     /// <remarks>Sets <c>myCanceled</c> and <c>myRunning</c> to <c>false</c>. The global scope is cleared,
@@ -178,12 +169,6 @@
     /// Calls <see cref="OnPrepared"/>.</remarks>
     public void Prepare() {
-      canceled = false;
-      running = false;
-      globalScope.Clear();
-      ExecutionTime = new TimeSpan();
-      executionStack.Clear();
-      if ((OperatorGraph.InitialOperator != null) && (Problem != null))
-        executionStack.Push(new ExecutionContext(null, OperatorGraph.InitialOperator, GlobalScope, Problem));
-      OnPrepared();
+      if (OperatorGraph.InitialOperator != null)
+        Prepare(new ExecutionContext(null, OperatorGraph.InitialOperator, GlobalScope));
     }
     /// <inheritdoc/>
@@ -254,15 +239,4 @@
     }
     /// <summary>
-    /// Occurs when the problem was changed.
-    /// </summary>
-    public event EventHandler ProblemChanged;
-    /// <summary>
-    /// Fires a new <c>ProblemChanged</c> event.
-    /// </summary>
-    protected virtual void OnProblemChanged() {
-      if (ProblemChanged != null)
-        ProblemChanged(this, EventArgs.Empty);
-    }
-    /// <summary>
     /// Occurs when the execution time changed.
     /// </summary>
Index: trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs	(revision 2834)
@@ -21,20 +21,24 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
+using HeuristicLab.Collections;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
 namespace HeuristicLab.Core {
-  public class ExecutionContext : DeepCloneable, IExecutionSequence {
+  public class ExecutionContext : DeepCloneable, IExecutionContext, IAtomicOperation {
     [Storable]
-    private ExecutionContext parent;
-    public ExecutionContext Parent {
+    private IParameterizedItem parameterizedItem;
+
+    [Storable]
+    private IExecutionContext parent;
+    public IExecutionContext Parent {
       get { return parent; }
     }
 
-    [Storable]
-    private IOperator op;
+    public IObservableKeyedCollection<string, IParameter> Parameters {
+      get { return parameterizedItem.Parameters; }
+    }
+
     public IOperator Operator {
-      get { return op; }
+      get { return parameterizedItem as IOperator; }
     }
 
@@ -45,22 +49,14 @@
     }
 
-    [Storable]
-    private IProblem problem;
-    public IProblem Problem {
-      get { return problem; }
-    }
-
     private ExecutionContext() {
       parent = null;
-      op = null;
+      parameterizedItem = null;
       scope = null;
-      problem = null;
     }
-    public ExecutionContext(ExecutionContext parent, IOperator op, IScope scope, IProblem problem) {
-      if ((op == null) || (scope == null) || (problem == null)) throw new ArgumentNullException();
+    public ExecutionContext(IExecutionContext parent, IParameterizedItem parameterizedItem, IScope scope) {
+      if ((parameterizedItem == null) || (scope == null)) throw new ArgumentNullException();
       this.parent = parent;
-      this.op = op;
+      this.parameterizedItem = parameterizedItem;
       this.scope = scope;
-      this.problem = problem;
     }
 
@@ -68,22 +64,21 @@
       ExecutionContext clone = new ExecutionContext();
       cloner.RegisterClonedObject(this, clone);
-      clone.parent = (ExecutionContext)cloner.Clone(parent);
-      clone.op = (IOperator)cloner.Clone(op);
+      clone.parent = (IExecutionContext)cloner.Clone(parent);
+      clone.parameterizedItem = (IParameterizedItem)cloner.Clone(parameterizedItem);
       clone.scope = (IScope)cloner.Clone(scope);
-      clone.problem = (IProblem)cloner.Clone(problem);
       return clone;
     }
 
-    public ExecutionContext CreateContext(IOperator op) {
-      return new ExecutionContext(parent, op, scope, problem);
+    public IAtomicOperation CreateOperation(IOperator op) {
+      return new ExecutionContext(parent, op, scope);
     }
-    public ExecutionContext CreateContext(IOperator op, IScope scope) {
-      return new ExecutionContext(parent, op, scope, problem);
+    public IAtomicOperation CreateOperation(IOperator op, IScope scope) {
+      return new ExecutionContext(parent, op, scope);
     }
-    public ExecutionContext CreateChildContext(IOperator op) {
-      return new ExecutionContext(this, op, scope, problem);
+    public IAtomicOperation CreateChildOperation(IOperator op) {
+      return new ExecutionContext(this, op, scope);
     }
-    public ExecutionContext CreateChildContext(IOperator op, IScope scope) {
-      return new ExecutionContext(this, op, scope, problem);
+    public IAtomicOperation CreateChildOperation(IOperator op, IScope scope) {
+      return new ExecutionContext(this, op, scope);
     }
   }
Index: trunk/sources/HeuristicLab.Core/3.3/ExecutionContextCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/ExecutionContextCollection.cs	(revision 2833)
+++ 	(revision )
@@ -1,115 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Xml;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Core {
-  public class ExecutionContextCollection : DeepCloneable, IList<IExecutionSequence>, IExecutionSequence {
-    [Storable]
-    private IList<IExecutionSequence> contexts;
-
-    [Storable]
-    private bool parallel;
-    public bool Parallel {
-      get { return parallel; }
-      set { parallel = value; }
-    }
-
-    public ExecutionContextCollection() {
-      contexts = new List<IExecutionSequence>();
-      parallel = false;
-    }
-    public ExecutionContextCollection(IEnumerable<IExecutionSequence> collection) {
-      contexts = new List<IExecutionSequence>(collection.Where(e => e != null));
-      parallel = false;
-    }
-    public ExecutionContextCollection(params IExecutionSequence[] list) {
-      contexts = new List<IExecutionSequence>(list.Where(e => e != null));
-      parallel = false;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      ExecutionContextCollection clone = new ExecutionContextCollection();
-      cloner.RegisterClonedObject(this, clone);
-      clone.parallel = parallel;
-      for (int i = 0; i < contexts.Count; i++)
-        clone.contexts.Add((IExecutionSequence)cloner.Clone(contexts[i]));
-      return clone;
-    }
-
-    #region IList<IExecutionContext> Members
-    public int IndexOf(IExecutionSequence item) {
-      return contexts.IndexOf(item);
-    }
-    public void Insert(int index, IExecutionSequence item) {
-      if (item != null) contexts.Insert(index, item);
-    }
-    public void RemoveAt(int index) {
-      contexts.RemoveAt(index);
-    }
-    public IExecutionSequence this[int index] {
-      get { return contexts[index]; }
-      set { if (value != null) contexts[index] = value; }
-    }
-    #endregion
-
-    #region ICollection<IExecutionContext> Members
-    public void Add(IExecutionSequence item) {
-      if (item != null) contexts.Add(item);
-    }
-    public void Clear() {
-      contexts.Clear();
-    }
-    public bool Contains(IExecutionSequence item) {
-      return contexts.Contains(item);
-    }
-    public void CopyTo(IExecutionSequence[] array, int arrayIndex) {
-      contexts.CopyTo(array, arrayIndex);
-    }
-    public int Count {
-      get { return contexts.Count; }
-    }
-    public bool IsReadOnly {
-      get { return contexts.IsReadOnly; }
-    }
-    public bool Remove(IExecutionSequence item) {
-      return contexts.Remove(item);
-    }
-    #endregion
-
-    #region IEnumerable<IExecutionContext> Members
-    public IEnumerator<IExecutionSequence> GetEnumerator() {
-      return contexts.GetEnumerator();
-    }
-    #endregion
-
-    #region IEnumerable Members
-    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
-      return contexts.GetEnumerator();
-    }
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj	(revision 2834)
@@ -104,7 +104,10 @@
     <Compile Include="ChangedEventArgs.cs" />
     <None Include="HeuristicLabCorePlugin.cs.frame" />
+    <Compile Include="Interfaces\IParameterizedItem.cs" />
+    <Compile Include="Interfaces\IAtomicOperation.cs" />
+    <Compile Include="Interfaces\IExecutionContext.cs" />
+    <Compile Include="Interfaces\IOperation.cs" />
+    <Compile Include="OperationCollection.cs" />
     <Compile Include="ValueParameterCollection.cs" />
-    <Compile Include="Interfaces\IProblem.cs" />
-    <Compile Include="Interfaces\IExecutionSequence.cs" />
     <Compile Include="Interfaces\IValueLookupParameter.cs" />
     <Compile Include="Interfaces\IValueParameter.cs" />
@@ -117,5 +120,4 @@
     <Compile Include="Item.cs" />
     <Compile Include="NamedItem.cs" />
-    <Compile Include="Problem.cs" />
     <Compile Include="OperatorGraph.cs" />
     <Compile Include="Interfaces\IParameter.cs" />
@@ -128,5 +130,4 @@
       <SubType>Code</SubType>
     </Compile>
-    <Compile Include="ExecutionContextCollection.cs" />
     <Compile Include="ExecutionContext.cs" />
     <Compile Include="OperatorList.cs" />
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IAtomicOperation.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IAtomicOperation.cs	(revision 2834)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IAtomicOperation.cs	(revision 2834)
@@ -0,0 +1,30 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Core {
+  /// <summary>
+  /// Interface which represents an atomic operation.
+  /// </summary>
+  public interface IAtomicOperation : IOperation {
+    IOperator Operator { get; }
+    IScope Scope { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs	(revision 2834)
@@ -38,8 +38,4 @@
     /// </summary>
     IScope GlobalScope { get; }
-    /// <summary>
-    /// Gets the problem of the current instance.
-    /// </summary>
-    IProblem Problem { get; set; }
 
     /// <summary>
@@ -62,4 +58,8 @@
     void Prepare();
     /// <summary>
+    /// Prepares the engine with a given initial operation.
+    /// </summary>
+    void Prepare(IOperation initialOperation);
+    /// <summary>
     /// Executes the whole run.
     /// </summary>
@@ -78,8 +78,4 @@
     /// </summary>
     event EventHandler OperatorGraphChanged;
-    /// <summary>
-    /// Occurs when the problem was changed.
-    /// </summary>
-    event EventHandler ProblemChanged;
     /// <summary>
     /// Occurs when the execution time was changed.
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 2834)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs	(revision 2834)
@@ -0,0 +1,38 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Collections;
+
+namespace HeuristicLab.Core {
+  /// <summary>
+  /// Interface which represents an execution context.
+  /// </summary>
+  public interface IExecutionContext : IDeepCloneable {
+    IExecutionContext Parent { get; }
+    IObservableKeyedCollection<string, IParameter> Parameters { get; }
+    IScope Scope { get; }
+
+    IAtomicOperation CreateOperation(IOperator op);
+    IAtomicOperation CreateOperation(IOperator op, IScope scope);
+    IAtomicOperation CreateChildOperation(IOperator op);
+    IAtomicOperation CreateChildOperation(IOperator op, IScope scope);
+  }
+}
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionSequence.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionSequence.cs	(revision 2833)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Text;
-using System.Drawing;
-
-namespace HeuristicLab.Core {
-  /// <summary>
-  /// Interface which represents an execution context.
-  /// </summary>
-  public interface IExecutionSequence : IDeepCloneable { }
-}
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperation.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperation.cs	(revision 2834)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperation.cs	(revision 2834)
@@ -0,0 +1,27 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Core {
+  /// <summary>
+  /// Interface which represents an operation.
+  /// </summary>
+  public interface IOperation : IDeepCloneable { }
+}
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperator.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperator.cs	(revision 2834)
@@ -21,8 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Collections;
 
 namespace HeuristicLab.Core {
@@ -31,7 +27,5 @@
   /// a basic instruction of an algorithm.
   /// </summary>
-  public interface IOperator : INamedItem {
-    IObservableKeyedCollection<string, IParameter> Parameters { get; }
-
+  public interface IOperator : INamedItem, IParameterizedItem {
     /// <summary>
     /// Gets or sets a boolean value whether the engine should stop here during the run.
@@ -44,5 +38,5 @@
     /// <param name="scope">The scope where to execute the current instance.</param>
     /// <returns>The next operation.</returns>
-    IExecutionSequence Execute(ExecutionContext context);
+    IOperation Execute(IExecutionContext context);
     /// <summary>
     /// Aborts the current operator.
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameter.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameter.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameter.cs	(revision 2834)
@@ -21,8 +21,4 @@
 
 using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Xml;
-using HeuristicLab.Common;
 
 namespace HeuristicLab.Core {
@@ -30,5 +26,5 @@
     Type DataType { get; }
     IItem ActualValue { get; set; }
-    ExecutionContext ExecutionContext { get; set; }
+    IExecutionContext ExecutionContext { get; set; }
   }
 }
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs	(revision 2834)
+++ trunk/sources/HeuristicLab.Core/3.3/Interfaces/IParameterizedItem.cs	(revision 2834)
@@ -0,0 +1,31 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Collections;
+
+namespace HeuristicLab.Core {
+  /// <summary>
+  /// An interface which represents an item which contains parameters.
+  /// </summary>
+  public interface IParameterizedItem : IItem {
+    IObservableKeyedCollection<string, IParameter> Parameters { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Core/3.3/Interfaces/IProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Interfaces/IProblem.cs	(revision 2833)
+++ 	(revision )
@@ -1,31 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Collections;
-
-namespace HeuristicLab.Core {
-  /// <summary>
-  /// Interface to represent a problem.
-  /// </summary>
-  public interface IProblem : INamedItem {
-    IObservableKeyedCollection<string, IValueParameter> Parameters { get; }
-  }
-}
Index: trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs	(revision 2833)
+++ trunk/sources/HeuristicLab.Core/3.3/NamedItemCollection.cs	(revision 2834)
@@ -21,7 +21,7 @@
 
 using System;
-using System.Linq;
 using System.Collections.Generic;
 using System.Drawing;
+using System.Linq;
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
Index: trunk/sources/HeuristicLab.Core/3.3/OperationCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/OperationCollection.cs	(revision 2834)
+++ trunk/sources/HeuristicLab.Core/3.3/OperationCollection.cs	(revision 2834)
@@ -0,0 +1,110 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Core {
+  public class OperationCollection : DeepCloneable, IList<IOperation>, IOperation {
+    [Storable]
+    private IList<IOperation> operations;
+
+    [Storable]
+    private bool parallel;
+    public bool Parallel {
+      get { return parallel; }
+      set { parallel = value; }
+    }
+
+    public OperationCollection() {
+      operations = new List<IOperation>();
+      parallel = false;
+    }
+    public OperationCollection(IEnumerable<IOperation> collection) {
+      operations = new List<IOperation>(collection.Where(e => e != null));
+      parallel = false;
+    }
+    public OperationCollection(params IOperation[] list) {
+      operations = new List<IOperation>(list.Where(e => e != null));
+      parallel = false;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      OperationCollection clone = new OperationCollection(this.Select(x => (IOperation)cloner.Clone(x)));
+      cloner.RegisterClonedObject(this, clone);
+      clone.parallel = parallel;
+      return clone;
+    }
+
+    #region IList<IOperation> Members
+    public int IndexOf(IOperation item) {
+      return operations.IndexOf(item);
+    }
+    public void Insert(int index, IOperation item) {
+      if (item != null) operations.Insert(index, item);
+    }
+    public void RemoveAt(int index) {
+      operations.RemoveAt(index);
+    }
+    public IOperation this[int index] {
+      get { return operations[index]; }
+      set { if (value != null) operations[index] = value; }
+    }
+    #endregion
+
+    #region ICollection<IOperation> Members
+    public void Add(IOperation item) {
+      if (item != null) operations.Add(item);
+    }
+    public void Clear() {
+      operations.Clear();
+    }
+    public bool Contains(IOperation item) {
+      return operations.Contains(item);
+    }
+    public void CopyTo(IOperation[] array, int arrayIndex) {
+      operations.CopyTo(array, arrayIndex);
+    }
+    public int Count {
+      get { return operations.Count; }
+    }
+    public bool IsReadOnly {
+      get { return operations.IsReadOnly; }
+    }
+    public bool Remove(IOperation item) {
+      return operations.Remove(item);
+    }
+    #endregion
+
+    #region IEnumerable<IOperation> Members
+    public IEnumerator<IOperation> GetEnumerator() {
+      return operations.GetEnumerator();
+    }
+    #endregion
+
+    #region IEnumerable Members
+    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
+      return operations.GetEnumerator();
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Core/3.3/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.Core/3.3/Problem.cs	(revision 2833)
+++ 	(revision )
@@ -1,72 +1,0 @@
-#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.Drawing;
-using HeuristicLab.Collections;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Core {
-  /// <summary>
-  /// The base class for all problems.
-  /// </summary>
-  [Item("Problem", "Base class for problems.")]
-  public abstract class Problem : NamedItem, IProblem {
-    public override Image ItemImage {
-      get { return HeuristicLab.Common.Resources.VS2008ImageLibrary.Type; }
-    }
-
-    private ValueParameterCollection parameters;
-    [Storable]
-    protected ValueParameterCollection Parameters {
-      get { return parameters;}
-      private set {
-        if (parameters != null) parameters.Changed -= new ChangedEventHandler(Parameters_Changed);
-        parameters = value;
-        readOnlyParameters = null;
-        if (parameters != null) parameters.Changed += new ChangedEventHandler(Parameters_Changed);
-      }
-    }
-    private ReadOnlyObservableKeyedCollection<string, IValueParameter> readOnlyParameters;
-    IObservableKeyedCollection<string, IValueParameter> IProblem.Parameters {
-      get {
-        if (readOnlyParameters == null) readOnlyParameters = parameters.AsReadOnly();
-        return readOnlyParameters;
-      }
-    }
-
-    protected Problem() {
-      Name = ItemName;
-      Parameters = new ValueParameterCollection();
-      readOnlyParameters = null;
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      Problem clone = (Problem)base.Clone(cloner);
-      clone.Parameters = (ValueParameterCollection)cloner.Clone(parameters);
-      return clone;
-    }
-
-    private void Parameters_Changed(object sender, ChangedEventArgs e) {
-      OnChanged(e);
-    }
-  }
-}
