Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.csproj
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.csproj	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.csproj	(revision 7183)
@@ -120,6 +120,8 @@
       <SubType>Code</SubType>
     </Compile>
+    <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer.cs" />
     <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs" />
     <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs" />
+    <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer.cs" />
     <Compile Include="SymbolicTimeSeriesPrognosisModel.cs" />
     <Compile Include="SymbolicTimeSeriesPrognosisSolution.cs" />
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveMeanSquaredErrorEvaluator.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 7183)
@@ -93,18 +93,5 @@
         meanCalculator.Add(calc.MeanSquaredError);
       }
-      //int i = 0;
-      //foreach (var targetVariable in problemData.TargetVariables) {
-      //  var predictedContinuations = allPredictedContinuations.Select(v => v.ElementAt(i));
-      //  for (int h = 0; h < horizon; h++) {
-      //    OnlineCalculatorError errorState;
-      //    meanCalculator.Add(OnlineMeanSquaredErrorCalculator.Calculate(predictedContinuations
-      //                                                                    .Select(x => x.ElementAt(h))
-      //                                                                    .LimitToRange(lowerEstimationLimit,
-      //                                                                                  upperEstimationLimit),
-      //                                                                  actualContinuations.Select(x => x.ElementAt(h)),
-      //                                                                  out errorState));
-      //    if (errorState != OnlineCalculatorError.None) return double.NaN;
-      //  }
-      //}
+
       return meanCalculator.MeanErrorState == OnlineCalculatorError.None ? meanCalculator.Mean : double.MaxValue;
     }
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs	(revision 7183)
@@ -76,20 +76,12 @@
     private void InitializeOperators() {
       Operators.Add(new SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer());
-      //Operators.Add(new SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer());
-      //Operators.Add(new SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer());
+      Operators.Add(new SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer());
+      Operators.Add(new SymbolicTimeSeriesPrognosisSingleObjectiveOverfittingAnalyzer());
       ParameterizeOperators();
     }
 
     private void UpdateEstimationLimits() {
-      //if (ProblemData.TrainingIndizes.Any()) {
-      //  var targetValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariables, ProblemData.TrainingIndizes).ToList();
-      //  var mean = targetValues.Average();
-      //  var range = targetValues.Max() - targetValues.Min();
-      //  EstimationLimits.Upper = mean + PunishmentFactor * range;
-      //  EstimationLimits.Lower = mean - PunishmentFactor * range;
-      //} else {
       EstimationLimits.Upper = double.MaxValue;
       EstimationLimits.Lower = double.MinValue;
-      //}
     }
 
@@ -106,6 +98,5 @@
           op.EstimationLimitsParameter.ActualName = EstimationLimitsParameter.Name;
         }
-        foreach (var op in operators.OfType<SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer>())
-        {
+        foreach (var op in operators.OfType<SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer>()) {
           op.MaximizationParameter.ActualName = MaximizationParameter.Name;
           op.ProblemDataParameter.ActualName = ProblemDataParameter.Name;
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 7183)
@@ -76,5 +76,5 @@
 
     protected override ISymbolicTimeSeriesPrognosisSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
-      var model = new SymbolicTimeSeriesPrognosisModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariables.ToArray());
+      var model = new SymbolicTimeSeriesPrognosisModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariables.ToArray(), EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
       if (ApplyLinearScaling.Value)
         SymbolicTimeSeriesPrognosisModel.Scale(model, ProblemDataParameter.ActualValue);
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer.cs	(revision 7183)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -33,9 +34,7 @@
   [Item("SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer", "An operator that analyzes the validation best symbolic time-series prognosis solution for single objective symbolic time-series prognosis problems.")]
   [StorableClass]
-  public sealed class SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicTimeSeriesPrognosisSolution, ISymbolicTimeSeriesPrognosisSingleObjectiveEvaluator, ITimeSeriesPrognosisProblemData>,
-    ISymbolicDataAnalysisBoundedOperator {
+  public sealed class SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveValidationBestSolutionAnalyzer<ISymbolicTimeSeriesPrognosisSolution, ISymbolicTimeSeriesPrognosisSingleObjectiveEvaluator, ITimeSeriesPrognosisProblemData>, ISymbolicDataAnalysisBoundedOperator {
     private const string EstimationLimitsParameterName = "EstimationLimits";
     private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
-
     #region parameter properties
     public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
@@ -61,5 +60,4 @@
       Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
     }
-
     public override IDeepCloneable Clone(Cloner cloner) {
       return new SymbolicTimeSeriesPrognosisSingleObjectiveValidationBestSolutionAnalyzer(this, cloner);
@@ -67,5 +65,5 @@
 
     protected override ISymbolicTimeSeriesPrognosisSolution CreateSolution(ISymbolicExpressionTree bestTree, double bestQuality) {
-      var model = new SymbolicTimeSeriesPrognosisModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicTimeSeriesPrognosisInterpreterParameter.ActualValue);
+      var model = new SymbolicTimeSeriesPrognosisModel((ISymbolicExpressionTree)bestTree.Clone(), SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, ProblemDataParameter.ActualValue.TargetVariables.ToArray(), EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper);
       if (ApplyLinearScaling.Value)
         SymbolicTimeSeriesPrognosisModel.Scale(model, ProblemDataParameter.ActualValue);
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs	(revision 7154)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs	(revision 7183)
@@ -39,4 +39,8 @@
       get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
     }
+    [Storable(DefaultValue = double.MinValue)]
+    private double lowerEstimationLimit;
+    [Storable(DefaultValue = double.MaxValue)]
+    private double upperEstimationLimit;
 
     #region properties
@@ -72,6 +76,8 @@
       this.targetVariables = new string[original.targetVariables.Length];
       Array.Copy(original.targetVariables, this.targetVariables, this.targetVariables.Length);
-    }
-    public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, IEnumerable<string> targetVariables)
+      this.lowerEstimationLimit = original.lowerEstimationLimit;
+      this.upperEstimationLimit = original.upperEstimationLimit;
+    }
+    public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, IEnumerable<string> targetVariables, double lowerLimit = double.MinValue, double upperLimit = double.MaxValue)
       : base() {
       this.name = ItemName;
@@ -79,4 +85,6 @@
       this.symbolicExpressionTree = tree;
       this.interpreter = interpreter; this.targetVariables = targetVariables.ToArray();
+      this.lowerEstimationLimit = lowerLimit;
+      this.upperEstimationLimit = upperLimit;
     }
 
@@ -95,5 +103,5 @@
           for (int c = 0; c < components.Length; c++) {
             enumerator.MoveNext();
-            components[c] = enumerator.Current;
+            components[c] = Math.Min(upperEstimationLimit, Math.Max(lowerEstimationLimit, enumerator.Current));
           }
           l.Add(components);
