Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 9145)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj	(revision 9162)
@@ -198,4 +198,5 @@
     <Compile Include="Interfaces\ISymbolicDataAnalysisExpressionTreeInterpreter.cs" />
     <Compile Include="Interfaces\ISymbolicDataAnalysisProblem.cs" />
+    <Compile Include="SlidingWindow\SlidingWindowVisualizer.cs" />
     <Compile Include="SymbolicDataAnalysisModel.cs">
       <SubType>Code</SubType>
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs	(revision 9145)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/GenerationalSlidingWindowAnalyzer.cs	(revision 9162)
@@ -30,6 +30,5 @@
   [Item("Generational Sliding Window GP Analyzer", "Analyzer which moves a sliding window every n-th generation over the training partition.")]
   [StorableClass]
-  public class GenerationalSlidingWindowAnalyzer<T> : SlidingWindowAnalyzer<T>, IIterationBasedOperator
-    where T : class, IDataAnalysisProblemData {
+  public class GenerationalSlidingWindowAnalyzer : SlidingWindowAnalyzer, IIterationBasedOperator {
     private const string GenerationsIntervalParameterName = "Generation Interval";
     private const string GenerationsIntervalStartParameterName = "Generation Interval Start";
@@ -64,7 +63,7 @@
     [StorableConstructor]
     protected GenerationalSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
-    protected GenerationalSlidingWindowAnalyzer(GenerationalSlidingWindowAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
+    protected GenerationalSlidingWindowAnalyzer(GenerationalSlidingWindowAnalyzer original, Cloner cloner) : base(original, cloner) { }
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new GenerationalSlidingWindowAnalyzer<T>(this, cloner);
+      return new GenerationalSlidingWindowAnalyzer(this, cloner);
     }
 
@@ -74,4 +73,7 @@
       Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalParameterName, "", new IntValue(5)));
       Parameters.Add(new FixedValueParameter<IntValue>(GenerationsIntervalStartParameterName, "", new IntValue(0)));
+
+      IterationsParameter.ActualName = "Generations";
+      MaximumIterationsParameter.Hidden = true;
     }
 
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs	(revision 9145)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/OffspringSelectionSlidingWindowAnalyzer.cs	(revision 9162)
@@ -29,6 +29,5 @@
   [Item("Offspring Selection Sliding Window GP Analyzer", "Analyzer which moves a sliding window whenever the selection pressure exceeds a certain threshold.")]
   [StorableClass]
