Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 16851)
@@ -204,5 +204,4 @@
     <Compile Include="Plugin.cs" />
     <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" />
-    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionConstraintSatisfactionEvaluator.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs" />
Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstraintSatisfactionEvaluator.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionConstraintSatisfactionEvaluator.cs	(revision 16846)
+++ 	(revision )
@@ -1,134 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2019 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 HEAL.Attic;
-using HeuristicLab.Common;
-using HeuristicLab.Core;
-using HeuristicLab.Data;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Parameters;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
-  [Item("Constraint Satisfaction Evaluator", "Basic evaluator which checks for constraint satisfaction and returns a soft penalty.")]
-  [StorableType("1CFBDAD0-1059-4908-9A76-C02976C367E6")]
-  public class SymbolicRegressionConstraintSatisfactionEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
-    private const string UseBinaryPenaltyValuesParameterName = "UseBinaryPenaltyValues";
-    private const string IntervalConstraintParameterName = "Constraint";
-
-    private readonly IntervalInterpreter interpreter = new IntervalInterpreter();
-    private IntervalConstraint constraint = null;
-
-    public IFixedValueParameter<StringValue> IntervalConstraintParameter {
-      get { return (IFixedValueParameter<StringValue>)Parameters[IntervalConstraintParameterName]; }
-    }
-
-    public IFixedValueParameter<BoolValue> UseBinaryPenaltyValuesParameter {
-      get { return (IFixedValueParameter<BoolValue>)Parameters[UseBinaryPenaltyValuesParameterName]; }
-    }
-
-    public bool UseBinaryPenaltyValues {
-      get { return UseBinaryPenaltyValuesParameter.Value.Value; }
-      set { UseBinaryPenaltyValuesParameter.Value.Value = value; }
-    }
-
-    public string IntervalConstraint {
-      get { return IntervalConstraintParameter.Value.Value; }
-      set { IntervalConstraintParameter.Value.Value = value; }
-    }
-
-    public SymbolicRegressionConstraintSatisfactionEvaluator() {
-      Parameters.Add(new FixedValueParameter<BoolValue>(UseBinaryPenaltyValuesParameterName));
-      Parameters.Add(new FixedValueParameter<StringValue>(IntervalConstraintParameterName));
-
-      IntervalConstraintParameter.Value.ValueChanged += (sender, args) => constraint = IntervalConstraintsParser.Parse(IntervalConstraint).FirstOrDefault();
-    }
-
-    protected SymbolicRegressionConstraintSatisfactionEvaluator(SymbolicRegressionConstraintSatisfactionEvaluator original, Cloner cloner) : base(original, cloner) { }
-
-    [StorableConstructor]
-    protected SymbolicRegressionConstraintSatisfactionEvaluator(StorableConstructorFlag _) : base(_) { }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void AfterDeserialization() {
-      if (!Parameters.ContainsKey(UseBinaryPenaltyValuesParameterName)) {
-        Parameters.Add(new FixedValueParameter<BoolValue>(UseBinaryPenaltyValuesParameterName));
-      }
-    }
-
-    public override bool Maximization => false;
-
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SymbolicRegressionConstraintSatisfactionEvaluator(this, cloner);
-    }
-
-    public override IOperation InstrumentedApply() {
-      var tree = SymbolicExpressionTreeParameter.ActualValue;
-      var problemData = ProblemDataParameter.ActualValue;
-
-      double quality = Evaluate(this.ExecutionContext, tree, problemData, problemData.TrainingIndices);
-
-      QualityParameter.ActualValue = new DoubleValue(quality);
-      return base.InstrumentedApply();
-    }
-
-    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
-      constraint = constraint ?? IntervalConstraintsParser.Parse(IntervalConstraint).FirstOrDefault();
-
-      ISymbolicExpressionTree t = tree;
-      if (constraint.IsDerivation) {
-        var order = constraint.NumberOfDerivation;
-        while (order-- > 0) {
-          t = DerivativeCalculator.Derive(t, constraint.Variable);
-        }
-      }
-      const double maxPenalty = double.MaxValue; // TODO: find an appropriate value for this
-      var satisfied = CheckConstraintSatisfaction(tree, problemData, rows, interpreter, constraint, out Interval interval, out double lowerBoundPenalty, out double upperBoundPenalty);
-
-      if (satisfied) return 0;
-      if (UseBinaryPenaltyValues) return 1;
-
-      var penalty = lowerBoundPenalty + upperBoundPenalty;
-
-      if (double.IsNaN(penalty) || double.IsInfinity(penalty) || penalty > maxPenalty) {
-        penalty = maxPenalty;
-      }
-
-      return penalty;
-    }
-
-    public static bool CheckConstraintSatisfaction(ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows, IntervalInterpreter interpreter, IntervalConstraint constraint, out Interval interval, out double lowerBoundPenalty, out double upperBoundPenalty) {
-      ISymbolicExpressionTree t = tree;
-      if (constraint.IsDerivation) {
-        var order = constraint.NumberOfDerivation;
-        while (order-- > 0) {
-          t = DerivativeCalculator.Derive(t, constraint.Variable);
-        }
-      }
-      interval = interpreter.GetSymbolicExpressionTreeInterval(t, problemData.Dataset, rows);
-      lowerBoundPenalty = Math.Max(constraint.Interval.LowerBound - interval.LowerBound, 0);
-      upperBoundPenalty = Math.Max(interval.UpperBound - constraint.Interval.UpperBound, 0);
-      return constraint.Interval.Contains(interval, constraint.InclusiveLowerBound, constraint.InclusiveUpperBound);
-    }
-  }
-}
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 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintConstOptEvaluator.cs	(revision 16851)
@@ -58,14 +58,10 @@
       IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(tree, problemData.Dataset, rows);
       IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
