Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs	(revision 16781)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs	(revision 16800)
@@ -61,7 +61,7 @@
 
       //var constraints = IntervalConstraintsParser.Parse(((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Value);
-      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints.Where(x => x.IsChecked);
+      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints.Where(x => x.Enabled);
       var intervalInterpreter = new IntervalInterpreter();
-      var variableRanges = ((RegressionProblemData)problemData).VariableRangesParameter.Value.VariableIntervals;
+      var variableRanges = ((RegressionProblemData) problemData).VariableRangesParameter.Value.VariableIntervals;
 
 
@@ -92,5 +92,5 @@
 
     private static bool HasConstraintVioluations(IEnumerable<IntervalConstraint> constraints, IntervalInterpreter intervalInterpreter,
-      Dictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution) {
+      IDictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution) {
       foreach (var constraint in constraints) {
         if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable))
Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintPearsonRSquaredEvaluator.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintPearsonRSquaredEvaluator.cs	(revision 16781)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintPearsonRSquaredEvaluator.cs	(revision 16800)
@@ -64,37 +64,4 @@
       var variableRanges = ((RegressionProblemData)problemData).VariableRangesParameter.Value.VariableIntervals;
 
-
-      //foreach (var constraint in constraints) {
-      //  if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable))
-      //    throw new ArgumentException($"The given variable {constraint.Variable} in the constraint does not exists in the model.", nameof(IntervalConstraintsParser));
-      //  if (!constraint.IsDerivation) {
-      //    var res = intervalInterpreter.GetSymbolicExressionTreeInterval(solution, variableRanges);
-      //    if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-      //      constraint.InclusiveUpperBound)) {
-      //      return 0;
-      //    }
-      //  } else {
-      //    var tree = solution;
-      //    for (var i = 0; i < constraint.NumberOfDerivation; ++i) {
-      //      tree = DerivativeCalculator.Derive(tree, constraint.Variable);
-      //    }
-      //    var res = intervalInterpreter.GetSymbolicExressionTreeInterval(tree, variableRanges);
-      //    if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-      //      constraint.InclusiveUpperBound)) {
-      //      return 0;
-      //    }
-      //  }
-      //}
-      // TODO
-      // m = new SymbolicRegressionModel(...)
-      // m.Scale();
-
-      // var e = m.GetEstimatedValues (TRAINING)
-      // OnlinePearsonCalc.Calculate(e, TARGET_TRAIING)
-
-      // scaledTree = model.Tree;
-
-      // constraints mit scaledTree berechnen (auch die Ableitungen)
-
       double r;
       if (applyLinearScaling) {
@@ -142,5 +109,5 @@
 
     private static bool CheckConstraintsViolations(IEnumerable<IntervalConstraint> constraints, IntervalInterpreter intervalInterpreter,
-      Dictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution, out double r) {
+      IDictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution, out double r) {
       foreach (var constraint in constraints) {
         if (constraint.Variable != null && !variableRanges.ContainsKey(constraint.Variable))
Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs	(revision 16781)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs	(revision 16800)
@@ -37,16 +37,19 @@
   public class SymbolicRegressionConstraintAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeAnalyzer {
     private const string ConstraintViolationsResultName = "Constraint Violations";
-
     private const string ProblemDataParameterName = "ProblemData";
     private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
 
     #region parameter properties
+
     public ILookupParameter<RegressionProblemData> RegressionProblemDataParameter {
-      get { return (ILookupParameter<RegressionProblemData>)Parameters[ProblemDataParameterName]; }
+      get { return (ILookupParameter<RegressionProblemData>) Parameters[ProblemDataParameterName]; }
     }
+
     public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>) Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
     }
+
     #endregion
+
     #region properties
 
@@ -58,9 +61,8 @@
       get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
     }
+
     #endregion
 
-    public virtual bool EnabledByDefault {
-      get { return false; }
-    }
+    public override bool EnabledByDefault => false;
 
     [StorableConstructor]
@@ -68,6 +70,5 @@
     }
 
-    protected SymbolicRegressionConstraintAnalyzer(SymbolicRegressionConstraintAnalyzer original, Cloner cloner)
-      : base(original, cloner) {
+    protected SymbolicRegressionConstraintAnalyzer(SymbolicRegressionConstraintAnalyzer original, Cloner cloner) : base(original, cloner) {
     }
 
@@ -85,10 +86,8 @@
     }
 
