Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views-3.3.csproj
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views-3.3.csproj	(revision 4462)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views-3.3.csproj	(revision 4463)
@@ -109,4 +109,10 @@
   <ItemGroup>
     <Compile Include="HeuristicLabProblemsDataAnalysisMultiVariateTimeSeriesPrognosisViewsPlugin.cs" />
+    <Compile Include="InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.Designer.cs">
+      <DependentUpon>InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs</DependentUpon>
+    </Compile>
     <Compile Include="ResultsView.cs">
       <SubType>UserControl</SubType>
@@ -114,4 +120,16 @@
     <Compile Include="ResultsView.Designer.cs">
       <DependentUpon>ResultsView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SimplifiedSymbolicTimeSeriesPrognosisModelView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SimplifiedSymbolicTimeSeriesPrognosisModelView.designer.cs">
+      <DependentUpon>SimplifiedSymbolicTimeSeriesPrognosisModelView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="SymbolicTimeSeriesPrognosisSolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="SymbolicTimeSeriesPrognosisSolutionView.Designer.cs">
+      <DependentUpon>SymbolicTimeSeriesPrognosisSolutionView.cs</DependentUpon>
     </Compile>
     <Compile Include="SymbolicTimeSeriesPrognosisModelView.cs">
@@ -185,4 +203,12 @@
       <Name>HeuristicLab.MainForm-3.3</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
       <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
@@ -196,4 +222,8 @@
       <Project>{B3310CE1-0C05-410F-BA77-8DAD6CE3F803}</Project>
       <Name>HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.MultiVariate.Views\3.3\HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj">