-      OnlineCalculatorError errorState = OnlineCalculatorError.None;
 
-      //var constraints = IntervalConstraintsParser.Parse(((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Value);
-      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints.Where(x => x.Enabled);
-      var intervalInterpreter = new IntervalInterpreter();
-      var variableRanges = ((RegressionProblemData) problemData).VariableRangesParameter.Value.VariableIntervals;
-
+      var constraints = problemData.IntervalConstraints.Constraints.Where(x => x.Enabled);
+      var variableRanges = problemData.VariableRanges.VariableIntervals;
 
       var r2 = SymbolicRegressionConstantOptimizationEvaluator.OptimizeConstants(interpreter, tree, problemData, problemData.TrainingIndices, applyLinearScaling, 10);
-      if (HasConstraintVioluations(constraints, intervalInterpreter, variableRanges, tree)) {
+      if (SymbolicRegressionConstraintAnalyzer.ConstraintsSatisfied(constraints, variableRanges, tree)) {
         r2 = 0;
       }
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 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveConstraintPearsonRSquaredEvaluator.cs	(revision 16851)
@@ -22,4 +22,5 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using HEAL.Attic;
 using HeuristicLab.Common;
@@ -59,8 +60,7 @@
       OnlineCalculatorError errorState = OnlineCalculatorError.None;
 
-      //var constraints = IntervalConstraintsParser.Parse(((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Value);
-      var constraints = ((RegressionProblemData)problemData).IntervalConstraintsParameter.Value.Constraints;
-      var intervalInterpreter = new IntervalInterpreter();
-      var variableRanges = ((RegressionProblemData)problemData).VariableRangesParameter.Value.VariableIntervals;
+      var constraints = problemData.IntervalConstraints.Constraints.Where(x => x.Enabled);
+      var variableRanges = problemData.VariableRanges.VariableIntervals;
+      var tree = solution;
 
       double r;
@@ -70,20 +70,16 @@
         var model = new SymbolicRegressionModel(problemData.TargetVariable, solution, interpreter, lowerEstimationLimit, upperEstimationLimit);
         model.Scale(problemData);
-        var e = model.GetEstimatedValues(problemData.Dataset, problemData.TrainingIndices);
-        var scaledTree = model.SymbolicExpressionTree;
+        tree = model.SymbolicExpressionTree;
         errorState = rCalculator.ErrorState;
-        if (CheckConstraintsViolations(constraints, intervalInterpreter, variableRanges, scaledTree, out var val)) {
-          r = val;
-        } else {
-          r = rCalculator.R;
-        }
+        r = rCalculator.R;
       } else {
         IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
-        if (CheckConstraintsViolations(constraints, intervalInterpreter, variableRanges, solution, out var val)) {
-          r = val;
-        } else {
-          r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
-        }
+        r = OnlinePearsonsRCalculator.Calculate(targetValues, boundedEstimatedValues, out errorState);
       }
