Index: stable/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- stable/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 14023)
+++ stable/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 14133)
@@ -155,4 +155,5 @@
     <Compile Include="Interfaces\ILocalImprovementAlgorithmOperator.cs" />
     <Compile Include="Interfaces\IMultiObjectiveOperator.cs" />
+    <Compile Include="Results\IResultParameter.cs" />
     <Compile Include="Interfaces\ISingleObjectiveOperator.cs" />
     <Compile Include="Interfaces\ISingleObjectivePathRelinker.cs" />
@@ -168,4 +169,5 @@
     <Compile Include="MetaOptimizers\Experiment.cs" />
     <Compile Include="MetaOptimizers\TimeLimitRun.cs" />
+    <Compile Include="Results\ResultParameter.cs" />
     <Compile Include="RunCollectionModification\RunCollectionRunRemover.cs" />
     <Compile Include="Plugin.cs" />
@@ -229,5 +231,5 @@
     <Compile Include="RunCollection.cs" />
     <Compile Include="Run.cs" />
-    <Compile Include="Interfaces\IResult.cs" />
+    <Compile Include="Results\IResult.cs" />
     <Compile Include="Interfaces\IDiscreteDoubleValueModifier.cs" />
     <Compile Include="Interfaces\IExhaustiveMoveGenerator.cs" />
@@ -253,9 +255,9 @@
     <Compile Include="Interfaces\ITabuChecker.cs" />
     <Compile Include="Interfaces\ITabuMaker.cs" />
-    <Compile Include="Result.cs" />
+    <Compile Include="Results\Result.cs" />
     <Compile Include="Algorithms\UserDefinedAlgorithm.cs" />
     <Compile Include="Algorithms\EngineAlgorithm.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="ResultCollection.cs" />
+    <Compile Include="Results\ResultCollection.cs" />
     <Compile Include="Problems\UserDefinedProblem.cs" />
   </ItemGroup>