-  public class OffspringSelectionSlidingWindowAnalyzer<T> : SlidingWindowAnalyzer<T>
-    where T : class, IDataAnalysisProblemData {
+  public class OffspringSelectionSlidingWindowAnalyzer : SlidingWindowAnalyzer {
     private const string SelectionPressureParameterName = "SelectionPressure";
     private const string SelectionPressureThresholdParameterName = "SelectionPressureThreshold";
@@ -52,7 +51,7 @@
     [StorableConstructor]
     protected OffspringSelectionSlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
-    protected OffspringSelectionSlidingWindowAnalyzer(OffspringSelectionSlidingWindowAnalyzer<T> original, Cloner cloner) : base(original, cloner) { }
+    protected OffspringSelectionSlidingWindowAnalyzer(OffspringSelectionSlidingWindowAnalyzer original, Cloner cloner) : base(original, cloner) { }
     public override IDeepCloneable Clone(Cloner cloner) {
-      return new OffspringSelectionSlidingWindowAnalyzer<T>(this, cloner);
+      return new OffspringSelectionSlidingWindowAnalyzer(this, cloner);
     }
 
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs	(revision 9145)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowAnalyzer.cs	(revision 9162)
@@ -20,10 +20,7 @@
 #endregion
 
-using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
 using HeuristicLab.Data;
-using HeuristicLab.Operators;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
@@ -32,25 +29,19 @@
   [StorableClass]
   [Item("Sliding Window GP Analyzer", "Base class for concrete sliding window GP analyzers.")]
-  public abstract class SlidingWindowAnalyzer<T> : SingleSuccessorOperator, IAnalyzer where T : class,IDataAnalysisProblemData {
+  public abstract class SlidingWindowAnalyzer : SymbolicDataAnalysisAnalyzer {
     private const string ProblemDataParameterName = "ProblemData";
-    private const string ResultCollectionParameterName = "Results";
     private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
     private const string SlidingWindowSizeParameterName = "Sliding Window Size";
     private const string SlidingWindowStepWidthParameterName = "Sliding Window Step Width";
     private const string InitialSlidingWindowParameterName = "Initial Sliding Window";
-
-    private const string SlidingWindowDataResultName = "Sliding Window";
+    private const string TerminateSlidingWindowParameterName = "TerminateSlidingWindow";
 
     #region parameter properties
-    public IValueLookupParameter<T> ProblemDataParameter {
-      get { return (IValueLookupParameter<T>)Parameters[ProblemDataParameterName]; }
-    }
-    public ILookupParameter<ResultCollection> ResultCollectionParameter {
-      get { return (ILookupParameter<ResultCollection>)Parameters[ResultCollectionParameterName]; }
+    public IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
     }
     public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
       get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
     }
-
     public IFixedValueParameter<IntValue> SlidingWindowSizeParameter {
       get { return (IFixedValueParameter<IntValue>)Parameters[SlidingWindowSizeParameterName]; }
@@ -60,12 +51,13 @@
     }
     public IFixedValueParameter<IntRange> InitialSlidingWindowParameter {
-      get {
-        return (IFixedValueParameter<IntRange>)Parameters[InitialSlidingWindowParameterName];
-      }
+      get { return (IFixedValueParameter<IntRange>)Parameters[InitialSlidingWindowParameterName]; }
+    }
+    public ILookupParameter<BoolValue> TerminateSlidingWindowParameter {
+      get { return (ILookupParameter<BoolValue>)Parameters[TerminateSlidingWindowParameterName]; }
     }
     #endregion
 
     #region properties
-    public bool EnabledByDefault { get { return false; } }
+    public override bool EnabledByDefault { get { return false; } }
     public IntValue SlidingWindowSize { get { return SlidingWindowSizeParameter.Value; } }
     public IntValue SlidingWindowStepWidth { get { return SlidingWindowStepWidthParameter.Value; } }
@@ -76,56 +68,49 @@
     [StorableConstructor]
     protected SlidingWindowAnalyzer(bool deserializing) : base(deserializing) { }
-    protected SlidingWindowAnalyzer(SlidingWindowAnalyzer<T> original, Cloner cloner)
+    protected SlidingWindowAnalyzer(SlidingWindowAnalyzer original, Cloner cloner)
       : base(original, cloner) { }
 
-    protected SlidingWindowAnalyzer() {
-      Parameters.Add(new LookupParameter<ResultCollection>(ResultCollectionParameterName, "The result collection to store the analysis results."));
-      Parameters.Add(new ValueLookupParameter<T>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+    protected SlidingWindowAnalyzer()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
       Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
       Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowSizeParameterName, "", new IntValue(1)));
       Parameters.Add(new FixedValueParameter<IntValue>(SlidingWindowStepWidthParameterName, "", new IntValue(1)));
       Parameters.Add(new FixedValueParameter<IntRange>(InitialSlidingWindowParameterName, "", new IntRange(0, 1)));
+      Parameters.Add(new LookupParameter<BoolValue>(TerminateSlidingWindowParameterName, ""));
 
-      FitnessCalculationPartitionParameter.ActualName = "Sliding Window";
+      ProblemDataParameter.Hidden = true;
     }
 
     public override IOperation Apply() {
+      //intialize sliding window
       if (FitnessCalculationPartitionParameter.ActualValue == null) {
+        TerminateSlidingWindowParameter.ActualValue = new BoolValue(false);
         FitnessCalculationPartitionParameter.ActualValue = (IntRange)InitialSlidingWindow.Clone();
-      } else if (CheckForUpdate()) {
-        var fitnessPartition = FitnessCalculationPartitionParameter.ActualValue;
-        if (fitnessPartition.End - fitnessPartition.Start == SlidingWindowSize.Value)
-          fitnessPartition.Start += SlidingWindowStepWidth.Value;
-
-        fitnessPartition.End += SlidingWindowStepWidth.Value;
-        if (fitnessPartition.End - fitnessPartition.Start > SlidingWindowSize.Value)
-          fitnessPartition.End = fitnessPartition.Start + SlidingWindowSize.Value;
-
-        //TODO check if fitnesspartition exceeds training partition
+        return base.Apply();
       }
 
-      //create and update result
-      var results = ResultCollectionParameter.ActualValue;
-      SlidingWindowData slidingWindowData;
-      if (!results.ContainsKey(SlidingWindowDataResultName)) {
-        string targetVariable;
-        var classificationProblemData = ProblemDataParameter.ActualValue as IClassificationProblemData;
-        var regressionProblemData = ProblemDataParameter.ActualValue as IRegressionProblemData;
-        if (classificationProblemData != null) targetVariable = classificationProblemData.TargetVariable;
-        else if (regressionProblemData != null) targetVariable = regressionProblemData.TargetVariable;
-        else throw new NotSupportedException();
+      if (!CheckForUpdate()) return base.Apply();
 
-        var targetData = ProblemDataParameter.ActualValue.Dataset.GetDoubleValues(targetVariable);
-        slidingWindowData = new SlidingWindowData(FitnessCalculationPartitionParameter.ActualValue, targetData);
-        results.Add(new Result(SlidingWindowDataResultName, slidingWindowData));
-      } else slidingWindowData = (SlidingWindowData)results[SlidingWindowDataResultName].Value;
+      //update necessary - move sliding window
+      var fitnessPartition = (IntRange)FitnessCalculationPartitionParameter.ActualValue.Clone();
+      if (fitnessPartition.End - fitnessPartition.Start == SlidingWindowSize.Value)
+        fitnessPartition.Start += SlidingWindowStepWidth.Value;
 
-      slidingWindowData.SlidingWindowPosition.Start = FitnessCalculationPartitionParameter.ActualValue.Start;
-      slidingWindowData.SlidingWindowPosition.End = FitnessCalculationPartitionParameter.ActualValue.End;
+      fitnessPartition.End += SlidingWindowStepWidth.Value;
+      if (fitnessPartition.End - fitnessPartition.Start > SlidingWindowSize.Value)
+        fitnessPartition.End = fitnessPartition.Start + SlidingWindowSize.Value;
+
+      //check if update should be performed or if the algorithm should stop
+      if (fitnessPartition.End > ProblemDataParameter.ActualValue.TrainingPartition.End)
+        TerminateSlidingWindowParameter.ActualValue.Value = true;
+      else {
+        FitnessCalculationPartitionParameter.ActualValue.Start = fitnessPartition.Start;
+        FitnessCalculationPartitionParameter.ActualValue.End = fitnessPartition.End;
+      }
 
       return base.Apply();
     }
 
-
     protected abstract bool CheckForUpdate();
   }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs	(revision 9145)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowData.cs	(revision 9162)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -28,6 +29,7 @@
 
 namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
-  [Item("Sliding Window Position", "TODO")]
-  public class SlidingWindowData : Item {
+  [StorableClass]
+  [Item("Sliding Window Position", "")]
+  public sealed class SlidingWindowData : Item {
 
     [Storable]
@@ -43,6 +45,18 @@
     }
 
-    protected SlidingWindowData(bool deserializing) : base(deserializing) { }
-    protected SlidingWindowData(SlidingWindowData original, Cloner cloner)
+    [Storable]
+    private IEnumerable<double> estimatedValues;
+    public IEnumerable<double> EstimatedValues {
+      get { return estimatedValues; }
+      set {
+        if (value == null) throw new ArgumentNullException();
+        estimatedValues = value.ToArray();
+        OnEstimatedValuesChanged();
+      }
+    }
+
+    [StorableConstructor]
+    private SlidingWindowData(bool deserializing) : base(deserializing) { }
+    private SlidingWindowData(SlidingWindowData original, Cloner cloner)
       : base(original, cloner) {
       slidingWindowPosition = cloner.Clone(original.slidingWindowPosition);
@@ -58,4 +72,10 @@
       this.targetValues = targetValues.ToArray();
     }
+
+    public event EventHandler EstimatedValuesChanged;
+    private void OnEstimatedValuesChanged() {
+      var handler = EstimatedValuesChanged;
+      if (handler != null) EstimatedValuesChanged(this, EventArgs.Empty);
+    }
   }
 }
