Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs	(revision 16244)
@@ -467,53 +467,4 @@
     }
     #endregion
-
-    protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-      IClassificationProblemData classificationProblemData = problemData as IClassificationProblemData;
-      if (classificationProblemData == null)
-        throw new ArgumentException("The problem data is no classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      var returnValue = base.IsProblemDataCompatible(classificationProblemData, out errorMessage);
-      //check targetVariable
-      if (classificationProblemData.InputVariables.All(var => var.Value != TargetVariable)) {
-        errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable)
-                       + Environment.NewLine + errorMessage;
-        return false;
-      }
-
-      var newClassValues = classificationProblemData.Dataset.GetDoubleValues(TargetVariable).Distinct().OrderBy(x => x);
-      if (!newClassValues.SequenceEqual(ClassValues)) {
-        errorMessage = errorMessage + string.Format("The class values differ in the provided classification problem data.");
-        returnValue = false;
-      }
-
-      var newPositivieClassName = classificationProblemData.PositiveClass;
-      if (newPositivieClassName != PositiveClass) {
-        errorMessage = errorMessage + string.Format("The positive class differs in the provided classification problem data.");
-        returnValue = false;
-      }
-
-      return returnValue;
-    }
-
-    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-      ClassificationProblemData classificationProblemData = problemData as ClassificationProblemData;
-      if (classificationProblemData == null)
-        throw new ArgumentException("The problem data is not a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      base.AdjustProblemDataProperties(problemData);
-      TargetVariable = classificationProblemData.TargetVariable;
-      for (int i = 0; i < classificationProblemData.ClassNames.Count(); i++)
-        ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i);
-
-      PositiveClass = classificationProblemData.PositiveClass;
-
-      for (int i = 0; i < Classes; i++) {
-        for (int j = 0; j < Classes; j++) {
-          ClassificationPenaltiesParameter.Value[i, j] = classificationProblemData.GetClassificationPenalty(ClassValuesCache[i], ClassValuesCache[j]);
-        }
-      }
-    }
   }
 }
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs	(revision 16244)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -44,5 +45,11 @@
     public new IClassificationProblemData ProblemData {
       get { return (IClassificationProblemData)base.ProblemData; }
-      set { base.ProblemData = value; }
+      set {
+        if (value == null) throw new ArgumentNullException("The problemData must not be null.");
+        string errorMessage = string.Empty;
+        if (!Model.IsProblemDataCompatible(value, out errorMessage)) throw new ArgumentException(errorMessage);
+
+        base.ProblemData = value;
+      }
     }
 
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblemData.cs	(revision 16244)
@@ -207,39 +207,4 @@
       if (listeners != null) listeners(this, EventArgs.Empty);
     }
-
-    protected virtual bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
-      errorMessage = string.Empty;
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-
-      //check allowed input variables
-      StringBuilder message = new StringBuilder();
-      var variables = new HashSet<string>(problemData.InputVariables.Select(x => x.Value));
-      foreach (var item in AllowedInputVariables) {
-        if (!variables.Contains(item))
-          message.AppendLine("Input variable '" + item + "' is not present in the new problem data.");
-      }
-
-      if (message.Length != 0) {
-        errorMessage = message.ToString();
-        return false;
-      }
-      return true;
-
-    }
-
-    public virtual void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
-      DataAnalysisProblemData data = problemData as DataAnalysisProblemData;
-      if (data == null) throw new ArgumentException("The problem data is not a data analysis problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      string errorMessage;
-      if (!data.IsProblemDataCompatible(this, out errorMessage)) {
-        throw new InvalidOperationException(errorMessage);
-      }
-
-      foreach (var inputVariable in InputVariables) {
-        var variable = data.InputVariables.FirstOrDefault(i => i.Value == inputVariable.Value);
-        InputVariables.SetItemCheckedState(inputVariable, variable != null && data.InputVariables.ItemChecked(variable));
-      }
-    }
   }
 }
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisSolution.cs	(revision 16244)
@@ -58,12 +58,13 @@
       get { return (IDataAnalysisProblemData)this[ProblemDataResultName].Value; }
       set {
-        if (this[ProblemDataResultName].Value != value) {
-          if (value != null) {
-            ProblemData.Changed -= new EventHandler(ProblemData_Changed);
-            this[ProblemDataResultName].Value = value;
-            ProblemData.Changed += new EventHandler(ProblemData_Changed);
-            OnProblemDataChanged();
-          }
-        }
+        if (value == null) throw new ArgumentNullException("The problemData must not be null.");
+        if (this[ProblemDataResultName].Value == value) return;
+        string errorMessage = string.Empty;
+        if (!Model.IsProblemDataCompatible(value, out errorMessage)) throw new ArgumentException(errorMessage);
+
+        ProblemData.Changed -= new EventHandler(ProblemData_Changed);
+        this[ProblemDataResultName].Value = value;
+        ProblemData.Changed += new EventHandler(ProblemData_Changed);
+        OnProblemDataChanged();
       }
     }
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs	(revision 16244)
@@ -161,23 +161,4 @@
       OnChanged();
     }
