Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ParameterConfigurations/ParameterConfiguration.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ParameterConfigurations/ParameterConfiguration.cs	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ParameterConfigurations/ParameterConfiguration.cs	(revision 4981)
@@ -14,16 +14,16 @@
 
     [Storable]
-    protected bool optimizationEnabled;
-    public bool OptimizationEnabled {
-      get { return optimizationEnabled; }
+    protected bool optimize;
+    public bool Optimize {
+      get { return optimize; }
       set {
-        if (optimizationEnabled != value) {
-          optimizationEnabled = value;
-          if (optimizationEnabled) {
+        if (optimize != value) {
+          optimize = value;
+          if (optimize) {
             PopulateValueConfigurations();
           } else {
             this.ValueConfigurations.Clear();
           }
-          OnOptimizationEnabledChanged();
+          OnOptimizeChanged();
         }
       }
@@ -62,6 +62,6 @@
     }
 
-    protected ICheckedItemList<IValueConfiguration> valueConfigurations;
-    public ICheckedItemList<IValueConfiguration> ValueConfigurations {
+    protected ICheckedValueConfigurationCollection valueConfigurations;
+    public ICheckedValueConfigurationCollection ValueConfigurations {
       get { return this.valueConfigurations; }
       protected set { this.valueConfigurations = value; }
@@ -75,7 +75,13 @@
     }
 
+    public ConstrainedValue ConstrainedValue {
+      get { return actualValueConfiguration.ConstrainedValue; }
+      set { actualValueConfiguration.ConstrainedValue = value; }
+    }
+    
     // store parameter reference only for name/description/image/...
     private IValueParameter parameter;
 
+    #region Constructors and Cloning
     public ParameterConfiguration(string parameterName, IValueParameter valueParameter) {
       this.ParameterName = parameterName;
@@ -84,7 +90,7 @@
       this.valueDataType = valueParameter.DataType;
       this.validValues = GetValidValues();
-      this.ValueConfigurations = new CheckedItemList<IValueConfiguration>();
+      this.ValueConfigurations = new CheckedValueConfigurationCollection(this.valueDataType);
       this.ActualValueConfiguration = new ValueConfiguration(valueParameter.Value, valueParameter.DataType);
-      if (OptimizationEnabled) {
+      if (Optimize) {
         PopulateValueConfigurations();
       }
@@ -94,5 +100,6 @@
     [StorableConstructor]
     protected ParameterConfiguration(bool deserializing) { }
-    protected ParameterConfiguration(ParameterConfiguration original, Cloner cloner) : base(original, cloner) {
+    protected ParameterConfiguration(ParameterConfiguration original, Cloner cloner)
+      : base(original, cloner) {
       this.ParameterName = original.ParameterName;
       this.parameterDataType = original.parameterDataType;
@@ -102,9 +109,10 @@
       this.ValueConfigurations = cloner.Clone(original.ValueConfigurations);
       this.ActualValueConfiguration = cloner.Clone(original.ActualValueConfiguration);
-      this.OptimizationEnabled = original.optimizationEnabled;
+      this.Optimize = original.optimize;
     }
     public override IDeepCloneable Clone(Cloner cloner) {
       return new ParameterConfiguration(this, cloner);
     }
+    #endregion
 
     private void PopulateValueConfigurations() {
@@ -118,23 +126,23 @@
     }
 
-    void ValidValues_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<IItem>> e) {
-      var oldItems = e.OldItems.Select(x => x.Value);
-      var newItems = e.Items.Select(x => x.Value);
-      var intersection = oldItems.Intersect(newItems);
-      var removedItems = oldItems.Where(x => !intersection.Contains(x));
-      var addedItems = newItems.Where(x => !intersection.Contains(x));
-
-      foreach (var item in removedItems) {
-        RemoveValueConfiguration(item);
-      }
-      foreach (var item in addedItems) {
-        this.ValueConfigurations.Add(new ValueConfiguration(item, item.GetType()));
-      }
-    }
-
-    private void RemoveValueConfiguration(IItem item) {
-      IValueConfiguration vc = this.ValueConfigurations.Single(x => x.ValueDataType == item.GetType());
-      this.ValueConfigurations.Remove(vc);
-    }
+    //void ValidValues_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<IItem>> e) {
+    //  var oldItems = e.OldItems.Select(x => x.Value);
+    //  var newItems = e.Items.Select(x => x.Value);
+    //  var intersection = oldItems.Intersect(newItems);
+    //  var removedItems = oldItems.Where(x => !intersection.Contains(x));
+    //  var addedItems = newItems.Where(x => !intersection.Contains(x));
+
+    //  foreach (var item in removedItems) {
+    //    RemoveValueConfiguration(item);
+    //  }
+    //  foreach (var item in addedItems) {
+    //    this.ValueConfigurations.Add(new ValueConfiguration(item, item.GetType()));
+    //  }
+    //}
+
+    //private void RemoveValueConfiguration(IItem item) {
+    //  IValueConfiguration vc = this.ValueConfigurations.Single(x => x.ValueDataType == item.GetType());
+    //  this.ValueConfigurations.Remove(vc);
+    //}
 
     #region INamedItem Properties
@@ -198,7 +206,7 @@
     }
 
-    public virtual event EventHandler OptimizationEnabledChanged;
-    protected virtual void OnOptimizationEnabledChanged() {
-      var handler = OptimizationEnabledChanged;
+    public virtual event EventHandler OptimizeChanged;
+    protected virtual void OnOptimizeChanged() {
+      var handler = OptimizeChanged;
       if (handler != null) handler(this, EventArgs.Empty);
     }
@@ -206,5 +214,5 @@
 
     public override string ToString() {
-      return string.Format("{0}", ParameterName);
+      return string.Format("{0}: {1}", ParameterName, ConstrainedValue.Value);
     }
 
@@ -217,5 +225,4 @@
       return null;
     }
-
   }
 }
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/ConstrainedValue.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/ConstrainedValue.cs	(revision 4981)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/ConstrainedValue.cs	(revision 4981)
@@ -0,0 +1,62 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.MetaOptimization {
+  [StorableClass]
+  public class ConstrainedValue : Item {
+    [Storable]
+    protected Type valueDataType;
+    public Type ValueDataType {
+      get { return this.valueDataType; }
+      protected set { this.valueDataType = value; }
+    }
+
+    [Storable]
+    protected IItem value;
+    public IItem Value {
+      get { return value; }
+      set {
+        if (this.value != value) {
+          if(this.value != null) DeregisterEvents();
+          this.value = value;
+          if(this.value != null) RegisterEvents();
+          OnToStringChanged();
+        }
+      }
+    }
+
+    private void RegisterEvents() {
+      this.value.ToStringChanged += new EventHandler(value_ToStringChanged);
+    }
+    private void DeregisterEvents() {
+      this.value.ToStringChanged -= new EventHandler(value_ToStringChanged);
+    }
+    
+    public ConstrainedValue() { }
+    public ConstrainedValue(IItem value, Type valueDataType) {
+      this.Value = value;
+      this.ValueDataType = valueDataType;
+    }
+    protected ConstrainedValue(ConstrainedValue original, Cloner cloner) : base(original, cloner) {
+      this.valueDataType = original.valueDataType;
+      this.value = cloner.Clone(value);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ConstrainedValue(this, cloner);
+    }
+
+    void value_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+
+    public override string ToString() {
+      return value != null ? value.ToString() : base.ToString();
+    }
+  }
+}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/Range.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/Range.cs	(revision 4981)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/RangeConstraints/Range.cs	(revision 4981)
@@ -0,0 +1,196 @@
+﻿using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.MetaOptimization {
+  [StorableClass]
+  public class Range<T> : Item, IRange<T> where T : class, IStringConvertibleValue, IDeepCloneable {
+    [Storable]
+    private T lowerBound;
+    public T LowerBound {
+      get { return lowerBound; }
+      set {
+        if (lowerBound != value) {
+          if (lowerBound != null) {
+            lowerBound.ValueChanged -= new EventHandler(lowerBound_ToStringChanged);
+          }
+          lowerBound = value;
+          if (lowerBound != null) {
+            lowerBound.ValueChanged += new EventHandler(lowerBound_ToStringChanged);
+          }
+          OnLowerBoundChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private T upperBound;
+    public T UpperBound {
+      get { return upperBound; }
+      set {
+        if (upperBound != value) {
+          if (upperBound != null) {
+            upperBound.ValueChanged -= new EventHandler(upperBound_ToStringChanged);
+          }
+          upperBound = value;
+          if (upperBound != null) {
+            upperBound.ValueChanged += new EventHandler(upperBound_ToStringChanged);
+          }
+          OnUpperBoundChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private T stepSize;
+    public T StepSize {
+      get { return stepSize; }
+      set {
+        if (stepSize != value) {
+          if (stepSize != null) {
+            stepSize.ValueChanged -= new EventHandler(upperBound_ToStringChanged);
+          }
+          stepSize = value;
+          if (stepSize != null) {
+            stepSize.ValueChanged += new EventHandler(stepSize_ToStringChanged);
+          }
+          OnStepSizeChanged();
+        }
+      }
+    }
+
+    #region IRange Members
+    object IRange.LowerBound {
+      get { return lowerBound; }
+      set { lowerBound = (T)value; }
+    }
+    object IRange.UpperBound {
+      get { return upperBound; }
+      set { upperBound = (T)value; }
+    }
+    object IRange.StepSize {
+      get { return stepSize; }
+      set { stepSize = (T)value; }
+    }
+    #endregion
+
+    #region Constructors and Cloning
+    public Range(T lowerBound, T upperBound, T stepSize) {
+      this.LowerBound = lowerBound;
+      this.UpperBound = upperBound;
+      this.StepSize = stepSize;
+    }
+
+    [StorableConstructor]
+    protected Range(bool deserializing) : base(deserializing) { }
+    protected Range(Range<T> original, Cloner cloner)
+      : base(original, cloner) {
+      this.LowerBound = cloner.Clone(original.LowerBound);
+      this.UpperBound = cloner.Clone(original.UpperBound);
+      this.StepSize = cloner.Clone(original.StepSize);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Range<T>(this, cloner);
+    }
+    #endregion
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      if (lowerBound != null) {
+        lowerBound.ValueChanged += new EventHandler(lowerBound_ToStringChanged);
+      }
+      if (upperBound != null) {
+        upperBound.ValueChanged += new EventHandler(upperBound_ToStringChanged);
+      }
+      if (stepSize != null) {
+        stepSize.ValueChanged += new EventHandler(stepSize_ToStringChanged);
+      }
+    }
+
+    #region Events
+    private void lowerBound_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    private void upperBound_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    private void stepSize_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    #endregion
+
+    #region Eventhandler
+    public event EventHandler LowerBoundChanged;
+    private void OnLowerBoundChanged() {
+      var handler = LowerBoundChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler UpperBoundChanged;
+    private void OnUpperBoundChanged() {
+      var handler = UpperBoundChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler StepSizeChanged;
+    private void OnStepSizeChanged() {
+      var handler = StepSizeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    public event EventHandler ValueChanged;
+    private void OnValueChanged() {
+      var handler = ValueChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
+    #endregion
+
+    public override string ToString() {
+      return string.Format("{0},{1}:{2}", LowerBound.ToString(), UpperBound.ToString(), StepSize.ToString());
+    }
+
+    #region IStringConvertibleValue Members
+
+    public string GetValue() {
+      return this.ToString();
+    }
+    public bool ReadOnly {
+      get { return false; }
+    }
+    public bool SetValue(string value) {
+      var parts1 = value.Split(':');
+      if (parts1.Length != 2) return false;
+      var parts2 = parts1[0].Split(',');
+      if (parts2.Length != 2) return false;
+
+      return
+        lowerBound.SetValue(parts2[0]) &&
+        upperBound.SetValue(parts2[1]) &&
+        stepSize.SetValue(parts1[1]);
+    }
+    public bool Validate(string value, out string errorMessage) {
+      // TODO: check that upper is larger than lower
+      T lower = (T)lowerBound.Clone();
+      T upper = (T)upperBound.Clone();
+      T step = (T)stepSize.Clone();
+
+      var parts1 = value.Split(':');
+      if (parts1.Length != 2) {
+        errorMessage = "Could not parse range."; return false;
+      }
+      var parts2 = parts1[0].Split(',');
+      if (parts2.Length != 2) {
+        errorMessage = "Could not parse range."; return false;
+      }
+
+      if (lowerBound.SetValue(parts2[0]) &&
+          upperBound.SetValue(parts2[1]) &&
+          stepSize.SetValue(parts1[1])) {
+        errorMessage = string.Empty; return true;
+      } else {
+        errorMessage = "Could not parse range."; return false;
+      }
+    }
+
+    #endregion
+  }
+}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/CheckedValueConfigurationCollection.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/CheckedValueConfigurationCollection.cs	(revision 4981)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/CheckedValueConfigurationCollection.cs	(revision 4981)
@@ -0,0 +1,21 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.MetaOptimization {
+  // todo: check that at least 1 elements needs to be selected
+  // todo: control creatable item types
+  public class CheckedValueConfigurationCollection : CheckedItemCollection<IValueConfiguration>, ICheckedValueConfigurationCollection {
+
+    protected Type valueDataType;
+    public Type ValueDataType {
+      get { return valueDataType; }
+    }
+
+    public CheckedValueConfigurationCollection(Type valueDataType) {
+      this.valueDataType = valueDataType;
+    }
+  }
+}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/ValueConfiguration.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/ValueConfiguration.cs	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueConfigurations/ValueConfiguration.cs	(revision 4981)
@@ -1,39 +1,68 @@
 ﻿using System;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Data;
+using System.Drawing;
 
 namespace HeuristicLab.Problems.MetaOptimization {
-  [StorableClass]
-  public class ValueConfiguration : DeepCloneable, IValueConfiguration {
-    [Storable]
-    protected IItemList<IParameterConfiguration> parameterConfigurations = new ItemList<IParameterConfiguration>();
-    public IItemList<IParameterConfiguration> ParameterConfigurations {
+  // TODO: ItemName/Descr, storability
+  public class ValueConfiguration : Item, IValueConfiguration {
+    protected bool optimize;
+    public bool Optimize {
+      get { return optimize; }
+      set {
+        if (optimize != value) {
+          optimize = value;
+          if (optimize) {
+            ClearParameterConfigurations();
+            PopulateParameterConfigurations();
+          } else {
+            ClearParameterConfigurations();
+          }
+          OnOptimizeChanged();
+          OnToStringChanged();
+        }
+      }
+    }
+
+    protected IItemCollection<IParameterConfiguration> parameterConfigurations = new ItemCollection<IParameterConfiguration>();
+    public IItemCollection<IParameterConfiguration> ParameterConfigurations {
       get { return this.parameterConfigurations; }
       protected set { this.parameterConfigurations = value; }
     }
 
-    protected IItem value;
-    public IItem Value {
-      get { return value; }
+    protected ConstrainedValue constrainedValue;
+    public ConstrainedValue ConstrainedValue {
+      get { return constrainedValue; }
       set {
-        if (this.value != value) {
-          ClearChildParameterConfigurations();
-          this.value = value;
-          if (this.value is IParameterizedNamedItem) AddChildParameterConfigurations(this.value as IParameterizedNamedItem);
+        if (this.constrainedValue != value) {
+          ClearParameterConfigurations();
+          this.constrainedValue = value;
+          PopulateParameterConfigurations();
           OnValueChanged();
+          OnToStringChanged();
         }
       }
     }
 
-    protected Type valueDataType;
-    public Type ValueDataType {
-      get { return this.valueDataType; }
-      protected set { this.valueDataType = value; }
+    protected IRange rangeConstraint;
+    public IRange RangeConstraint {
+      get { return rangeConstraint; }
     }
-
+    
+    #region Constructors and Cloning
     public ValueConfiguration(IItem value, Type valueDataType) {
-      this.Value = value;
-      this.ValueDataType = valueDataType;
+      this.parameterConfigurations = new ItemList<IParameterConfiguration>();
+      this.ConstrainedValue = new ConstrainedValue(value, valueDataType);
+      if (constrainedValue.ValueDataType == typeof(IntValue)) {
+        rangeConstraint = new Range<IntValue>(new IntValue(0), (IntValue)value, new IntValue(1));
+      } else if (constrainedValue.ValueDataType == typeof(DoubleValue)) {
+        rangeConstraint = new Range<DoubleValue>(new DoubleValue(0), (DoubleValue)value, new DoubleValue(0.1));
+      } else {
+        rangeConstraint = null;
+      }
+      RegisterEvents();
     }
 
@@ -43,53 +72,57 @@
     protected ValueConfiguration(ValueConfiguration original, Cloner cloner) : base(original, cloner) {
       this.ParameterConfigurations = cloner.Clone(original.ParameterConfigurations);
-      this.Value = cloner.Clone(original.Value);
-      this.ValueDataType = original.ValueDataType;
-
+      this.ConstrainedValue = cloner.Clone(original.ConstrainedValue);
+      this.rangeConstraint = cloner.Clone(original.RangeConstraint);
+      RegisterEvents();
     }
     public override IDeepCloneable Clone(Cloner cloner) {
       return new ValueConfiguration(this, cloner);
     }
+    #endregion
 
-    protected virtual void AddChildParameterConfigurations(IParameterizedNamedItem parameterizedItem) {
-      foreach (var childParameter in parameterizedItem.Parameters) {
-        var pc = ParameterConfiguration.Create(parameterizedItem, childParameter);
-        if (pc != null) this.ParameterConfigurations.Add(pc);
+    protected virtual void PopulateParameterConfigurations() {
+      if (this.constrainedValue.Value is IParameterizedNamedItem) {
+        var parameterizedItem = this.constrainedValue.Value as IParameterizedNamedItem;
+        foreach (var childParameter in parameterizedItem.Parameters) {
+          var pc = ParameterConfiguration.Create(parameterizedItem, childParameter);
+          if (pc != null) this.ParameterConfigurations.Add(pc);
+        }
       }
     }
-    protected virtual void ClearChildParameterConfigurations() {
+    protected virtual void ClearParameterConfigurations() {
       ParameterConfigurations.Clear();
     }
-    
-    #region IItem Members
-    public string ItemDescription {
-      get { return value.ItemDescription; }
+
+    private void RegisterEvents() {
+      if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged);
+      if (this.ConstrainedValue != null) this.ConstrainedValue.ToStringChanged += new EventHandler(ConstrainedValue_ToStringChanged);
+    }
+    private void DeregisterEvents() {
+      if (this.RangeConstraint != null) this.RangeConstraint.ToStringChanged += new EventHandler(RangeConstraint_ToStringChanged);
+      if (this.ConstrainedValue != null) this.ConstrainedValue.ToStringChanged += new EventHandler(ConstrainedValue_ToStringChanged);
     }
 
-    public System.Drawing.Image ItemImage {
-      get { return value.ItemImage; }
+    void ConstrainedValue_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
+    }
+    void RangeConstraint_ToStringChanged(object sender, EventArgs e) {
+      OnToStringChanged();
     }
 
-    public string ItemName {
-      get { return value.ItemDescription; }
+    #region IItem Members
+    public override string ItemDescription {
+      get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemDescription : base.ItemDescription; }
     }
 
-    public Version ItemVersion {
-      get { return value.ItemVersion; }
+    public override Image ItemImage {
+      get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemImage : base.ItemImage; }
+    }
+
+    public override string ItemName {
+      get { return (constrainedValue != null && constrainedValue.Value != null) ? constrainedValue.Value.ItemDescription : base.ItemName; }
     }
     #endregion
 
-    #region Events
-    public virtual event EventHandler ItemImageChanged;
-    protected virtual void OnItemImageChanged(object sender, EventArgs e) {
-      var handler = ItemImageChanged;
-      if (handler != null) handler(sender, e);
-    }
-
-    public virtual event EventHandler ToStringChanged;
-    protected virtual void OnStringChanged(object sender, EventArgs e) {
-      var handler = ToStringChanged;
-      if (handler != null) handler(this, e); // important to set 'this' as sender
-    }
-
+    #region Event Handlers
     public virtual event EventHandler ValueChanged;
     protected virtual void OnValueChanged() {
@@ -97,8 +130,23 @@
       if (handler != null) handler(this, EventArgs.Empty);
     }
+
+    public virtual event EventHandler OptimizeChanged;
+    protected virtual void OnOptimizeChanged() {
+      var handler = OptimizeChanged;
+      if (handler != null) handler(this, EventArgs.Empty);
+    }
     #endregion
 
     public override string ToString() {
-      return value.ItemName;
+      if (ConstrainedValue != null && ConstrainedValue.Value != null) {
+        if(Optimize) {
+          return string.Format("{0}: {1}", ConstrainedValue.Value.ItemName, RangeConstraint);
+        } else {
+          return string.Format("{0}: {1}", ConstrainedValue.Value.ItemName, ConstrainedValue.Value);
+        }        
+      } else {
+        return base.ToString();
+      }
+
     }
   }
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueTypeParameterConfiguration.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Encodings/ValueTypeParameterConfiguration.cs	(revision 4839)
+++ 	(revision )
@@ -1,80 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Data;
-using HeuristicLab.Core;
-using HeuristicLab.Collections;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-
-namespace HeuristicLab.Problems.MetaOptimization {
-  [StorableClass]
-  public abstract class ValueTypeParameterConfiguration<T> : ParameterConfiguration where T : class, IItem, IStringConvertibleValue, IDeepCloneable {
-    [Storable]
-    private IItemList<IRange<T>> ranges;
-    public IItemList<IRange<T>> Ranges {
-      get { return ranges; }
-    }
-
-    public ValueTypeParameterConfiguration(string parameterName, IValueParameter valueParameter) : base(parameterName, valueParameter) {
-      this.ranges = new ItemList<IRange<T>>();
-      this.ranges.ItemsAdded += new CollectionItemsChangedEventHandler<IndexedItem<IRange<T>>>(ranges_ItemsAdded);
-      this.ranges.ItemsRemoved += new CollectionItemsChangedEventHandler<IndexedItem<IRange<T>>>(ranges_ItemsRemoved);
-      this.ranges.CollectionReset += new CollectionItemsChangedEventHandler<IndexedItem<IRange<T>>>(ranges_CollectionReset);
-    }
-
-    protected ValueTypeParameterConfiguration() { }
-    [StorableConstructor]
-    protected ValueTypeParameterConfiguration(bool deserializing) : base(deserializing) { }
-    protected ValueTypeParameterConfiguration(ValueTypeParameterConfiguration<T> original, Cloner cloner) : base(original, cloner) {
-      this.ranges = cloner.Clone(original.Ranges);
-    }
-
-    void ranges_CollectionReset(object sender, CollectionItemsChangedEventArgs<IndexedItem<IRange<T>>> e) {
-      foreach (var i in e.Items) {
-        DeregisterItemEvents(i.Value);
-      }
-      OnStringChanged(sender, e);
-    }
-
-    void ranges_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IndexedItem<IRange<T>>> e) {
-      foreach (var i in e.Items) {
-        DeregisterItemEvents(i.Value);
-      }
-      OnStringChanged(sender, e);
-    }
-
-    void ranges_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IndexedItem<IRange<T>>> e) {
-      foreach (var i in e.Items) {
-        RegisterItemEvents(i.Value);
-      }
-      OnStringChanged(sender, e);
-    }
-
-    private void DeregisterItemEvents(IRange<T> range) {
-      range.ToStringChanged -= new EventHandler(range_ToStringChanged);
-    }
-    private void RegisterItemEvents(IRange<T> range) {
-      range.ToStringChanged += new EventHandler(range_ToStringChanged);
-    }
-
-    public IntValue GetRandomValue() {
-      return new IntValue(0);
-    }
-    
-    void range_ToStringChanged(object sender, EventArgs e) {
-      OnStringChanged(sender, e);
-    }
-
-    public override string ToString() {
-      return string.Format("{0}: ({1})", base.ToString(), string.Join(",", ranges.Select(r => r.ToString()).ToArray()));
-    }
-
-    //public override void SetRandomValue(IRandom random) {
-    //  int rangeIndex = random.Next(ranges.Count);
-    //  int value = random.Next(ranges.ElementAt(rangeIndex).LowerBound.Value, ranges.ElementAt(rangeIndex).UpperBound.Value); // TODO: respect StepSize parameter
-    //  this.Parameter.ActualValue = new IntValue(value);
-    //}
-  }
-}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/HeuristicLab.Problems.MetaOptimization-3.3.csproj	(revision 4981)
@@ -88,5 +88,11 @@
   <ItemGroup>
     <Compile Include="Analyzers\BestParameterConfigurationAnalyzer.cs" />
+    <Compile Include="Encodings\RangeConstraints\ConstrainedValue.cs">
+      <SubType>Code</SubType>
+    </Compile>
     <Compile Include="Encodings\ValueConfigurations\ValueConfiguration.cs" />
+    <Compile Include="Encodings\ValueConfigurations\CheckedValueConfigurationCollection.cs" />
+    <Compile Include="Interfaces\ICheckedValueConfigurationCollection.cs" />
+    <Compile Include="Interfaces\IOptimizable.cs" />
     <Compile Include="Interfaces\IParameterConfigurationCreator.cs" />
     <Compile Include="Creators\RandomParameterConfigurationCreator.cs" />
@@ -99,5 +105,5 @@
     <Compile Include="Encodings\ParameterConfigurations\ParameterConfiguration.cs" />
     <Compile Include="Interfaces\IValueConfiguration.cs" />
-    <Compile Include="Range.cs" />
+    <Compile Include="Encodings\RangeConstraints\Range.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="MetaOptimizationProblem.cs" />
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/ICheckedValueConfigurationCollection.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/ICheckedValueConfigurationCollection.cs	(revision 4981)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/ICheckedValueConfigurationCollection.cs	(revision 4981)
@@ -0,0 +1,11 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.MetaOptimization {
+  public interface ICheckedValueConfigurationCollection : ICheckedItemCollection<IValueConfiguration> {
+    Type ValueDataType { get; }
+  }
+}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IOptimizable.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IOptimizable.cs	(revision 4981)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IOptimizable.cs	(revision 4981)
@@ -0,0 +1,14 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Problems.MetaOptimization {
+  public interface IOptimizable : IItem {
+    bool Optimize { get; set; }
+    ConstrainedValue ConstrainedValue { get; set; }
+    event EventHandler OptimizeChanged;
+  }
+}
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IParameterConfiguration.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IParameterConfiguration.cs	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IParameterConfiguration.cs	(revision 4981)
@@ -2,16 +2,14 @@
 using HeuristicLab.Core;
 using System.Collections.Generic;
+using HeuristicLab.Data;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.Problems.MetaOptimization {
-  public interface IParameterConfiguration : INamedItem {
-    bool OptimizationEnabled { get; set; }
+  public interface IParameterConfiguration : IOptimizable, INamedItem {
     string ParameterName { get; set; }
     Type ParameterDataType { get; }
-    ICheckedItemList<IValueConfiguration> ValueConfigurations { get; }
+    ICheckedValueConfigurationCollection ValueConfigurations { get; }
     IValueConfiguration ActualValueConfiguration { get; set; }
-    Type ValueDataType { get; }
     IEnumerable<IItem> ValidValues { get; }
-
-    event EventHandler OptimizationEnabledChanged;
   }
 }
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IRange.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IRange.cs	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IRange.cs	(revision 4981)
@@ -5,8 +5,8 @@
 
 namespace HeuristicLab.Problems.MetaOptimization {
-  public interface IRange<T> : IItem where T : class, IItem, IStringConvertibleValue, IDeepCloneable {
-    T LowerBound { get; set; }
-    T UpperBound { get; set; }
-    T StepSize { get; set; }
+  public interface IRange : IItem, IStringConvertibleValue {
+    object LowerBound { get; set; }
+    object UpperBound { get; set; }
+    object StepSize { get; set; }
 
     event EventHandler LowerBoundChanged;
@@ -14,3 +14,9 @@
     event EventHandler StepSizeChanged;
   }
+
+  public interface IRange<T> : IRange, IItem where T : class {
+    new T LowerBound { get; set; }
+    new T UpperBound { get; set; }
+    new T StepSize { get; set; }
+  }
 }
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IValueConfiguration.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IValueConfiguration.cs	(revision 4839)
+++ branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Interfaces/IValueConfiguration.cs	(revision 4981)
@@ -1,11 +1,10 @@
 ﻿using System;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.MetaOptimization {
-  public interface IValueConfiguration : IItem {
-    IItem Value { get; set; }
-    Type ValueDataType { get; }
-    IItemList<IParameterConfiguration> ParameterConfigurations { get; }
-
+  public interface IValueConfiguration : IOptimizable, IItem {
+    IItemCollection<IParameterConfiguration> ParameterConfigurations { get; }
+    IRange RangeConstraint { get; }
     event EventHandler ValueChanged;
   }
Index: branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Range.cs
===================================================================
--- branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization/3.3/Range.cs	(revision 4839)
+++ 	(revision )
@@ -1,125 +1,0 @@
-﻿using System;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
-namespace HeuristicLab.Problems.MetaOptimization {
-  [StorableClass]
-  public class Range<T> : Item, IRange<T> where T : class, IItem, IStringConvertibleValue, IDeepCloneable {
-    [Storable]
-    private T lowerBound;
-    public T LowerBound {
-      get { return lowerBound; }
-      set {
-        if (lowerBound != value) {
-          if (lowerBound != null) {
-            lowerBound.ValueChanged -= new EventHandler(lowerBound_ValueChanged);
-          }
-          lowerBound = value;
-          if (lowerBound != null) {
-            lowerBound.ValueChanged += new EventHandler(lowerBound_ValueChanged);
-          }
-          OnLowerBoundChanged();
-        }
-      }
-    }
-
-    [Storable]
-    private T upperBound;
-    public T UpperBound {
-      get { return upperBound; }
-      set {
-        if (upperBound != value) {
-          if (upperBound != null) {
-            upperBound.ValueChanged -= new EventHandler(upperBound_ValueChanged);
-          }
-          upperBound = value;
-          if (upperBound != null) {
-            upperBound.ValueChanged += new EventHandler(upperBound_ValueChanged);
-          }
-          OnUpperBoundChanged();
-        }
-      }
-    }
-
-    [Storable]
-    private T stepSize;
-    public T StepSize {
-      get { return stepSize; }
-      set {
-        if (stepSize != value) {
-          if (stepSize != null) {
-            stepSize.ValueChanged -= new EventHandler(upperBound_ValueChanged);
-          }
-          stepSize = value;
-          if (stepSize != null) {
-            stepSize.ValueChanged += new EventHandler(stepSize_ValueChanged);
-          }
-          OnStepSizeChanged();
-        }
-      }
-    }
-
-    public Range() {
-      LowerBound = Activator.CreateInstance<T>();
-      UpperBound = Activator.CreateInstance<T>();
-      StepSize = Activator.CreateInstance<T>(); // todo: stepsize should be != 0
-    }
-
-    [StorableConstructor]
-    protected Range(bool deserializing) : base(deserializing) { }
-    protected Range(Range<T> original, Cloner cloner) : base(original, cloner) {
-      this.LowerBound = cloner.Clone(original.LowerBound);
-      this.UpperBound = cloner.Clone(original.UpperBound);
-      this.StepSize = cloner.Clone(original.StepSize);
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new Range<T>(this, cloner);
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      if (lowerBound != null) {
-        lowerBound.ValueChanged += new EventHandler(lowerBound_ValueChanged);
-      }
-      if (upperBound != null) {
-        upperBound.ValueChanged += new EventHandler(upperBound_ValueChanged);
-      }
-      if (stepSize != null) {
-        stepSize.ValueChanged += new EventHandler(stepSize_ValueChanged);
-      }
-    }
-
-    void lowerBound_ValueChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-    void upperBound_ValueChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-    void stepSize_ValueChanged(object sender, EventArgs e) {
-      OnToStringChanged();
-    }
-
-    public event EventHandler LowerBoundChanged;
-    private void OnLowerBoundChanged() {
-      var handler = LowerBoundChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    public event EventHandler UpperBoundChanged;
-    private void OnUpperBoundChanged() {
-      var handler = UpperBoundChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-    public event EventHandler StepSizeChanged;
-    private void OnStepSizeChanged() {
-      var handler = StepSizeChanged;
-      if (handler != null) handler(this, EventArgs.Empty);
-    }
-
-    public override string ToString() {
-      return string.Format("[{0},{1}:{2}]", LowerBound.ToString(), UpperBound.ToString(), StepSize.ToString());
-    }
-  }
-}
