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 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis-3.4.csproj	(revision 7120)
@@ -111,5 +111,4 @@
   <ItemGroup>
     <Compile Include="Interfaces\ISymbolicTimeSeriesPrognosisInterpreterOperator.cs" />
-    <Compile Include="Interfaces\ISymbolicTimeSeriesPrognogisInterpreter.cs" />
     <Compile Include="Interfaces\ISymbolicTimeSeriesPrognosisEvaluator.cs" />
     <Compile Include="Interfaces\ISymbolicTimeSeriesPrognosisModel.cs" />
@@ -122,5 +121,4 @@
     <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs" />
     <Compile Include="SingleObjective\SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs" />
-    <Compile Include="SymbolicTimeSeriesPrognosisInterpreter.cs" />
     <Compile Include="SymbolicTimeSeriesPrognosisModel.cs" />
     <Compile Include="SymbolicTimeSeriesPrognosisSolution.cs" />
@@ -139,4 +137,8 @@
       <Name>HeuristicLab.Collections-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
       <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
@@ -182,4 +184,8 @@
       <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>
       <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
     </ProjectReference>
   </ItemGroup>
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognogisInterpreter.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognogisInterpreter.cs	(revision 7100)
+++ 	(revision )
@@ -1,30 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2011 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.Collections.Generic;
-using HeuristicLab.Core;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-
-namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis {
-  public interface ISymbolicTimeSeriesPrognosisInterpreter : ISymbolicDataAnalysisExpressionTreeInterpreter {
-    IEnumerable<IEnumerable<IEnumerable<double>>> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows, int horizon);
-  }
-}
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisEvaluator.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisEvaluator.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisEvaluator.cs	(revision 7120)
@@ -20,7 +20,10 @@
 #endregion
 
+using HeuristicLab.Core;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis {
   public interface ISymbolicTimeSeriesPrognosisEvaluator : ISymbolicDataAnalysisEvaluator<ITimeSeriesPrognosisProblemData> {
+    IValueLookupParameter<IntValue> HorizonParameter { get; }
   }
 }
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisInterpreterOperator.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisInterpreterOperator.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisInterpreterOperator.cs	(revision 7120)
@@ -24,5 +24,5 @@
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis {
   public interface ISymbolicTimeSeriesPrognosisInterpreterOperator : IOperator {
-    ILookupParameter<ISymbolicTimeSeriesPrognosisInterpreter> SymbolicTimeSeriesPrognosisInterpreterParameter { get; }
+    ILookupParameter<ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter> SymbolicTimeSeriesPrognosisInterpreterParameter { get; }
   }
 }
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisModel.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisModel.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/Interfaces/ISymbolicTimeSeriesPrognosisModel.cs	(revision 7120)
@@ -22,5 +22,7 @@
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis {
-  public interface ISymbolicTimeSeriesPrognosisModel : ITimeSeriesPrognosisModel, ISymbolicDataAnalysisModel {
+  public interface ISymbolicTimeSeriesPrognosisModel : ITimeSeriesPrognosisModel {
+    ISymbolicExpressionTree SymbolicExpressionTree { get; }
+    ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter Interpreter { get; }
   }
 }
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator.cs	(revision 7120)
@@ -22,7 +22,16 @@
 
 using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis {
   public abstract class SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator : SymbolicDataAnalysisSingleObjectiveEvaluator<ITimeSeriesPrognosisProblemData>, ISymbolicTimeSeriesPrognosisSingleObjectiveEvaluator {
+    private const string HorizonParameterName = "Horizon";
+
+    public IValueLookupParameter<IntValue> HorizonParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters[HorizonParameterName]; }
+    }
+
     [StorableConstructor]
     protected SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator(bool deserializing) : base(deserializing) { }
@@ -31,5 +40,8 @@
     }
 
-    protected SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator() : base() { }
+    protected SymbolicTimeSeriesPrognosisSingleObjectiveEvaluator()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IntValue>(HorizonParameterName, "The time interval for which the prognosis should be calculated.", new IntValue(1)));
+    }
   }
 }
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 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveMeanSquaredErrorEvaluator.cs	(revision 7120)
@@ -20,5 +20,7 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -48,5 +50,9 @@
       IEnumerable<int> rows = GenerateRowsToEvaluate();
 
