Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2270)
@@ -43,9 +43,9 @@
     }
 
-    private Random random;    
+    private Random random;
     private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns;
 
     public SimpleDispatcher(IModelingDatabase database, Problem problem)
-      : base(database, problem) {      
+      : base(database, problem) {
       random = new Random();
       finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>();
@@ -100,8 +100,9 @@
     private void PopulateFinishedRuns() {
       var dispatchedAlgos = from model in Database.GetAllModels()
-                            select new { 
-                              TargetVariable = model.TargetVariable.Name, 
-                              Algorithm = model.Algorithm.Name, 
-                              Inputvariables = Database.GetInputVariableResults(model).Select(x => x.Variable.Name).Distinct() };
+                            select new {
+                              TargetVariable = model.TargetVariable.Name,
+                              Algorithm = model.Algorithm.Name,
+                              Inputvariables = Database.GetInputVariableResults(model).Select(x => x.Variable.Name).Distinct()
+                            };
       foreach (var algo in dispatchedAlgos) {
         AddDispatchedRun(algo.TargetVariable, algo.Inputvariables, algo.Algorithm);
@@ -144,6 +145,6 @@
     private void AddDispatchedRun(string targetVariable, IEnumerable<string> inputVariables, string algorithm) {
       AddDispatchedRun(
-        Problem.Dataset.GetVariableIndex(targetVariable), 
-        inputVariables.Select(x => Problem.Dataset.GetVariableIndex(x)).ToArray(), 
+        Problem.Dataset.GetVariableIndex(targetVariable),
+        inputVariables.Select(x => Problem.Dataset.GetVariableIndex(x)).ToArray(),
         algorithm);
     }
Index: trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/AlgorithmBase.cs
===================================================================
--- trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/AlgorithmBase.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/BaseClasses/AlgorithmBase.cs	(revision 2270)
@@ -423,4 +423,11 @@
       model.Dataset = ds;
       model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
+      model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data;
+      model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data;
+      model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data;
+      model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data;
+      model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data;
+      model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data;
+
       model.TrainingMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data;
       model.ValidationMeanSquaredError = bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data;
Index: trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.LinearRegression/3.2/LinearRegression.cs	(revision 2270)
@@ -152,5 +152,5 @@
       testMSE.GetVariableInfo("SamplesEnd").ActualName = "TestSamplesEnd";
       #endregion
-      
+
       #region R2
       CoefficientOfDeterminationEvaluator trainingR2 = new CoefficientOfDeterminationEvaluator();
@@ -290,4 +290,10 @@
       model.Dataset = ds;
       model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
+      model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data;
+      model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data;
+      model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data;
+      model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data;
+      model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data;
+      model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data;
 
       ItemList evaluationImpacts = bestModelScope.GetVariableValue<ItemList>("VariableEvaluationImpacts", false);
Index: trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs	(revision 2270)
@@ -68,11 +68,4 @@
 
     public void Persist(HeuristicLab.Modeling.IAlgorithm algorithm) {
-      int trainingSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesStart", false)).Data;
-      int trainingSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TrainingSamplesEnd", false)).Data;
-      int validationSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesStart", false)).Data;
-      int validationSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("ValidationSamplesEnd", false)).Data;
-      int testSamplesStart = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesStart", false)).Data;
-      int testSamplesEnd = ((IntData)algorithm.Engine.GlobalScope.GetVariableValue("TestSamplesEnd", false)).Data;
-
       GetOrCreateProblem(algorithm.Dataset);
       Dictionary<string, Variable> variables = GetAllVariables();
@@ -83,10 +76,10 @@
       using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
         model = new Model(target, algo);
-        model.TrainingSamplesStart = trainingSamplesStart;
-        model.TrainingSamplesEnd = trainingSamplesEnd;
-        model.ValidationSamplesStart = validationSamplesStart;
-        model.ValidationSamplesEnd = validationSamplesEnd;
-        model.TestSamplesStart = testSamplesStart;
-        model.TestSamplesEnd = testSamplesEnd;
+        model.TrainingSamplesStart = algorithm.Model.TrainingSamplesStart;
+        model.TrainingSamplesEnd = algorithm.Model.TrainingSamplesEnd;
+        model.ValidationSamplesStart = algorithm.Model.ValidationSamplesStart;
+        model.ValidationSamplesEnd = algorithm.Model.ValidationSamplesEnd;
+        model.TestSamplesStart = algorithm.Model.TestSamplesStart;
+        model.TestSamplesEnd = algorithm.Model.TestSamplesEnd;
 
         ctx.Models.InsertOnSubmit(model);
Index: trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.Modeling/3.2/IModel.cs	(revision 2270)
@@ -31,4 +31,10 @@
     string TargetVariable { get; }
     IEnumerable<string> InputVariables { get; }
+    int TrainingSamplesStart { get; set; }
+    int TrainingSamplesEnd { get; set; }
+    int ValidationSamplesStart { get; set; }
+    int ValidationSamplesEnd { get; set; }
+    int TestSamplesStart { get; set; }
+    int TestSamplesEnd { get; set; }
     double TrainingMeanSquaredError { get; }
     double ValidationMeanSquaredError { get; }
Index: trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
===================================================================
--- trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.Modeling/3.2/Model.cs	(revision 2270)
@@ -46,4 +46,11 @@
       get { return inputVariables; }
     }
+
+    public int TrainingSamplesStart { get; set; }
+    public int TrainingSamplesEnd { get; set; }
+    public int ValidationSamplesStart { get; set; }
+    public int ValidationSamplesEnd { get; set; }
+    public int TestSamplesStart { get; set; }
+    public int TestSamplesEnd { get; set; }
 
     public void AddInputVariables(string variableName) {
Index: trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs
===================================================================
--- trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2269)
+++ trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs	(revision 2270)
@@ -162,5 +162,5 @@
       modelScopeCreator.AddVariable(new HeuristicLab.Core.Variable("SubScopes", new IntData(1)));
       main.AddSubOperator(modelScopeCreator);
-      
+
       SequentialSubScopesProcessor seqSubScopesProc = new SequentialSubScopesProcessor();
       IOperator modelProcessor = CreateModelProcessor();
@@ -238,5 +238,5 @@
       nuBranch.Name = "NuLoop";
       nuBranch.GetVariableInfo("Condition").ActualName = "RepeatNuLoop";
-      
+
       nuBranch.AddSubOperator(nuLoop);
       nuLoop.AddSubOperator(nuBranch);
@@ -362,5 +362,5 @@
       progOp.RemoveVariableInfo("Result");
       progOp.AddVariableInfo(new VariableInfo("Value", "Value", typeof(IntData), VariableKind.In | VariableKind.Out));
-      progOp.Code = "Value.Data = "+value+";";
+      progOp.Code = "Value.Data = " + value + ";";
       progOp.GetVariableInfo("Value").ActualName = paramName;
       return progOp;
@@ -443,4 +443,10 @@
       model.Dataset = ds;
       model.TargetVariable = ds.GetVariableName(bestModelScope.GetVariableValue<IntData>("TargetVariable", true).Data);
+      model.TrainingSamplesStart = bestModelScope.GetVariableValue<IntData>("TrainingSamplesStart", true).Data;
+      model.TrainingSamplesEnd = bestModelScope.GetVariableValue<IntData>("TrainingSamplesEnd", true).Data;
+      model.ValidationSamplesStart = bestModelScope.GetVariableValue<IntData>("ValidationSamplesStart", true).Data;
+      model.ValidationSamplesEnd = bestModelScope.GetVariableValue<IntData>("ValidationSamplesEnd", true).Data;
+      model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data;
+      model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data;
 
       ItemList evaluationImpacts = bestModelScope.GetVariableValue<ItemList>("VariableEvaluationImpacts", false);
