Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -35,12 +33,12 @@
 using HeuristicLab.Core;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
   public abstract class DispatcherBase : IDispatcher {
-    private IStore store;
-    private DataSet dataset;
+    private IModelingDatabase database;
     private List<int> allowedTargetVariables;
     private Dictionary<int, List<int>> activeInputVariables;
-
+    private Problem problem;
     internal event EventHandler Changed;
     private object locker = new object();
@@ -48,6 +46,6 @@
     public IEnumerable<string> TargetVariables {
       get {
-        if (dataset != null) {
-          return dataset.Problem.AllowedTargetVariables.Select(x => dataset.Problem.Dataset.GetVariableName(x));
+        if (problem != null) {
+          return Enumerable.Range(0, problem.Dataset.Columns).Select(x => problem.Dataset.GetVariableName(x));
         } else return new string[0];
       }
@@ -56,28 +54,25 @@
     public IEnumerable<string> InputVariables {
       get {
-        if (dataset != null) {
-          return dataset.Problem.AllowedInputVariables.Select(x => dataset.Problem.Dataset.GetVariableName(x));
+        if (problem != null) {
+          return TargetVariables;
         } else return new string[0];
       }
     }
 
-    public DispatcherBase(IStore store) {
-      this.store = store;
+    public DispatcherBase(IModelingDatabase database, Problem problem) {
+      this.problem = problem;
       allowedTargetVariables = new List<int>();
       activeInputVariables = new Dictionary<int, List<int>>();
+      problem.Changed += (sender, args) => {
+        lock (locker) {
+          allowedTargetVariables.Clear();
+          activeInputVariables.Clear();
+        }
+        OnChanged();
+      };
+      this.database = database;
     }
 
-    public IAlgorithm GetNextJob() {
-      if (dataset == null) {
-        var datasetEntities = store.Query("?DataSet <" + Ontology.InstanceOf.Uri + "> <" + Ontology.TypeDataSet.Uri + "> .", 0, 1)
-          .Select(x => (Entity)x.Get("DataSet"));
-        if (datasetEntities.Count() == 0) return null;
-        dataset = new DataSet(store, datasetEntities.ElementAt(0));
-        foreach (int targetVar in dataset.Problem.AllowedTargetVariables) {
-          activeInputVariables.Add(targetVar, new List<int>());
-          activeInputVariables[targetVar].AddRange(dataset.Problem.AllowedInputVariables);
-        }
-        OnChanged();
-      }
+    public HeuristicLab.Modeling.IAlgorithm GetNextJob() {
       if (allowedTargetVariables.Count > 0) {
         int[] targetVariables, inputVariables;
@@ -92,5 +87,5 @@
         }
 
-        IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, dataset.Problem);
+        HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, problem);
 
         return selectedAlgorithm;
@@ -102,5 +97,5 @@
       return targetVariables[rand.Next(targetVariables.Length)];
     }
-    public abstract IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
+    public abstract HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
 
     #region IViewable Members
@@ -114,16 +109,17 @@
     internal void EnableTargetVariable(string name) {
       lock (locker)
-        allowedTargetVariables.Add(dataset.Problem.Dataset.GetVariableIndex(name));
+        allowedTargetVariables.Add(problem.Dataset.GetVariableIndex(name));
     }
 
     internal void DisableTargetVariable(string name) {
       lock (locker)
-        allowedTargetVariables.Remove(dataset.Problem.Dataset.GetVariableIndex(name));
+        allowedTargetVariables.Remove(problem.Dataset.GetVariableIndex(name));
     }
 
     internal void EnableInputVariable(string target, string name) {
       lock (locker) {
-        int targetIndex = dataset.Problem.Dataset.GetVariableIndex(target);
-        int inputIndex = dataset.Problem.Dataset.GetVariableIndex(name);
+        int targetIndex = problem.Dataset.GetVariableIndex(target);
+        int inputIndex = problem.Dataset.GetVariableIndex(name);
+        if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
         if (!activeInputVariables[targetIndex].Contains(inputIndex)) {
           activeInputVariables[targetIndex].Add(inputIndex);
@@ -134,6 +130,7 @@
     internal void DisableInputVariable(string target, string name) {
       lock (locker) {
-        int targetIndex = dataset.Problem.Dataset.GetVariableIndex(target);
-        int inputIndex = dataset.Problem.Dataset.GetVariableIndex(name);
+        int targetIndex = problem.Dataset.GetVariableIndex(target);
+        int inputIndex = problem.Dataset.GetVariableIndex(name);
+        if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
         while (activeInputVariables[targetIndex].Remove(inputIndex)) { }
       }
@@ -145,6 +142,8 @@
 
     internal IEnumerable<string> GetInputVariables(string target) {
-      return activeInputVariables[dataset.Problem.Dataset.GetVariableIndex(target)]
-        .Select(i => dataset.Problem.Dataset.GetVariableName(i));
+      int targetIndex = problem.Dataset.GetVariableIndex(target);
+      if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
+      return activeInputVariables[targetIndex]
+        .Select(i => problem.Dataset.GetVariableName(i));
     }
   }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2223)
@@ -12,9 +12,11 @@
   public partial class DispatcherView : ViewBase {
     private DispatcherBase dispatcher;
-    public DispatcherView(DispatcherBase dispatcher) : base() {
+    public DispatcherView(DispatcherBase dispatcher)
+      : base() {
       this.dispatcher = dispatcher;
       InitializeComponent();
       UpdateControls();
       dispatcher.Changed += (sender, args) => UpdateControls();
+      this.inputVariableList.CheckOnClick = true;
     }
 
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -38,4 +36,5 @@
 using System.Threading;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
@@ -46,6 +45,6 @@
     protected IDispatcher Dispatcher {
       get { return dispatcher; }
-    }
-    private IStore store;
+    }    
+    private IModelingDatabase databaseService;
 
     private int maxActiveJobs;
@@ -59,8 +58,8 @@
     }
 
-    public ExecuterBase(IDispatcher dispatcher, IStore store) {
+    public ExecuterBase(IDispatcher dispatcher, IModelingDatabase databaseService) {
       maxActiveJobs = 10;
       this.dispatcher = dispatcher;
-      this.store = store;
+      this.databaseService = databaseService;
     }
 
@@ -72,5 +71,5 @@
 
     protected void SetResults(IScope src, IScope target) {
-      foreach (IVariable v in src.Variables) {
+      foreach (HeuristicLab.Core.IVariable v in src.Variables) {
         target.AddVariable(v);
       }
@@ -83,49 +82,50 @@
     }
 
-    protected void StoreResults(IAlgorithm finishedAlgorithm) {
-      Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-      IModel model = finishedAlgorithm.Model;
-      List<Statement> statements = new List<Statement>();
-      statements.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel));
-      statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(model.TargetVariable)));
-      statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Name)));
+    protected void StoreResults(HeuristicLab.Modeling.IAlgorithm finishedAlgorithm) {
+      databaseService.Persist(finishedAlgorithm);
+      //Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      //IModel model = finishedAlgorithm.Model;
+      //List<Statement> statements = new List<Statement>();
+      //statements.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel));
+      //statements.Add(new Statement(modelEntity, Ontology.TargetVariable, new Literal(model.TargetVariable)));
+      //statements.Add(new Statement(modelEntity, Ontology.Name, new Literal(finishedAlgorithm.Name)));
       
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanSquaredError, new Literal(model.TestMeanSquaredError)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingCoefficientOfDetermination, new Literal(model.TrainingCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationCoefficientOfDetermination, new Literal(model.ValidationCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.TestCoefficientOfDetermination, new Literal(model.TestCoefficientOfDetermination)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingVarianceAccountedFor, new Literal(model.TrainingVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationVarianceAccountedFor, new Literal(model.ValidationVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.TestVarianceAccountedFor, new Literal(model.TestVarianceAccountedFor)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, new Literal(model.TrainingMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, new Literal(model.ValidationMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageError, new Literal(model.TestMeanAbsolutePercentageError)));
-      statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, new Literal(model.TrainingMeanAbsolutePercentageOfRangeError)));
-      statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, new Literal(model.ValidationMeanAbsolutePercentageOfRangeError)));
-      statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, new Literal(model.TestMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanSquaredError, new Literal(model.TrainingMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanSquaredError, new Literal(model.ValidationMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanSquaredError, new Literal(model.TestMeanSquaredError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingCoefficientOfDetermination, new Literal(model.TrainingCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationCoefficientOfDetermination, new Literal(model.ValidationCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestCoefficientOfDetermination, new Literal(model.TestCoefficientOfDetermination)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingVarianceAccountedFor, new Literal(model.TrainingVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationVarianceAccountedFor, new Literal(model.ValidationVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestVarianceAccountedFor, new Literal(model.TestVarianceAccountedFor)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, new Literal(model.TrainingMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, new Literal(model.ValidationMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageError, new Literal(model.TestMeanAbsolutePercentageError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, new Literal(model.TrainingMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, new Literal(model.ValidationMeanAbsolutePercentageOfRangeError)));
+      //statements.Add(new Statement(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, new Literal(model.TestMeanAbsolutePercentageOfRangeError)));
 
-      for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) {
-        try {
-          string variableName = finishedAlgorithm.Dataset.GetVariableName(i);
-          double qualImpact = model.GetVariableQualityImpact(variableName);
-          double evalImpact = model.GetVariableEvaluationImpact(variableName);
+      //for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) {
+      //  try {
+      //    string variableName = finishedAlgorithm.Dataset.GetVariableName(i);
+      //    double qualImpact = model.GetVariableQualityImpact(variableName);
+      //    double evalImpact = model.GetVariableEvaluationImpact(variableName);
 
-          Entity inputVariableEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
-          statements.Add(new Statement(inputVariableEntity, Ontology.InstanceOf, Ontology.TypeVariableImpact));
-          statements.Add(new Statement(modelEntity, Ontology.HasInputVariable, inputVariableEntity));
-          statements.Add(new Statement(inputVariableEntity, Ontology.EvaluationImpact, new Literal(evalImpact)));
-          statements.Add(new Statement(inputVariableEntity, Ontology.QualityImpact, new Literal(qualImpact)));
-          statements.Add(new Statement(inputVariableEntity, Ontology.Name, new Literal(variableName)));
-        }
-        catch (ArgumentException) {
-          // ignore
-        }
-      }
+      //    Entity inputVariableEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.InstanceOf, Ontology.TypeVariableImpact));
+      //    statements.Add(new Statement(modelEntity, Ontology.HasInputVariable, inputVariableEntity));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.EvaluationImpact, new Literal(evalImpact)));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.QualityImpact, new Literal(qualImpact)));
+      //    statements.Add(new Statement(inputVariableEntity, Ontology.Name, new Literal(variableName)));
+      //  }
+      //  catch (ArgumentException) {
+      //    // ignore
+      //  }
+      //}
 
-      byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data);
-      statements.Add(new Statement(modelEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(serializedModel))));
-      store.AddRange(statements);
+      //byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data);
+      //statements.Add(new Statement(modelEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(serializedModel))));
+      //store.AddRange(statements);
     }
 
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -38,9 +36,10 @@
 using System.Threading;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
   public class GridExecuter : ExecuterBase {
     private JobManager jobManager;
-    private Dictionary<AsyncGridResult, IAlgorithm> activeAlgorithms;
+    private Dictionary<AsyncGridResult, HeuristicLab.Modeling.IAlgorithm> activeAlgorithms;
 
     private TimeSpan StartJobInterval {
@@ -56,8 +55,8 @@
     }
 
-    public GridExecuter(IDispatcher dispatcher, IStore store, IGridServer server)
-      : base(dispatcher, store) {
+    public GridExecuter(IDispatcher dispatcher,  IGridServer server, IModelingDatabase databaseService)
+      : base(dispatcher, databaseService) {
       this.jobManager = new JobManager(server);
-      activeAlgorithms = new Dictionary<AsyncGridResult, IAlgorithm>();
+      activeAlgorithms = new Dictionary<AsyncGridResult, HeuristicLab.Modeling.IAlgorithm>();
       jobManager.Reset();
     }
@@ -71,5 +70,5 @@
             Thread.Sleep(StartJobInterval);
             // get an execution from the dispatcher and execute in grid via job-manager
-            IAlgorithm algorithm = Dispatcher.GetNextJob();
+            HeuristicLab.Modeling.IAlgorithm algorithm = Dispatcher.GetNextJob();
             if (algorithm != null) {
               AtomicOperation op = new AtomicOperation(algorithm.Engine.OperatorGraph.InitialOperator, algorithm.Engine.GlobalScope);
@@ -91,5 +90,5 @@
             if (readyHandleIndex != WaitHandle.WaitTimeout) {
               WaitHandle readyHandle = whArr[readyHandleIndex];
-              IAlgorithm finishedAlgorithm = null;
+              HeuristicLab.Modeling.IAlgorithm finishedAlgorithm = null;
               AsyncGridResult finishedResult = null;
               lock (activeAlgorithms) {
@@ -138,5 +137,5 @@
         string[] retVal = new string[activeAlgorithms.Count];
         int i = 0;
-        foreach (IAlgorithm a in activeAlgorithms.Values) {
+        foreach (HeuristicLab.Modeling.IAlgorithm a in activeAlgorithms.Values) {
           retVal[i++] = a.Name + " " + a.Dataset.GetVariableName(a.TargetVariable);
         }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLab.CEDMA.Server-3.3.csproj	(revision 2223)
@@ -91,4 +91,12 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="LearningTask.cs" />
+    <Compile Include="Problem.cs" />
+    <Compile Include="ProblemView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ProblemView.Designer.cs">
+      <DependentUpon>ProblemView.cs</DependentUpon>
+    </Compile>
     <Compile Include="ExecuterView.cs">
       <SubType>UserControl</SubType>
@@ -125,12 +133,4 @@
       <Name>HeuristicLab.CEDMA.Core-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB.Interfaces\3.3\HeuristicLab.CEDMA.DB.Interfaces-3.3.csproj">
-      <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>
-      <Name>HeuristicLab.CEDMA.DB.Interfaces-3.3</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.CEDMA.DB\3.3\HeuristicLab.CEDMA.DB-3.3.csproj">
-      <Project>{B3D6D8D9-2B1F-47EC-9C73-77FAECF87310}</Project>
-      <Name>HeuristicLab.CEDMA.DB-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.2\HeuristicLab.Core-3.2.csproj">
       <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
@@ -153,4 +153,12 @@
       <Name>HeuristicLab.Grid-3.2</Name>
     </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database.SQLServerCompact\3.2\HeuristicLab.Modeling.Database.SQLServerCompact-3.2.csproj">
+      <Project>{EC1AA756-D612-4FA6-AA52-25CF4F8E3836}</Project>
+      <Name>HeuristicLab.Modeling.Database.SQLServerCompact-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Modeling.Database\3.2\HeuristicLab.Modeling.Database-3.2.csproj">
+      <Project>{E84E5717-79F8-498F-A5E0-A055C4EC086B}</Project>
+      <Name>HeuristicLab.Modeling.Database-3.2</Name>
+    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Modeling\3.2\HeuristicLab.Modeling-3.2.csproj">
       <Project>{80F7FADA-549D-4151-8856-79B620A50DBA}</Project>
@@ -171,4 +179,7 @@
   </ItemGroup>
   <ItemGroup>
+    <EmbeddedResource Include="ProblemView.resx">
+      <DependentUpon>ProblemView.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="DispatcherView.resx">
       <DependentUpon>DispatcherView.cs</DependentUpon>
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/HeuristicLabCedmaServerPlugin.cs	(revision 2223)
@@ -28,6 +28,4 @@
   [ClassInfo(Name = "HeuristicLab.CEDMA.Server-3.3")]
   [PluginFile(Filename = "HeuristicLab.CEDMA.Server-3.3.dll", Filetype = PluginFileType.Assembly)]
-  [Dependency(Dependency = "HeuristicLab.CEDMA.DB.Interfaces-3.3")]
-  [Dependency(Dependency = "HeuristicLab.CEDMA.DB-3.3")]
   [Dependency(Dependency = "HeuristicLab.Grid-3.2")]
   [Dependency(Dependency = "HeuristicLab.Grid.HiveBridge-3.2")]
@@ -36,4 +34,6 @@
   [Dependency(Dependency = "HeuristicLab.DataAnalysis-3.2")]
   [Dependency(Dependency = "HeuristicLab.Modeling-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Modeling.Database.SQLServerCompact-3.2")]
   [Dependency(Dependency = "HeuristicLab.Tracing-3.2")]
   public class HeuristicLabCedmaServerPlugin : PluginBase {
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs	(revision 2223)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/LearningTask.cs	(revision 2223)
@@ -0,0 +1,29 @@
+#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
+
+namespace HeuristicLab.CEDMA.Server {
+  public enum LearningTask {
+    Classification,
+    Regression,
+    TimeSeries,
+    Clustering
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs	(revision 2223)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs	(revision 2223)
@@ -0,0 +1,141 @@
+﻿#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.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using System.Xml;
+using HeuristicLab.Operators;
+
+namespace HeuristicLab.CEDMA.Server {
+
+
+  /// <summary>
+  /// Problem describes the data mining task.
+  /// Contains the actual data and meta-data:
+  ///  * which variables should be modelled 
+  ///  * regression, time-series or classification problem
+  /// </summary>
+  public class Problem {
+    internal event EventHandler Changed;
+
+    private HeuristicLab.DataAnalysis.Dataset dataset;
+    public HeuristicLab.DataAnalysis.Dataset Dataset {
+      get { return dataset; }
+      set {
+        if (value != dataset) {
+          dataset = value;
+        }
+      }
+    }
+
+    private int trainingSamplesStart;
+    public int TrainingSamplesStart {
+      get { return trainingSamplesStart; }
+      set { trainingSamplesStart = value; }
+    }
+
+    private int trainingSamplesEnd;
+    public int TrainingSamplesEnd {
+      get { return trainingSamplesEnd; }
+      set { trainingSamplesEnd = value; }
+    }
+
+    private int validationSamplesStart;
+    public int ValidationSamplesStart {
+      get { return validationSamplesStart; }
+      set { validationSamplesStart = value; }
+    }
+
+    private int validationSamplesEnd;
+    public int ValidationSamplesEnd {
+      get { return validationSamplesEnd; }
+      set { validationSamplesEnd = value; }
+    }
+
+    private int testSamplesStart;
+    public int TestSamplesStart {
+      get { return testSamplesStart; }
+      set { testSamplesStart = value; }
+    }
+
+    private int testSamplesEnd;
+    public int TestSamplesEnd {
+      get { return testSamplesEnd; }
+      set { testSamplesEnd = value; }
+    }
+
+    //private List<int> allowedInputVariables;
+    //public List<int> AllowedInputVariables {
+    //  get { return allowedInputVariables; }
+    //}
+
+    //private List<int> allowedTargetVariables;
+    //public List<int> AllowedTargetVariables {
+    //  get { return allowedTargetVariables; }
+    //}
+
+    private bool autoRegressive;
+    public bool AutoRegressive {
+      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; }
+    }
+
+    private LearningTask learningTask;
+    public LearningTask LearningTask {
+      get { return learningTask; }
+      set { learningTask = value; }
+    }
+
+    public Problem()
+      : base() {
+      //allowedInputVariables = new List<int>();
+      //allowedTargetVariables = new List<int>();
+      Dataset = new HeuristicLab.DataAnalysis.Dataset();
+    }
+
+    public string GetVariableName(int index) {
+      return dataset.GetVariableName(index);
+    }
+
+    public IView CreateView() {
+      return new ProblemView(this);
+    }
+
+    internal void FireChanged() {
+      if (Changed != null) Changed(this, new EventArgs());
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs	(revision 2223)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.Designer.cs	(revision 2223)
@@ -0,0 +1,359 @@
+﻿#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 HeuristicLab.Core;
+using System.Windows.Forms;
+namespace HeuristicLab.CEDMA.Server {
+  partial class ProblemView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if(disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.importButton = new System.Windows.Forms.Button();
+      this.trainingSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.trainingLabel = new System.Windows.Forms.Label();
+      this.trainingSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.validationSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.validationSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.validationLabel = new System.Windows.Forms.Label();
+      this.testSamplesEndTextBox = new System.Windows.Forms.TextBox();
+      this.testSamplesStartTextBox = new System.Windows.Forms.TextBox();
+      this.testLabel = new System.Windows.Forms.Label();
+      this.autoregressiveCheckBox = new System.Windows.Forms.CheckBox();
+      this.partitioningGroupBox = new System.Windows.Forms.GroupBox();
+      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
+      this.classificationRadioButton = new System.Windows.Forms.RadioButton();
+      this.regressionRadioButton = new System.Windows.Forms.RadioButton();
+      this.timeSeriesRadioButton = new System.Windows.Forms.RadioButton();
+      this.minTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.learningTaskGroupBox = new System.Windows.Forms.GroupBox();
+      this.autoregressiveLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetLabel = new System.Windows.Forms.Label();
+      this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();
+      this.datasetView1 = new HeuristicLab.DataAnalysis.DatasetView();
+      this.partitioningGroupBox.SuspendLayout();
+      this.learningTaskGroupBox.SuspendLayout();
+      this.SuspendLayout();
+      // 
+      // importButton
+      // 
+      this.importButton.Location = new System.Drawing.Point(3, 3);
+      this.importButton.Name = "importButton";
+      this.importButton.Size = new System.Drawing.Size(75, 23);
+      this.importButton.TabIndex = 0;
+      this.importButton.Text = "Import";
+      this.importButton.UseVisualStyleBackColor = true;
+      this.importButton.Click += new System.EventHandler(this.importButton_Click);
+      // 
+      // trainingSamplesStartTextBox
+      // 
+      this.trainingSamplesStartTextBox.Location = new System.Drawing.Point(119, 17);
+      this.trainingSamplesStartTextBox.Name = "trainingSamplesStartTextBox";
+      this.trainingSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.trainingSamplesStartTextBox.TabIndex = 4;
+      this.trainingSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.trainingSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // trainingLabel
+      // 
+      this.trainingLabel.AutoSize = true;
+      this.trainingLabel.Location = new System.Drawing.Point(13, 20);
+      this.trainingLabel.Name = "trainingLabel";
+      this.trainingLabel.Size = new System.Drawing.Size(89, 13);
+      this.trainingLabel.TabIndex = 3;
+      this.trainingLabel.Text = "Training samples:";
+      // 
+      // trainingSamplesEndTextBox
+      // 
+      this.trainingSamplesEndTextBox.Location = new System.Drawing.Point(221, 17);
+      this.trainingSamplesEndTextBox.Name = "trainingSamplesEndTextBox";
+      this.trainingSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.trainingSamplesEndTextBox.TabIndex = 10;
+      this.trainingSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.trainingSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationSamplesEndTextBox
+      // 
+      this.validationSamplesEndTextBox.Location = new System.Drawing.Point(221, 43);
+      this.validationSamplesEndTextBox.Name = "validationSamplesEndTextBox";
+      this.validationSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.validationSamplesEndTextBox.TabIndex = 13;
+      this.validationSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.validationSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationSamplesStartTextBox
+      // 
+      this.validationSamplesStartTextBox.Location = new System.Drawing.Point(119, 43);
+      this.validationSamplesStartTextBox.Name = "validationSamplesStartTextBox";
+      this.validationSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.validationSamplesStartTextBox.TabIndex = 12;
+      this.validationSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.validationSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // validationLabel
+      // 
+      this.validationLabel.AutoSize = true;
+      this.validationLabel.Location = new System.Drawing.Point(5, 46);
+      this.validationLabel.Name = "validationLabel";
+      this.validationLabel.Size = new System.Drawing.Size(97, 13);
+      this.validationLabel.TabIndex = 11;
+      this.validationLabel.Text = "Validation samples:";
+      // 
+      // testSamplesEndTextBox
+      // 
+      this.testSamplesEndTextBox.Location = new System.Drawing.Point(221, 68);
+      this.testSamplesEndTextBox.Name = "testSamplesEndTextBox";
+      this.testSamplesEndTextBox.Size = new System.Drawing.Size(96, 20);
+      this.testSamplesEndTextBox.TabIndex = 16;
+      this.testSamplesEndTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.testSamplesEndTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // testSamplesStartTextBox
+      // 
+      this.testSamplesStartTextBox.Location = new System.Drawing.Point(119, 68);
+      this.testSamplesStartTextBox.Name = "testSamplesStartTextBox";
+      this.testSamplesStartTextBox.Size = new System.Drawing.Size(96, 20);
+      this.testSamplesStartTextBox.TabIndex = 15;
+      this.testSamplesStartTextBox.Validated += new System.EventHandler(this.samplesTextBox_Validated);
+      this.testSamplesStartTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.samplesTextBox_Validating);
+      // 
+      // testLabel
+      // 
+      this.testLabel.AutoSize = true;
+      this.testLabel.Location = new System.Drawing.Point(30, 71);
+      this.testLabel.Name = "testLabel";
+      this.testLabel.Size = new System.Drawing.Size(72, 13);
+      this.testLabel.TabIndex = 14;
+      this.testLabel.Text = "Test samples:";
+      // 
+      // autoregressiveCheckBox
+      // 
+      this.autoregressiveCheckBox.Anchor = System.Windows.Forms.AnchorStyles.Top;
+      this.autoregressiveCheckBox.AutoSize = true;
+      this.autoregressiveCheckBox.Enabled = false;
+      this.autoregressiveCheckBox.Location = new System.Drawing.Point(131, 83);
+      this.autoregressiveCheckBox.Name = "autoregressiveCheckBox";
+      this.autoregressiveCheckBox.Size = new System.Drawing.Size(15, 14);
+      this.autoregressiveCheckBox.TabIndex = 22;
+      this.autoregressiveCheckBox.UseVisualStyleBackColor = true;
+      this.autoregressiveCheckBox.CheckedChanged += new System.EventHandler(this.autoregressiveCheckBox_CheckedChanged);
+      // 
+      // partitioningGroupBox
+      // 
+      this.partitioningGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.partitioningGroupBox.Controls.Add(this.validationSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.trainingLabel);
+      this.partitioningGroupBox.Controls.Add(this.trainingSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.trainingSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.validationLabel);
+      this.partitioningGroupBox.Controls.Add(this.testSamplesEndTextBox);
+      this.partitioningGroupBox.Controls.Add(this.validationSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.testSamplesStartTextBox);
+      this.partitioningGroupBox.Controls.Add(this.testLabel);
+      this.partitioningGroupBox.Location = new System.Drawing.Point(3, 452);
+      this.partitioningGroupBox.Name = "partitioningGroupBox";
+      this.partitioningGroupBox.Size = new System.Drawing.Size(326, 100);
+      this.partitioningGroupBox.TabIndex = 25;
+      this.partitioningGroupBox.TabStop = false;
+      this.partitioningGroupBox.Text = "Data set partitions:";
+      // 
+      // openFileDialog
+      // 
+      this.openFileDialog.DefaultExt = "txt";
+      this.openFileDialog.FileName = "txt";
+      this.openFileDialog.Filter = "Text files|*.txt|All files|*.*";
+      this.openFileDialog.Title = "Import data set from file";
+      // 
+      // classificationRadioButton
+      // 
+      this.classificationRadioButton.AutoSize = true;
+      this.classificationRadioButton.Checked = true;
+      this.classificationRadioButton.Location = new System.Drawing.Point(6, 16);
+      this.classificationRadioButton.Name = "classificationRadioButton";
+      this.classificationRadioButton.Size = new System.Drawing.Size(86, 17);
+      this.classificationRadioButton.TabIndex = 28;
+      this.classificationRadioButton.TabStop = true;
+      this.classificationRadioButton.Text = "Classification";
+      this.classificationRadioButton.UseVisualStyleBackColor = true;
+      this.classificationRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // regressionRadioButton
+      // 
+      this.regressionRadioButton.AutoSize = true;
+      this.regressionRadioButton.Location = new System.Drawing.Point(6, 39);
+      this.regressionRadioButton.Name = "regressionRadioButton";
+      this.regressionRadioButton.Size = new System.Drawing.Size(78, 17);
+      this.regressionRadioButton.TabIndex = 29;
+      this.regressionRadioButton.Text = "Regression";
+      this.regressionRadioButton.UseVisualStyleBackColor = true;
+      this.regressionRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // timeSeriesRadioButton
+      // 
+      this.timeSeriesRadioButton.AutoSize = true;
+      this.timeSeriesRadioButton.Location = new System.Drawing.Point(6, 62);
+      this.timeSeriesRadioButton.Name = "timeSeriesRadioButton";
+      this.timeSeriesRadioButton.Size = new System.Drawing.Size(119, 17);
+      this.timeSeriesRadioButton.TabIndex = 30;
+      this.timeSeriesRadioButton.Text = "Time series forecast";
+      this.timeSeriesRadioButton.UseVisualStyleBackColor = true;
+      this.timeSeriesRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged);
+      // 
+      // minTimeOffsetLabel
+      // 
+      this.minTimeOffsetLabel.AutoSize = true;
+      this.minTimeOffsetLabel.Enabled = false;
+      this.minTimeOffsetLabel.Location = new System.Drawing.Point(38, 106);
+      this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";
+      this.minTimeOffsetLabel.Size = new System.Drawing.Size(87, 13);
+      this.minTimeOffsetLabel.TabIndex = 31;
+      this.minTimeOffsetLabel.Text = "Min. Time Offset:";
+      // 
+      // minTimeOffsetTextBox
+      // 
+      this.minTimeOffsetTextBox.Enabled = false;
+      this.minTimeOffsetTextBox.Location = new System.Drawing.Point(131, 103);
+      this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";
+      this.minTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.minTimeOffsetTextBox.TabIndex = 32;
+      this.minTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.minTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // learningTaskGroupBox
+      // 
+      this.learningTaskGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveLabel);
+      this.learningTaskGroupBox.Controls.Add(this.classificationRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetLabel);
+      this.learningTaskGroupBox.Controls.Add(this.regressionRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetTextBox);
+      this.learningTaskGroupBox.Controls.Add(this.timeSeriesRadioButton);
+      this.learningTaskGroupBox.Controls.Add(this.autoregressiveCheckBox);
+      this.learningTaskGroupBox.Location = new System.Drawing.Point(335, 452);
+      this.learningTaskGroupBox.Name = "learningTaskGroupBox";
+      this.learningTaskGroupBox.Size = new System.Drawing.Size(326, 163);
+      this.learningTaskGroupBox.TabIndex = 35;
+      this.learningTaskGroupBox.TabStop = false;
+      this.learningTaskGroupBox.Text = "Learning task";
+      // 
+      // autoregressiveLabel
+      // 
+      this.autoregressiveLabel.AutoSize = true;
+      this.autoregressiveLabel.Enabled = false;
+      this.autoregressiveLabel.Location = new System.Drawing.Point(45, 83);
+      this.autoregressiveLabel.Name = "autoregressiveLabel";
+      this.autoregressiveLabel.Size = new System.Drawing.Size(80, 13);
+      this.autoregressiveLabel.TabIndex = 35;
+      this.autoregressiveLabel.Text = "Autoregressive:";
+      // 
+      // maxTimeOffsetLabel
+      // 
+      this.maxTimeOffsetLabel.AutoSize = true;
+      this.maxTimeOffsetLabel.Enabled = false;
+      this.maxTimeOffsetLabel.Location = new System.Drawing.Point(35, 132);
+      this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";
+      this.maxTimeOffsetLabel.Size = new System.Drawing.Size(90, 13);
+      this.maxTimeOffsetLabel.TabIndex = 33;
+      this.maxTimeOffsetLabel.Text = "Max. Time Offset:";
+      // 
+      // maxTimeOffsetTextBox
+      // 
+      this.maxTimeOffsetTextBox.Enabled = false;
+      this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(131, 129);
+      this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";
+      this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);
+      this.maxTimeOffsetTextBox.TabIndex = 34;
+      this.maxTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);
+      this.maxTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);
+      // 
+      // datasetView1
+      // 
+      this.datasetView1.Location = new System.Drawing.Point(3, 32);
+      this.datasetView1.Name = "datasetView1";
+      this.datasetView1.Size = new System.Drawing.Size(770, 414);
+      this.datasetView1.TabIndex = 36;
+      // 
+      // ProblemView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.datasetView1);
+      this.Controls.Add(this.learningTaskGroupBox);
+      this.Controls.Add(this.partitioningGroupBox);
+      this.Controls.Add(this.importButton);
+      this.Name = "ProblemView";
+      this.Size = new System.Drawing.Size(776, 615);
+      this.partitioningGroupBox.ResumeLayout(false);
+      this.partitioningGroupBox.PerformLayout();
+      this.learningTaskGroupBox.ResumeLayout(false);
+      this.learningTaskGroupBox.PerformLayout();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button importButton;
+    private System.Windows.Forms.TextBox trainingSamplesStartTextBox;
+    private System.Windows.Forms.Label trainingLabel;
+    private System.Windows.Forms.TextBox trainingSamplesEndTextBox;
+    private System.Windows.Forms.TextBox validationSamplesEndTextBox;
+    private System.Windows.Forms.TextBox validationSamplesStartTextBox;
+    private System.Windows.Forms.Label validationLabel;
+    private System.Windows.Forms.TextBox testSamplesEndTextBox;
+    private System.Windows.Forms.TextBox testSamplesStartTextBox;
+    private System.Windows.Forms.Label testLabel;
+    private System.Windows.Forms.CheckBox autoregressiveCheckBox;
+    private System.Windows.Forms.GroupBox partitioningGroupBox;
+    private System.Windows.Forms.OpenFileDialog openFileDialog;
+    private System.Windows.Forms.RadioButton classificationRadioButton;
+    private System.Windows.Forms.RadioButton regressionRadioButton;
+    private System.Windows.Forms.RadioButton timeSeriesRadioButton;
+    private System.Windows.Forms.Label minTimeOffsetLabel;
+    private System.Windows.Forms.TextBox minTimeOffsetTextBox;
+    private System.Windows.Forms.GroupBox learningTaskGroupBox;
+    private System.Windows.Forms.Label maxTimeOffsetLabel;
+    private System.Windows.Forms.TextBox maxTimeOffsetTextBox;
+    private System.Windows.Forms.Label autoregressiveLabel;
+    private HeuristicLab.DataAnalysis.DatasetView datasetView1;
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs	(revision 2223)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.cs	(revision 2223)
@@ -0,0 +1,238 @@
+﻿#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.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Core;
+using HeuristicLab.DataAnalysis;
+using System.Diagnostics;
+using HeuristicLab.CEDMA.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public partial class ProblemView : ViewBase {
+    private Problem problem;
+
+    public ProblemView(Problem problem) {
+      this.problem = problem;
+      problem.Changed += (sender, args) => UpdateControls();
+      InitializeComponent();
+      UpdateControls();
+    }
+
+    protected override void UpdateControls() {
+      base.UpdateControls();
+      trainingSamplesStartTextBox.Text = problem.TrainingSamplesStart.ToString();
+      trainingSamplesEndTextBox.Text = problem.TrainingSamplesEnd.ToString();
+      validationSamplesStartTextBox.Text = problem.ValidationSamplesStart.ToString();
+      validationSamplesEndTextBox.Text = problem.ValidationSamplesEnd.ToString();
+      testSamplesStartTextBox.Text = problem.TestSamplesStart.ToString();
+      testSamplesEndTextBox.Text = problem.TestSamplesEnd.ToString();
+      minTimeOffsetTextBox.Text = problem.MinTimeOffset.ToString();
+      maxTimeOffsetTextBox.Text = problem.MaxTimeOffset.ToString();
+      autoregressiveCheckBox.Checked = problem.AutoRegressive;
+      switch (problem.LearningTask) {
+        case LearningTask.Classification: classificationRadioButton.Checked = true; break;
+        case LearningTask.Regression: regressionRadioButton.Checked = true; break;
+        case LearningTask.TimeSeries: timeSeriesRadioButton.Checked = true; break;
+      }
+    }
+
+    private void importButton_Click(object sender, EventArgs e) {
+      if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
+        DatasetParser parser = new DatasetParser();
+        bool success = false;
+        try {
+          try {
+            parser.Import(openFileDialog.FileName, true);
+            success = true;
+          }
+          catch (DataFormatException ex) {
+            ShowWarningMessageBox(ex);
+            // not possible to parse strictly => clear and try to parse non-strict
+            parser.Reset();
+            parser.Import(openFileDialog.FileName, false);
+            success = true;
+          }
+        }
+        catch (DataFormatException ex) {
+          // if the non-strict parsing also failed then show the exception
+          ShowErrorMessageBox(ex);
+        }
+        if (success) {
+          Dataset dataset = (Dataset)problem.Dataset;
+          dataset.Rows = parser.Rows;
+          dataset.Columns = parser.Columns;
+          for (int i = 0; i < parser.VariableNames.Length; i++) {
+            dataset.SetVariableName(i, parser.VariableNames[i]);
+          }
+          dataset.Name = parser.ProblemName;
+          dataset.Samples = new double[dataset.Rows * dataset.Columns];
+          Array.Copy(parser.Samples, dataset.Samples, dataset.Columns * dataset.Rows);
+          datasetView1.Dataset = problem.Dataset;
+
+          problem.TrainingSamplesStart = parser.TrainingSamplesStart;
+          problem.ValidationSamplesEnd = parser.TrainingSamplesStart;
+          problem.TrainingSamplesEnd = parser.TrainingSamplesEnd;
+          problem.ValidationSamplesStart = parser.ValidationSamplesStart;
+          problem.ValidationSamplesEnd = parser.ValidationSamplesEnd;
+          problem.TestSamplesStart = parser.TestSamplesStart;
+          problem.TestSamplesEnd = parser.TestSamplesEnd;
+          //problem.AllowedTargetVariables.Add(parser.TargetVariable);
+          problem.FireChanged();
+          //List<int> nonInputVariables = parser.NonInputVariables;
+          //for (int i = 0; i < dataset.Columns; i++) {
+          //  if (!nonInputVariables.Contains(i)) problem.AllowedInputVariables.Add(i);
+          //}
+          Refresh();
+        }
+      }
+    }
+
+    //private void targetsListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+    //  if (e.NewValue == CheckState.Checked && !problem.AllowedTargetVariables.Contains(e.Index))
+    //    problem.AllowedTargetVariables.Add(e.Index);
+    //  else if (e.NewValue == CheckState.Unchecked && problem.AllowedTargetVariables.Contains(e.Index))
+    //    problem.AllowedTargetVariables.Remove(e.Index);
+    //}
+
+    //private void inputsListBox_ItemCheck(object sender, ItemCheckEventArgs e) {
+    //  if (e.NewValue == CheckState.Checked && !problem.AllowedInputVariables.Contains(e.Index))
+    //    problem.AllowedInputVariables.Add(e.Index);
+    //  else if (e.NewValue == CheckState.Unchecked && problem.AllowedInputVariables.Contains(e.Index))
+    //    problem.AllowedInputVariables.Remove(e.Index);
+    //}
+
+    private void autoregressiveCheckBox_CheckedChanged(object sender, EventArgs e) {
+      problem.AutoRegressive = autoregressiveCheckBox.Checked;
+    }
+
+    private void samplesTextBox_Validating(object sender, CancelEventArgs e) {
+      try {
+        int trainingStart = int.Parse(trainingSamplesStartTextBox.Text);
+        int trainingEnd = int.Parse(trainingSamplesEndTextBox.Text);
+        int validationStart = int.Parse(validationSamplesStartTextBox.Text);
+        int validationEnd = int.Parse(validationSamplesEndTextBox.Text);
+        int testStart = int.Parse(testSamplesStartTextBox.Text);
+        int testEnd = int.Parse(testSamplesEndTextBox.Text);
+        if (trainingStart < 0 || validationStart < 0 || testStart < 0 ||
+          trainingEnd >= problem.Dataset.Rows || validationEnd >= problem.Dataset.Rows || testEnd >= problem.Dataset.Rows ||
+          trainingStart >= trainingEnd ||
+          validationStart >= validationEnd ||
+          testStart >= testEnd ||
+          IsOverlapping(trainingStart, trainingEnd, validationStart, validationEnd) ||
+          IsOverlapping(trainingStart, trainingEnd, testStart, testEnd) ||
+          IsOverlapping(validationStart, validationEnd, testStart, testEnd))
+          ColorSamplesTextBoxes(Color.Red);
+        else
+          ColorSamplesTextBoxes(Color.White);
+      }
+      catch (FormatException ex) {
+        ColorSamplesTextBoxes(Color.Red);
+      }
+    }
+
+    private void samplesTextBox_Validated(object sender, EventArgs e) {
+      problem.TrainingSamplesStart = int.Parse(trainingSamplesStartTextBox.Text);
+      problem.TrainingSamplesEnd = int.Parse(trainingSamplesEndTextBox.Text);
+      problem.ValidationSamplesStart = int.Parse(validationSamplesStartTextBox.Text);
+      problem.ValidationSamplesEnd = int.Parse(validationSamplesEndTextBox.Text);
+      problem.TestSamplesStart = int.Parse(testSamplesStartTextBox.Text);
+      problem.TestSamplesEnd = int.Parse(testSamplesEndTextBox.Text);
+    }
+
+    private void ColorSamplesTextBoxes(Color color) {
+      trainingSamplesStartTextBox.BackColor = color;
+      trainingSamplesEndTextBox.BackColor = color;
+      validationSamplesStartTextBox.BackColor = color;
+      validationSamplesEndTextBox.BackColor = color;
+      testSamplesStartTextBox.BackColor = color;
+      testSamplesEndTextBox.BackColor = color;
+    }
+
+    private bool IsOverlapping(int x0, int y0, int x1, int y1) {
+      Trace.Assert(x0 <= y0 && x1 <= y1);
+      int tmp;
+      // make sure that x0,y0 is the left interval
+      if (x1 < x0) {
+        tmp = x1;
+        x1 = x0;
+        x0 = tmp;
+        tmp = y1;
+        y1 = y0;
+        y0 = tmp;
+      }
+      return y0 > x1;
+    }
+    private void ShowWarningMessageBox(Exception ex) {
+      MessageBox.Show(ex.Message,
+                      "Warning - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Warning);
+    }
+    private void ShowErrorMessageBox(Exception ex) {
+      MessageBox.Show(BuildErrorMessage(ex),
+                      "Error - " + ex.GetType().Name,
+                      MessageBoxButtons.OK,
+                      MessageBoxIcon.Error);
+    }
+    private string BuildErrorMessage(Exception ex) {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("Sorry, but something went wrong!\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+
+      while (ex.InnerException != null) {
+        ex = ex.InnerException;
+        sb.Append("\n\n-----\n\n" + ex.Message + "\n\n" + ex.StackTrace);
+      }
+      return sb.ToString();
+    }
+
+    #region gui events
+    private void radioButton_CheckedChanged(object sender, EventArgs e) {
+      minTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      minTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;
+      maxTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveCheckBox.Enabled = timeSeriesRadioButton.Checked;
+      autoregressiveLabel.Enabled = timeSeriesRadioButton.Checked;
+      if (timeSeriesRadioButton.Checked) problem.LearningTask = LearningTask.TimeSeries;
+      else if (classificationRadioButton.Checked) problem.LearningTask = LearningTask.Classification;
+      else if (regressionRadioButton.Checked) problem.LearningTask = LearningTask.Regression;
+    }
+
+    private void timeOffsetTextBox_Validating(object sender, CancelEventArgs e) {
+      int min, max;
+      e.Cancel = !int.TryParse(minTimeOffsetTextBox.Text, out min);
+      e.Cancel = !int.TryParse(maxTimeOffsetTextBox.Text, out max);
+      e.Cancel = min > max;
+    }
+    private void timeOffsetTextBox_Validated(object sender, EventArgs e) {
+      problem.MinTimeOffset = int.Parse(minTimeOffsetTextBox.Text);
+      problem.MaxTimeOffset = int.Parse(maxTimeOffsetTextBox.Text);
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx	(revision 2223)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemView.resx	(revision 2223)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs	(revision 2223)
@@ -27,23 +27,23 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using HeuristicLab.Grid;
 using HeuristicLab.Grid.HiveBridge;
 using HeuristicLab.Core;
+using HeuristicLab.Modeling.Database;
+using HeuristicLab.Modeling.Database.SQLServerCompact;
 
 namespace HeuristicLab.CEDMA.Server {
   public class Server : IViewable {
-    private static readonly string rdfFile = AppDomain.CurrentDomain.BaseDirectory + "rdf_store.db3";
-    private static readonly string rdfConnectionString = "sqlite:rdf:Data Source=\"" + rdfFile + "\"";
+    private static readonly string sqlServerCompactFile = AppDomain.CurrentDomain.BaseDirectory + "HeuristicLab.Modeling.database.sdf";
+    private static readonly string sqlServerCompactConnectionString = @"Data Source=" + sqlServerCompactFile;
 
-    private ServiceHost host;
-    private Store store;
-
+    private DatabaseService database;
     private IDispatcher dispatcher;
     public IDispatcher Dispatcher { get { return dispatcher; } }
     private IExecuter executer;
     public IExecuter Executer { get { return executer; } }
+    private Problem problem;
+    public Problem Problem { get { return problem; } }
 
     private string gridServiceUrl;
@@ -53,46 +53,16 @@
     }
 
-    private string cedmaServiceUrl;
-    public string CedmaServiceUrl {
-      get { return cedmaServiceUrl; }
-      set { cedmaServiceUrl = value; }
-    }
-
     public Server() {
-      IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName());
-      // windows XP returns the external ip on index 0 while windows vista returns the external ip as one of the last entries
-      // also if IPv6 protocol is installed we want to find an entry that is IPv4
-      int index = 0;
-      if (System.Environment.OSVersion.Version.Major >= 6) {
-        for (index = addresses.Length - 1; index >= 0; index--)
-          if (addresses[index].AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
-            break;
+      database = new DatabaseService(sqlServerCompactConnectionString);
+      problem = new Problem();
+      try {
+        problem.Dataset = database.GetDataset();
       }
-      cedmaServiceUrl = "net.tcp://" + addresses[index] + ":8002/CEDMA";
-      store = new Store(rdfConnectionString);
-    }
-
-    public void Start() {
-      host = new ServiceHost(store, new Uri(cedmaServiceUrl));
-      ServiceThrottlingBehavior throttlingBehavior = new ServiceThrottlingBehavior();
-      throttlingBehavior.MaxConcurrentSessions = 20;
-      host.Description.Behaviors.Add(throttlingBehavior);
-      try {
-        NetTcpBinding binding = new NetTcpBinding();
-        binding.SendTimeout = new TimeSpan(10, 0, 0);
-        binding.MaxReceivedMessageSize = int.MaxValue;
-        binding.ReaderQuotas.MaxStringContentLength = int.MaxValue;
-        binding.ReaderQuotas.MaxArrayLength = int.MaxValue;
-        host.AddServiceEndpoint(typeof(IStore), binding, cedmaServiceUrl);
-        host.Open();
-      }
-      catch (CommunicationException ex) {
-        MessageBox.Show("An exception occurred: " + ex.Message);
-        host.Abort();
+      catch (InvalidOperationException ex) {
       }
     }
 
     internal void Connect(string serverUrl) {
-      dispatcher = new SimpleDispatcher(store);
+      dispatcher = new SimpleDispatcher(database, problem);
       IGridServer gridServer = null;
       if (serverUrl.Contains("ExecutionEngine")) {
@@ -102,5 +72,5 @@
         gridServer = new GridServerProxy(serverUrl);
       }
-      executer = new GridExecuter(dispatcher, store, gridServer);
+      executer = new GridExecuter(dispatcher, gridServer, database);
       executer.Start();
     }
@@ -110,5 +80,4 @@
       return new ServerView(this);
     }
-
     #endregion
   }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerApplication.cs	(revision 2223)
@@ -27,14 +27,13 @@
 
 namespace HeuristicLab.CEDMA.Server {
-  [ClassInfo(Name = "CEDMA Server", Description = "Server to execute CEDMA agents.", AutoRestart=true)]
+  [ClassInfo(Name = "CEDMA", Description = "Cooperative Evolutionary Data Mining.", AutoRestart=true)]
   class ServerApplication : ApplicationBase {
     public override void Run() {
       Server server = new Server();
-      server.Start();
       Form mainForm = new Form();
       UserControl serverControl = (UserControl)server.CreateView();
       serverControl.Dock = DockStyle.Fill;
       mainForm.Controls.Add(serverControl);
-      mainForm.Name = "CEDMA Server";
+      mainForm.Name = "CEDMA";
       Application.Run(mainForm);
     }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.cs	(revision 2223)
@@ -32,6 +32,4 @@
 using HeuristicLab.PluginInfrastructure;
 using System.Net;
-using HeuristicLab.CEDMA.DB;
-using HeuristicLab.CEDMA.DB.Interfaces;
 using System.Data.Common;
 using System.Threading;
@@ -47,5 +45,4 @@
       this.server = server;
       InitializeComponent();
-      addressTextBox.Text = server.CedmaServiceUrl;
     }
 
@@ -58,4 +55,7 @@
       dispatcherControl.Dock = DockStyle.Fill;
       dispatcherTabPage.Controls.Add(dispatcherControl);
+      UserControl problemControl = (UserControl)server.Problem.CreateView();
+      problemControl.Dock = DockStyle.Fill;
+      problemPage.Controls.Add(problemControl);
       connectButton.Enabled = false;      
     }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/ServerView.designer.cs	(revision 2223)
@@ -45,6 +45,4 @@
     /// </summary>
     private void InitializeComponent() {
-      this.addressTextBox = new System.Windows.Forms.TextBox();
-      this.externalAddressLabel = new System.Windows.Forms.Label();
       this.gridAddressLabel = new System.Windows.Forms.Label();
       this.address = new System.Windows.Forms.TextBox();
@@ -53,23 +51,7 @@
       this.executerTabPage = new System.Windows.Forms.TabPage();
       this.dispatcherTabPage = new System.Windows.Forms.TabPage();
+      this.problemPage = new System.Windows.Forms.TabPage();
       this.tabControl.SuspendLayout();
       this.SuspendLayout();
-      // 
-      // addressTextBox
-      // 
-      this.addressTextBox.Location = new System.Drawing.Point(106, 6);
-      this.addressTextBox.Name = "addressTextBox";
-      this.addressTextBox.ReadOnly = true;
-      this.addressTextBox.Size = new System.Drawing.Size(229, 20);
-      this.addressTextBox.TabIndex = 0;
-      // 
-      // externalAddressLabel
-      // 
-      this.externalAddressLabel.AutoSize = true;
-      this.externalAddressLabel.Location = new System.Drawing.Point(12, 9);
-      this.externalAddressLabel.Name = "externalAddressLabel";
-      this.externalAddressLabel.Size = new System.Drawing.Size(48, 13);
-      this.externalAddressLabel.TabIndex = 3;
-      this.externalAddressLabel.Text = "&Address:";
       // 
       // gridAddressLabel
@@ -106,4 +88,5 @@
       this.tabControl.Controls.Add(this.executerTabPage);
       this.tabControl.Controls.Add(this.dispatcherTabPage);
+      this.tabControl.Controls.Add(this.problemPage);
       this.tabControl.Location = new System.Drawing.Point(3, 58);
       this.tabControl.Name = "tabControl";
@@ -132,5 +115,15 @@
       this.dispatcherTabPage.UseVisualStyleBackColor = true;
       // 
-      // ServerForm
+      // problemPage
+      // 
+      this.problemPage.Location = new System.Drawing.Point(4, 22);
+      this.problemPage.Name = "problemPage";
+      this.problemPage.Padding = new System.Windows.Forms.Padding(3);
+      this.problemPage.Size = new System.Drawing.Size(565, 517);
+      this.problemPage.TabIndex = 2;
+      this.problemPage.Text = "Problem";
+      this.problemPage.UseVisualStyleBackColor = true;
+      // 
+      // ServerView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -140,7 +133,5 @@
       this.Controls.Add(this.gridAddressLabel);
       this.Controls.Add(this.address);
-      this.Controls.Add(this.externalAddressLabel);
-      this.Controls.Add(this.addressTextBox);
-      this.Name = "ServerForm";
+      this.Name = "ServerView";
       this.Size = new System.Drawing.Size(579, 604);
       this.tabControl.ResumeLayout(false);
@@ -152,6 +143,4 @@
     #endregion
 
-    private System.Windows.Forms.TextBox addressTextBox;
-    private System.Windows.Forms.Label externalAddressLabel;
     private System.Windows.Forms.Label gridAddressLabel;
     private System.Windows.Forms.TextBox address;
@@ -160,4 +149,5 @@
     private System.Windows.Forms.TabPage executerTabPage;
     private System.Windows.Forms.TabPage dispatcherTabPage;
+    private System.Windows.Forms.TabPage problemPage;
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2222)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2223)
@@ -27,6 +27,4 @@
 using System.Net;
 using System.ServiceModel;
-using HeuristicLab.CEDMA.DB.Interfaces;
-using HeuristicLab.CEDMA.DB;
 using System.ServiceModel.Description;
 using System.Linq;
@@ -35,4 +33,5 @@
 using HeuristicLab.Core;
 using HeuristicLab.Modeling;
+using HeuristicLab.Modeling.Database;
 
 namespace HeuristicLab.CEDMA.Server {
@@ -44,11 +43,9 @@
     }
 
-    private Random random;
-    private IStore store;
+    private Random random;    
     private Dictionary<int, List<AlgorithmConfiguration>> finishedAndDispatchedRuns;
 
-    public SimpleDispatcher(IStore store)
-      : base(store) {
-      this.store = store;
+    public SimpleDispatcher(IModelingDatabase database, Problem problem)
+      : base(database, problem) {      
       random = new Random();
       finishedAndDispatchedRuns = new Dictionary<int, List<AlgorithmConfiguration>>();
@@ -56,8 +53,8 @@
     }
 
-    public override IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
+    public override HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
       DiscoveryService ds = new DiscoveryService();
-      IAlgorithm[] algos = ds.GetInstances<IAlgorithm>();
-      IAlgorithm selectedAlgorithm = null;
+      HeuristicLab.Modeling.IAlgorithm[] algos = ds.GetInstances<HeuristicLab.Modeling.IAlgorithm>();
+      HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = null;
       switch (problem.LearningTask) {
         case LearningTask.Regression: {
@@ -86,5 +83,5 @@
     }
 
-    private IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<IAlgorithm> algos) {
+    private HeuristicLab.Modeling.IAlgorithm ChooseDeterministic(int targetVariable, int[] inputVariables, IEnumerable<HeuristicLab.Modeling.IAlgorithm> algos) {
       var deterministicAlgos = algos
         .Where(a => (a as IStochasticAlgorithm) == null)
@@ -95,5 +92,5 @@
     }
 
-    private IAlgorithm ChooseStochastic(IEnumerable<IAlgorithm> regressionAlgos) {
+    private HeuristicLab.Modeling.IAlgorithm ChooseStochastic(IEnumerable<HeuristicLab.Modeling.IAlgorithm> regressionAlgos) {
       var stochasticAlgos = regressionAlgos.Where(a => (a as IStochasticAlgorithm) != null);
       if (stochasticAlgos.Count() == 0) return null;
@@ -102,53 +99,53 @@
 
     private void PopulateFinishedRuns() {
-      Dictionary<Entity, Entity> processedModels = new Dictionary<Entity, Entity>();
-      var datasetBindings = store
-        .Query(
-        "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1)
-        .Select(x => (Entity)x.Get("Dataset"));
-
-      if (datasetBindings.Count() > 0) {
-        var datasetEntity = datasetBindings.ElementAt(0);
-
-        DataSet ds = new DataSet(store, datasetEntity);
-        var result = store
-          .Query(
-          "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine +
-          "?Model <" + Ontology.Name + "> ?AlgoName .",
-          0, 1000)
-          .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName"), (Entity)x.Get("Model") });
-
-        foreach (Resource[] row in result) {
-          Entity model = ((Entity)row[2]);
-          if (!processedModels.ContainsKey(model)) {
-            processedModels.Add(model, model);
-
-            string targetVariable = (string)((Literal)row[0]).Value;
-            string algoName = (string)((Literal)row[1]).Value;
-            int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable);
-
-            var inputVariableLiterals = store
-              .Query(
-                "<" + model.Uri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." + Environment.NewLine +
-                "?InputVariable <" + Ontology.Name + "> ?Name .",
-                0, 1000)
-              .Select(x => (Literal)x.Get("Name"))
-              .Select(l => (string)l.Value)
-              .Distinct();
-
-            List<int> inputVariables = new List<int>();
-            foreach (string variableName in inputVariableLiterals) {
-              int variableIndex = ds.Problem.Dataset.GetVariableIndex(variableName);
-              inputVariables.Add(variableIndex);
-            }
-            if (!AlgorithmFinishedOrDispatched(targetVariableIndex, inputVariables.ToArray(), algoName)) {
-              AddDispatchedRun(targetVariableIndex, inputVariables.ToArray(), algoName);
-            }
-          }
-        }
-      }
-    }
-
-    private void SetProblemParameters(IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
+      //Dictionary<Entity, Entity> processedModels = new Dictionary<Entity, Entity>();
+      //var datasetBindings = store
+      //  .Query(
+      //  "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1)
+      //  .Select(x => (Entity)x.Get("Dataset"));
+
+      //if (datasetBindings.Count() > 0) {
+      //  var datasetEntity = datasetBindings.ElementAt(0);
+
+      //  DataSet ds = new DataSet(store, datasetEntity);
+      //  var result = store
+      //    .Query(
+      //    "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine +
+      //    "?Model <" + Ontology.Name + "> ?AlgoName .",
+      //    0, 1000)
+      //    .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName"), (Entity)x.Get("Model") });
+
+      //  foreach (Resource[] row in result) {
+      //    Entity model = ((Entity)row[2]);
+      //    if (!processedModels.ContainsKey(model)) {
+      //      processedModels.Add(model, model);
+
+      //      string targetVariable = (string)((Literal)row[0]).Value;
+      //      string algoName = (string)((Literal)row[1]).Value;
+      //      int targetVariableIndex = ds.Problem.Dataset.GetVariableIndex(targetVariable);
+
+      //      var inputVariableLiterals = store
+      //        .Query(
+      //          "<" + model.Uri + "> <" + Ontology.HasInputVariable + "> ?InputVariable ." + Environment.NewLine +
+      //          "?InputVariable <" + Ontology.Name + "> ?Name .",
+      //          0, 1000)
+      //        .Select(x => (Literal)x.Get("Name"))
+      //        .Select(l => (string)l.Value)
+      //        .Distinct();
+
+      //      List<int> inputVariables = new List<int>();
+      //      foreach (string variableName in inputVariableLiterals) {
+      //        int variableIndex = ds.Problem.Dataset.GetVariableIndex(variableName);
+      //        inputVariables.Add(variableIndex);
+      //      }
+      //      if (!AlgorithmFinishedOrDispatched(targetVariableIndex, inputVariables.ToArray(), algoName)) {
+      //        AddDispatchedRun(targetVariableIndex, inputVariables.ToArray(), algoName);
+      //      }
+      //    }
+      //  }
+      //}
+    }
+
+    private void SetProblemParameters(HeuristicLab.Modeling.IAlgorithm algo, Problem problem, int targetVariable, int[] inputVariables) {
       algo.Dataset = problem.Dataset;
       algo.TargetVariable = targetVariable;
