Index: branches/HiveHiveEngine/HeuristicLab.Operators/3.3/DataReducer.cs
===================================================================
--- branches/HiveHiveEngine/HeuristicLab.Operators/3.3/DataReducer.cs	(revision 7392)
+++ branches/HiveHiveEngine/HeuristicLab.Operators/3.3/DataReducer.cs	(revision 7392)
@@ -0,0 +1,208 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Operators {
+  [Item("DataReducer", "An operator to reduce values of sub scopes.")]
+  [StorableClass]
+  public sealed class DataReducer : SingleSuccessorOperator {
+    #region Parameter Properties
+    public ScopeTreeLookupParameter<IItem> ParameterToReduce {
+      get { return (ScopeTreeLookupParameter<IItem>)Parameters["ParameterToReduce"]; }
+    }
+    public LookupParameter<IItem> TargetParameter {
+      get { return (LookupParameter<IItem>)Parameters["TargetParameter"]; }
+    }
+    public ValueParameter<ReductionOperation> ReductionOperation {
+      get { return (ValueParameter<ReductionOperation>)Parameters["ReductionOperation"]; }
+    }
+    public ValueParameter<ReductionOperation> TargetOperation {
+      get { return (ValueParameter<ReductionOperation>)Parameters["TargetOperation"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private DataReducer(bool deserializing) : base(deserializing) { }
+    private DataReducer(DataReducer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public DataReducer()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new ScopeTreeLookupParameter<IItem>("ParameterToReduce", "The parameter on which the reduction operation should be applied."));
+      Parameters.Add(new LookupParameter<IItem>("TargetParameter", "The target variable in which the reduced value should be stored."));
+      Parameters.Add(new ValueParameter<ReductionOperation>("ReductionOperation", "The operation which is applied on the parameters to reduce."));
+      Parameters.Add(new ValueParameter<ReductionOperation>("TargetOperation", "The operation used to apply the reduced value to the target variable."));
+      #endregion
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DataReducer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      var values = ParameterToReduce.ActualValue;
+      if (values.Count() > 0) {
+        if (values.All(x => x.GetType() == typeof(IntValue))) {
+          List<IntValue> intValues = new List<IntValue>();
+          values.ForEach(x => intValues.Add((IntValue)x));
+          CalculateResult(intValues);
+        } else if (values.All(x => x.GetType() == typeof(DoubleValue))) {
+          List<DoubleValue> doubleValues = new List<DoubleValue>();
+          values.ForEach(x => doubleValues.Add((DoubleValue)x));
+          CalculateResult(doubleValues);
+        } else if (values.All(x => x.GetType() == typeof(TimeSpanValue))) {
+          List<TimeSpanValue> timeSpanValues = new List<TimeSpanValue>();
+          values.ForEach(x => timeSpanValues.Add((TimeSpanValue)x));
+          CalculateResult(timeSpanValues);
+        } else {
+          throw new ArgumentException(string.Format("Type {0} is not supported by the DataReducer.", values.First().GetType()));
+        }
+      }
+      return base.Apply();
+    }
+
+    private void CalculateResult(List<IntValue> values) {
+      int result = 1;
+      if (TargetParameter.ActualValue == null) TargetParameter.ActualValue = new IntValue();
+      IntValue target = (IntValue)TargetParameter.ActualValue;
+
+      switch (ReductionOperation.Value.Value) {
+        case ReductionOperations.Sum:
+          result = values.Sum(x => x.Value);
+          break;
+        case ReductionOperations.Prod:
+          values.ForEach(x => result *= x.Value);
+          break;
+        case ReductionOperations.Avg:
+          result = (int)Math.Round(values.Average(x => x.Value));
+          break;
+        case ReductionOperations.Min:
+          result = values.Min(x => x.Value);
+          break;
+        case ReductionOperations.Max:
+          result = values.Max(x => x.Value);
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as ReductionOperation for type: {1}.", ReductionOperation.Value.Value, result.GetType()));
+      }
+
+      switch (TargetOperation.Value.Value) {
+        case ReductionOperations.Assign:
+          target.Value = result;
+          break;
+        case ReductionOperations.Sum:
+          target.Value += result;
+          break;
+        case ReductionOperations.Prod:
+          if (target.Value == 0) target.Value = 1;
+          target.Value *= result;
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as TargetOperation for type: {1}.", TargetOperation.Value.Value, result.GetType()));
+      }
+    }
+
+    private void CalculateResult(List<DoubleValue> values) {
+      double result = 1.0;
+      if (TargetParameter.ActualValue == null) TargetParameter.ActualValue = new DoubleValue();
+      DoubleValue target = (DoubleValue)TargetParameter.ActualValue;
+
+      switch (ReductionOperation.Value.Value) {
+        case ReductionOperations.Sum:
+          result = values.Sum(x => x.Value);
+          break;
+        case ReductionOperations.Prod:
+          values.ForEach(x => result *= x.Value);
+          break;
+        case ReductionOperations.Avg:
+          result = values.Average(x => x.Value);
+          break;
+        case ReductionOperations.Min:
+          result = values.Min(x => x.Value);
+          break;
+        case ReductionOperations.Max:
+          result = values.Max(x => x.Value);
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as ReductionOperation for type: {1}.", ReductionOperation.Value.Value, result.GetType()));
+      }
+
+      switch (TargetOperation.Value.Value) {
+        case ReductionOperations.Assign:
+          target.Value = result;
+          break;
+        case ReductionOperations.Sum:
+          target.Value += result;
+          break;
+        case ReductionOperations.Prod:
+          if (target.Value == 0.0) target.Value = 1.0;
+          target.Value *= result;
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as TargetOperation for type: {1}.", TargetOperation.Value.Value, result.GetType()));
+      }
+    }
+
+    private void CalculateResult(List<TimeSpanValue> values) {
+      TimeSpan result = TimeSpan.Zero;
+      if (TargetParameter.ActualValue == null) TargetParameter.ActualValue = new TimeSpanValue();
+      TimeSpanValue target = (TimeSpanValue)TargetParameter.ActualValue;
+
+      switch (ReductionOperation.Value.Value) {
+        case ReductionOperations.Sum:
+          values.ForEach(x => result = result.Add(x.Value));
+          break;
+        case ReductionOperations.Avg:
+          double avg = values.Average(x => x.Value.TotalMilliseconds);
+          result = TimeSpan.FromMilliseconds(avg);
+          break;
+        case ReductionOperations.Min:
+          result = values.Min(x => x.Value);
+          break;
+        case ReductionOperations.Max:
+          result = values.Max(x => x.Value);
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as ReductionOperation for type: {1}.", ReductionOperation.Value.Value, result.GetType()));
+      }
+
+      switch (TargetOperation.Value.Value) {
+        case ReductionOperations.Assign:
+          target.Value = result;
+          break;
+        case ReductionOperations.Sum:
+          target.Value += result;
+          break;
+        default:
+          throw new InvalidOperationException(string.Format("Operation {0} is not supported as TargetOperation for type: {1}.", TargetOperation.Value.Value, result.GetType()));
+      }
+    }
+  }
+}
Index: branches/HiveHiveEngine/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj
===================================================================
--- branches/HiveHiveEngine/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj	(revision 7391)
+++ branches/HiveHiveEngine/HeuristicLab.Operators/3.3/HeuristicLab.Operators-3.3.csproj	(revision 7392)
@@ -118,6 +118,6 @@
     <Compile Include="Assigner.cs" />
     <Compile Include="AlgorithmOperator.cs" />
-    <Compile Include="SubScopesRandomCreator.cs" />
-    <Compile Include="IntDataReducer.cs" />
+    <Compile Include="LocalRandomGenerator.cs" />
+    <Compile Include="DataReducer.cs" />
     <Compile Include="ReductionOperation.cs" />
     <Compile Include="ReductionOperations.cs" />
Index: branches/HiveHiveEngine/HeuristicLab.Operators/3.3/IntDataReducer.cs
===================================================================
--- branches/HiveHiveEngine/HeuristicLab.Operators/3.3/IntDataReducer.cs	(revision 7391)
+++ 	(revision )
@@ -1,113 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using System;
-using System.Linq;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Operators {
-  [Item("IntDataReducer", "An operator to reduce int values of sub scopes")]
-  [StorableClass]
-  public sealed class IntDataReducer : SingleSuccessorOperator {
-    #region Parameter Properties
-    public ScopeTreeLookupParameter<IntValue> ParameterToReduce {
-      get { return (ScopeTreeLookupParameter<IntValue>)Parameters["ParameterToReduce"]; }
-    }
-    public LookupParameter<IntValue> TargetParameter {
-      get { return (LookupParameter<IntValue>)Parameters["TargetParameter"]; }
-    }
-    public ValueParameter<ReductionOperation> ReductionOperation {
-      get { return (ValueParameter<ReductionOperation>)Parameters["ReductionOperation"]; }
-    }
-    public ValueParameter<ReductionOperation> TargetOperation {
-      get { return (ValueParameter<ReductionOperation>)Parameters["TargetOperation"]; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private IntDataReducer(bool deserializing) : base(deserializing) { }
-    private IntDataReducer(IntDataReducer original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public IntDataReducer()
-      : base() {
-      #region Create parameters
-      Parameters.Add(new ScopeTreeLookupParameter<IntValue>("ParameterToReduce", "The parameter on which the reduction operation should be applied."));
-      Parameters.Add(new LookupParameter<IntValue>("TargetParameter", "The target variable in which the reduced value should be stored."));
-      Parameters.Add(new ValueParameter<ReductionOperation>("ReductionOperation", "The operation which is applied on the parameter to reduce."));
-      Parameters.Add(new ValueParameter<ReductionOperation>("TargetOperation", "The operation used to apply the reduced value to the target variable."));
-      #endregion
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new IntDataReducer(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      var intValues = ParameterToReduce.ActualValue;
-
-      if (intValues.Count() > 0) {
-        if (TargetParameter.ActualValue == null) TargetParameter.ActualValue = new IntValue();
-
-        int result = 1;
-        switch (ReductionOperation.Value.Value) {
-          case ReductionOperations.Sum:
-            result = intValues.Sum(x => x.Value);
-            break;
-          case ReductionOperations.Prod:
-            intValues.ForEach(x => result *= x.Value);
-            break;
-          case ReductionOperations.Avg:
-            result = (int)Math.Round(intValues.Average(x => x.Value));
-            break;
-          case ReductionOperations.Min:
-            result = intValues.Min(x => x.Value);
-            break;
-          case ReductionOperations.Max:
-            result = intValues.Max(x => x.Value);
-            break;
-          default:
-            throw new InvalidOperationException("Operation " + ReductionOperation.Value.Value + " is not supported as ReductionOperation.");
-        }
-
-        switch (TargetOperation.Value.Value) {
-          case ReductionOperations.Assign:
-            TargetParameter.ActualValue.Value = result;
-            break;
-          case ReductionOperations.Sum:
-            TargetParameter.ActualValue.Value += result;
-            break;
-          case ReductionOperations.Prod:
-            if (TargetParameter.ActualValue.Value == 0) TargetParameter.ActualValue.Value = 1;
-            TargetParameter.ActualValue.Value *= result;
-            break;
-          default:
-            throw new InvalidOperationException("Operation " + TargetOperation.Value.Value + " is not supported as TargetOperation.");
-        }
-      }
-      return base.Apply();
-    }
-  }
-}
Index: branches/HiveHiveEngine/HeuristicLab.Operators/3.3/LocalRandomGenerator.cs
===================================================================
--- branches/HiveHiveEngine/HeuristicLab.Operators/3.3/LocalRandomGenerator.cs	(revision 7392)
+++ branches/HiveHiveEngine/HeuristicLab.Operators/3.3/LocalRandomGenerator.cs	(revision 7392)
@@ -0,0 +1,65 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Operators {
+  [Item("LocalRandomGenerator", "Creates local pseudo random number generator from a global random number generator.")]
+  [StorableClass]
+  public sealed class LocalRandomGenerator : SingleSuccessorOperator {
+    #region Parameter Properties
+    public LookupParameter<IRandom> GlobalRandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["GlobalRandom"]; }
+    }
+    public LookupParameter<IRandom> LocalRandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["LocalRandom"]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private LocalRandomGenerator(bool deserializing) : base(deserializing) { }
+    private LocalRandomGenerator(LocalRandomGenerator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public LocalRandomGenerator()
+      : base() {
+      #region Create parameters
+      Parameters.Add(new LookupParameter<IRandom>("GlobalRandom", "The global random number generator which is used to initialize the local random number generator.", "GlobalRandom"));
+      Parameters.Add(new LookupParameter<IRandom>("LocalRandom", "The local pseudo random number generator."));
+      #endregion
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LocalRandomGenerator(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      IRandom globalRandom = GlobalRandomParameter.ActualValue;
+      IRandom localRandom = (IRandom)globalRandom.Clone();
+      localRandom.Reset(globalRandom.Next());
+      LocalRandomParameter.ActualValue = localRandom;
+      return base.Apply();
+    }
+  }
+}
Index: branches/HiveHiveEngine/HeuristicLab.Operators/3.3/SubScopesRandomCreator.cs
===================================================================
--- branches/HiveHiveEngine/HeuristicLab.Operators/3.3/SubScopesRandomCreator.cs	(revision 7391)
+++ 	(revision )
@@ -1,68 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Parameters;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Operators {
-  [Item("SubScopesRandomCreator", "Creates pseudo random number generators for each subscope.")]
-  [StorableClass]
-  public sealed class SubScopesRandomCreator : SingleSuccessorOperator {
-    #region Parameter Properties
-    private LookupParameter<IRandom> GlobalRandomParameter {
-      get { return (LookupParameter<IRandom>)Parameters["GlobalRandom"]; }
-    }
-    private ScopeParameter CurrentScopeParameter {
-      get { return (ScopeParameter)Parameters["CurrentScope"]; }
-    }
-    private IScope CurrentScope {
-      get { return CurrentScopeParameter.ActualValue; }
-    }
-    #endregion
-
-    [StorableConstructor]
-    private SubScopesRandomCreator(bool deserializing) : base(deserializing) { }
-    private SubScopesRandomCreator(SubScopesRandomCreator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public SubScopesRandomCreator()
-      : base() {
-      #region Create parameters
-      Parameters.Add(new ScopeParameter("CurrentScope", "The current scope into which the random number generator is cloned."));
-      Parameters.Add(new LookupParameter<IRandom>("GlobalRandom", "A pseudo random number generator.", "Random"));
-      #endregion
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SubScopesRandomCreator(this, cloner);
-    }
-
-    public override IOperation Apply() {
-      IRandom random = GlobalRandomParameter.ActualValue;
-      IRandom subScopesRandom = (IRandom)random.Clone();
-      subScopesRandom.Reset(random.Next());
-      CurrentScope.Variables.Add(new Variable("Random", "A pseudo random number generator.", subScopesRandom));
-      return base.Apply();
-    }
-  }
-}