Index: stable/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Interfaces/IResult.cs	(revision 14023)
+++ 	(revision )
@@ -1,36 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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.Core;
-
-namespace HeuristicLab.Optimization {
-  /// <summary>
-  /// Represents a result which has a name and a data type and holds an IItem.
-  /// </summary>
-  public interface IResult : INamedItem {
-    Type DataType { get; }
-    IItem Value { get; set; }
-
-    /// <inheritdoc/>
-    event EventHandler ValueChanged;
-  }
-}
Index: stable/HeuristicLab.Optimization/3.3/Result.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Result.cs	(revision 14023)
+++ 	(revision )
@@ -1,157 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  /// <summary>
-  /// Represents a result which has a name and a data type and holds an IItem.
-  /// </summary>
-  [Item("Result", "A result which has a name and a data type and holds an IItem.")]
-  [StorableClass]
-  public sealed class Result : NamedItem, IResult, IStorableContent {
-    public string Filename { get; set; }
-
-    public override Image ItemImage {
-      get {
-        if (value != null) return value.ItemImage;
-        else return base.ItemImage;
-      }
-    }
-
-    public override bool CanChangeName {
-      get { return false; }
-    }
-    public override bool CanChangeDescription {
-      get { return false; }
-    }
-
-    [Storable]
-    private Type dataType;
-    public Type DataType {
-      get { return dataType; }
-    }
-
-    [Storable]
-    private IItem value;
-    public IItem Value {
-      get { return value; }
-      set {
-        if (this.value != value) {
-          if ((value != null) && (!dataType.IsInstanceOfType(value)))
-            throw new ArgumentException(
-              string.Format("Type mismatch. Value is not a \"{0}\".",
-                            dataType.GetPrettyName())
-            );
-
-          DeregisterValueEvents();
-          this.value = value;
-          RegisterValueEvents();
-          OnValueChanged();
-        }
-      }
-    }
-
-    [StorableConstructor]
-    private Result(bool deserializing) : base(deserializing) { }
-    private Result(Result original, Cloner cloner)
-      : base(original, cloner) {
-      dataType = original.dataType;
-      value = cloner.Clone(original.value);
-      Initialize();
-    }
-    public Result()
-      : base("Anonymous") {
-      this.dataType = typeof(IItem);
-      this.value = null;
-    }
-    public Result(string name, Type dataType)
-      : base(name) {
-      this.dataType = dataType;
-      this.value = null;
-    }
-    public Result(string name, string description, Type dataType)
-      : base(name, description) {
-      this.dataType = dataType;
-      this.value = null;
-    }
-    public Result(string name, IItem value)
-      : base(name) {
-      this.dataType = value == null ? typeof(IItem) : value.GetType();
-      this.value = value;
-      Initialize();
-    }
-    public Result(string name, string description, IItem value)
-      : base(name, description) {
-      this.dataType = value == null ? typeof(IItem) : value.GetType();
-      this.value = value;
-      Initialize();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      Initialize();
-    }
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Result(this, cloner);
-    }
-
-    private void Initialize() {
-      RegisterValueEvents();
-    }
-
-    public override string ToString() {
-      return string.Format("{0}: {1}", Name, Value == null ? "null" : Value.ToString());
-    }
-
-    public event EventHandler ValueChanged;
-    private void OnValueChanged() {
-      var handler = ValueChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-      OnItemImageChanged();
-      OnToStringChanged();
-    }
-
-    private void RegisterValueEvents() {
-      if (value != null) {
-        value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
-        value.ToStringChanged += new EventHandler(Value_ToStringChanged);
-      }
-    }
-    private void DeregisterValueEvents() {
-      if (value != null) {
-        value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);
-        value.ToStringChanged -= new EventHandler(Value_ToStringChanged);
-      }
-    }
-    private void Value_ItemImageChanged(object sender, EventArgs e) {
-      OnItemImageChanged();
-    }
-    private void Value_ToStringChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-  }
-}
Index: stable/HeuristicLab.Optimization/3.3/ResultCollection.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/ResultCollection.cs	(revision 14023)
+++ 	(revision )
@@ -1,78 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 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 HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Optimization {
-  [StorableClass]
-  [Item("ResultCollection", "Represents a collection of results.")]
-  public class ResultCollection : NamedItemCollection<IResult> {
-    public ResultCollection() : base() { }
-    public ResultCollection(int capacity) : base(capacity) { }
-    public ResultCollection(IEnumerable<IResult> collection) : base(collection) { }
-    [StorableConstructor]
-    protected ResultCollection(bool deserializing) : base(deserializing) { }
-    protected ResultCollection(ResultCollection original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ResultCollection(this, cloner);
-    }
-
-    public static new System.Drawing.Image StaticItemImage {
-      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
-    }
-
-    public virtual void CollectResultValues(IDictionary<string, IItem> values) {
-      CollectResultValues(values, string.Empty);
-    }
-
-    public virtual void CollectResultValues(IDictionary<string, IItem> values, string rootPath) {
-      foreach (IResult result in this) {
-        var children = GetCollectedResults(result);
-        string path = string.Empty;
-        if (!string.IsNullOrWhiteSpace(rootPath))
-          path = rootPath + ".";
-        foreach (var c in children) {
-          if (string.IsNullOrEmpty(c.Key))
-            values.Add(path + result.Name, c.Value);
-          else values.Add(path + result.Name + "." + c.Key, c.Value);
-        }
-      }
-    }
-
-    protected virtual IEnumerable<KeyValuePair<string, IItem>> GetCollectedResults(IResult result) {
-      if (result.Value == null) yield break;
-      yield return new KeyValuePair<string, IItem>(string.Empty, result.Value);
-
-      var resultCollection = result.Value as ResultCollection;
-      if (resultCollection != null) {
-        var children = new Dictionary<string, IItem>();
-        resultCollection.CollectResultValues(children);
-        foreach (var child in children) yield return child;
-      }
-    }
-
-  }
-}
Index: stable/HeuristicLab.Optimization/3.3/Results/IResult.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Results/IResult.cs	(revision 14133)
+++ stable/HeuristicLab.Optimization/3.3/Results/IResult.cs	(revision 14133)
@@ -0,0 +1,36 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Core;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents a result which has a name and a data type and holds an IItem.
+  /// </summary>
+  public interface IResult : INamedItem {
+    Type DataType { get; }
+    IItem Value { get; set; }
+
+    /// <inheritdoc/>
+    event EventHandler ValueChanged;
+  }
+}
Index: stable/HeuristicLab.Optimization/3.3/Results/IResultParameter.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Results/IResultParameter.cs	(revision 14133)
+++ stable/HeuristicLab.Optimization/3.3/Results/IResultParameter.cs	(revision 14133)
@@ -0,0 +1,35 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IResultParameter : ILookupParameter {
+    string ResultCollectionName { get; set; }
+    event EventHandler ResultCollectionNameChanged;
+  }
+
+  public interface IResultParameter<T> : ILookupParameter<T>, IResultParameter where T : class, IItem {
+    T DefaultValue { get; set; }
+    event EventHandler DefaultValueChanged;
+  }
+}
Index: stable/HeuristicLab.Optimization/3.3/Results/Result.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Results/Result.cs	(revision 14133)
+++ stable/HeuristicLab.Optimization/3.3/Results/Result.cs	(revision 14133)
@@ -0,0 +1,157 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  /// <summary>
+  /// Represents a result which has a name and a data type and holds an IItem.
+  /// </summary>
+  [Item("Result", "A result which has a name and a data type and holds an IItem.")]
+  [StorableClass]
+  public sealed class Result : NamedItem, IResult, IStorableContent {
+    public string Filename { get; set; }
+
+    public override Image ItemImage {
+      get {
+        if (value != null) return value.ItemImage;
+        else return base.ItemImage;
+      }
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+    public override bool CanChangeDescription {
+      get { return false; }
+    }
+
+    [Storable]
+    private Type dataType;
+    public Type DataType {
+      get { return dataType; }
+    }
+
+    [Storable]
+    private IItem value;
+    public IItem Value {
+      get { return value; }
+      set {
+        if (this.value != value) {
+          if ((value != null) && (!dataType.IsInstanceOfType(value)))
+            throw new ArgumentException(
+              string.Format("Type mismatch. Value is not a \"{0}\".",
+                            dataType.GetPrettyName())
+            );
+
+          DeregisterValueEvents();
+          this.value = value;
+          RegisterValueEvents();
+          OnValueChanged();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    private Result(bool deserializing) : base(deserializing) { }
+    private Result(Result original, Cloner cloner)
+      : base(original, cloner) {
+      dataType = original.dataType;
+      value = cloner.Clone(original.value);
+      Initialize();
+    }
+    public Result()
+      : base("Anonymous") {
+      this.dataType = typeof(IItem);
+      this.value = null;
+    }
+    public Result(string name, Type dataType)
+      : base(name) {
+      this.dataType = dataType;
+      this.value = null;
+    }
+    public Result(string name, string description, Type dataType)
+      : base(name, description) {
+      this.dataType = dataType;
+      this.value = null;
+    }
+    public Result(string name, IItem value)
+      : base(name) {
+      this.dataType = value == null ? typeof(IItem) : value.GetType();
+      this.value = value;
+      Initialize();
+    }
+    public Result(string name, string description, IItem value)
+      : base(name, description) {
+      this.dataType = value == null ? typeof(IItem) : value.GetType();
+      this.value = value;
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Result(this, cloner);
+    }
+
+    private void Initialize() {
+      RegisterValueEvents();
+    }
+
+    public override string ToString() {
+      return string.Format("{0}: {1}", Name, Value == null ? "null" : Value.ToString());
+    }
+
+    public event EventHandler ValueChanged;
+    private void OnValueChanged() {
+      var handler = ValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+      OnToStringChanged();
+    }
+
+    private void RegisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged += new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged += new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void DeregisterValueEvents() {
+      if (value != null) {
+        value.ItemImageChanged -= new EventHandler(Value_ItemImageChanged);
+        value.ToStringChanged -= new EventHandler(Value_ToStringChanged);
+      }
+    }
+    private void Value_ItemImageChanged(object sender, EventArgs e) {
+      OnItemImageChanged();
+    }
+    private void Value_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+  }
+}
Index: stable/HeuristicLab.Optimization/3.3/Results/ResultCollection.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Results/ResultCollection.cs	(revision 14133)
+++ stable/HeuristicLab.Optimization/3.3/Results/ResultCollection.cs	(revision 14133)
@@ -0,0 +1,78 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [StorableClass]
+  [Item("ResultCollection", "Represents a collection of results.")]
+  public class ResultCollection : NamedItemCollection<IResult> {
+    public ResultCollection() : base() { }
+    public ResultCollection(int capacity) : base(capacity) { }
+    public ResultCollection(IEnumerable<IResult> collection) : base(collection) { }
+    [StorableConstructor]
+    protected ResultCollection(bool deserializing) : base(deserializing) { }
+    protected ResultCollection(ResultCollection original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ResultCollection(this, cloner);
+    }
+
+    public static new System.Drawing.Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Object; }
+    }
+
+    public virtual void CollectResultValues(IDictionary<string, IItem> values) {
+      CollectResultValues(values, string.Empty);
+    }
+
+    public virtual void CollectResultValues(IDictionary<string, IItem> values, string rootPath) {
+      foreach (IResult result in this) {
+        var children = GetCollectedResults(result);
+        string path = string.Empty;
+        if (!string.IsNullOrWhiteSpace(rootPath))
+          path = rootPath + ".";
+        foreach (var c in children) {
+          if (string.IsNullOrEmpty(c.Key))
+            values.Add(path + result.Name, c.Value);
+          else values.Add(path + result.Name + "." + c.Key, c.Value);
+        }
+      }
+    }
+
+    protected virtual IEnumerable<KeyValuePair<string, IItem>> GetCollectedResults(IResult result) {
+      if (result.Value == null) yield break;
+      yield return new KeyValuePair<string, IItem>(string.Empty, result.Value);
+
+      var resultCollection = result.Value as ResultCollection;
+      if (resultCollection != null) {
+        var children = new Dictionary<string, IItem>();
+        resultCollection.CollectResultValues(children);
+        foreach (var child in children) yield return child;
+      }
+    }
+
+  }
+}
Index: stable/HeuristicLab.Optimization/3.3/Results/ResultParameter.cs
===================================================================
--- stable/HeuristicLab.Optimization/3.3/Results/ResultParameter.cs	(revision 14133)
+++ stable/HeuristicLab.Optimization/3.3/Results/ResultParameter.cs	(revision 14133)
@@ -0,0 +1,152 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Common.Resources;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Optimization {
+  [Item("ResultParameter", "A parameter whose value is written to a result collection.")]
+  [StorableClass]
+  public sealed class ResultParameter<T> : LookupParameter<T>, IResultParameter<T> where T : class, IItem {
+    public override Image ItemImage { get { return VSImageLibrary.Exception; } }
+    public override bool CanChangeDescription { get { return true; } }
+
+    [Storable]
+    private string resultCollectionName;
+    public string ResultCollectionName {
+      get { return resultCollectionName; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        if (string.IsNullOrWhiteSpace(value)) throw new ArgumentNullException();
+        else if (!resultCollectionName.Equals(value)) {
+          resultCollectionName = value;
+          OnResultCollectionNameChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private T defaultValue;
+    public T DefaultValue {
+      get { return defaultValue; }
+      set {
+        if (value != defaultValue) {
+          defaultValue = value;
+          OnDefaultValueChanged();
+        }
+      }
+    }
+
+    [StorableConstructor]
+    private ResultParameter(bool deserializing) : base(deserializing) { }
+    private ResultParameter(ResultParameter<T> original, Cloner cloner)
+      : base(original, cloner) {
+      resultCollectionName = original.resultCollectionName;
+      defaultValue = cloner.Clone(original.defaultValue);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ResultParameter<T>(this, cloner);
+    }
+    public ResultParameter() : this("Anonymous", string.Empty, "Results") { }
+    public ResultParameter(string name, string description) : this(name, description, "Results") { }
+
+    public ResultParameter(string name, string description, string resultCollectionName)
+      : base(name, description, string.Empty) {
+      if (string.IsNullOrEmpty(resultCollectionName)) throw new ArgumentException("resultCollectionName");
+      this.resultCollectionName = resultCollectionName;
+      Hidden = false;
+    }
+    public ResultParameter(string name, string description, string resultCollectionName, T defaultValue)
+      : base(name, description, string.Empty) {
+      if (string.IsNullOrEmpty(resultCollectionName)) throw new ArgumentException("resultCollectionName");
+      if (defaultValue == null) throw new ArgumentNullException("defaultValue");
+      this.resultCollectionName = resultCollectionName;
+      this.defaultValue = defaultValue;
+      Hidden = false;
+    }
+
+    protected override IItem GetActualValue() {
+      ResultCollection results;
+      if (CachedActualValue != null) {
+        results = CachedActualValue as ResultCollection;
+        if (results == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): ResultCollection not found.");
+      } else {
+        var tmp = ResultCollectionName;
+        // verifyType has to be disabled, because the ResultCollection may not be identical to the generic type of the parameter
+        results = GetValue(ExecutionContext, ref tmp) as ResultCollection;
+        if (results == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): ResultCollection with name " + tmp + " not found.");
+        CachedActualValue = results;
+      }
+
+      IResult result;
+      if (!results.TryGetValue(ActualName, out result)) {
+        if (DefaultValue == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): Result not found and no default value specified.");
+        result = ItemDescription == Description ? new Result(ActualName, (T)DefaultValue.Clone()) : new Result(ActualName, Description, (T)DefaultValue.Clone());
+        results.Add(result);
+      }
+
+      var resultValue = result.Value as T;
+      if (resultValue == null)
+        throw new InvalidOperationException(string.Format("Type mismatch. Result \"{0}\" does not contain a \"{1}\".", ActualName, typeof(T).GetPrettyName()));
+
+      return resultValue;
+    }
+
+    protected override void SetActualValue(IItem value) {
+      ResultCollection results;
+      if (CachedActualValue != null) {
+        results = CachedActualValue as ResultCollection;
+        if (results == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): ResultCollection not found.");
+      } else {
+        var tmp = ResultCollectionName;
+        results = GetValue(ExecutionContext, ref tmp) as ResultCollection;
+        if (results == null) throw new InvalidOperationException("ResultParameter (" + ActualName + "): ResultCollection with name " + tmp + " not found.");
+        CachedActualValue = results;
+      }
+
+      IResult result;
+      if (!results.TryGetValue(ActualName, out result)) {
+        result = ItemDescription == Description ? new Result(ActualName, value) : new Result(ActualName, Description, value);
+        results.Add(result);
+      } else result.Value = value;
+    }
+
+
+    public event EventHandler ResultCollectionNameChanged;
+    private void OnResultCollectionNameChanged() {
+      var handler = ResultCollectionNameChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnToStringChanged();
+    }
+
+    public event EventHandler DefaultValueChanged;
+    private void OnDefaultValueChanged() {
+      EventHandler handler = DefaultValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+      OnItemImageChanged();
+    }
+  }
+}