-      double quality = Calculate(SymbolicTimeSeriesPrognosisInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
+      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue,
+        solution,
+        EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper,
+        ProblemDataParameter.ActualValue,
+        rows, HorizonParameter.ActualValue.Value);
       QualityParameter.ActualValue = new DoubleValue(quality);
 
@@ -54,14 +60,20 @@
     }
 
-    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
-      OnlineMeanAndVarianceCalculator meanCalculator = new OnlineMeanAndVarianceCalculator();
+    public static double Calculate(ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows, int horizon) {
+      var allPredictedContinuations = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, problemData.TargetVariables.ToArray(), rows, horizon);
+      var meanCalculator = new OnlineMeanAndVarianceCalculator();
+      var allPredictedContinuationsEnumerator = allPredictedContinuations.GetEnumerator();
       foreach (var targetVariable in problemData.TargetVariables) {
-        IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(targetVariable, rows);
-        IEnumerable<double> boundedEstimationValues = estimatedValues.LimitToRange(lowerEstimationLimit,
-                                                                                   upperEstimationLimit);
-        OnlineCalculatorError errorState;
-        meanCalculator.Add(OnlineMeanSquaredErrorCalculator.Calculate(originalValues, boundedEstimationValues, out errorState));
-        if (errorState != OnlineCalculatorError.None) return double.NaN;
+        if (!allPredictedContinuationsEnumerator.MoveNext()) throw new InvalidOperationException();
+        var actualContinuations = from r in rows
+                                  select problemData.Dataset.GetDoubleValues(targetVariable, Enumerable.Range(r, horizon));
+        var actualContinuationsEnumerator = actualContinuations.GetEnumerator();
+        var predictedContinuationsEnumerator = allPredictedContinuationsEnumerator.Current.GetEnumerator();
+        while (actualContinuationsEnumerator.MoveNext() & predictedContinuationsEnumerator.MoveNext()) {
+          OnlineCalculatorError errorState;
+          meanCalculator.Add(OnlineMeanSquaredErrorCalculator.Calculate(predictedContinuationsEnumerator.Current.LimitToRange(lowerEstimationLimit, upperEstimationLimit),
+                                                                        actualContinuationsEnumerator.Current, out errorState));
+          if (errorState != OnlineCalculatorError.None) return double.NaN;
+        }
       }
       return meanCalculator.Mean;
@@ -69,11 +81,12 @@
 
     public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows) {
-      SymbolicTimeSeriesPrognosisInterpreterParameter.ExecutionContext = context;
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
       EstimationLimitsParameter.ExecutionContext = context;
+      HorizonParameter.ExecutionContext = context;
 
-      double mse = Calculate(SymbolicTimeSeriesPrognosisInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
+      double mse = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, HorizonParameter.ActualValue.Value);
 
-
-      SymbolicTimeSeriesPrognosisInterpreterParameter.ExecutionContext = null;
+      HorizonParameter.ExecutionContext = null;
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
       EstimationLimitsParameter.ExecutionContext = null;
 
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectivePearsonRSquaredEvaluator.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectivePearsonRSquaredEvaluator.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectivePearsonRSquaredEvaluator.cs	(revision 7120)
@@ -20,5 +20,7 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -48,5 +50,8 @@
       IEnumerable<int> rows = GenerateRowsToEvaluate();
 
-      double quality = Calculate(SymbolicTimeSeriesPrognosisInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
+      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution,
+        EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper,
+        ProblemDataParameter.ActualValue,
+        rows, HorizonParameter.ActualValue.Value);
       QualityParameter.ActualValue = new DoubleValue(quality);
 
@@ -54,12 +59,22 @@
     }
 