+
+      if (!SymbolicRegressionConstraintAnalyzer.ConstraintsSatisfied(constraints, variableRanges, tree)) {
+        return 0;
+      }
+
       if (errorState != OnlineCalculatorError.None) return double.NaN;
       return r * r;
@@ -107,33 +103,4 @@
       return r2;
     }
-
-    private static bool CheckConstraintsViolations(IEnumerable<IntervalConstraint> constraints, IntervalInterpreter intervalInterpreter,
-      IDictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution, out double r) {
-      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.GetSymbolicExpressionTreeInterval(solution, variableRanges);
-          if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-            constraint.InclusiveUpperBound)) {
-            r = 0;
-            return true;
-          }
-        } else {
-          var tree = solution;
-          for (var i = 0; i < constraint.NumberOfDerivation; ++i) {
-            tree = DerivativeCalculator.Derive(tree, constraint.Variable);
-          }
-          var res = intervalInterpreter.GetSymbolicExpressionTreeInterval(tree, variableRanges);
-          if (!constraint.Interval.Contains(res, constraint.InclusiveLowerBound,
-            constraint.InclusiveUpperBound)) {
-            r = 0;
-            return true;
-          }
-        }
-      }
-      r = 1;
-      return false;
-    }
   }
 }
Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveEvaluator.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveEvaluator.cs	(revision 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionSingleObjectiveEvaluator.cs	(revision 16851)
@@ -22,5 +22,4 @@
 using HeuristicLab.Common;
 using HEAL.Attic;
-
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
   [StorableType("7EB90F03-4385-474F-BDE7-3B133E8FEAAB")]
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 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/SymbolicRegressionConstraintAnalyzer.cs	(revision 16851)
@@ -22,4 +22,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -34,31 +35,12 @@
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
   [StorableType("4318C6BD-E0A1-45FE-AC30-96E7F73B51FB")]
-  public class SymbolicRegressionConstraintAnalyzer : SymbolicDataAnalysisAnalyzer, ISymbolicDataAnalysisInterpreterOperator, ISymbolicExpressionTreeAnalyzer {
+  public class SymbolicRegressionConstraintAnalyzer : SymbolicDataAnalysisAnalyzer, 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]; }
+    public ILookupParameter<IRegressionProblemData> RegressionProblemDataParameter {
+      get { return (ILookupParameter<IRegressionProblemData>) Parameters[ProblemDataParameterName]; }
     }
-
-    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>) Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
-    }
-
-    #endregion
-
-    #region properties
-
-    public RegressionProblemData RegressionProblemData {
-      get { return RegressionProblemDataParameter.ActualValue; }
-    }
-
-    public ISymbolicDataAnalysisExpressionTreeInterpreter Interpreter {
-      get { return SymbolicDataAnalysisTreeInterpreterParameter.ActualValue; }
-    }
-
     #endregion
 
@@ -76,7 +58,6 @@
     }
 
