Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneR.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneR.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/OneR.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -59,5 +60,5 @@
     }
 
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       var solution = CreateOneRSolution(Problem.ProblemData, MinBucketSizeParameter.Value.Value);
       Results.Add(new Result("OneR solution", "The 1R classifier.", solution));
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/ZeroR.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/ZeroR.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/BaselineClassifiers/ZeroR.cs	(revision 14542)
@@ -21,4 +21,5 @@
 
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -49,5 +50,5 @@
     }
 
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       var solution = CreateZeroRSolution(Problem.ProblemData);
       Results.Add(new Result("ZeroR solution", "The simplest possible classifier, ZeroR always predicts the majority class.", solution));
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/FixedDataAnalysisAlgorithm.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/FixedDataAnalysisAlgorithm.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/FixedDataAnalysisAlgorithm.cs	(revision 14542)
@@ -21,6 +21,4 @@
 
 using System;
-using System.Threading;
-using System.Threading.Tasks;
 using HeuristicLab.Common;
 using HeuristicLab.Optimization;
@@ -30,10 +28,5 @@
 namespace HeuristicLab.Algorithms.DataAnalysis {
   [StorableClass]
-  public abstract class FixedDataAnalysisAlgorithm<T> : Algorithm,
-    IDataAnalysisAlgorithm<T>,
-    IStorableContent
-    where T : class, IDataAnalysisProblem {
-    public string Filename { get; set; }
-
+  public abstract class FixedDataAnalysisAlgorithm<T> : BasicAlgorithm where T : class, IDataAnalysisProblem {
     #region Properties
     public override Type ProblemType {
@@ -44,87 +37,12 @@
       set { base.Problem = value; }
     }
-    [Storable]
-    private ResultCollection results;
-    public override ResultCollection Results {
-      get { return results; }
-    }
     #endregion
 
-    private DateTime lastUpdateTime;
+    public override bool SupportsPause { get { return false; } }
 
     [StorableConstructor]
     protected FixedDataAnalysisAlgorithm(bool deserializing) : base(deserializing) { }
-    protected FixedDataAnalysisAlgorithm(FixedDataAnalysisAlgorithm<T> original, Cloner cloner)
-      : base(original, cloner) {
-      results = cloner.Clone(original.Results);
-    }
-    public FixedDataAnalysisAlgorithm()
-      : base() {
-      results = new ResultCollection();
-    }
-
-    public override void Prepare() {
-      if (Problem != null) base.Prepare();
-      results.Clear();
-      OnPrepared();
-    }
-
-    public override void Start() {
-      base.Start();
-      var cancellationTokenSource = new CancellationTokenSource();
-
-      OnStarted();
-      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
-      task.ContinueWith(t => {
-        try {
-          t.Wait();
-        }
-        catch (AggregateException ex) {
-          try {
-            ex.Flatten().Handle(x => x is OperationCanceledException);
-          }
-          catch (AggregateException remaining) {
-            if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
-            else OnExceptionOccurred(remaining);
-          }
-        }
-        cancellationTokenSource.Dispose();
-        cancellationTokenSource = null;
-        OnStopped();
-      });
-    }
-    private void Run(object state) {
-      CancellationToken cancellationToken = (CancellationToken)state;
-      lastUpdateTime = DateTime.UtcNow;
-      System.Timers.Timer timer = new System.Timers.Timer(250);
-      timer.AutoReset = true;
-      timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
-      timer.Start();
-      try {
-        Run();
-      }
-      finally {
-        timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
-        timer.Stop();
-        ExecutionTime += DateTime.UtcNow - lastUpdateTime;
-      }
-
-      cancellationToken.ThrowIfCancellationRequested();
-    }
-    protected abstract void Run();
-    #region Events
-    protected override void OnProblemChanged() {
-      Problem.Reset += new EventHandler(Problem_Reset);
-      base.OnProblemChanged();
-    }
-    private void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) {
-      System.Timers.Timer timer = (System.Timers.Timer)sender;
-      timer.Enabled = false;
-      DateTime now = DateTime.UtcNow;
-      ExecutionTime += now - lastUpdateTime;
-      lastUpdateTime = now;
-      timer.Enabled = true;
-    }
-    #endregion
+    protected FixedDataAnalysisAlgorithm(FixedDataAnalysisAlgorithm<T> original, Cloner cloner) : base(original, cloner) { }
+    public FixedDataAnalysisAlgorithm() : base() { }
 
   }
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GBM/GradientBoostingRegressionAlgorithm.cs	(revision 14542)
@@ -44,13 +44,5 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 350)]
-  public class GradientBoostingRegressionAlgorithm : BasicAlgorithm {
-    public override Type ProblemType {
-      get { return typeof(IRegressionProblem); }
-    }
-
-    public new IRegressionProblem Problem {
-      get { return (IRegressionProblem)base.Problem; }
-      set { base.Problem = value; }
-    }
+  public class GradientBoostingRegressionAlgorithm : FixedDataAnalysisAlgorithm<IRegressionProblem> {
 
     #region ParameterNames
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithm.cs	(revision 14542)
@@ -38,13 +38,5 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 125)]
-  public class GradientBoostedTreesAlgorithm : BasicAlgorithm {
-    public override Type ProblemType {
-      get { return typeof(IRegressionProblem); }
-    }
-    public new IRegressionProblem Problem {
-      get { return (IRegressionProblem)base.Problem; }
-      set { base.Problem = value; }
-    }
-
+  public class GradientBoostedTreesAlgorithm : FixedDataAnalysisAlgorithm<IRegressionProblem> {
     #region ParameterNames
     private const string IterationsParameterName = "Iterations";
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearDiscriminantAnalysis.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -59,5 +60,5 @@
 
     #region Fisher LDA
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       var solution = CreateLinearDiscriminantAnalysisSolution(Problem.ProblemData);
       Results.Add(new Result(LinearDiscriminantAnalysisSolutionResultName, "The linear discriminant analysis.", solution));
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/LinearRegression.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -60,5 +61,5 @@
 
     #region linear regression
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, cvRmsError;
       var solution = CreateLinearRegressionSolution(Problem.ProblemData, out rmsError, out cvRmsError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/Linear/MultinomialLogitClassification.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -57,5 +58,5 @@
 
     #region logit classification
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, relClassError;
       var solution = CreateLogitClassificationSolution(Problem.ProblemData, out rmsError, out relClassError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionAlgorithm.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionAlgorithm.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/MctsSymbolicRegression/MctsSymbolicRegressionAlgorithm.cs	(revision 14542)
@@ -38,12 +38,5 @@
   [StorableClass]
   [Creatable(CreatableAttribute.Categories.DataAnalysisRegression, Priority = 250)]
-  public class MctsSymbolicRegressionAlgorithm : BasicAlgorithm {
-    public override Type ProblemType {
-      get { return typeof(IRegressionProblem); }
-    }
-    public new IRegressionProblem Problem {
-      get { return (IRegressionProblem)base.Problem; }
-      set { base.Problem = value; }
-    }
+  public class MctsSymbolicRegressionAlgorithm : FixedDataAnalysisAlgorithm<IRegressionProblem> {
 
     #region ParameterNames
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourClassification.cs	(revision 14542)
@@ -22,4 +22,5 @@
 using System;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -91,5 +92,5 @@
 
     #region nearest neighbour
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double[] weights = null;
       if (Weights != null) weights = Weights.CloneAsArray();
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourRegression.cs	(revision 14542)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -92,5 +93,5 @@
 
     #region nearest neighbour
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double[] weights = null;
       if (Weights != null) weights = Weights.CloneAsArray();
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkClassification.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -168,5 +169,5 @@
 
     #region neural network
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, avgRelError, relClassError;
       var solution = CreateNeuralNetworkClassificationSolution(Problem.ProblemData, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError, out relClassError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleClassification.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -154,5 +155,5 @@
 
     #region neural network ensemble
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, avgRelError, relClassError;
       var solution = CreateNeuralNetworkEnsembleClassificationSolution(Problem.ProblemData, EnsembleSize, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError, out relClassError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleRegression.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -154,5 +155,5 @@
 
     #region neural network ensemble
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, avgRelError;
       var solution = CreateNeuralNetworkEnsembleRegressionSolution(Problem.ProblemData, EnsembleSize, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkRegression.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -170,5 +171,5 @@
 
     #region neural network
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, avgRelError;
       var solution = CreateNeuralNetworkRegressionSolution(Problem.ProblemData, HiddenLayers, NodesInFirstHiddenLayer, NodesInSecondHiddenLayer, Decay, Restarts, out rmsError, out avgRelError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NonlinearRegression/NonlinearRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NonlinearRegression/NonlinearRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/NonlinearRegression/NonlinearRegression.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Analysis;
 using HeuristicLab.Common;
@@ -158,5 +159,5 @@
 
     #region nonlinear regression
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       IRegressionSolution bestSolution = null;
       if (InitializeParametersRandomly) {
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestClassification.cs	(revision 14542)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -132,5 +133,5 @@
 
     #region random forest
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, relClassificationError, outOfBagRmsError, outOfBagRelClassificationError;
       if (SetSeedRandomly) Seed = new System.Random().Next();
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestRegression.cs	(revision 14542)
@@ -20,4 +20,5 @@
 #endregion
 
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -131,5 +132,5 @@
 
     #region random forest
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, avgRelError, outOfBagRmsError, outOfBagAvgRelError;
       if (SetSeedRandomly) Seed = new System.Random().Next();
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorClassification.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -143,5 +144,5 @@
 
     #region support vector classification
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       IClassificationProblemData problemData = Problem.ProblemData;
       IEnumerable<string> selectedInputVariables = problemData.AllowedInputVariables;
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorRegression.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -151,5 +152,5 @@
 
     #region support vector regression
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       IRegressionProblemData problemData = Problem.ProblemData;
       IEnumerable<string> selectedInputVariables = problemData.AllowedInputVariables;
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/TimeSeries/AutoregressiveModeling.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/TimeSeries/AutoregressiveModeling.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/TimeSeries/AutoregressiveModeling.cs	(revision 14542)
@@ -22,4 +22,5 @@
 using System;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -63,5 +64,5 @@
     }
 
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       double rmsError, cvRmsError;
       var solution = CreateAutoRegressiveSolution(Problem.ProblemData, TimeOffset, out rmsError, out cvRmsError);
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClustering.cs	(revision 14542)
@@ -23,4 +23,5 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Threading;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -77,5 +78,5 @@
 
     #region k-Means clustering
-    protected override void Run() {
+    protected override void Run(CancellationToken cancellationToken) {
       var solution = CreateKMeansSolution(Problem.ProblemData, K.Value, Restarts.Value);
       Results.Add(new Result(KMeansSolutionResultName, "The k-Means clustering solution.", solution));
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/HillClimber.cs	(revision 14542)
@@ -48,8 +48,13 @@
 
     private const string IterationsParameterName = "Iterations";
+    private const string BestQualityResultName = "Best quality";
+    private const string IterationsResultName = "Iterations";
 
     public override Type ProblemType {
       get { return typeof(BinaryProblem); }
     }
+
+    public override bool SupportsPause { get { return false; } }
+
     public new BinaryProblem Problem {
       get { return (BinaryProblem)base.Problem; }
@@ -65,4 +70,15 @@
       set { IterationsParameter.Value.Value = value; }
     }
+
+    #region ResultsProperties
+    private double ResultsBestQuality {
+      get { return ((DoubleValue)Results[BestQualityResultName].Value).Value; }
+      set { ((DoubleValue)Results[BestQualityResultName].Value).Value = value; }
+    }
+    private int ResultsIterations {
+      get { return ((IntValue)Results[IterationsResultName].Value).Value; }
+      set { ((IntValue)Results[IterationsResultName].Value).Value = value; }
+    }
+    #endregion
 
     [StorableConstructor]
@@ -80,8 +96,15 @@
       Parameters.Add(new FixedValueParameter<IntValue>(IterationsParameterName, "", new IntValue(100)));
     }
+
+
+    protected override void Initialize(CancellationToken cancellationToken) {
+      Results.Add(new Result(BestQualityResultName, new DoubleValue(double.NaN)));
+      Results.Add(new Result(IterationsResultName, new IntValue(0)));
+      base.Initialize(cancellationToken);
+    }
     protected override void Run(CancellationToken cancellationToken) {
-      var BestQuality = new DoubleValue(double.NaN);
-      Results.Add(new Result("Best quality", BestQuality));
-      for (int iteration = 0; iteration < Iterations; iteration++) {
+      while (ResultsIterations < Iterations) {
+        cancellationToken.ThrowIfCancellationRequested();
+
         var solution = new BinaryVector(Problem.Length);
         for (int i = 0; i < solution.Length; i++) {
@@ -92,7 +115,9 @@
 
         fitness = ImproveToLocalOptimum(Problem, solution, fitness, random);
-        if (double.IsNaN(BestQuality.Value) || Problem.IsBetter(fitness, BestQuality.Value)) {
-          BestQuality.Value = fitness;
+        if (double.IsNaN(ResultsBestQuality) || Problem.IsBetter(fitness, ResultsBestQuality)) {
+          ResultsBestQuality = fitness;
         }
+
+        ResultsIterations++;
       }
     }
Index: branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/ParameterlessPopulationPyramid.cs	(revision 14542)
@@ -56,5 +56,5 @@
 
     // Tracks all solutions in Pyramid for quick membership checks
-    private HashSet<BinaryVector> seen = new HashSet<BinaryVector>(new EnumerableBoolEqualityComparer());
+    private readonly HashSet<BinaryVector> seen = new HashSet<BinaryVector>(new EnumerableBoolEqualityComparer());
 
     #region ParameterNames
@@ -152,4 +152,6 @@
     }
     #endregion
+
+    public override bool SupportsPause { get { return true; } }
 
     [StorableConstructor]
@@ -213,5 +215,5 @@
     }
 
-    protected override void Run(CancellationToken cancellationToken) {
+    protected override void Initialize(CancellationToken cancellationToken) {
       // Set up the algorithm
       if (SetSeedRandomly) Seed = new System.Random().Next();
@@ -242,10 +244,15 @@
       Results.Add(new Result("Stored Solutions", table));
 
+      base.Initialize(cancellationToken);
+    }
+
+    protected override void Run(CancellationToken cancellationToken) {
       // Loop until iteration limit reached or canceled.
-      for (ResultsIterations = 0; ResultsIterations < MaximumIterations; ResultsIterations++) {
+      while (ResultsIterations < MaximumIterations) {
         double fitness = double.NaN;
 
         try {
           fitness = iterate();
+          ResultsIterations++;
           cancellationToken.ThrowIfCancellationRequested();
         } finally {
Index: branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/DataTableControl.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/DataTableControl.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/DataTableControl.cs	(revision 14542)
@@ -27,21 +27,14 @@
 using System.Windows.Forms.DataVisualization.Charting;
 using HeuristicLab.Collections;
+using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Analysis.Views {
-  public partial class DataTableControl : UserControl {
+  public partial class DataTableControl : AsynchronousContentView {
     protected List<Series> invisibleSeries;
     protected Dictionary<IObservableList<double>, DataRow> valuesRowsTable;
 
-    private DataTable content;
-    public DataTable Content {
-      get { return content; }
-      set {
-        if (value == content) return;
-        if (content != null) DeregisterContentEvents();
-        content = value;
-        if (content != null) RegisterContentEvents();
-        OnContentChanged();
-        SetEnabledStateOfControls();
-      }
+    public new DataTable Content {
+      get { return (DataTable)base.Content; }
+      set { base.Content = value; }
     }
 
@@ -56,5 +49,5 @@
 
     #region Event Handler Registration
-    protected virtual void DeregisterContentEvents() {
+    protected override void DeregisterContentEvents() {
       foreach (DataRow row in Content.Rows)
         DeregisterDataRowEvents(row);
@@ -65,5 +58,5 @@
       Content.Rows.CollectionReset -= new CollectionItemsChangedEventHandler<DataRow>(Rows_CollectionReset);
     }
-    protected virtual void RegisterContentEvents() {
+    protected override void RegisterContentEvents() {
       Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged);
       Content.Rows.ItemsAdded += new CollectionItemsChangedEventHandler<DataRow>(Rows_ItemsAdded);
@@ -95,5 +88,5 @@
     #endregion
 
-    protected virtual void OnContentChanged() {
+    protected override void OnContentChanged() {
       invisibleSeries.Clear();
       chart.Titles[0].Text = string.Empty;
@@ -111,5 +104,5 @@
     }
 
-    protected virtual void SetEnabledStateOfControls() {
+    protected override void SetEnabledStateOfControls() {
       chart.Enabled = Content != null;
     }
@@ -541,7 +534,10 @@
       if (!row.Values.Any()) return;
 
+      var validValues = histogramRows.SelectMany(r => r.Values).Where(x => !IsInvalidValue(x)).ToList();
+      if (!validValues.Any()) return;
+
       int bins = histogramRows.Max(r => r.VisualProperties.Bins);
-      decimal minValue = (decimal)histogramRows.Min(r => r.Values.Min());
-      decimal maxValue = (decimal)histogramRows.Max(r => r.Values.Max());
+      decimal minValue = (decimal)validValues.Min();
+      decimal maxValue = (decimal)validValues.Max();
       decimal intervalWidth = (maxValue - minValue) / bins;
       if (intervalWidth < 0) return;
Index: branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Analysis.Views/3.3/ScatterPlotControl.cs	(revision 14542)
@@ -29,7 +29,8 @@
 using HeuristicLab.Collections;
 using HeuristicLab.Common;
+using HeuristicLab.MainForm.WindowsForms;
 
 namespace HeuristicLab.Analysis.Views {
-  public partial class ScatterPlotControl : UserControl {
+  public partial class ScatterPlotControl : AsynchronousContentView {
     protected List<Series> invisibleSeries;
     protected Dictionary<IObservableList<Point2D<double>>, ScatterPlotDataRow> pointsRowsTable;
@@ -37,15 +38,7 @@
     private double xMin, xMax, yMin, yMax;
 
-    private ScatterPlot content;
-    public ScatterPlot Content {
-      get { return content; }
-      set {
-        if (value == content) return;
-        if (content != null) DeregisterContentEvents();
-        content = value;
-        if (content != null) RegisterContentEvents();
-        OnContentChanged();
-        SetEnabledStateOfControls();
-      }
+    public new ScatterPlot Content {
+      get { return (ScatterPlot)base.Content; }
+      set { base.Content = value; }
     }
 
@@ -61,5 +54,5 @@
 
     #region Event Handler Registration
-    protected virtual void DeregisterContentEvents() {
+    protected override void DeregisterContentEvents() {
       foreach (ScatterPlotDataRow row in Content.Rows)
         DeregisterScatterPlotDataRowEvents(row);
@@ -70,5 +63,5 @@
       Content.Rows.CollectionReset -= new CollectionItemsChangedEventHandler<ScatterPlotDataRow>(Rows_CollectionReset);
     }
-    protected virtual void RegisterContentEvents() {
+    protected override void RegisterContentEvents() {
       Content.VisualPropertiesChanged += new EventHandler(Content_VisualPropertiesChanged);
       Content.Rows.ItemsAdded += new CollectionItemsChangedEventHandler<ScatterPlotDataRow>(Rows_ItemsAdded);
@@ -98,5 +91,5 @@
     #endregion
 
-    protected virtual void OnContentChanged() {
+    protected override void OnContentChanged() {
       invisibleSeries.Clear();
       chart.Titles[0].Text = string.Empty;
@@ -114,5 +107,5 @@
     }
 
-    protected virtual void SetEnabledStateOfControls() {
+    protected override void SetEnabledStateOfControls() {
       chart.Enabled = Content != null;
     }
@@ -508,4 +501,5 @@
 
     private void FillSeriesWithRowValues(Series series, ScatterPlotDataRow row) {
+      bool zerosOnly = true;
       for (int i = 0; i < row.Points.Count; i++) {
         var value = row.Points[i];
@@ -518,5 +512,9 @@
         }
         series.Points.Add(point);
-      }
+        if (value.X != 0.0f)
+          zerosOnly = false;
+      }
+      if (zerosOnly) // if all x-values are zero, the x-values are interpreted as 1, 2, 3, ...
+        series.Points.Add(new DataPoint(1, 1) { IsEmpty = true });
       double correlation = Correlation(row.Points);
       series.LegendToolTip = string.Format("Correlation (R²) = {0:G4}", correlation * correlation);
Index: branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.DataPreprocessing.Views/3.4/HeuristicLab.DataPreprocessing.Views-3.4.csproj	(revision 14542)
@@ -98,4 +98,10 @@
   <ItemGroup>
     <Compile Include="DataPreprocessingMenuItem.cs" />
+    <Compile Include="PreprocessingCheckedVariablesView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="PreprocessingCheckedVariablesView.Designer.cs">
+      <DependentUpon>PreprocessingCheckedVariablesView.cs</DependentUpon>
+    </Compile>
     <Compile Include="PreprocessingFeatureCorrelationView.cs">
       <SubType>UserControl</SubType>
@@ -165,5 +171,7 @@
       <DependentUpon>FilterView.cs</DependentUpon>
     </Compile>
-    <Compile Include="ScatterPlotMultiView.cs" />
+    <Compile Include="ScatterPlotMultiView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="ScatterPlotMultiView.Designer.cs">
       <DependentUpon>ScatterPlotMultiView.cs</DependentUpon>
@@ -181,9 +189,13 @@
       <DependentUpon>SearchAndReplaceDialog.cs</DependentUpon>
     </Compile>
-    <Compile Include="HistogramView.cs" />
+    <Compile Include="HistogramView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="HistogramView.Designer.cs">
       <DependentUpon>HistogramView.cs</DependentUpon>
     </Compile>
-    <Compile Include="LineChartView.cs" />
+    <Compile Include="LineChartView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="LineChartView.Designer.cs">
       <DependentUpon>LineChartView.cs</DependentUpon>
@@ -196,5 +208,7 @@
     </Compile>
     <Compile Include="Plugin.cs" />
-    <Compile Include="PreprocessingChartView.cs" />
+    <Compile Include="PreprocessingChartView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
     <Compile Include="PreprocessingChartView.Designer.cs">
       <DependentUpon>PreprocessingChartView.cs</DependentUpon>
Index: branches/symbreg-factors-2650/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.MainForm.WindowsForms/3.3/Views/View.cs	(revision 14542)
@@ -34,4 +34,5 @@
       this.closeReason = CloseReason.None;
       this.readOnly = false;
+
       if (ViewAttribute.HasViewAttribute(this.GetType()))
         this.Caption = ViewAttribute.GetViewName(this.GetType());
@@ -45,5 +46,5 @@
       set {
         if (InvokeRequired) {
-          Action<string> action = delegate(string s) { this.Caption = s; };
+          Action<string> action = delegate (string s) { this.Caption = s; };
           Invoke(action, value);
         } else {
@@ -61,5 +62,5 @@
       set {
         if (InvokeRequired) {
-          Action<bool> action = delegate(bool b) { this.ReadOnly = b; };
+          Action<bool> action = delegate (bool b) { this.ReadOnly = b; };
           Invoke(action, value);
         } else {
@@ -94,6 +95,8 @@
 
     protected override void OnEnabledChanged(EventArgs e) {
+      SuspendRepaint();
       base.OnEnabledChanged(e);
       if (Enabled) SetEnabledStateOfControls();
+      ResumeRepaint(true);
     }
 
Index: branches/symbreg-factors-2650/HeuristicLab.Optimization.Views/3.3/BasicAlgorithmView.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Optimization.Views/3.3/BasicAlgorithmView.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Optimization.Views/3.3/BasicAlgorithmView.cs	(revision 14542)
@@ -36,10 +36,10 @@
     protected override void SetEnabledStateOfControls() {
       base.SetEnabledStateOfControls();
-      pauseButton.Enabled = false;
+      pauseButton.Enabled &= Content != null && Content.SupportsPause;
     }
 
     protected override void SetEnabledStateOfExecutableButtons() {
       base.SetEnabledStateOfExecutableButtons();
-      pauseButton.Enabled = false;
+      pauseButton.Enabled &= Content != null && Content.SupportsPause;
     }
   }
Index: branches/symbreg-factors-2650/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Optimization/3.3/Algorithms/BasicAlgorithm.cs	(revision 14542)
@@ -24,4 +24,5 @@
 using System.Threading.Tasks;
 using HeuristicLab.Common;
+using HeuristicLab.Core;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
@@ -29,8 +30,16 @@
   [StorableClass]
   public abstract class BasicAlgorithm : Algorithm, IStorableContent {
+
+    private bool pausePending;
+    private DateTime lastUpdateTime;
+
     public string Filename { get; set; }
 
+    public abstract bool SupportsPause { get; }
+
     [Storable]
-    private ResultCollection results;
+    private bool initialized;
+    [Storable]
+    private readonly ResultCollection results;
     public override ResultCollection Results {
       get { return results; }
@@ -58,4 +67,5 @@
       base.Prepare();
       results.Clear();
+      initialized = false;
       OnPrepared();
     }
@@ -64,14 +74,17 @@
       base.Start();
       CancellationTokenSource = new CancellationTokenSource();
+      pausePending = false;
+      OnStarted();
 
-      OnStarted();
-      Task task = Task.Factory.StartNew(Run, cancellationTokenSource.Token, cancellationTokenSource.Token);
+      Task task = Task.Factory.StartNew(Run, CancellationTokenSource.Token, CancellationTokenSource.Token);
       task.ContinueWith(t => {
         try {
           t.Wait();
-        } catch (AggregateException ex) {
+        }
+        catch (AggregateException ex) {
           try {
             ex.Flatten().Handle(x => x is OperationCanceledException);
-          } catch (AggregateException remaining) {
+          }
+          catch (AggregateException remaining) {
             if (remaining.InnerExceptions.Count == 1) OnExceptionOccurred(remaining.InnerExceptions[0]);
             else OnExceptionOccurred(remaining);
@@ -80,10 +93,18 @@
         CancellationTokenSource.Dispose();
         CancellationTokenSource = null;
-        OnStopped();
+        if (pausePending) OnPaused();
+        else OnStopped();
       });
     }
 
     public override void Pause() {
-      throw new NotSupportedException("Pause is not supported in basic algorithms.");
+      // CancellationToken.ThrowIfCancellationRequested() must be called from within the Run method, otherwise pause does nothing
+      // alternatively check the IsCancellationRequested property of the cancellation token
+      if (!SupportsPause)
+        throw new NotSupportedException("Pause is not supported by this algorithm.");
+
+      base.Pause();
+      pausePending = true;
+      CancellationTokenSource.Cancel();
     }
 
@@ -92,9 +113,8 @@
       // alternatively check the IsCancellationRequested property of the cancellation token
       base.Stop();
-      CancellationTokenSource.Cancel();
+      if (ExecutionState == ExecutionState.Paused) OnStopped();
+      else CancellationTokenSource.Cancel();
     }
 
-
-    private DateTime lastUpdateTime;
     private void Run(object state) {
       CancellationToken cancellationToken = (CancellationToken)state;
@@ -105,6 +125,10 @@
       timer.Start();
       try {
+        if (!initialized)
+          Initialize(cancellationToken);
+        initialized = true;
         Run(cancellationToken);
-      } finally {
+      }
+      finally {
         timer.Elapsed -= new System.Timers.ElapsedEventHandler(timer_Elapsed);
         timer.Stop();
@@ -113,4 +137,5 @@
     }
 
+    protected virtual void Initialize(CancellationToken cancellationToken) { }
     protected abstract void Run(CancellationToken cancellationToken);
 
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4.csproj	(revision 14542)
@@ -129,4 +129,5 @@
     <Compile Include="Plugin.cs" />
     <Compile Include="SingleObjective\ConstantOptimizationAnalyzer.cs" />
+    <Compile Include="SingleObjective\Evaluators\SymbolicRegressionVarianceModelEvaluator.cs" />
     <Compile Include="SingleObjective\Evaluators\SymbolicRegressionMeanRelativeErrorEvaluator.cs" />
     <Compile Include="SingleObjective\SymbolicRegressionSolutionsAnalyzer.cs" />
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionVarianceModelEvaluator.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionVarianceModelEvaluator.cs	(revision 14542)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression/3.4/SingleObjective/Evaluators/SymbolicRegressionVarianceModelEvaluator.cs	(revision 14542)
@@ -0,0 +1,90 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Regression {
+  [Item("Variance Model Evaluator", "Can be used for modeling variance of a variable. Assumes that the variable values are sampled from a zero mean Gaussian. Use a model for the target variable to calculate the residuals. In a second step use the residuals as the target variable and use this evaluator to create the model for the conditional variance.")]
+  [StorableClass]
+  public class SymbolicRegressionVarianceModelEvaluator : SymbolicRegressionSingleObjectiveEvaluator {
+    [StorableConstructor]
+    protected SymbolicRegressionVarianceModelEvaluator(bool deserializing) : base(deserializing) { }
+    protected SymbolicRegressionVarianceModelEvaluator(SymbolicRegressionVarianceModelEvaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SymbolicRegressionVarianceModelEvaluator(this, cloner);
+    }
+
+    public SymbolicRegressionVarianceModelEvaluator() : base() { }
+
+    public override bool Maximization { get { return true; } }
+
+    public override IOperation InstrumentedApply() {
+      var solution = SymbolicExpressionTreeParameter.ActualValue;
+      IEnumerable<int> rows = GenerateRowsToEvaluate();
+
+      double quality = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, solution, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, ProblemDataParameter.ActualValue, rows);
+      QualityParameter.ActualValue = new DoubleValue(quality);
+
+      return base.InstrumentedApply();
+    }
+
+    public static double Calculate(ISymbolicDataAnalysisExpressionTreeInterpreter interpreter, ISymbolicExpressionTree solution, double lowerEstimationLimit, double upperEstimationLimit, IRegressionProblemData problemData, IEnumerable<int> rows) {
+      IEnumerable<double> estimatedValues = interpreter.GetSymbolicExpressionTreeValues(solution, problemData.Dataset, rows);
+      IEnumerable<double> targetValues = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, rows);
+      IEnumerable<double> boundedEstimatedValues = estimatedValues.LimitToRange(lowerEstimationLimit, upperEstimationLimit);
+
+      // assumes residuals follow a zero-mean Gaussian distribution where the variance is a function of the inputs
+
+      // boundedEstimatedValues is the estimator for std.dev.
+      // log likelihood for N(target_i | 0, boundesEstimatedValues)
+      var l2pi = Math.Log(2.0 * Math.PI);
+      var ll = -0.5 *
+               boundedEstimatedValues.Zip(targetValues, (s, t) =>
+                 +l2pi
+                 + Math.Log(s * s)
+                 + (t * t) / (s * s)
+                 ).Sum();
+
+      return ll;
+    }
+
+    public override double Evaluate(IExecutionContext context, ISymbolicExpressionTree tree, IRegressionProblemData problemData, IEnumerable<int> rows) {
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = context;
+      EstimationLimitsParameter.ExecutionContext = context;
+
+      double ll = Calculate(SymbolicDataAnalysisTreeInterpreterParameter.ActualValue, tree, EstimationLimitsParameter.ActualValue.Lower, EstimationLimitsParameter.ActualValue.Upper, problemData, rows);
+
+      SymbolicDataAnalysisTreeInterpreterParameter.ExecutionContext = null;
+      EstimationLimitsParameter.ExecutionContext = null;
+
+      return ll;
+    }
+  }
+}
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj	(revision 14542)
@@ -428,4 +428,10 @@
     <Compile Include="Solution Views\TimeSeriesPrognosisSolutionView.Designer.cs">
       <DependentUpon>TimeSeriesPrognosisSolutionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisResidualsLineChartView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisResidualsLineChartView.Designer.cs">
+      <DependentUpon>TimeSeriesPrognosisResidualsLineChartView.cs</DependentUpon>
     </Compile>
     <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisLineChartView.cs">
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionLineChartViewBase.cs	(revision 14542)
@@ -253,5 +253,5 @@
     }
 
-    private void ToggleSeriesData(Series series) {
+    public void ToggleSeriesData(Series series) {
       if (series.Points.Count > 0) {  //checks if series is shown
         if (this.chart.Series.Any(s => s != series && s.Points.Count > 0)) {
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionResidualsLineChartView.cs	(revision 14542)
@@ -43,5 +43,5 @@
     }
 
-    private void CalcResiduals(int[] idx, double[] x) {
+    protected void CalcResiduals(int[] idx, double[] x) {
       var problemData = Content.ProblemData;
       var target = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, idx).ToArray();
@@ -88,4 +88,5 @@
         base.chart.Series[RegressionSolutionLineChartView.ESTIMATEDVALUES_ALL_SERIES_NAME].ChartType = SeriesChartType.RangeColumn;
         base.chart.Series[RegressionSolutionLineChartView.ESTIMATEDVALUES_ALL_SERIES_NAME].Points.DataBindXY(idx, res.Select(_ => 0.0).ToArray(), res);
+        ToggleSeriesData(base.chart.Series[RegressionSolutionLineChartView.ESTIMATEDVALUES_ALL_SERIES_NAME]); // don't show by default
       }
     }
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.Designer.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.Designer.cs	(revision 14542)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.Designer.cs	(revision 14542)
@@ -0,0 +1,52 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Views {
+  partial class TimeSeriesPrognosisResidualsLineChartView {
+    /// <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() {
+
+    }
+
+    #endregion
+
+  }
+}
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs	(revision 14542)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisResidualsLineChartView.cs	(revision 14542)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Linq;
+using System.Windows.Forms.DataVisualization.Charting;
+using HeuristicLab.MainForm;
+
+
+namespace HeuristicLab.Problems.DataAnalysis.Views {
+  [View("Residuals Line Chart (prognosis)")]
+  [Content(typeof(ITimeSeriesPrognosisSolution))]
+  public partial class TimeSeriesPrognosisResidualsLineChartView : RegressionSolutionResidualsLineChartView, IDataAnalysisSolutionEvaluationView {
+
+    public new ITimeSeriesPrognosisSolution Content {
+      get { return (ITimeSeriesPrognosisSolution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public TimeSeriesPrognosisResidualsLineChartView()
+      : base() {
+      InitializeComponent();
+    }                                                                                                      
+
+    protected override void GetTestSeries(out int[] idx, out double[] y) {
+      idx = Content.ProblemData.TestIndices.ToArray();
+      y = Content.PrognosedTestValues.ToArray();
+      CalcResiduals(idx, y);
+    }
+
+    protected override void GetAllValuesSeries(out int[] idx, out double[] y) {
+      // not supported
+      idx = new int[0];
+      y = new double[0];
+    }                                                                                     
+  }
+}
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 14542)
@@ -41,16 +41,37 @@
 
     #region parameter properites
+    //mkommend: inserted parameter caching due to performance reasons
+    private IFixedValueParameter<Dataset> datasetParameter;
     public IFixedValueParameter<Dataset> DatasetParameter {
-      get { return (IFixedValueParameter<Dataset>)Parameters[DatasetParameterName]; }
-    }
+      get {
+        if (datasetParameter == null) datasetParameter = (IFixedValueParameter<Dataset>)Parameters[DatasetParameterName];
+        return datasetParameter;
+      }
+    }
+
+    private IFixedValueParameter<ReadOnlyCheckedItemList<StringValue>> inputVariablesParameter;
     public IFixedValueParameter<ReadOnlyCheckedItemList<StringValue>> InputVariablesParameter {
-      get { return (IFixedValueParameter<ReadOnlyCheckedItemList<StringValue>>)Parameters[InputVariablesParameterName]; }
-    }
+      get {
+        if (inputVariablesParameter == null) inputVariablesParameter = (IFixedValueParameter<ReadOnlyCheckedItemList<StringValue>>)Parameters[InputVariablesParameterName];
+        return inputVariablesParameter;
+      }
+    }
+
+    private IFixedValueParameter<IntRange> trainingPartitionParameter;
     public IFixedValueParameter<IntRange> TrainingPartitionParameter {
-      get { return (IFixedValueParameter<IntRange>)Parameters[TrainingPartitionParameterName]; }
-    }
+      get {
+        if (trainingPartitionParameter == null) trainingPartitionParameter = (IFixedValueParameter<IntRange>)Parameters[TrainingPartitionParameterName];
+        return trainingPartitionParameter;
+      }
+    }
+
+    private IFixedValueParameter<IntRange> testPartitionParameter;
     public IFixedValueParameter<IntRange> TestPartitionParameter {
-      get { return (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName]; }
-    }
+      get {
+        if (testPartitionParameter == null) testPartitionParameter = (IFixedValueParameter<IntRange>)Parameters[TestPartitionParameterName];
+        return testPartitionParameter;
+      }
+    }
+
     public IFixedValueParameter<ReadOnlyItemList<ITransformation>> TransformationsParameter {
       get { return (IFixedValueParameter<ReadOnlyItemList<ITransformation>>)Parameters[TransformationsParameterName]; }
@@ -102,6 +123,6 @@
     public virtual bool IsTrainingSample(int index) {
       return index >= 0 && index < Dataset.Rows &&
-        TrainingPartition.Start <= index && index < TrainingPartition.End &&
-        (index < TestPartition.Start || TestPartition.End <= index);
+             TrainingPartition.Start <= index && index < TrainingPartition.End &&
+             (index < TestPartition.Start || TestPartition.End <= index);
     }
 
@@ -214,8 +235,4 @@
         InputVariables.SetItemCheckedState(inputVariable, variable != null && data.InputVariables.ItemChecked(variable));
       }
-
-      TrainingPartition.Start = TrainingPartition.End = 0;
-      TestPartition.Start = 0;
-      TestPartition.End = Dataset.Rows;
     }
   }
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBInstanceProvider.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBInstanceProvider.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBInstanceProvider.cs	(revision 14542)
@@ -67,9 +67,5 @@
           var parser = new JSSPORLIBParser();
           parser.Parse(stream);
-          var instance = Load(parser);
-          instance.Name = id.Name;
-          instance.Description = id.Description;
-
-          return instance;
+          return Load(parser);
         }
       }
@@ -82,12 +78,11 @@
       var parser = new JSSPORLIBParser();
       parser.Parse(path);
-      var instance = Load(parser);
-      instance.Name = Path.GetFileName(path);
-      instance.Description = "Loaded from file \"" + path + "\" on " + DateTime.Now.ToString();
-      return instance;
+      return Load(parser);
     }
 
     private JSSPData Load(JSSPORLIBParser parser) {
       var instance = new JSSPData {
+        Name = parser.Name,
+        Description = parser.Description,
         Jobs = parser.Jobs,
         Resources = parser.Resources,
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBParser.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBParser.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.Scheduling/3.3/JSSPORLIBParser.cs	(revision 14542)
@@ -24,4 +24,5 @@
 using System.IO;
 using System.Linq;
+using System.Text;
 
 namespace HeuristicLab.Problems.Instances.Scheduling {
@@ -53,5 +54,5 @@
 
     public void Export(string file) {
-      using (Stream stream = new FileStream(file, FileMode.Open, FileAccess.Read)) {
+      using (Stream stream = new FileStream(file, FileMode.Create, FileAccess.ReadWrite)) {
         Export(stream);
       }
@@ -65,48 +66,55 @@
     /// </remarks>
     /// <param name="stream">The stream to read data from.</param>
-    /// <returns>True if the file was successfully read or false otherwise.</returns>
     public void Parse(Stream stream) {
-      var reader = new StreamReader(stream);
-      Name = reader.ReadLine().Trim();
-      Description = reader.ReadLine().Trim();
-      var delim = new char[] { ' ', '\t' };
+      using (var reader = new StreamReader(stream, Encoding.UTF8, true, 4092, true)) {
+        Name = reader.ReadLine().Trim();
+        Description = reader.ReadLine().Trim();
+        var delim = new char[] {' ', '\t'};
 
-      var info = reader.ReadLine().Split(delim, StringSplitOptions.RemoveEmptyEntries);
-      Jobs = int.Parse(info[0]);
-      Resources = int.Parse(info[1]);
-      ProcessingTimes = new double[Jobs, Resources];
-      Demands = new int[Jobs, Resources];
+        var info = reader.ReadLine().Split(delim, StringSplitOptions.RemoveEmptyEntries);
+        Jobs = int.Parse(info[0]);
+        Resources = int.Parse(info[1]);
+        ProcessingTimes = new double[Jobs, Resources];
+        Demands = new int[Jobs, Resources];
 
-      for (int k = 0; k < Jobs; k++) {
-        if (reader.EndOfStream) throw new InvalidDataException("Unexpected End of Stream.");
-        var valLine = reader.ReadLine();
-        while (String.IsNullOrWhiteSpace(valLine)) valLine = reader.ReadLine();
-        var vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
-        if (vals.Length > 2 * Resources) {
-          if (DueDates == null) DueDates = new double[Jobs];
-          DueDates[k] = double.Parse(vals.Last(), CultureInfo.InvariantCulture.NumberFormat);
-        }
+        for (int k = 0; k < Jobs; k++) {
+          if (reader.EndOfStream) throw new InvalidDataException("Unexpected End of Stream.");
+          var valLine = reader.ReadLine();
+          while (String.IsNullOrWhiteSpace(valLine)) valLine = reader.ReadLine();
+          var vals = valLine.Split(delim, StringSplitOptions.RemoveEmptyEntries);
+          if (vals.Length > 2 * Resources) {
+            if (DueDates == null) DueDates = new double[Jobs];
+            DueDates[k] = double.Parse(vals.Last(), CultureInfo.InvariantCulture.NumberFormat);
+          }
 
-        for (int i = 0; i < Resources; i++) {
-          Demands[k, i] = int.Parse(vals[2 * i]);
-          ProcessingTimes[k, i] = double.Parse(vals[2 * i + 1], CultureInfo.InvariantCulture.NumberFormat);
+          for (int i = 0; i < Resources; i++) {
+            Demands[k, i] = int.Parse(vals[2 * i]);
+            ProcessingTimes[k, i] = double.Parse(vals[2 * i + 1], CultureInfo.InvariantCulture.NumberFormat);
+          }
         }
       }
-
     }
 
+    /// <summary>
+    /// Writes to the given stream data which is expected to be in the JSSP ORLIB format.
+    /// </summary>
+    /// <remarks>
+    /// The stream is not closed or disposed. The caller has to take care of that.
+    /// </remarks>
+    /// <param name="stream">The stream to write data to.</param>
     public void Export(Stream stream) {
-      var writer = new StreamWriter(stream);
-      writer.WriteLine(Name);
-      writer.WriteLine(Description);
-      writer.WriteLine(Jobs.ToString(CultureInfo.InvariantCulture.NumberFormat) + " " + Resources.ToString(CultureInfo.InvariantCulture.NumberFormat));
-      for (int i = 0; i < Jobs; i++) {
-        for (int j = 0; j < Resources; j++) {
-          writer.Write(Demands[i, j] + " " + ProcessingTimes[i, j] + " ");
+      using (var writer = new StreamWriter(stream, Encoding.UTF8, 4092, true)) {
+        writer.WriteLine(Name);
+        writer.WriteLine(Description);
+        writer.WriteLine(Jobs.ToString(CultureInfo.InvariantCulture.NumberFormat) + " " + Resources.ToString(CultureInfo.InvariantCulture.NumberFormat));
+        for (int i = 0; i < Jobs; i++) {
+          for (int j = 0; j < Resources; j++) {
+            writer.Write(Demands[i, j] + " " + ProcessingTimes[i, j] + " ");
+          }
+          if (DueDates != null) writer.Write(DueDates[i].ToString("r", CultureInfo.InvariantCulture.NumberFormat));
+          writer.WriteLine();
         }
-        if (DueDates != null) writer.Write(DueDates[i].ToString(CultureInfo.InvariantCulture.NumberFormat));
-        writer.WriteLine();
+        writer.Flush();
       }
-      writer.Flush();
     }
 
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/GoldenFormat/GoldenParser.cs	(revision 14542)
@@ -366,5 +366,5 @@
 
           int index = int.Parse(tokens[0]);
-          double value = double.Parse(tokens[1]);
+          double value = double.Parse(tokens[1], System.Globalization.CultureInfo.InvariantCulture);
 
           demands[index] = value;
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/LiLimFormat/LiLimParser.cs	(revision 14542)
@@ -149,5 +149,5 @@
 
         vehicles = int.Parse(m[0].Value);
-        capacity = double.Parse(m[1].Value);
+        capacity = double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture);
 
         line = reader.ReadLine();
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonFormatInstanceProvider.cs	(revision 14542)
@@ -21,4 +21,5 @@
 
 using System;
+using System.Globalization;
 using System.IO;
 using System.Linq;
@@ -74,5 +75,5 @@
             break;
           case "Distance":
-            double quality = double.Parse(reader.ReadLine());
+            double quality = double.Parse(reader.ReadLine(), CultureInfo.InvariantCulture);
             instance.BestKnownQuality = quality;
             break;
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Instances.VehicleRouting/3.4/SolomonFormat/SolomonParser.cs	(revision 14542)
@@ -143,5 +143,5 @@
 
         vehicles = int.Parse(m[0].Value);
-        capacity = double.Parse(m[1].Value);
+        capacity = double.Parse(m[1].Value, System.Globalization.CultureInfo.InvariantCulture);
 
         for (int i = 0; i < 4; i++) {
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs	(revision 14542)
@@ -43,4 +43,6 @@
     #region Default Instance
     private static readonly JSSPData DefaultInstance = new JSSPData() {
+      Name = "Job Shop Scheduling Problem (JSSP)",
+      Description = "The default instance of the JSSP problem in HeuristicLab",
       Jobs = 10,
       Resources = 10,
@@ -225,5 +227,6 @@
           BestKnownQuality = new DoubleValue(MakespanEvaluator.GetMakespan(BestKnownSolution));
       }
-
+      Name = data.Name;
+      Description = data.Description;
       JobData = jobData;
       Jobs = data.Jobs;
Index: branches/symbreg-factors-2650/HeuristicLab.Random/3.3/RandomEnumerable.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Random/3.3/RandomEnumerable.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Random/3.3/RandomEnumerable.cs	(revision 14542)
@@ -269,5 +269,6 @@
         // swapped element because we already returned it.
       }
-      yield return elements[0];
+      if (elements.Length > 0)
+        yield return elements[0];
     }
   }
Index: branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 14542)
@@ -50,8 +50,8 @@
       SamplesUtils.RunAlgorithm(osga);
 
-      Assert.AreEqual(0.020952753415199643, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
-      Assert.AreEqual(0.023220938866319357, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
-      Assert.AreEqual(0.023716788824595391, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
-      Assert.AreEqual(48200, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
+      Assert.AreEqual(0.015441526903606416, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
+      Assert.AreEqual(0.017420834241279298, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(0.065195703753298972, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(92000, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
     }
 
@@ -63,4 +63,5 @@
       problem.MaximumSymbolicExpressionTreeDepth.Value = 12;
       problem.EvaluatorParameter.Value.HorizonParameter.Value.Value = 10;
+      problem.ApplyLinearScaling.Value = true;
 
       foreach (var symbol in problem.SymbolicExpressionTreeGrammar.Symbols) {
Index: branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 14541)
+++ branches/symbreg-factors-2650/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 14542)
@@ -39,5 +39,7 @@
       PrivateObject hidden = new PrivateObject(solver);
       try {
-        hidden.Invoke("Run", new CancellationToken());
+        var ct = new CancellationToken();
+        hidden.Invoke("Initialize", ct);
+        hidden.Invoke("Run", ct);
       } catch (OperationCanceledException) {
         // Ignore
