Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj	(revision 1265)
+++ branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/HeuristicLab.CEDMA.Core.csproj	(revision 1266)
@@ -107,5 +107,4 @@
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="ProblemInjector.cs" />
     <Compile Include="Results.cs" />
   </ItemGroup>
Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/Problem.cs
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/Problem.cs	(revision 1265)
+++ branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/Problem.cs	(revision 1266)
@@ -104,4 +104,16 @@
       get { return autoRegressive; }
       set { autoRegressive = value; }
+    }
+
+    private int minTimeOffset;
+    public int MinTimeOffset {
+      get { return minTimeOffset; }
+      set { minTimeOffset = value; }
+    }
+
+    private int maxTimeOffset;
+    public int MaxTimeOffset {
+      get { return maxTimeOffset; }
+      set { maxTimeOffset = value; }
     }
 
@@ -147,4 +159,8 @@
       XmlAttribute autoRegressiveAttr = document.CreateAttribute("AutoRegressive");
       autoRegressiveAttr.Value = AutoRegressive.ToString();
+      XmlAttribute minTimeOffsetAttr = document.CreateAttribute("MinTimeOffset");
+      minTimeOffsetAttr.Value = MinTimeOffset.ToString();
+      XmlAttribute maxTimeOffsetAttr = document.CreateAttribute("MaxTimeOffset");
+      maxTimeOffsetAttr.Value = MaxTimeOffset.ToString();
 
       node.Attributes.Append(trainingSamplesStartAttr);
@@ -156,4 +172,6 @@
       node.Attributes.Append(learningTaskAttr);
       node.Attributes.Append(autoRegressiveAttr);
+      node.Attributes.Append(minTimeOffsetAttr);
+      node.Attributes.Append(maxTimeOffsetAttr);
 
       XmlElement targetVariablesElement = document.CreateElement("AllowedTargetVariables");
@@ -177,4 +195,11 @@
       LearningTask = (LearningTask)Enum.Parse(typeof(LearningTask), node.Attributes["LearningTask"].Value);
       AutoRegressive = bool.Parse(node.Attributes["AutoRegressive"].Value);