-    public SymbolicRegressionConstraintAnalyzer() {
-      Parameters.Add(new LookupParameter<RegressionProblemData>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
-      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The interpreter for symbolic data analysis expression trees."));
+    public SymbolicRegressionConstraintAnalyzer() : base(){
+      Parameters.Add(new LookupParameter<IRegressionProblemData>(ProblemDataParameterName, "The problem data of the symbolic data analysis problem."));
     }
 
@@ -85,83 +66,68 @@
     }
 
-    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicExpressionTree model, IRegressionProblemData problemData) {
+    public override IOperation Apply() {
+      var problemData = RegressionProblemDataParameter.ActualValue;
+      var trees = SymbolicExpressionTreeParameter.ActualValue;
+
+      var results = ResultCollectionParameter.ActualValue;
       var constraints = problemData.IntervalConstraints.Constraints.Where(x => x.Enabled);
-      var constraintViolations = new Dictionary<IntervalConstraint, bool>();
       var variableRanges = problemData.VariableRanges.VariableIntervals;
-      foreach (var constraint in constraints) {
-        if (!constraintViolations.ContainsKey(constraint)) {
-          constraintViolations.Add(constraint, CheckConstraint(model, variableRanges, constraint));
-        }
-      }
 
-      return constraintViolations;
-    }
-
-    public static Dictionary<IntervalConstraint, bool> CheckConstraints(ISymbolicRegressionModel model, IRegressionProblemData problemData) {
-      return CheckConstraints(model.SymbolicExpressionTree, problemData);
-    }
-
-    public static bool CheckConstraint(ISymbolicExpressionTree model, IDictionary<string, Interval> variableRanges, IntervalConstraint constraint) {
-      var intervalInterpreter = new IntervalInterpreter();
-      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;
-    }
-
-    public static bool CheckConstraint(ISymbolicRegressionModel model, IDictionary<string, Interval> variableRanges, IntervalConstraint constraint) {
-      return CheckConstraint(model.SymbolicExpressionTree, variableRanges, constraint);
-    }
-
-    public override IOperation Apply() {
-      var results = ResultCollectionParameter.ActualValue;
       if (!results.ContainsKey(ConstraintViolationsResultName)) {
         var newDataTable = new DataTable(ConstraintViolationsResultName);
+          foreach (var constraint in constraints) {
+              newDataTable.Rows.Add(new DataRow(constraint.Expression));
+        }
         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.Enabled);
-      if (dataTable.Rows.Count == 0) {
-        foreach (var constraint in constraints) {
-          if (!dataTable.Rows.ContainsKey(constraint.Expression)) {
-            dataTable.Rows.Add(new DataRow(constraint.Expression));
-          }
+      var interpreter = new IntervalInterpreter();
+      foreach (var constraint in constraints) {
+        int violations = 0;
+        foreach (var tree in trees) {
+          var satisfied = SymbolicRegressionConstraintAnalyzer.ConstraintSatisfied(constraint, interpreter, variableRanges, tree);
+          if (!satisfied) violations++;
         }
+        dataTable.Rows[constraint.Expression].Values.Add(violations);
       }
-
-      foreach (var constraint in constraints) {
-        constraintViolations.Add(constraint.Expression, 0);
-      }
-
-      foreach (var tree in this.SymbolicExpressionTree) {
-        var checkedConstraints = CheckConstraints(tree, problemData);
-        foreach (var kvp in checkedConstraints) {
-          if (!kvp.Value) constraintViolations[kvp.Key.Expression]++;
-        }
-      }
-
-      foreach (var kvp in constraintViolations) {
-        dataTable.Rows[kvp.Key].Values.Add(kvp.Value);
-      }
+      
 
       return base.Apply();
     }
+
+    public static bool ConstraintSatisfied(IntervalConstraint constraint, IntervalInterpreter intervalInterpreter,
+      IDictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution) {
+
+      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));
+
+      Interval resultInterval;
+
+      if (!constraint.IsDerivation) {
+        resultInterval = intervalInterpreter.GetSymbolicExpressionTreeInterval(solution, variableRanges);
+      } else {
+        var tree = solution;
+        for (var i = 0; i < constraint.NumberOfDerivation; ++i) {
+          tree = DerivativeCalculator.Derive(tree, constraint.Variable);
+        }
+        resultInterval = intervalInterpreter.GetSymbolicExpressionTreeInterval(tree, variableRanges);
+      }
+
+      var satisfied = constraint.Interval.Contains(resultInterval, constraint.InclusiveLowerBound, constraint.InclusiveUpperBound);
+      return satisfied;
+    }
+
+    public static bool ConstraintsSatisfied(IEnumerable<IntervalConstraint> constraints, IDictionary<string, Interval> variableRanges, ISymbolicExpressionTree solution) {
+      var intervalInterpreter = new IntervalInterpreter();
+      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));
+
+        var satisfied = ConstraintSatisfied(constraint, intervalInterpreter, variableRanges, solution);
+        if (!satisfied) return false;
+      }
+      return true;
+    }
   }
 }
