Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2258)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2290)
@@ -37,124 +37,4 @@
 namespace HeuristicLab.CEDMA.Server {
   public abstract class DispatcherBase : IDispatcher {
-    private IModelingDatabase database;
-    public IModelingDatabase Database {
-      get {
-        return database;
-      }
-    }
-    private List<int> allowedTargetVariables;
-    private Dictionary<int, List<int>> activeInputVariables;
-    private Problem problem;
-    public Problem Problem {
-      get {
-        return problem;
-      }
-    }
-    internal event EventHandler Changed;
-    private object locker = new object();
-
-    public IEnumerable<string> TargetVariables {
-      get {
-        if (problem != null) {
-          return Enumerable.Range(0, problem.Dataset.Columns).Select(x => problem.Dataset.GetVariableName(x));
-        } else return new string[0];
-      }
-    }
-
-    public IEnumerable<string> InputVariables {
-      get {
-        if (problem != null) {
-          return TargetVariables;
-        } else return new string[0];
-      }
-    }
-
-    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 HeuristicLab.Modeling.IAlgorithm GetNextJob() {
-      if (allowedTargetVariables.Count > 0) {
-        int[] targetVariables, inputVariables;
-        lock (locker) {
-          targetVariables = allowedTargetVariables.ToArray();
-        }
-
-        int targetVariable = SelectTargetVariable(targetVariables);
-
-        lock (locker) {
-          inputVariables = activeInputVariables[targetVariable].ToArray();
-        }
-
-        HeuristicLab.Modeling.IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, problem);
-
-        return selectedAlgorithm;
-      } else return null;
-    }
-
-    public virtual int SelectTargetVariable(int[] targetVariables) {
-      Random rand = new Random();
-      return targetVariables[rand.Next(targetVariables.Length)];
-    }
-    public abstract HeuristicLab.Modeling.IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
-
-    #region IViewable Members
-
-    public IView CreateView() {
-      return new DispatcherView(this);
-    }
-
-    #endregion
-
-    internal void EnableTargetVariable(string name) {
-      lock (locker)
-        allowedTargetVariables.Add(problem.Dataset.GetVariableIndex(name));
-    }
-
-    internal void DisableTargetVariable(string name) {
-      lock (locker)
-        allowedTargetVariables.Remove(problem.Dataset.GetVariableIndex(name));
-    }
-
-    internal void EnableInputVariable(string target, string name) {
-      lock (locker) {
-        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);
-        }
-      }
-    }
-
-    internal void DisableInputVariable(string target, string name) {
-      lock (locker) {
-        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)) { }
-      }
-    }
-
-    private void OnChanged() {
-      if (Changed != null) Changed(this, new EventArgs());
-    }
-
-    internal IEnumerable<string> GetInputVariables(string target) {
-      int targetIndex = problem.Dataset.GetVariableIndex(target);
-      if (!activeInputVariables.ContainsKey(targetIndex)) activeInputVariables[targetIndex] = new List<int>();
-      return activeInputVariables[targetIndex]
-        .Select(i => problem.Dataset.GetVariableName(i));
-    }
   }
 }