-    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows) {
-      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
+    public static double Calculate(ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows, int horizon) {
+      var allPredictedContinuations =
+        interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, problemData.TargetVariables.ToArray(),
+                                                    rows, horizon).ToArray();
+
       var meanCalculator = new OnlineMeanAndVarianceCalculator();
+      int i = 0;
       foreach (var targetVariable in problemData.TargetVariables) {
-        IEnumerable<double> originalValues = problemData.Dataset.GetDoubleValues(targetVariable, rows);
+        var actualContinuations = from r in rows
+                                  select problemData.Dataset.GetDoubleValues(targetVariable, Enumerable.Range(r, horizon));
+        var startValues = problemData.Dataset.GetDoubleValues(targetVariable, rows.Select(r => r - 1));
         OnlineCalculatorError errorState;
-        meanCalculator.Add(OnlinePearsonsRSquaredCalculator.Calculate(estimatedValues, originalValues, out errorState));
-        if (errorState != OnlineCalculatorError.None) return 0.0;
+        meanCalculator.Add(OnlineTheilsUStatisticCalculator.Calculate(
+          startValues,
+          allPredictedContinuations.Select(v => v.ElementAt(i)),
+          actualContinuations, out errorState));
+        if (errorState != OnlineCalculatorError.None) return double.NaN;
+        i++;
       }
       return meanCalculator.Mean;
@@ -67,10 +82,12 @@
 
     public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, ITimeSeriesPrognosisProblemData problemData, IEnumerable<int> rows) {
-      SymbolicTimeSeriesPrognosisInterpreterParameter.ExecutionContext = context;
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
       EstimationLimitsParameter.ExecutionContext = context;
+      HorizonParameter.ExecutionContext = context;
 
-      double r2 = Calculate(SymbolicTimeSeriesPrognosisInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
+      double r2 = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows, HorizonParameter.ActualValue.Value);
 
-      SymbolicTimeSeriesPrognosisInterpreterParameter.ExecutionContext = null;
+      HorizonParameter.ExecutionContext = null;
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
       EstimationLimitsParameter.ExecutionContext = null;
 
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 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveProblem.cs	(revision 7120)
@@ -31,5 +31,4 @@
   [Creatable("Problems")]
   public class SymbolicTimeSeriesPrognosisSingleObjectiveProblem : SymbolicDataAnalysisSingleObjectiveProblem<ITimeSeriesPrognosisProblemData, ISymbolicTimeSeriesPrognosisSingleObjectiveEvaluator, ISymbolicDataAnalysisSolutionCreator>, ITimeSeriesPrognosisProblem {
-    private const double PunishmentFactor = 10;
     private const int InitialMaximumTreeDepth = 8;
     private const int InitialMaximumTreeLength = 25;
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 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SingleObjective/SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer.cs	(revision 7120)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -34,7 +35,7 @@
   [StorableClass]
   public sealed class SymbolicTimeSeriesPrognosisSingleObjectiveTrainingBestSolutionAnalyzer : SymbolicDataAnalysisSingleObjectiveTrainingBestSolutionAnalyzer<ISymbolicTimeSeriesPrognosisSolution>,
-  ISymbolicTimeSeriesPrognosisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
+  ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator {
     private const string ProblemDataParameterName = "ProblemData";
-    private const string SymbolicTimeSeriesPrognosisInterpreterParameterName = "SymbolicTimeSeriesPrognosisInterpreter";
+    private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter";
     private const string EstimationLimitsParameterName = "EstimationLimits";
     private const string ApplyLinearScalingParameterName = "ApplyLinearScaling";
@@ -43,6 +44,6 @@
       get { return (ILookupParameter<ITimeSeriesPrognosisProblemData>)Parameters[ProblemDataParameterName]; }
     }
-    public ILookupParameter<ISymbolicTimeSeriesPrognosisInterpreter> SymbolicTimeSeriesPrognosisInterpreterParameter {
-      get { return (ILookupParameter<ISymbolicTimeSeriesPrognosisInterpreter>)Parameters[SymbolicTimeSeriesPrognosisInterpreterParameterName]; }
+    public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter {
+      get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; }
     }
     public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter {
@@ -66,5 +67,5 @@
       : base() {
       Parameters.Add(new LookupParameter<ITimeSeriesPrognosisProblemData>(ProblemDataParameterName, "The problem data for the symbolic regression solution."));
-      Parameters.Add(new LookupParameter<ISymbolicTimeSeriesPrognosisInterpreter>(SymbolicTimeSeriesPrognosisInterpreterParameterName, "The symbolic time series prognosis interpreter for the symbolic expression tree."));
+      Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic time series prognosis interpreter for the symbolic expression tree."));
       Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic regression model."));
       Parameters.Add(new ValueParameter<BoolValue>(ApplyLinearScalingParameterName, "Flag that indicates if the produced symbolic regression solution should be linearly scaled.", new BoolValue(true)));
@@ -75,5 +76,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());
       if (ApplyLinearScaling.Value)
         SymbolicTimeSeriesPrognosisModel.Scale(model, ProblemDataParameter.ActualValue);
Index: branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisInterpreter.cs
===================================================================
--- branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisInterpreter.cs	(revision 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisInterpreter.cs	(revision 7120)
@@ -33,5 +33,5 @@
   [StorableClass]
   [Item("SymbolicTimeSeriesPrognosisInterpreter", "Interpreter for symbolic expression trees including automatically defined functions.")]
-  public sealed class SymbolicTimeSeriesPrognosisInterpreter : ParameterizedNamedItem, ISymbolicTimeSeriesPrognosisInterpreter {
+  public sealed class SymbolicTimeSeriesPrognosisInterpreter : ParameterizedNamedItem, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter {
     private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic";
     #region private classes
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 7100)
+++ branches/HeuristicLab.TimeSeries/HeuristicLab.Problems.DataAnalysis.Symbolic.TimeSeriesPrognosis/3.4/SymbolicTimeSeriesPrognosisModel.cs	(revision 7120)
@@ -21,4 +21,5 @@
 
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;
 using HeuristicLab.Common;
@@ -33,8 +34,28 @@
   [StorableClass]
   [Item(Name = "Symbolic Time-Series Prognosis Model", Description = "Represents a symbolic time series prognosis model.")]
-  public class SymbolicTimeSeriesPrognosisModel : SymbolicDataAnalysisModel, ISymbolicTimeSeriesPrognosisModel {
-    public new ISymbolicTimeSeriesPrognosisInterpreter Interpreter {
-      get { return (ISymbolicTimeSeriesPrognosisInterpreter)base.Interpreter; }
+  public class SymbolicTimeSeriesPrognosisModel : NamedItem, ISymbolicTimeSeriesPrognosisModel {
+    public override Image ItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; }
     }
+
+    #region properties
+
+    [Storable]
+    private ISymbolicExpressionTree symbolicExpressionTree;
+    public ISymbolicExpressionTree SymbolicExpressionTree {
+      get { return symbolicExpressionTree; }
+    }
+
+    [Storable]
+    private ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter;
+    public ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter Interpreter {
+      get { return interpreter; }
+    }
+
+    #endregion
+
+    [Storable]
+    private string[] targetVariables;
+
 
     [StorableConstructor]
@@ -42,7 +63,13 @@
     protected SymbolicTimeSeriesPrognosisModel(SymbolicTimeSeriesPrognosisModel original, Cloner cloner)
       : base(original, cloner) {
+      this.symbolicExpressionTree = cloner.Clone(original.symbolicExpressionTree);
+      this.interpreter = cloner.Clone(original.interpreter);
     }
-    public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisInterpreter interpreter)
-      : base(tree, interpreter) {
+    public SymbolicTimeSeriesPrognosisModel(ISymbolicExpressionTree tree, ISymbolicTimeSeriesPrognosisExpressionTreeInterpreter interpreter, IEnumerable<string> targetVariables)
+      : base() {
+      this.name = ItemName;
+      this.description = ItemDescription;
+      this.symbolicExpressionTree = tree;
+      this.interpreter = interpreter; this.targetVariables = targetVariables.ToArray();
     }
 
@@ -52,5 +79,5 @@
 
     public IEnumerable<IEnumerable<IEnumerable<double>>> GetPrognosedValues(Dataset dataset, IEnumerable<int> rows, int horizon) {
-      return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, rows, horizon);
+      return Interpreter.GetSymbolicExpressionTreeValues(SymbolicExpressionTree, dataset, targetVariables, rows, horizon);
     }
 
@@ -68,5 +95,5 @@
       int i = 0;
       int horizon = 1;
-      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, rows, horizon)
+      var estimatedValues = model.Interpreter.GetSymbolicExpressionTreeValues(model.SymbolicExpressionTree, dataset, problemData.TargetVariables.ToArray(), rows, horizon)
         .ToArray();
       foreach (var targetVariable in targetVariables) {