+      if (node.Attributes["MinTimeOffset"] != null)
+        MinTimeOffset = XmlConvert.ToInt32(node.Attributes["MinTimeOffset"].Value);
+      else MinTimeOffset = 0;
+      if (node.Attributes["MaxTimeOffset"] != null)
+        MaxTimeOffset = XmlConvert.ToInt32(node.Attributes["MaxTimeOffset"].Value);
+      else MaxTimeOffset = 0;
+
       allowedTargetVariables.Clear();
       foreach (string tok in node.SelectSingleNode("AllowedTargetVariables").InnerText.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries))
Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemInjector.cs
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Core/ProblemInjector.cs	(revision 1265)
+++ 	(revision )
@@ -1,97 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2008 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.Text;
-using System.Xml;
-using HeuristicLab.Core;
-using HeuristicLab.Operators;
-using HeuristicLab.DataAnalysis;
-using HeuristicLab.Data;
-
-namespace HeuristicLab.CEDMA.Core {
-  public class ProblemInjector : OperatorBase {
-    public override string Description {
-      get { return @"Injects the necessary variables for a CEDMA problem."; }
-    }
-
-    private IntData targetVariable = new IntData();
-    public int TargetVariable {
-      get { return targetVariable.Data; }
-      set { targetVariable.Data = value; }
-    }
-
-    public ProblemInjector() : base() { } // for persistence
-
-    public ProblemInjector(Problem problem)
-      : base() {
-      AddVariableInfo(new VariableInfo("Dataset", "Dataset", typeof(Dataset), VariableKind.New));
-      GetVariableInfo("Dataset").Local = true;
-      AddVariable(new Variable("Dataset", problem.DataSet));
-
-      AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), VariableKind.New));
-      GetVariableInfo("TargetVariable").Local = true;
-      AddVariable(new Variable("TargetVariable", targetVariable));
-
-      AddVariableInfo(new VariableInfo("AllowedFeatures", "Indexes of allowed input variables", typeof(ItemList<IntData>), VariableKind.New));
-      GetVariableInfo("AllowedFeatures").Local = true;
-      ItemList<IntData> allowedFeatures = new ItemList<IntData>();
-      foreach(int allowedVariable in problem.AllowedInputVariables) 
-        allowedFeatures.Add(new IntData(allowedVariable));
-      AddVariable(new Variable("AllowedFeatures", allowedFeatures));
-
-      AddVariableInfo(new VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), VariableKind.New));
-      GetVariableInfo("TrainingSamplesStart").Local = true;
-      AddVariable(new Variable("TrainingSamplesStart", new IntData(problem.TrainingSamplesStart)));
-
-      AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "TrainingSamplesEnd", typeof(IntData), VariableKind.New));
-      GetVariableInfo("TrainingSamplesEnd").Local = true;
-      AddVariable(new Variable("TrainingSamplesEnd", new IntData(problem.TrainingSamplesEnd)));
-
-      AddVariableInfo(new VariableInfo("ValidationSamplesStart", "ValidationSamplesStart", typeof(IntData), VariableKind.New));
-      GetVariableInfo("ValidationSamplesStart").Local = true;
-      AddVariable(new Variable("ValidationSamplesStart", new IntData(problem.ValidationSamplesStart)));
-
-      AddVariableInfo(new VariableInfo("ValidationSamplesEnd", "ValidationSamplesEnd", typeof(IntData), VariableKind.New));
-      GetVariableInfo("ValidationSamplesEnd").Local = true;
-      AddVariable(new Variable("ValidationSamplesEnd", new IntData(problem.ValidationSamplesEnd)));
-
-      AddVariableInfo(new VariableInfo("TestSamplesStart", "TestSamplesStart", typeof(IntData), VariableKind.New));
-      GetVariableInfo("TestSamplesStart").Local = true;
-      AddVariable(new Variable("TestSamplesStart", new IntData(problem.TestSamplesStart)));
-
-      AddVariableInfo(new VariableInfo("TestSamplesEnd", "TestSamplesEnd", typeof(IntData), VariableKind.New));
-      GetVariableInfo("TestSamplesEnd").Local = true;
-      AddVariable(new Variable("TestSamplesEnd", new IntData(problem.TestSamplesEnd)));
-    }
-
-    public override IOperation Apply(IScope scope) {
-      foreach(VariableInfo info in VariableInfos) {
-        if(info.Local) {
-          IVariable var = GetVariable(info.FormalName);
-          if(var != null) scope.AddVariable(new Variable(info.ActualName, (IItem)var.Value.Clone()));
-        }
-      }
-      return null;
-    }
-  }
-}
Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/DispatcherBase.cs
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/DispatcherBase.cs	(revision 1265)
+++ branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/DispatcherBase.cs	(revision 1266)
@@ -37,14 +37,14 @@
 
 namespace HeuristicLab.CEDMA.Server {
-  public abstract class DispatcherBase :IDispatcher {
+  public abstract class DispatcherBase : IDispatcher {
     public enum ModelComplexity { Low, Medium, High };
-    public enum Algorithm { StandardGP };
+    public enum Algorithm { StandardGpRegression, OffspringGpRegression, StandardGpClassification, OffspringGpClassification, StandardGpForecasting, OffspringGpForecasting };
 
     private IStore store;
     private ModelComplexity[] possibleComplexities = new ModelComplexity[] { ModelComplexity.Low, ModelComplexity.Medium, ModelComplexity.High };
     private Dictionary<LearningTask, Algorithm[]> possibleAlgorithms = new Dictionary<LearningTask, Algorithm[]>() {
-      {LearningTask.Classification, new Algorithm[] {}},
-      {LearningTask.Regression, new Algorithm[] { Algorithm.StandardGP }},
-      {LearningTask.TimeSeries, new Algorithm[] { }}
+      {LearningTask.Classification, new Algorithm[] { Algorithm.StandardGpClassification, Algorithm.OffspringGpClassification }},
+      {LearningTask.Regression, new Algorithm[] { Algorithm.StandardGpRegression, Algorithm.OffspringGpRegression }},
+      {LearningTask.TimeSeries, new Algorithm[] { Algorithm.StandardGpForecasting, Algorithm.OffspringGpForecasting }}
     };
 
@@ -90,6 +90,57 @@
     private Execution CreateExecution(Problem problem, int targetVariable, Algorithm algorithm, ModelComplexity complexity) {
       switch (algorithm) {
-        case Algorithm.StandardGP: {
-            return CreateStandardGpExecution(problem, targetVariable, complexity);
+        case Algorithm.StandardGpRegression: {
+            var algo = new HeuristicLab.GP.StructureIdentification.StandardGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxGenerations = 2;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "StandardGP - Complexity: " + complexity;
+            return exec;
+          }
+        case Algorithm.OffspringGpRegression: {
+            var algo = new HeuristicLab.GP.StructureIdentification.OffspringSelectionGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxEvaluatedSolutions = 10000;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "OffspringGP - Complexity: " + complexity;
+            return exec;
+          }
+        case Algorithm.StandardGpClassification: {
+            var algo = new HeuristicLab.GP.StructureIdentification.Classification.StandardGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxGenerations = 2;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "StandardGP - Complexity: " + complexity;
+            return exec;
+          }
+        case Algorithm.OffspringGpClassification: {
+            var algo = new HeuristicLab.GP.StructureIdentification.Classification.OffspringSelectionGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxEvaluatedSolutions = 10000;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "OffspringGP - Complexity: " + complexity;
+            return exec;
+          }
+        case Algorithm.StandardGpForecasting: {
+            var algo = new HeuristicLab.GP.StructureIdentification.TimeSeries.StandardGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxGenerations = 2;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "StandardGP - Complexity: " + complexity;
+            return exec;
+          }
+        case Algorithm.OffspringGpForecasting: {
+            var algo = new HeuristicLab.GP.StructureIdentification.TimeSeries.OffspringSelectionGP();
+            SetGpParameters(algo, complexity);
+            SetProblemParameters(algo, problem, targetVariable);
+            algo.MaxEvaluatedSolutions = 10000;
+            Execution exec = new Execution(algo.Engine);
+            exec.Description = "OffspringGP - Complexity: " + complexity;
+            return exec;
           }
         default: {
@@ -99,39 +150,51 @@
     }
 
-    private Execution CreateStandardGpExecution(Problem problem, int targetVariable, ModelComplexity complexity) {
-      HeuristicLab.CEDMA.Core.ProblemInjector probInjector = new HeuristicLab.CEDMA.Core.ProblemInjector(problem);
-      probInjector.TargetVariable = targetVariable;
-      StandardGP sgp = new StandardGP();
-      sgp.SetSeedRandomly = true;
-      sgp.MaxGenerations = 2;
-      sgp.PopulationSize = 100;
-      sgp.Elites = 1;
-      sgp.ProblemInjector = probInjector;
-
-      int maxTreeHeight = 10;
-      int maxTreeSize = 100;
+    private void SetGpParameters(AlgorithmBase algo, ModelComplexity complexity) {
+      algo.SetSeedRandomly = true;
+      algo.PopulationSize = 1000;
+      algo.Elites = 1;
       switch (complexity) {
         case ModelComplexity.Low: {
-            maxTreeHeight = 5;
-            maxTreeSize = 20;
+            algo.MaxTreeHeight = 5;
+            algo.MaxTreeSize = 20;
             break;
           }
         case ModelComplexity.Medium: {
-            maxTreeHeight = 10;
-            maxTreeSize = 100;
+            algo.MaxTreeHeight = 10;
+            algo.MaxTreeSize = 100;
             break;
           }
         case ModelComplexity.High: {
-            maxTreeHeight = 12;
-            maxTreeSize = 200;
+            algo.MaxTreeHeight = 12;
+            algo.MaxTreeSize = 200;
             break;
           }
       }
-
-      sgp.MaxTreeHeight = maxTreeHeight;
-      sgp.MaxTreeSize = maxTreeSize;
-      Execution exec = new Execution(sgp.Engine);
-      exec.Description = "StandardGP - Complexity: " + complexity;
-      return exec;
+    }
+
+    private void SetProblemParameters(AlgorithmBase algo, Problem problem, int targetVariable) {
+      algo.ProblemInjector.GetVariable("Dataset").Value = problem.DataSet;
+      algo.ProblemInjector.GetVariable("TargetVariable").GetValue<IntData>().Data = targetVariable;
+      algo.ProblemInjector.GetVariable("TrainingSamplesStart").GetValue<IntData>().Data = problem.TrainingSamplesStart;
+      algo.ProblemInjector.GetVariable("TrainingSamplesEnd").GetValue<IntData>().Data = problem.TrainingSamplesEnd;
+      algo.ProblemInjector.GetVariable("ValidationSamplesStart").GetValue<IntData>().Data = problem.ValidationSamplesStart;
+      algo.ProblemInjector.GetVariable("ValidationSamplesEnd").GetValue<IntData>().Data = problem.ValidationSamplesEnd;
+      algo.ProblemInjector.GetVariable("TestSamplesStart").GetValue<IntData>().Data = problem.TestSamplesStart;
+      algo.ProblemInjector.GetVariable("TestSamplesEnd").GetValue<IntData>().Data = problem.TestSamplesEnd;
+      ItemList<IntData> allowedFeatures = algo.ProblemInjector.GetVariable("AllowedFeatures").GetValue<ItemList<IntData>>();
+      foreach (int allowedFeature in problem.AllowedInputVariables) allowedFeatures.Add(new IntData(allowedFeature));
+
+      if (problem.LearningTask == LearningTask.TimeSeries) {
+        algo.ProblemInjector.GetVariable("Autoregressive").GetValue<BoolData>().Data = problem.AutoRegressive;
+        algo.ProblemInjector.GetVariable("MinTimeOffset").GetValue<IntData>().Data = problem.MinTimeOffset;
+        algo.ProblemInjector.GetVariable("MaxTimeOffset").GetValue<IntData>().Data = problem.MaxTimeOffset;
+      } else if (problem.LearningTask == LearningTask.Classification) {
+        ItemList<DoubleData> classValues = algo.ProblemInjector.GetVariable("TargetClassValues").GetValue<ItemList<DoubleData>>();
+        foreach (double classValue in GetDifferentClassValues(problem.DataSet, targetVariable)) classValues.Add(new DoubleData(classValue));
+      }
+    }
+
+    private IEnumerable<double> GetDifferentClassValues(HeuristicLab.DataAnalysis.Dataset dataset, int targetVariable) {
+      throw new NotImplementedException();
     }
   }
Index: branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/HeuristicLab.CEDMA.Server.csproj
===================================================================
--- branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/HeuristicLab.CEDMA.Server.csproj	(revision 1265)
+++ branches/CEDMA-Refactoring-Ticket419/HeuristicLab.CEDMA.Server/HeuristicLab.CEDMA.Server.csproj	(revision 1266)
@@ -108,7 +108,19 @@
       <Name>HeuristicLab.Core</Name>
     </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.DataAnalysis\HeuristicLab.DataAnalysis.csproj">
+      <Project>{7DD3A97A-56E9-462F-90E2-A351FE7AF5C2}</Project>
+      <Name>HeuristicLab.DataAnalysis</Name>
+    </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.Data\HeuristicLab.Data.csproj">
       <Project>{F473D9AF-3F09-4296-9F28-3C65118DAFFA}</Project>
       <Name>HeuristicLab.Data</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.GP.StructureIdentification.Classification\HeuristicLab.GP.StructureIdentification.Classification.csproj">
+      <Project>{7C20D100-8BEB-433A-9499-F075E2CB9297}</Project>
+      <Name>HeuristicLab.GP.StructureIdentification.Classification</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.GP.StructureIdentification.TimeSeries\HeuristicLab.GP.StructureIdentification.TimeSeries.csproj">
+      <Project>{6084CFB5-733F-449D-9F92-2E40D13F0514}</Project>
+      <Name>HeuristicLab.GP.StructureIdentification.TimeSeries</Name>
     </ProjectReference>
     <ProjectReference Include="..\HeuristicLab.GP.StructureIdentification\HeuristicLab.GP.StructureIdentification.csproj">
