Index: trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 17180)
+++ trunk/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SymbolicRegressionSolution.cs	(revision 17579)
@@ -1,3 +1,3 @@
-#region License Information
+﻿#region License Information
 /* HeuristicLab
  * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
@@ -21,4 +21,5 @@
 
 using System.Linq;
+using HEAL.Attic;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -26,5 +27,4 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 using HeuristicLab.Optimization;
-using HEAL.Attic;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
@@ -47,4 +47,6 @@
     private const string TestNaNEvaluationsResultName = "Test NaN Evaluations";
 
+    private const string ModelBoundsResultName = "Model Bounds";
+
     public new ISymbolicRegressionModel Model {
       get { return (ISymbolicRegressionModel)base.Model; }
@@ -95,4 +97,21 @@
       private set { ((IntValue)EstimationLimitsResultCollection[TestNaNEvaluationsResultName].Value).Value = value; }
     }
+
+    public IntervalCollection ModelBoundsCollection {
+      get {
+        if (!ContainsKey(ModelBoundsResultName)) return null;
+        return (IntervalCollection)this[ModelBoundsResultName].Value;
+      }
+      private set {
+        if (ContainsKey(ModelBoundsResultName)) {
+          this[ModelBoundsResultName].Value = value;
+        } else {
+          Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", value));
+        }
+
+      }
+    }
+
+
 
     [StorableConstructor]
@@ -118,4 +137,8 @@
       estimationLimitResults.Add(new Result(TestNaNEvaluationsResultName, "", new IntValue()));
       Add(new Result(EstimationLimitsResultsResultName, "Results concerning the estimation limits of symbolic regression solution", estimationLimitResults));
+
+      if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree))
+        Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
+
       RecalculateResults();
     }
@@ -139,4 +162,11 @@
         CalculateResults();
       }
+
+      if (!ContainsKey(ModelBoundsResultName)) {
+        if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree)) {
+          Add(new Result(ModelBoundsResultName, "Results concerning the derivation of symbolic regression solution", new IntervalCollection()));
+          CalculateResults();
+        }
+      }
     }
 
@@ -159,4 +189,30 @@
       TrainingNaNEvaluations = Model.Interpreter.GetSymbolicExpressionTreeValues(Model.SymbolicExpressionTree, ProblemData.Dataset, ProblemData.TrainingIndices).Count(double.IsNaN);
       TestNaNEvaluations = Model.Interpreter.GetSymbolicExpressionTreeValues(Model.SymbolicExpressionTree, ProblemData.Dataset, ProblemData.TestIndices).Count(double.IsNaN);
+
+      //Check if the tree contains unknown symbols for the interval calculation
+      if (IntervalInterpreter.IsCompatible(Model.SymbolicExpressionTree))
+        ModelBoundsCollection = CalculateModelIntervals(this);
+    }
+
+    private static IntervalCollection CalculateModelIntervals(ISymbolicRegressionSolution solution) {
+      var intervalEvaluation = new IntervalCollection();
+      var interpreter = new IntervalInterpreter();
+      var problemData = solution.ProblemData;
+      var model = solution.Model;
+      var variableRanges = problemData.VariableRanges.GetReadonlyDictionary();
+
+      intervalEvaluation.AddInterval($"Target {problemData.TargetVariable}", new Interval(variableRanges[problemData.TargetVariable].LowerBound, variableRanges[problemData.TargetVariable].UpperBound));
+      intervalEvaluation.AddInterval("Model", interpreter.GetSymbolicExpressionTreeInterval(model.SymbolicExpressionTree, variableRanges));
+
+      if (DerivativeCalculator.IsCompatible(model.SymbolicExpressionTree)) {
+        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.AddInterval(" ∂f/∂" + inputVariable, new Interval(derivedResultInterval.LowerBound, derivedResultInterval.UpperBound));
+        }
+      }
+
+      return intervalEvaluation;
     }
   }