Index: branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
===================================================================
--- branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 16846)
+++ branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 16851)
@@ -98,5 +98,4 @@
     }
 
-
     public NamedIntervals IntervalEvaluationCollection {
       get { return (NamedIntervals)this[IntervalEvaluationResultName].Value; }
@@ -128,5 +127,5 @@
       estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
       Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
-      Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", GetIntervalEvaluations()));
+      Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new NamedIntervals()));
       RecalculateResults();
     }
@@ -148,5 +147,5 @@
         estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
         Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
-        Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", GetIntervalEvaluations()));
+        Add(new Result(IntervalEvaluationResultName, "Results concerning the derivation of symbolic regression solution", new NamedIntervals()));
         CalculateResults();
       }
@@ -156,26 +155,4 @@
       base.RecalculateResults();
       CalculateResults();
-    }
-
-    private NamedIntervals GetIntervalEvaluations() {
-      var intervalEvaluation = new NamedIntervals();
-      var interpreter = new IntervalInterpreter();
-      var variableRanges = ProblemData.VariableRanges.VariableIntervals;
-
-      if (variableRanges != null) {
-        intervalEvaluation.VariableIntervals.Add($"Target {ProblemData.TargetVariable}", new Interval(variableRanges[ProblemData.TargetVariable].LowerBound, variableRanges[ProblemData.TargetVariable].UpperBound));
-        intervalEvaluation.VariableIntervals.Add("Modell Interval", interpreter.GetSymbolicExpressionTreeInterval(Model.SymbolicExpressionTree, variableRanges));
-     
-        foreach (var derivate in variableRanges) {
-          if (derivate.Key != ProblemData.TargetVariable) {
-            var derived = DerivativeCalculator.Derive(Model.SymbolicExpressionTree, derivate.Key);
-            var derivedResultInterval = interpreter.GetSymbolicExpressionTreeInterval(derived, variableRanges);
-
-            intervalEvaluation.VariableIntervals.Add(" \u2202f/\u2202" + derivate.Key,
-              new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound));
-          }
-        }
-      }
-      return intervalEvaluation;
     }
 
@@ -194,5 +171,26 @@
       TestNaNEvaluations = Model.Interpreter.GetSymbolicExpressionTreeValues(Model.SymbolicExpressionTree, ProblemData.Dataset, ProblemData.TestIndices).Count(double.IsNaN);
 
-      IntervalEvaluationCollection = GetIntervalEvaluations();
+      IntervalEvaluationCollection = CalculateModelIntervals(this);
+    }
+
+    private static NamedIntervals CalculateModelIntervals(ISymbolicRegressionSolution solution) {
+      var intervalEvaluation = new NamedIntervals();
+      var interpreter = new IntervalInterpreter();
+      var problemData = solution.ProblemData;
+      var model = solution.Model;
+      var variableRanges = problemData.VariableRanges.VariableIntervals;
+
+      intervalEvaluation.VariableIntervals.Add($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound));
+      intervalEvaluation.VariableIntervals.Add("Model Interval", interpreter.GetSymbolicExpressionTreeInterval(model.SymbolicExpressionTree, variableRanges));
+
+      foreach (var inputVariable in model.VariablesUsedForPrediction.OrderBy(v => v, new NaturalStringComparer())) {
+        var derivedModel = DerivativeCalculator.Derive(model.SymbolicExpressionTree, inputVariable);
+        var derivedResultInterval = interpreter.GetSymbolicExpressionTreeInterval(derivedModel, variableRanges);
+
+        intervalEvaluation.VariableIntervals.Add(" \u2202f/\u2202" + inputVariable,
+          new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound));
+      }
+
+      return intervalEvaluation;
     }
   }
