Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/DispatcherBase.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/DispatcherBase.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/DispatcherBase.cs	(revision 1311)
@@ -0,0 +1,138 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+using System.Linq;
+using HeuristicLab.CEDMA.Core;
+using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public abstract class DispatcherBase :IDispatcher {
+    public enum ModelComplexity { Low, Medium, High };
+    public enum Algorithm { StandardGP };
+
+    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[] { }}
+    };
+
+    public DispatcherBase(IStore store) {
+      this.store = store;
+    }
+
+    public Execution GetNextJob() {
+      // find and select a dataset
+      var dataSetVar = new HeuristicLab.CEDMA.DB.Interfaces.Variable("DataSet");
+      var dataSetQuery = new Statement[] {
+        new Statement(dataSetVar, Ontology.PredicateInstanceOf, Ontology.TypeDataSet)
+      };
+
+      Entity[] datasets = store.Query("?DataSet <" + Ontology.PredicateInstanceOf.Uri + "> <" + Ontology.TypeDataSet.Uri + "> .")
+        .Select(x => (Entity)x.Get("DataSet"))
+        .ToArray();
+
+      // no datasets => do nothing
+      if (datasets.Length == 0) return null;
+
+      Entity dataSetEntity = SelectDataSet(datasets);
+      DataSet dataSet = new DataSet(store, dataSetEntity);
+
+      int targetVariable = SelectTargetVariable(dataSet, dataSet.Problem.AllowedInputVariables.ToArray());
+      Algorithm selectedAlgorithm = SelectAlgorithm(dataSet, targetVariable, possibleAlgorithms[dataSet.Problem.LearningTask]);
+      string targetVariableName = dataSet.Problem.GetVariableName(targetVariable);
+      ModelComplexity selectedComplexity = SelectComplexity(dataSet, targetVariable, selectedAlgorithm, possibleComplexities);
+
+      Execution exec = CreateExecution(dataSet.Problem, targetVariable, selectedAlgorithm, selectedComplexity);
+      if (exec != null) {
+        exec.DataSetEntity = dataSetEntity;
+        exec.TargetVariable = targetVariableName;
+      }
+      return exec;
+    }
+
+    public abstract Entity SelectDataSet(Entity[] datasets);
+    public abstract int SelectTargetVariable(DataSet dataSet, int[] targetVariables);
+    public abstract Algorithm SelectAlgorithm(DataSet dataSet, int targetVariable, Algorithm[] possibleAlgorithms);
+    public abstract ModelComplexity SelectComplexity(DataSet dataSet, int targetVariable, Algorithm algorithm, ModelComplexity[] possibleComplexities);
+
+    private Execution CreateExecution(Problem problem, int targetVariable, Algorithm algorithm, ModelComplexity complexity) {
+      switch (algorithm) {
+        case Algorithm.StandardGP: {
+            return CreateStandardGpExecution(problem, targetVariable, complexity);
+          }
+        default: {
+            return null;
+          }
+      }
+    }
+
+    private Execution CreateStandardGpExecution(Problem problem, int targetVariable, ModelComplexity complexity) {
+      ProblemInjector probInjector = new 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;
+      switch (complexity) {
+        case ModelComplexity.Low: {
+            maxTreeHeight = 5;
+            maxTreeSize = 20;
+            break;
+          }
+        case ModelComplexity.Medium: {
+            maxTreeHeight = 10;
+            maxTreeSize = 100;
+            break;
+          }
+        case ModelComplexity.High: {
+            maxTreeHeight = 12;
+            maxTreeSize = 200;
+            break;
+          }
+      }
+
+      sgp.MaxTreeHeight = maxTreeHeight;
+      sgp.MaxTreeSize = maxTreeSize;
+      Execution exec = new Execution(sgp.Engine);
+      exec.Description = "StandardGP - Complexity: " + complexity;
+      return exec;
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Executer.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Executer.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Executer.cs	(revision 1311)
@@ -0,0 +1,162 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+using System.Linq;
+using HeuristicLab.CEDMA.Core;
+using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.Data;
+using HeuristicLab.Grid;
+using System.Diagnostics;
+using HeuristicLab.Core;
+using System.Threading;
+
+namespace HeuristicLab.CEDMA.Server {
+  public class Executer {
+    private IDispatcher dispatcher;
+    private JobManager jobManager;
+    private IStore store;
+    private Dictionary<WaitHandle, Execution> activeExecutions;
+
+    private TimeSpan StartJobInterval {
+      get { return TimeSpan.FromMilliseconds(500); }
+    }
+
+    private TimeSpan WaitForFinishedJobsTimeout {
+      get { return TimeSpan.FromMilliseconds(100); }
+    }
+
+    private int maxActiveJobs;
+    public int MaxActiveJobs {
+      get { return maxActiveJobs; }
+      set {
+        if (value < 0) throw new ArgumentException("Only positive values are allowed for MaxActiveJobs");
+        maxActiveJobs = value;
+      }
+    }
+
+    public Executer(IDispatcher dispatcher, IStore store, string gridUrl) {
+      activeExecutions = new Dictionary<WaitHandle, Execution>();
+      maxActiveJobs = 10;
+      this.dispatcher = dispatcher;
+      this.store = store;
+      this.jobManager = new JobManager(gridUrl);
+      jobManager.Reset();
+    }
+
+    internal void Start() {
+      new Thread(StartJobs).Start();
+    }
+
+    private void StartJobs() {
+      List<WaitHandle> wh = new List<WaitHandle>();
+      Dictionary<WaitHandle, AtomicOperation> activeOperations = new Dictionary<WaitHandle, AtomicOperation>();
+      while (true) {
+        try {
+          // start new jobs as long as there are less than MaxActiveJobs 
+          while (wh.Count < MaxActiveJobs) {
+            Thread.Sleep(StartJobInterval);
+            // get an execution from the dispatcher and execute in grid via job-manager
+            Execution execution = dispatcher.GetNextJob();
+            if (execution != null) {
+              AtomicOperation op = new AtomicOperation(execution.Engine.OperatorGraph.InitialOperator, execution.Engine.GlobalScope);
+              WaitHandle opWh = jobManager.BeginExecuteOperation(execution.Engine.GlobalScope, op);
+              wh.Add(opWh);
+              activeOperations.Add(opWh, op);
+              lock (activeExecutions) {
+                activeExecutions.Add(opWh, execution);
+              }
+            }
+          }
+          // wait until any job is finished
+          WaitHandle[] whArr = wh.ToArray();
+          int readyHandleIndex = WaitHandle.WaitAny(whArr, WaitForFinishedJobsTimeout);
+          if (readyHandleIndex != WaitHandle.WaitTimeout) {
+            WaitHandle readyHandle = whArr[readyHandleIndex];
+            AtomicOperation finishedOp = activeOperations[readyHandle];
+            wh.Remove(readyHandle);
+            Execution finishedExecution = null;
+            lock (activeExecutions) {
+              finishedExecution = activeExecutions[readyHandle];
+              activeExecutions.Remove(readyHandle);
+            }
+            activeOperations.Remove(readyHandle);
+            ProcessingEngine finishedEngine = null;
+            try {
+              finishedEngine = jobManager.EndExecuteOperation(finishedOp);
+            }
+            catch (Exception badEx) {
+              Trace.WriteLine("CEDMA Executer: Exception in job execution thread. " + badEx.Message);
+            }
+            if (finishedEngine != null) {
+              StoreResults(finishedExecution, finishedEngine);
+            }
+          }
+        }
+        catch (Exception ex) {
+          Trace.WriteLine("CEDMA Executer: Exception in job-management thread. " + ex.Message);
+        }
+      }
+    }
+
+    private void StoreResults(Execution finishedExecution, ProcessingEngine finishedEngine) {
+      Entity model = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid());
+      store.Add(new Statement(model, Ontology.PredicateInstanceOf, Ontology.TypeGeneticProgrammingFunctionTree));
+      store.Add(new Statement(finishedExecution.DataSetEntity, Ontology.PredicateHasModel, model));
+      StoreModelAttribute(model, Ontology.TargetVariable, finishedExecution.TargetVariable);
+      Scope bestModelScope = finishedEngine.GlobalScope.GetVariableValue<Scope>("BestValidationSolution", false);
+      StoreModelAttribute(model, Ontology.TrainingMeanSquaredError, bestModelScope.GetVariableValue<DoubleData>("Quality", false).Data);
+      StoreModelAttribute(model, Ontology.ValidationMeanSquaredError, bestModelScope.GetVariableValue<DoubleData>("ValidationQuality", false).Data);
+      StoreModelAttribute(model, Ontology.TrainingMeanAbsolutePercentageError, bestModelScope.GetVariableValue<DoubleData>("TrainingMAPE", false).Data);
+      StoreModelAttribute(model, Ontology.ValidationMeanAbsolutePercentageError, bestModelScope.GetVariableValue<DoubleData>("ValidationMAPE", false).Data);
+      StoreModelAttribute(model, Ontology.TreeSize, bestModelScope.GetVariableValue<IntData>("TreeSize", false).Data);
+      StoreModelAttribute(model, Ontology.TreeHeight, bestModelScope.GetVariableValue<IntData>("TreeHeight", false).Data);
+      StoreModelAttribute(model, Ontology.EvaluatedSolutions, bestModelScope.GetVariableValue<IntData>("EvaluatedSolutions", false).Data);
+
+      byte[] serializedModel = PersistenceManager.SaveToGZip(bestModelScope.GetVariableValue("FunctionTree", false));
+      store.Add(new Statement(model, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));
+    }
+
+    private void StoreModelAttribute(Entity model, Entity predicate, object value) {
+      store.Add(new Statement(model, predicate, new Literal(value)));
+    }
+
+    internal string[] GetJobs() {
+      lock (activeExecutions) {
+        string[] retVal = new string[activeExecutions.Count];
+        int i = 0;
+        foreach (Execution e in activeExecutions.Values) {
+          retVal[i++] = "Target-Variable: "+e.TargetVariable+" "+e.Description;
+        }
+        return retVal;
+      }
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Execution.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Execution.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Execution.cs	(revision 1311)
@@ -0,0 +1,71 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+using System.Linq;
+using HeuristicLab.CEDMA.Core;
+using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.Data;
+using HeuristicLab.Grid;
+using System.Diagnostics;
+using HeuristicLab.Core;
+using System.Threading;
+
+namespace HeuristicLab.CEDMA.Server {
+  public class Execution {
+    private Entity dataSetEntity;
+    public Entity DataSetEntity {
+      get { return dataSetEntity; }
+      set { dataSetEntity = value; }
+    }
+
+    private IEngine engine;
+    public IEngine Engine {
+      get { return engine; }
+      set { engine = value; }
+    }
+
+    private string targetVariable;
+    public string TargetVariable {
+      get { return targetVariable; }
+      set { targetVariable = value; }
+    }
+
+    private string description;
+    public string Description {
+      get { return description; }
+      set { description = value; }
+    }
+
+    public Execution(IEngine engine) {
+      this.engine = engine;
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLab.CEDMA.Server.csproj
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLab.CEDMA.Server.csproj	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLab.CEDMA.Server.csproj	(revision 1311)
@@ -0,0 +1,156 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{F05D261A-4F7D-46C9-AB9C-21FD4566D719}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.CEDMA.Server</RootNamespace>
+    <AssemblyName>HeuristicLab.CEDMA.Server-3.2</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>false</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Runtime.Serialization">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.ServiceModel">
+      <RequiredTargetFramework>3.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="DispatcherBase.cs" />
+    <Compile Include="IDispatcher.cs" />
+    <Compile Include="Execution.cs" />
+    <Compile Include="Executer.cs" />
+    <Compile Include="RandomDispatcher.cs" />
+    <Compile Include="Server.cs" />
+    <Compile Include="ServerApplication.cs" />
+    <Compile Include="HeuristicLabCedmaServerPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ServerForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="ServerForm.designer.cs">
+      <DependentUpon>ServerForm.cs</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\HeuristicLab.CEDMA.Core\HeuristicLab.CEDMA.Core.csproj">
+      <Project>{C27DDF6C-84DF-45EF-B82F-57A28DD51166}</Project>
+      <Name>HeuristicLab.CEDMA.Core</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.CEDMA.DB.Interfaces\HeuristicLab.CEDMA.DB.Interfaces.csproj">
+      <Project>{4F9BB789-D561-436B-B226-2BF44B7D0804}</Project>
+      <Name>HeuristicLab.CEDMA.DB.Interfaces</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.CEDMA.DB\HeuristicLab.CEDMA.DB.csproj">
+      <Project>{B3D6D8D9-2B1F-47EC-9C73-77FAECF87310}</Project>
+      <Name>HeuristicLab.CEDMA.DB</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Core\HeuristicLab.Core.csproj">
+      <Project>{F43B59AB-2B8C-4570-BC1E-15592086517C}</Project>
+      <Name>HeuristicLab.Core</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\HeuristicLab.GP.StructureIdentification.csproj">
+      <Project>{74223A32-C726-4978-BE78-37113A18373C}</Project>
+      <Name>HeuristicLab.GP.StructureIdentification</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Grid\HeuristicLab.Grid.csproj">
+      <Project>{545CE756-98D8-423B-AC2E-6E7D70926E5C}</Project>
+      <Name>HeuristicLab.Grid</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.Operators\HeuristicLab.Operators.csproj">
+      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
+      <Name>HeuristicLab.Operators</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="ServerForm.resx">
+      <DependentUpon>ServerForm.cs</DependentUpon>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLabCedmaServerPlugin.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLabCedmaServerPlugin.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/HeuristicLabCedmaServerPlugin.cs	(revision 1311)
@@ -0,0 +1,37 @@
+#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 HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.CEDMA.Server {
+  [ClassInfo(Name = "HeuristicLab.CEDMA.Server-3.2")]
+  [PluginFile(Filename = "HeuristicLab.CEDMA.Server-3.2.dll", Filetype = PluginFileType.Assembly)]
+  [Dependency(Dependency = "HeuristicLab.CEDMA.DB.Interfaces-3.2")]
+  [Dependency(Dependency = "HeuristicLab.CEDMA.DB-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Grid-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Core-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Data-3.2")]
+  public class HeuristicLabCedmaServerPlugin : PluginBase {
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/IDispatcher.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/IDispatcher.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/IDispatcher.cs	(revision 1311)
@@ -0,0 +1,42 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+using System.Linq;
+using HeuristicLab.CEDMA.Core;
+using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public interface IDispatcher {
+    Execution GetNextJob();
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Properties/AssemblyInfo.frame
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Properties/AssemblyInfo.frame	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Properties/AssemblyInfo.frame	(revision 1311)
@@ -0,0 +1,38 @@
+﻿using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using HeuristicLab.PluginInfrastructure;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.CEDMA.Server")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2008 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("209a38c6-cbb8-407e-9158-6f4f60bdadb7")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyFileVersion("3.2.0.$WCREV$")]
+[assembly: AssemblyBuildDate("$WCNOW$")]
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/RandomDispatcher.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/RandomDispatcher.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/RandomDispatcher.cs	(revision 1311)
@@ -0,0 +1,62 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+using System.Linq;
+using HeuristicLab.CEDMA.Core;
+using HeuristicLab.GP.StructureIdentification;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public class RandomDispatcher : DispatcherBase {
+    private Random random;
+    public RandomDispatcher(IStore store)
+      : base(store) {
+      random = new Random();
+    }
+
+    public override Algorithm SelectAlgorithm(DataSet dataSet, int targetVariable, Algorithm[] possibleAlgorithms) {
+      return possibleAlgorithms[random.Next(possibleAlgorithms.Length)];
+    }
+
+    public override ModelComplexity SelectComplexity(DataSet dataSet, int targetVariable, Algorithm algorithm, ModelComplexity[] possibleComplexities) {
+      return possibleComplexities[random.Next(possibleComplexities.Length)];
+    }
+
+    public override Entity SelectDataSet(Entity[] datasets) {
+      return datasets[random.Next(datasets.Length)];
+    }
+
+    public override int SelectTargetVariable(DataSet dataSet, int[] targetVariables) {
+      return targetVariables[random.Next(targetVariables.Length)];
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Server.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Server.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/Server.cs	(revision 1311)
@@ -0,0 +1,86 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using System.ServiceModel;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using HeuristicLab.CEDMA.DB;
+using System.ServiceModel.Description;
+
+namespace HeuristicLab.CEDMA.Server {
+  public class Server {
+    private ServiceHost host;
+    private IStore store;
+
+    private string gridServiceUrl;
+
+    public string GridServiceUrl {
+      get { return gridServiceUrl; }
+      set { gridServiceUrl = value; }
+    }
+
+    private string cedmaServiceUrl;
+
+    public string CedmaServiceUrl {
+      get { return cedmaServiceUrl; }
+      set { cedmaServiceUrl = value; }
+    }
+
+    public Server(IStore store) {
+      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;
+      }
+      cedmaServiceUrl = "net.tcp://" + addresses[index] + ":8002/CEDMA";
+      this.store = store;
+    }
+
+    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(1, 0, 0);
+        binding.MaxReceivedMessageSize = 1000000000; // 100Mbytes
+        binding.ReaderQuotas.MaxStringContentLength = 1000000000; // also 100M chars
+        binding.ReaderQuotas.MaxArrayLength = 1000000000; // also 100M elements;
+        host.AddServiceEndpoint(typeof(IStore), binding, cedmaServiceUrl);
+        host.Open();
+      }
+      catch (CommunicationException ex) {
+        MessageBox.Show("An exception occurred: " + ex.Message);
+        host.Abort();
+      }
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerApplication.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerApplication.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerApplication.cs	(revision 1311)
@@ -0,0 +1,36 @@
+#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.Windows.Forms;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.CEDMA.Server {
+  [ClassInfo(Name = "CEDMA Server", Description = "Server to execute CEDMA agents.", AutoRestart=true)]
+  class ServerApplication : ApplicationBase {
+    public override void Run() {
+      Form mainForm = new ServerForm();
+      Application.Run(mainForm);
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.cs	(revision 1311)
@@ -0,0 +1,78 @@
+#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.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using System.ServiceModel;
+using System.ServiceModel.Description;
+using HeuristicLab.PluginInfrastructure;
+using System.Net;
+using HeuristicLab.CEDMA.DB;
+using HeuristicLab.CEDMA.DB.Interfaces;
+using System.Data.Common;
+using System.Threading;
+using HeuristicLab.Grid;
+using HeuristicLab.Data;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.CEDMA.Server {
+  public partial class ServerForm : Form {
+    private Server server;
+    private Store store;
+    private IDispatcher dispatcher;
+    private Executer executer;
+
+    private static readonly string rdfFile = AppDomain.CurrentDomain.BaseDirectory + "rdf_store.db3";
+    private static readonly string rdfConnectionString = "sqlite:rdf:Data Source=\"" + rdfFile + "\"";
+
+    public ServerForm() {
+      InitializeComponent();
+      store = new Store(rdfConnectionString);
+      server = new Server(store);
+      server.Start();
+      addressTextBox.Text = server.CedmaServiceUrl;
+    }
+
+    private void refreshTimer_Tick(object sender, EventArgs e) {
+      listBox.DataSource = executer.GetJobs();
+    }
+
+    private void connectButton_Click(object sender, EventArgs e) {
+      dispatcher = new RandomDispatcher(store);
+      executer = new Executer(dispatcher, store, gridAddress.Text);
+      executer.Start();
+      maxActiveJobsUpDown.Enabled = true;
+      maxActiveJobsUpDown.Value = executer.MaxActiveJobs;
+      connectButton.Enabled = false;
+      refreshTimer.Start();
+    }
+
+    private void maxActiveJobsUpDown_ValueChanged(object sender, EventArgs e) {
+      executer.MaxActiveJobs = Convert.ToInt32(maxActiveJobsUpDown.Value);
+    }
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.designer.cs
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.designer.cs	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.designer.cs	(revision 1311)
@@ -0,0 +1,176 @@
+#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 {
+  partial class ServerForm {
+    /// <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 Windows Form 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.components = new System.ComponentModel.Container();
+      this.addressTextBox = new System.Windows.Forms.TextBox();
+      this.externalAddressLabel = new System.Windows.Forms.Label();
+      this.gridAddressLabel = new System.Windows.Forms.Label();
+      this.gridAddress = new System.Windows.Forms.TextBox();
+      this.connectButton = new System.Windows.Forms.Button();
+      this.listBox = new System.Windows.Forms.ListBox();
+      this.refreshTimer = new System.Windows.Forms.Timer(this.components);
+      this.maxActiveJobsUpDown = new System.Windows.Forms.NumericUpDown();
+      this.label1 = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.maxActiveJobsUpDown)).BeginInit();
+      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
+      // 
+      this.gridAddressLabel.AutoSize = true;
+      this.gridAddressLabel.Location = new System.Drawing.Point(12, 35);
+      this.gridAddressLabel.Name = "gridAddressLabel";
+      this.gridAddressLabel.Size = new System.Drawing.Size(69, 13);
+      this.gridAddressLabel.TabIndex = 9;
+      this.gridAddressLabel.Text = "&Grid address:";
+      // 
+      // gridAddress
+      // 
+      this.gridAddress.Location = new System.Drawing.Point(106, 32);
+      this.gridAddress.Name = "gridAddress";
+      this.gridAddress.Size = new System.Drawing.Size(160, 20);
+      this.gridAddress.TabIndex = 8;
+      // 
+      // connectButton
+      // 
+      this.connectButton.Location = new System.Drawing.Point(272, 30);
+      this.connectButton.Name = "connectButton";
+      this.connectButton.Size = new System.Drawing.Size(75, 23);
+      this.connectButton.TabIndex = 10;
+      this.connectButton.Text = "Connect";
+      this.connectButton.UseVisualStyleBackColor = true;
+      this.connectButton.Click += new System.EventHandler(this.connectButton_Click);
+      // 
+      // listBox
+      // 
+      this.listBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.listBox.FormattingEnabled = true;
+      this.listBox.Location = new System.Drawing.Point(12, 84);
+      this.listBox.Name = "listBox";
+      this.listBox.Size = new System.Drawing.Size(350, 251);
+      this.listBox.TabIndex = 11;
+      // 
+      // refreshTimer
+      // 
+      this.refreshTimer.Interval = 1000;
+      this.refreshTimer.Tick += new System.EventHandler(this.refreshTimer_Tick);
+      // 
+      // maxActiveJobsUpDown
+      // 
+      this.maxActiveJobsUpDown.Enabled = false;
+      this.maxActiveJobsUpDown.Location = new System.Drawing.Point(106, 59);
+      this.maxActiveJobsUpDown.Maximum = new decimal(new int[] {
+            64,
+            0,
+            0,
+            0});
+      this.maxActiveJobsUpDown.Name = "maxActiveJobsUpDown";
+      this.maxActiveJobsUpDown.Size = new System.Drawing.Size(120, 20);
+      this.maxActiveJobsUpDown.TabIndex = 12;
+      this.maxActiveJobsUpDown.ValueChanged += new System.EventHandler(this.maxActiveJobsUpDown_ValueChanged);
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Enabled = false;
+      this.label1.Location = new System.Drawing.Point(12, 61);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(84, 13);
+      this.label1.TabIndex = 13;
+      this.label1.Text = "&Max active jobs:";
+      // 
+      // ServerForm
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(374, 342);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.maxActiveJobsUpDown);
+      this.Controls.Add(this.listBox);
+      this.Controls.Add(this.connectButton);
+      this.Controls.Add(this.gridAddressLabel);
+      this.Controls.Add(this.gridAddress);
+      this.Controls.Add(this.externalAddressLabel);
+      this.Controls.Add(this.addressTextBox);
+      this.Name = "ServerForm";
+      this.Text = "CEDMA Server";
+      ((System.ComponentModel.ISupportInitialize)(this.maxActiveJobsUpDown)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.TextBox addressTextBox;
+    private System.Windows.Forms.Label externalAddressLabel;
+    private System.Windows.Forms.Label gridAddressLabel;
+    private System.Windows.Forms.TextBox gridAddress;
+    private System.Windows.Forms.Button connectButton;
+    private System.Windows.Forms.ListBox listBox;
+    private System.Windows.Forms.Timer refreshTimer;
+    private System.Windows.Forms.NumericUpDown maxActiveJobsUpDown;
+    private System.Windows.Forms.Label label1;
+  }
+}
Index: /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.resx
===================================================================
--- /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.resx	(revision 1311)
+++ /branches/plugins/HeuristicLab.CEDMA.DB.Server/3.2/ServerForm.resx	(revision 1311)
@@ -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="refreshTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