-
-    protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-      IRegressionProblemData regressionProblemData = problemData as IRegressionProblemData;
-      if (regressionProblemData == null)
-        throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      var returnValue = base.IsProblemDataCompatible(problemData, out errorMessage);
-      return returnValue;
-    }
-
-    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-      RegressionProblemData regressionProblemData = problemData as RegressionProblemData;
-      if (regressionProblemData == null)
-        throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      base.AdjustProblemDataProperties(problemData);
-    }
   }
 }
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs	(revision 16244)
@@ -70,5 +70,11 @@
     public new IRegressionProblemData ProblemData {
       get { return (IRegressionProblemData)base.ProblemData; }
-      set { base.ProblemData = value; }
+      set {
+        if (value == null) throw new ArgumentNullException("The problemData must not be null.");
+        string errorMessage = string.Empty;
+        if (!Model.IsProblemDataCompatible(value, out errorMessage)) throw new ArgumentException(errorMessage);
+
+        base.ProblemData = value;
+      }
     }
 
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisProblemData.cs	(revision 16244)
@@ -1620,36 +1620,4 @@
       OnChanged();
     }
-
-    protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) {
-      if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null.");
-      ITimeSeriesPrognosisProblemData timeseriesProblemData = problemData as ITimeSeriesPrognosisProblemData;
-      if (timeseriesProblemData == null)
-        throw new ArgumentException("The problem data is not a time-series problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      var returnValue = base.IsProblemDataCompatible(problemData, out errorMessage);
-      //check targetVariable
-      if (problemData.InputVariables.All(var => var.Value != TargetVariable)) {
-        errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable)
-                       + Environment.NewLine + errorMessage;
-        return false;
-      }
-      return returnValue;
-    }
-
-    public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) {
-      TimeSeriesPrognosisProblemData timeSeriesProblemData = problemData as TimeSeriesPrognosisProblemData;
-      if (timeSeriesProblemData == null)
-        throw new ArgumentException("The problem data is not a timeseries problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData");
-
-      var trainingDataStart = TrainingIndices.First();
-
-      base.AdjustProblemDataProperties(problemData);
-
-      TestPartition.Start = trainingDataStart;
-
-      TrainingHorizon = timeSeriesProblemData.TrainingHorizon;
-      TestHorizon = timeSeriesProblemData.TestHorizon;
-    }
-
   }
 }
Index: trunk/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs
===================================================================
--- trunk/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 16243)
+++ trunk/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/IDataAnalysisProblemData.cs	(revision 16244)
@@ -49,6 +49,4 @@
 
     event EventHandler Changed;
-
-    void AdjustProblemDataProperties(IDataAnalysisProblemData problemData);
   }
 }