Index: branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs
===================================================================
--- branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs	(revision 9162)
+++ branches/Sliding Window GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SlidingWindow/SlidingWindowVisualizer.cs	(revision 9162)
@@ -0,0 +1,108 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2013 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.SlidingWindow {
+  [StorableClass]
+  [Item("Sliding Window Visualizer", "Visualizes the actual sliding window position.")]
+  public sealed class SlidingWindowVisualizer : SymbolicDataAnalysisAnalyzer {
+    private const string ProblemDataParameterName = "ProblemData";
+    private const string FitnessCalculationPartitionParameterName = "FitnessCalculationPartition";
+
+    private const string SlidingWindowResultName = "Sliding Window";
+    private const string SlidingWindowDataResultName = "Sliding Window Data";
+    private const string BestTrainingSolutionResultName = "Best training solution";
+
+    #region parameter properties
+    public IValueLookupParameter<IDataAnalysisProblemData> ProblemDataParameter {
+      get { return (IValueLookupParameter<IDataAnalysisProblemData>)Parameters[ProblemDataParameterName]; }
+    }
+    public ILookupParameter<IntRange> FitnessCalculationPartitionParameter {
+      get { return (ILookupParameter<IntRange>)Parameters[FitnessCalculationPartitionParameterName]; }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private SlidingWindowVisualizer(bool deserializing) : base(deserializing) { }
+    private SlidingWindowVisualizer(SlidingWindowVisualizer original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SlidingWindowVisualizer(this, cloner);
+    }
+
+    public SlidingWindowVisualizer()
+      : base() {
+      Parameters.Add(new ValueLookupParameter<IDataAnalysisProblemData>(ProblemDataParameterName, "The problem data on which the symbolic data analysis solution should be evaluated."));
+      Parameters.Add(new LookupParameter<IntRange>(FitnessCalculationPartitionParameterName, ""));
+      ProblemDataParameter.Hidden = true;
+    }
+
+    public override IOperation Apply() {
+      //create and update result
+      var results = ResultCollectionParameter.ActualValue;
+
+      IntRange slidingWindow;
+      if (!results.ContainsKey(SlidingWindowResultName)) {
+        slidingWindow = new IntRange();
+        results.Add(new Result(SlidingWindowResultName, slidingWindow));
+      } else slidingWindow = (IntRange)results[SlidingWindowResultName].Value;
+      slidingWindow.Start = FitnessCalculationPartitionParameter.ActualValue.Start;
+      slidingWindow.End = FitnessCalculationPartitionParameter.ActualValue.End;
+
+      SlidingWindowData slidingWindowData;
+      if (!results.ContainsKey(SlidingWindowDataResultName)) {
+        string targetVariable;
+        var classificationProblemData = ProblemDataParameter.ActualValue as IClassificationProblemData;
+        var regressionProblemData = ProblemDataParameter.ActualValue as IRegressionProblemData;
+        if (classificationProblemData != null) targetVariable = classificationProblemData.TargetVariable;
+        else if (regressionProblemData != null) targetVariable = regressionProblemData.TargetVariable;
+        else throw new NotSupportedException();
+
+        var targetData = ProblemDataParameter.ActualValue.Dataset.GetDoubleValues(targetVariable);
+        slidingWindowData = new SlidingWindowData(FitnessCalculationPartitionParameter.ActualValue, targetData);
+        results.Add(new Result(SlidingWindowDataResultName, slidingWindowData));
+      } else slidingWindowData = (SlidingWindowData)results[SlidingWindowDataResultName].Value;
+
+      IEnumerable<double> estimatedValues = Enumerable.Empty<double>();
+      if (results.ContainsKey(BestTrainingSolutionResultName)) {
+        var trainingSolution = results[BestTrainingSolutionResultName].Value;
+        var regressionSolution = trainingSolution as IRegressionSolution;
+        var classificationSolution = trainingSolution as IClassificationSolution;
+
+        if (regressionSolution != null) estimatedValues = regressionSolution.EstimatedValues;
+        if (classificationSolution != null) estimatedValues = classificationSolution.EstimatedClassValues;
+      }
+
+      slidingWindowData.SlidingWindowPosition.Start = FitnessCalculationPartitionParameter.ActualValue.Start;
+      slidingWindowData.SlidingWindowPosition.End = FitnessCalculationPartitionParameter.ActualValue.End;
+      slidingWindowData.EstimatedValues = estimatedValues;
+      return base.Apply();
+    }
+  }
+}