-    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicExpressionTree model,
-      IRegressionProblemData problemData) {
-      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints.Where(x => x.IsChecked);
+    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicExpressionTree model, IRegressionProblemData problemData) {
+      var constraints = problemData.IntervalConstraints.Constraints.Where(x => x.Enabled);
       var constraintViolations = new Dictionary<IntervalConstraint, bool>();
-      var variableRanges = ((RegressionProblemData)problemData).VariableRanges.VariableIntervals;
-
+      var variableRanges = problemData.VariableRanges.VariableIntervals;
       foreach (var constraint in constraints) {
         if (!constraintViolations.ContainsKey(constraint)) {
@@ -100,37 +99,31 @@
     }
 
-    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicRegressionModel model,
-      IRegressionProblemData problemData) {
+    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicRegressionModel model, IRegressionProblemData problemData) {
       return CheckConstraints(model.SymbolicExpressionTree, problemData);
     }
 
-    public static bool CheckConstraint(ISymbolicExpressionTree model, Dictionary<string, Interval> variableRanges,
-      IntervalConstraint constraint) {
+    public static bool CheckConstraint(ISymbolicExpressionTree model, IDictionary<string, Interval> variableRanges, IntervalConstraint constraint) {
       var intervalInterpreter = new IntervalInterpreter();
-      if (constraint.Variable != null) {
-        if (!constraint.IsDerivation) {
-          var res = intervalInterpreter.GetSymbolicExpressionTreeInterval(model,
-            variableRanges);
-          if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-            constraint.InclusiveUpperBound)) {
-            return false;
-          }
-        } else {
-          var dTree = model;
-          for (var i = 0; i < constraint.NumberOfDerivation; ++i) {
-            dTree = DerivativeCalculator.Derive(dTree, constraint.Variable);
-          }
-          var res = intervalInterpreter.GetSymbolicExpressionTreeInterval(dTree,
-            variableRanges);
-          if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-            constraint.InclusiveUpperBound)) {
-            return false;
-          }
+      if (!constraint.IsDerivation) {
+        var res = intervalInterpreter.GetSymbolicExpressionTreeInterval(model, variableRanges);
+        if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound, constraint.InclusiveUpperBound)) {
+          return false;
+        }
+      } else {
+        var dTree = model;
+        for (var i = 0; i < constraint.NumberOfDerivation; ++i) {
+          dTree = DerivativeCalculator.Derive(dTree, constraint.Variable);
+        }
+
+        var res = intervalInterpreter.GetSymbolicExpressionTreeInterval(dTree, variableRanges);
+        if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound, constraint.InclusiveUpperBound)) {
+          return false;
         }
       }
+
       return true;
     }
 
-    static bool CheckConstraint(ISymbolicRegressionModel model, Dictionary<string, Interval> variableRanges, IntervalConstraint constraint) {
+    static bool CheckConstraint(ISymbolicRegressionModel model, IDictionary<string, Interval> variableRanges, IntervalConstraint constraint) {
       return CheckConstraint(model.SymbolicExpressionTree, variableRanges, constraint);
     }
@@ -140,13 +133,11 @@
       if (!results.ContainsKey(ConstraintViolationsResultName)) {
         var newDataTable = new DataTable(ConstraintViolationsResultName);
-        results.Add(new Result(ConstraintViolationsResultName, "Chart displaying the constraint violations.",
-          newDataTable));
+        results.Add(new Result(ConstraintViolationsResultName, "Chart displaying the constraint violations.", newDataTable));
       }
-      var dataTable = (DataTable)results[ConstraintViolationsResultName].Value;
+
+      var dataTable = (DataTable) results[ConstraintViolationsResultName].Value;
       var problemData = RegressionProblemData;
       var constraintViolations = new Dictionary<string, int>();
-
-      var constraints = problemData.IntervalConstraintsParameter.Value.Constraints.Where(x => x.IsChecked);
-
+      var constraints = problemData.IntervalConstraintsParameter.Value.Constraints.Where(x => x.Enabled);
       if (dataTable.Rows.Count == 0) {
         foreach (var constraint in constraints) {
@@ -163,8 +154,6 @@
       foreach (var tree in this.SymbolicExpressionTree) {
         var checkedConstraints = CheckConstraints(tree, problemData);
-
         foreach (var kvp in checkedConstraints) {
-          if (!kvp.Value)
-            constraintViolations[kvp.Key.Expression]++;
+          if (!kvp.Value) constraintViolations[kvp.Key.Expression]++;
         }
       }
@@ -173,4 +162,5 @@
         dataTable.Rows[kvp.Key].Values.Add(kvp.Value);
       }
+
       return base.Apply();
     }