+      <Project>{9B6EA19A-F894-4E00-B5A3-970514284772}</Project>
+      <Name>HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.MultiVariate\3.3\HeuristicLab.Problems.DataAnalysis.MultiVariate-3.3.csproj">
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.Designer.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.Designer.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.Designer.cs	(revision 4463)
@@ -0,0 +1,167 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  partial class InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.treeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.grpSimplify = new System.Windows.Forms.GroupBox();
+      this.btnSimplify = new System.Windows.Forms.Button();
+      this.grpViewHost = new System.Windows.Forms.GroupBox();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      this.grpSimplify.SuspendLayout();
+      this.grpViewHost.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // treeChart
+      // 
+      this.treeChart.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.treeChart.BackgroundColor = System.Drawing.Color.White;
+      this.treeChart.LineColor = System.Drawing.Color.Black;
+      this.treeChart.Location = new System.Drawing.Point(6, 16);
+      this.treeChart.Name = "treeChart";
+      this.treeChart.Size = new System.Drawing.Size(201, 297);
+      this.treeChart.Spacing = 5;
+      this.treeChart.TabIndex = 0;
+      this.treeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);
+      this.treeChart.Tree = null;
+      this.treeChart.SymbolicExpressionTreeNodeDoubleClicked += new System.Windows.Forms.MouseEventHandler(this.treeChart_SymbolicExpressionTreeNodeDoubleClicked);
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Caption = "View";
+      this.viewHost.Content = null;
+      this.viewHost.Location = new System.Drawing.Point(6, 16);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(335, 326);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewType = null;
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.grpSimplify);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.grpViewHost);
+      this.splitContainer.Size = new System.Drawing.Size(564, 348);
+      this.splitContainer.SplitterDistance = 213;
+      this.splitContainer.TabIndex = 1;
+      // 
+      // grpSimplify
+      // 
+      this.grpSimplify.Controls.Add(this.btnSimplify);
+      this.grpSimplify.Controls.Add(this.treeChart);
+      this.grpSimplify.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.grpSimplify.Location = new System.Drawing.Point(0, 0);
+      this.grpSimplify.Name = "grpSimplify";
+      this.grpSimplify.Size = new System.Drawing.Size(213, 348);
+      this.grpSimplify.TabIndex = 1;
+      this.grpSimplify.TabStop = false;
+      this.grpSimplify.Text = "Simplify";
+      // 
+      // btnSimplify
+      // 
+      this.btnSimplify.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.btnSimplify.Location = new System.Drawing.Point(6, 319);
+      this.btnSimplify.Name = "btnSimplify";
+      this.btnSimplify.Size = new System.Drawing.Size(201, 23);
+      this.btnSimplify.TabIndex = 1;
+      this.btnSimplify.Text = "Simplify";
+      this.btnSimplify.UseVisualStyleBackColor = true;
+      this.btnSimplify.Click += new System.EventHandler(this.btnSimplify_Click);
+      // 
+      // grpViewHost
+      // 
+      this.grpViewHost.Controls.Add(this.viewHost);
+      this.grpViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.grpViewHost.Location = new System.Drawing.Point(0, 0);
+      this.grpViewHost.Name = "grpViewHost";
+      this.grpViewHost.Size = new System.Drawing.Size(347, 348);
+      this.grpViewHost.TabIndex = 1;
+      this.grpViewHost.TabStop = false;
+      this.grpViewHost.Text = "Details";
+      // 
+      // InteractiveSymbolicRegressionSolutionSimplifierView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.splitContainer);
+      this.Name = "InteractiveSymbolicRegressionSolutionSimplifierView";
+      this.Size = new System.Drawing.Size(564, 348);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.ResumeLayout(false);
+      this.grpSimplify.ResumeLayout(false);
+      this.grpViewHost.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart treeChart;
+    private System.Windows.Forms.SplitContainer splitContainer;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
+    private System.Windows.Forms.GroupBox grpSimplify;
+    private System.Windows.Forms.GroupBox grpViewHost;
+    private System.Windows.Forms.Button btnSimplify;
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView.cs	(revision 4463)
@@ -0,0 +1,260 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Drawing;
+using System.Linq;
+using System.Windows.Forms;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Symbols;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Symbolic.Interfaces;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Symbolic.Evaluators;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  public partial class InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView : AsynchronousContentView {
+    private SymbolicExpressionTree simplifiedExpressionTree;
+    private ISymbolicTimeSeriesExpressionInterpreter interpreter;
+    private DoubleArray lowerEstimationLimit;
+    private DoubleArray upperEstimationLimit;
+    private string conditionVariableName;
+    private IEnumerable<string> targetVariables;
+    private int horizon;
+    private Dictionary<SymbolicExpressionTreeNode, ConstantTreeNode> replacementNodes;
+    private Dictionary<SymbolicExpressionTreeNode, double> nodeImpacts;
+
+    public InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView() {
+      InitializeComponent();
+      this.replacementNodes = new Dictionary<SymbolicExpressionTreeNode, ConstantTreeNode>();
+      this.nodeImpacts = new Dictionary<SymbolicExpressionTreeNode, double>();
+      this.simplifiedExpressionTree = null;
+      this.Caption = "Interactive Solution Simplifier";
+    }
+
+    public new SymbolicTimeSeriesPrognosisSolution Content {
+      get { return (SymbolicTimeSeriesPrognosisSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.ModelChanged += new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged);
+    }
+    protected override void DeregisterContentEvents() {
+      base.DeregisterContentEvents();
+      Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged);
+    }
+
+    private void Content_ModelChanged(object sender, EventArgs e) {
+      this.CalculateReplacementNodesAndNodeImpacts();
+    }
+    private void Content_ProblemDataChanged(object sender, EventArgs e) {
+      this.CalculateReplacementNodesAndNodeImpacts();
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      this.CalculateReplacementNodesAndNodeImpacts();
+      this.viewHost.Content = this.Content;
+    }
+
+    private void CalculateReplacementNodesAndNodeImpacts() {
+      this.replacementNodes.Clear();
+      this.nodeImpacts.Clear();
+      if (Content != null && Content.Model != null && Content.ProblemData != null) {
+        SymbolicSimplifier simplifier = new SymbolicSimplifier();
+        simplifiedExpressionTree = simplifier.Simplify(Content.Model.SymbolicExpressionTree);
+        int samplesStart = Content.ProblemData.TrainingSamplesStart.Value;
+        int samplesEnd = Content.ProblemData.TrainingSamplesEnd.Value;
+
+        double[] alpha, beta;
+        double quality;
+        conditionVariableName = Content.ConditionalEvaluationVariable;
+        targetVariables = Content.ProblemData.TargetVariables.CheckedItems.Select(x => x.Value.Value);
+        int nTargetVariables = Content.ProblemData.TargetVariables.CheckedItems.Count();
+        lowerEstimationLimit = new DoubleArray(Enumerable.Repeat(double.NegativeInfinity, nTargetVariables).ToArray());
+        upperEstimationLimit = new DoubleArray(Enumerable.Repeat(double.PositiveInfinity, nTargetVariables).ToArray());
+        interpreter = Content.Model.Interpreter;
+        horizon = Content.Horizon;
+        IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
+        SymbolicExpressionTree tree = (SymbolicExpressionTree)simplifiedExpressionTree.Clone();
+        SymbolicTimeSeriesPrognosisScaledNormalizedMseEvaluator.CalculateScalingParameters(tree,
+          Content.ProblemData, interpreter,
+          conditionVariableName, rows,
+          out beta, out alpha);
+
+        quality = SymbolicTimeSeriesPrognosisScaledNormalizedMseEvaluator.Evaluate(tree, Content.ProblemData, interpreter,
+          conditionVariableName, rows, horizon,
+          lowerEstimationLimit, upperEstimationLimit,
+          beta, alpha);
+
+        //double originalQuality = SymbolicTimeSeriesPrognosisScaledNormalizedMseEvaluator.Evaluate(
+
+        //  .Calculate(
+        //    Content.Model.Interpreter, new SymbolicExpressionTree(root), Content.LowerEstimationLimit, Content.UpperEstimationLimit,
+        //    Content.ProblemData.Dataset, Content.ProblemData.TargetVariable.Value,
+        //    Enumerable.Range(samplesStart, samplesEnd - samplesStart));
+
+        this.CalculateReplacementNodes();
+
+        this.CalculateNodeImpacts(tree, tree.Root, quality);
+        this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0]);
+        this.PaintNodeImpacts();
+      }
+    }
+
+    private void CalculateReplacementNodes() {
+      IEnumerable<int> trainingSamples = Enumerable.Range(Content.ProblemData.TrainingSamplesStart.Value, Content.ProblemData.TrainingSamplesEnd.Value - Content.ProblemData.TrainingSamplesStart.Value);
+      SymbolicExpressionTreeNode root = new ProgramRootSymbol().CreateTreeNode();
+      SymbolicExpressionTreeNode start = new StartSymbol().CreateTreeNode();
+      root.AddSubTree(start);
+      SymbolicExpressionTree tree = new SymbolicExpressionTree(root);
+      foreach (SymbolicExpressionTreeNode node in this.simplifiedExpressionTree.IterateNodesPrefix()) {
+        if (!(node.Symbol is StartSymbol)) {
+          while (start.SubTrees.Count > 0) start.RemoveSubTree(0);
+          start.AddSubTree(node);
+          double constantTreeNodeValue = interpreter.GetSymbolicExpressionTreeValues(tree, Content.ProblemData.Dataset, targetVariables, trainingSamples, 1).Select(x => x[0]).Median();
+          ConstantTreeNode constantTreeNode = MakeConstantTreeNode(constantTreeNodeValue);
+          replacementNodes[node] = constantTreeNode;
+        }
+      }
+    }
+
+    private void CalculateNodeImpacts(SymbolicExpressionTree tree, SymbolicExpressionTreeNode currentTreeNode, double originalQuality) {
+      foreach (SymbolicExpressionTreeNode childNode in currentTreeNode.SubTrees.ToList()) {
+        if (!(childNode.Symbol is StartSymbol)) {
+          SwitchNode(currentTreeNode, childNode, replacementNodes[childNode]);
+          int samplesStart = Content.ProblemData.TrainingSamplesStart.Value;
+          int samplesEnd = Content.ProblemData.TrainingSamplesEnd.Value;
+          double[] alpha;
+          double[] beta;
+          int horizon = Content.Horizon;
+          IEnumerable<int> rows = Enumerable.Range(samplesStart, samplesEnd - samplesStart);
+          //SymbolicExpressionTree tree = new SymbolicExpressionTree(root);
+          SymbolicTimeSeriesPrognosisScaledNormalizedMseEvaluator.CalculateScalingParameters(tree,
+            Content.ProblemData, interpreter,
+            conditionVariableName, rows,
+            out beta, out alpha);
+
+          double newQuality = SymbolicTimeSeriesPrognosisScaledNormalizedMseEvaluator.Evaluate(tree, Content.ProblemData, interpreter,
+            conditionVariableName, rows, horizon,
+            lowerEstimationLimit, upperEstimationLimit,
+            beta, alpha);
+
+          nodeImpacts[childNode] = newQuality / originalQuality;
+          SwitchNode(currentTreeNode, replacementNodes[childNode], childNode);
+        }
+        CalculateNodeImpacts(tree, childNode, originalQuality);
+      }
+    }
+
+    private void SwitchNode(SymbolicExpressionTreeNode root, SymbolicExpressionTreeNode oldBranch, SymbolicExpressionTreeNode newBranch) {
+      for (int i = 0; i < root.SubTrees.Count; i++) {
+        if (root.SubTrees[i] == oldBranch) {
+          root.RemoveSubTree(i);
+          root.InsertSubTree(i, newBranch);
+          return;
+        }
+      }
+    }
+
+    private ConstantTreeNode MakeConstantTreeNode(double value) {
+      Constant constant = new Constant();
+      constant.MinValue = value - 1;
+      constant.MaxValue = value + 1;
+      ConstantTreeNode constantTreeNode = (ConstantTreeNode)constant.CreateTreeNode();
+      constantTreeNode.Value = value;
+      return constantTreeNode;
+    }
+
+    private void treeChart_SymbolicExpressionTreeNodeDoubleClicked(object sender, MouseEventArgs e) {
+      VisualSymbolicExpressionTreeNode visualTreeNode = (VisualSymbolicExpressionTreeNode)sender;
+      foreach (SymbolicExpressionTreeNode treeNode in simplifiedExpressionTree.IterateNodesPostfix()) {
+        for (int i = 0; i < treeNode.SubTrees.Count; i++) {
+          SymbolicExpressionTreeNode subTree = treeNode.SubTrees[i];
+          if (subTree == visualTreeNode.SymbolicExpressionTreeNode) {
+            treeNode.RemoveSubTree(i);
+            if (replacementNodes.ContainsKey(subTree))
+              treeNode.InsertSubTree(i, replacementNodes[subTree]);
+            else if (subTree is ConstantTreeNode && replacementNodes.ContainsValue((ConstantTreeNode)subTree))
+              treeNode.InsertSubTree(i, replacementNodes.Where(v => v.Value == subTree).Single().Key);
+            else if (!(subTree is ConstantTreeNode))
+              throw new InvalidOperationException("Could not find replacement value.");
+          }
+        }
+      }
+      this.treeChart.Tree = new SymbolicExpressionTree(simplifiedExpressionTree.Root.SubTrees[0]);
+
+      SymbolicExpressionTree tree = (SymbolicExpressionTree)simplifiedExpressionTree.Clone();
+
+      this.Content.ModelChanged -= new EventHandler(Content_ModelChanged);
+      this.Content.Model = new SymbolicTimeSeriesPrognosisModel(Content.Model.Interpreter, tree);
+      this.Content.ModelChanged += new EventHandler(Content_ModelChanged);
+
+      this.PaintNodeImpacts();
+    }
+
+    private void PaintNodeImpacts() {
+      var impacts = nodeImpacts.Values;
+      double max = impacts.Max();
+      double min = impacts.Min();
+      foreach (SymbolicExpressionTreeNode treeNode in simplifiedExpressionTree.IterateNodesPostfix()) {
+        if (!(treeNode is ConstantTreeNode) && nodeImpacts.ContainsKey(treeNode)) {
+          double impact = nodeImpacts[treeNode];
+          double replacementValue = replacementNodes[treeNode].Value;
+          VisualSymbolicExpressionTreeNode visualTree = treeChart.GetVisualSymbolicExpressionTreeNode(treeNode);
+
+          if (impact < 1.0) {
+            visualTree.FillColor = Color.FromArgb((int)((1.0 - impact) * 255), Color.Red);
+          } else {
+            visualTree.FillColor = Color.FromArgb((int)((impact - 1.0) / max * 255), Color.Green);
+          }
+          visualTree.ToolTip += Environment.NewLine + "Node impact: " + impact;
+          visualTree.ToolTip += Environment.NewLine + "Replacement value: " + replacementValue;
+        }
+      }
+      this.PaintCollapsedNodes();
+      this.treeChart.Repaint();
+    }
+
+    private void PaintCollapsedNodes() {
+      foreach (SymbolicExpressionTreeNode treeNode in simplifiedExpressionTree.IterateNodesPostfix()) {
+        if (treeNode is ConstantTreeNode && replacementNodes.ContainsValue((ConstantTreeNode)treeNode))
+          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.DarkOrange;
+        else
+          this.treeChart.GetVisualSymbolicExpressionTreeNode(treeNode).LineColor = Color.Black;
+      }
+    }
+
+    private void btnSimplify_Click(object sender, EventArgs e) {
+      this.CalculateReplacementNodesAndNodeImpacts();
+    }
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.cs	(revision 4463)
@@ -0,0 +1,56 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Problems.DataAnalysis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Symbolic;
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  [View("Simplified Symbolic Time Series Prognosis Model View")]
+  [Content(typeof(SymbolicTimeSeriesPrognosisModel))]
+  public partial class SimplifiedSymbolicTimeSeriesPrognosisModelView : AsynchronousContentView {
+    public SimplifiedSymbolicTimeSeriesPrognosisModelView()
+      : base() {
+      InitializeComponent();
+    }
+
+    public new SymbolicTimeSeriesPrognosisModel Content {
+      get { return (SymbolicTimeSeriesPrognosisModel)base.Content; }
+      set { base.Content = value; }
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content != null)
+        UpdateTreeChart();
+      else
+        viewHost.Content = null;
+    }
+
+    private void UpdateTreeChart() {
+      var simplifier = new SymbolicSimplifier();
+      var simplifiedTree = simplifier.Simplify(Content.SymbolicExpressionTree);
+      viewHost.Content = simplifiedTree;
+    }
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.designer.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.designer.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SimplifiedSymbolicTimeSeriesPrognosisModelView.designer.cs	(revision 4463)
@@ -0,0 +1,95 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  partial class SimplifiedSymbolicTimeSeriesPrognosisModelView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.simplifiedModelGroupBox = new System.Windows.Forms.GroupBox();
+      this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
+      this.simplifiedModelGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // simplifiedModelGroupBox
+      // 
+      this.simplifiedModelGroupBox.Controls.Add(this.viewHost);
+      this.simplifiedModelGroupBox.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.simplifiedModelGroupBox.Location = new System.Drawing.Point(0, 0);
+      this.simplifiedModelGroupBox.Name = "simplifiedModelGroupBox";
+      this.simplifiedModelGroupBox.Size = new System.Drawing.Size(352, 413);
+      this.simplifiedModelGroupBox.TabIndex = 0;
+      this.simplifiedModelGroupBox.TabStop = false;
+      this.simplifiedModelGroupBox.Text = "Simplified Symbolic Expression Model";
+      // 
+      // viewHost
+      // 
+      this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.viewHost.Content = null;
+      this.viewHost.Location = new System.Drawing.Point(6, 19);
+      this.viewHost.Name = "viewHost";
+      this.viewHost.ReadOnly = false;
+      this.viewHost.Size = new System.Drawing.Size(340, 388);
+      this.viewHost.TabIndex = 0;
+      this.viewHost.ViewType = null;
+      // 
+      // SimplifiedSymbolicExpressionModelView
+      // 
+      this.AllowDrop = true;
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.simplifiedModelGroupBox);
+      this.Name = "SimplifiedSymbolicExpressionModelView";
+      this.Size = new System.Drawing.Size(352, 413);
+      this.simplifiedModelGroupBox.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.GroupBox simplifiedModelGroupBox;
+    private HeuristicLab.MainForm.WindowsForms.ViewHost viewHost;
+
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.Designer.cs	(revision 4463)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  partial class SymbolicTimeSeriesPrognosisSolutionView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.btn_SimplifyModel = new System.Windows.Forms.Button();
+      this.tabControl.SuspendLayout();
+      this.dataTabPage.SuspendLayout();
+      this.modelTabPage.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // tabControl
+      // 
+      this.tabControl.Size = new System.Drawing.Size(380, 233);
+      // 
+      // dataTabPage
+      // 
+      this.dataTabPage.Size = new System.Drawing.Size(372, 207);
+      // 
+      // modelTabPage
+      // 
+      this.modelTabPage.Size = new System.Drawing.Size(372, 207);
+      // 
+      // modelViewHost
+      // 
+      this.modelViewHost.Size = new System.Drawing.Size(360, 195);
+      // 
+      // btn_SimplifyModel
+      // 
+      this.btn_SimplifyModel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.btn_SimplifyModel.Location = new System.Drawing.Point(3, 238);
+      this.btn_SimplifyModel.Name = "btn_SimplifyModel";
+      this.btn_SimplifyModel.Size = new System.Drawing.Size(376, 23);
+      this.btn_SimplifyModel.TabIndex = 2;
+      this.btn_SimplifyModel.Text = "Simplify Model";
+      this.btn_SimplifyModel.UseVisualStyleBackColor = true;
+      this.btn_SimplifyModel.Click += new System.EventHandler(this.btn_SimplifyModel_Click);
+      // 
+      // SymbolicRegressionSolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.btn_SimplifyModel);
+      this.Name = "SymbolicRegressionSolutionView";
+      this.Controls.SetChildIndex(this.btn_SimplifyModel, 0);
+      this.Controls.SetChildIndex(this.tabControl, 0);
+      this.tabControl.ResumeLayout(false);
+      this.dataTabPage.ResumeLayout(false);
+      this.modelTabPage.ResumeLayout(false);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button btn_SimplifyModel;
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.cs	(revision 4463)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views/3.3/SymbolicTimeSeriesPrognosisSolutionView.cs	(revision 4463)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Windows.Forms;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Symbolic;
+using HeuristicLab.Problems.DataAnalysis.MultiVariate.Views;
+
+namespace HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis.Views {
+  [Content(typeof(SymbolicTimeSeriesPrognosisSolution))]
+  [View("Symbolic Time Series Prognosis Solution View")]
+  public partial class SymbolicTimeSeriesPrognosisSolutionView : MultiVariateDataAnalysisSolutionView {
+    public SymbolicTimeSeriesPrognosisSolutionView() {
+      InitializeComponent();
+    }
+
+    protected new SymbolicTimeSeriesPrognosisSolution Content {
+      get { return (SymbolicTimeSeriesPrognosisSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    private void btn_SimplifyModel_Click(object sender, EventArgs e) {
+      InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView view = new InteractiveSymbolicTimeSeriesPrognosisSolutionSimplifierView();
+      view.Content = (SymbolicTimeSeriesPrognosisSolution)this.Content.Clone();
+      view.Show();
+    }
+  }
+}
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SymbolicTimeSeriesPrognosisModel.cs
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SymbolicTimeSeriesPrognosisModel.cs	(revision 4462)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.TimeSeriesPrognosis/3.3/Symbolic/SymbolicTimeSeriesPrognosisModel.cs	(revision 4463)
@@ -37,4 +37,7 @@
     [Storable]
     private ISymbolicTimeSeriesExpressionInterpreter interpreter;
+    public ISymbolicTimeSeriesExpressionInterpreter Interpreter {
+      get { return interpreter; }
+    }
     [Storable]
     private SymbolicExpressionTree tree;
Index: /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj
===================================================================
--- /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj	(revision 4462)
+++ /branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views/3.3/HeuristicLab.Problems.DataAnalysis.MultiVariate.Views-3.3.csproj	(revision 4463)
@@ -205,4 +205,7 @@
     </BootstrapperPackage>
   </ItemGroup>
+  <ItemGroup>
+    <Folder Include="Symbolic\" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
