Index: /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 3716)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/HeuristicLab.Optimization-3.3.csproj	(revision 3717)
@@ -104,5 +104,5 @@
     <Compile Include="Interfaces\IStrategyParameterCreator.cs" />
     <Compile Include="Interfaces\IRun.cs" />
-    <Compile Include="IRunCollectionConstraint.cs" />
+    <Compile Include="RunCollectionConstraints\IRunCollectionConstraint.cs" />
     <Compile Include="OptimizerList.cs" />
     <Compile Include="Experiment.cs" />
Index: unk/sources/HeuristicLab.Optimization/3.3/IRunCollectionConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/IRunCollectionConstraint.cs	(revision 3716)
+++ 	(revision )
@@ -1,34 +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 HeuristicLab.Core;
-
-namespace HeuristicLab.Optimization {
-  public interface IRunCollectionConstraint : IConstraint{
-    new RunCollection ConstrainedValue { get; set; }
-    int ConstraintColumn { get; set; }
-    event EventHandler ConstraintColumnChanged;
-  }
-}
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 3716)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs	(revision 3717)
@@ -147,16 +147,17 @@
 
     public IItem GetValue(IRun run, int columnIndex) {
+      string name = ((IStringConvertibleMatrix)this).ColumnNames.ElementAt(columnIndex);
+      return GetValue(run, name);
+    }
+
+    public IItem GetValue(IRun run, string columnName) {
       IItem value = null;
-      if (columnIndex < parameterNames.Count) {
-        string parameterName = parameterNames[columnIndex];
-        if (run.Parameters.ContainsKey(parameterName))
-          value = run.Parameters[parameterName];
-      } else if (columnIndex < parameterNames.Count + resultNames.Count) {
-        string resultName = resultNames[columnIndex - parameterNames.Count];
-        if (run.Results.ContainsKey(resultName))
-          value = run.Results[resultName];
-      }
+       if (run.Parameters.ContainsKey(columnName))
+         value = run.Parameters[columnName];
+       else if (run.Results.ContainsKey(columnName))
+         value = run.Results[columnName];
       return value;
     }
+
 
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -193,4 +194,5 @@
         List<string> value = new List<string>(parameterNames);
         value.AddRange(resultNames);
+        value.Sort();
         return value;
       }
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 3717)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/IRunCollectionConstraint.cs	(revision 3717)
@@ -0,0 +1,34 @@
+﻿#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 HeuristicLab.Core;
+
+namespace HeuristicLab.Optimization {
+  public interface IRunCollectionConstraint : IConstraint{
+    new RunCollection ConstrainedValue { get; set; }
+    string ConstraintColumn { get; set; }
+    event EventHandler ConstraintColumnChanged;
+  }
+}
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 3716)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionComparisonConstraint.cs	(revision 3717)
@@ -61,9 +61,9 @@
 
     [Storable]
-    private int constraintColumn;
-    public int ConstraintColumn {
+    private string constraintColumn;
+    public string ConstraintColumn {
       get { return constraintColumn; }
       set {
-        if (value < 0 || value >= ((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Count())
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
           throw new ArgumentException("Could not set ConstraintData to not existing column index.");
         if (constraintColumn != value) {
@@ -80,4 +80,11 @@
       if (handler != null)
         handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
     }
 
@@ -111,5 +118,5 @@
       IStringConvertibleMatrix matrix = ConstrainedValue;
       if (matrix != null && matrix.ColumnNames.Count() != 0)
-        s += matrix.ColumnNames.ElementAt(constraintColumn) + " ";
+        s += constraintColumn + " ";
       else
         return "ComparisonConstraint";
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 3716)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionEqualityConstraint.cs	(revision 3717)
@@ -58,9 +58,9 @@
 
     [Storable]
-    private int constraintColumn;
-    public int ConstraintColumn {
+    private string constraintColumn;
+    public string ConstraintColumn {
       get { return constraintColumn; }
       set {
-        if (value < 0 || value >= ((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Count())
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
           throw new ArgumentException("Could not set ConstraintData to not existing column index.");
         if (constraintColumn != value) {
@@ -77,4 +77,11 @@
       if (handler != null)
         handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
     }
 
@@ -108,5 +115,5 @@
       IStringConvertibleMatrix matrix = ConstrainedValue;
       if (matrix != null && matrix.ColumnNames.Count() != 0)
-        s += matrix.ColumnNames.ElementAt(constraintColumn) + " ";
+        s += constraintColumn + " ";
       else
         return "EqualityConstraint";
Index: /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs
===================================================================
--- /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 3716)
+++ /trunk/sources/HeuristicLab.Optimization/3.3/RunCollectionConstraints/RunCollectionTypeCompatiblityConstraint.cs	(revision 3717)
@@ -51,9 +51,9 @@
     }
     [Storable]
-    private int constraintColumn;
-    public int ConstraintColumn {
+    private string constraintColumn;
+    public string ConstraintColumn {
       get { return constraintColumn; }
       set {
-        if (value < 0 || value >= ((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Count())
+        if (!((IStringConvertibleMatrix)ConstrainedValue).ColumnNames.Contains(value))
           throw new ArgumentException("Could not set ConstraintData to not existing column index.");
         if (constraintColumn != value) {
@@ -70,4 +70,11 @@
       if (handler != null)
         handler(this, EventArgs.Empty);
+    }
+
+    protected override void OnConstrainedValueChanged() {
+      base.OnConstrainedValueChanged();
+      IStringConvertibleMatrix matrix = (IStringConvertibleMatrix)ConstrainedValue;
+      if (constraintColumn == null && ConstrainedValue != null && matrix.Columns != 0)
+        constraintColumn = matrix.ColumnNames.ElementAt(0);
     }
 
@@ -101,5 +108,5 @@
       IStringConvertibleMatrix matrix = ConstrainedValue;
       if (matrix != null && matrix.ColumnNames.Count() != 0)
-        s += matrix.ColumnNames.ElementAt(constraintColumn) + " ";
+        s += constraintColumn + " ";
       else
         return "TypeCompabitilityConstraint";
