Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2152)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs	(revision 2153)
@@ -41,4 +41,7 @@
     private IStore store;
     private DataSet dataset;
+    private List<int> allowedTargetVariables;
+    private Dictionary<int, List<int>> activeInputVariables;
+
     internal event EventHandler Changed;
     private object locker = new object();
@@ -60,11 +63,8 @@
     }
 
-    private List<int> allowedInputVariables;
-    private List<int> allowedTargetVariables;
-
     public DispatcherBase(IStore store) {
       this.store = store;
-      allowedInputVariables = new List<int>();
       allowedTargetVariables = new List<int>();
+      activeInputVariables = new Dictionary<int, List<int>>();
     }
 
@@ -75,20 +75,33 @@
         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();
       }
-      if (allowedTargetVariables.Count > 0 && allowedInputVariables.Count > 0) {
+      if (allowedTargetVariables.Count > 0) {
         int[] targetVariables, inputVariables;
         lock (locker) {
           targetVariables = allowedTargetVariables.ToArray();
-          inputVariables = allowedInputVariables.ToArray();
         }
 
-        IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariables, inputVariables, dataset.Problem);
-        
+        int targetVariable = SelectTargetVariable(targetVariables);
+
+        lock (locker) {
+          inputVariables = activeInputVariables[targetVariable].ToArray();
+        }
+
+        IAlgorithm selectedAlgorithm = SelectAndConfigureAlgorithm(targetVariable, inputVariables, dataset.Problem);
+
         return selectedAlgorithm;
       } else return null;
     }
 
-    public abstract IAlgorithm SelectAndConfigureAlgorithm(int[] targetVariables, int[] inputVariables, Problem problem);
+    public virtual int SelectTargetVariable(int[] targetVariables) {
+      Random rand = new Random();
+      return targetVariables[rand.Next(targetVariables.Length)];
+    }
+    public abstract IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem);
 
     #region IViewable Members
@@ -99,9 +112,4 @@
 
     #endregion
-
-    internal void EnableInputVariable(string name) {
-      lock (locker)
-        allowedInputVariables.Add(dataset.Problem.Dataset.GetVariableIndex(name));
-    }
 
     internal void EnableTargetVariable(string name) {
@@ -115,7 +123,20 @@
     }
 
-    internal void DisableInputVariable(string name) {
-      lock (locker)
-        allowedInputVariables.Remove(dataset.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);
+        if (!activeInputVariables[targetIndex].Contains(inputIndex)) {
+          activeInputVariables[targetIndex].Add(inputIndex);
+        }
+      }
+    }
+
+    internal void DisableInputVariable(string target, string name) {
+      lock (locker) {
+        int targetIndex = dataset.Problem.Dataset.GetVariableIndex(target);
+        int inputIndex = dataset.Problem.Dataset.GetVariableIndex(name);
+        while (activeInputVariables[targetIndex].Remove(inputIndex)) { }
+      }
     }
 
@@ -123,4 +144,9 @@
       if (Changed != null) Changed(this, new EventArgs());
     }
+
+    internal IEnumerable<string> GetInputVariables(string target) {
+      return activeInputVariables[dataset.Problem.Dataset.GetVariableIndex(target)]
+        .Select(i => dataset.Problem.Dataset.GetVariableName(i));
+    }
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs	(revision 2152)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs	(revision 2153)
@@ -28,21 +28,34 @@
       this.targetVariablesLabel = new System.Windows.Forms.Label();
       this.inputVariablesLabel = new System.Windows.Forms.Label();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
       this.SuspendLayout();
       // 
       // targetVariableList
       // 
+      this.targetVariableList.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.targetVariableList.FormattingEnabled = true;
-      this.targetVariableList.Location = new System.Drawing.Point(3, 16);
+      this.targetVariableList.HorizontalScrollbar = true;
+      this.targetVariableList.Location = new System.Drawing.Point(6, 16);
       this.targetVariableList.Name = "targetVariableList";
-      this.targetVariableList.Size = new System.Drawing.Size(171, 409);
+      this.targetVariableList.Size = new System.Drawing.Size(193, 454);
       this.targetVariableList.TabIndex = 0;
       this.targetVariableList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.targetVariableList_ItemCheck);
+      this.targetVariableList.SelectedValueChanged += new System.EventHandler(this.targetVariableList_SelectedValueChanged);
       // 
       // inputVariableList
       // 
+      this.inputVariableList.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.inputVariableList.FormattingEnabled = true;
-      this.inputVariableList.Location = new System.Drawing.Point(194, 16);
+      this.inputVariableList.HorizontalScrollbar = true;
+      this.inputVariableList.Location = new System.Drawing.Point(2, 16);
       this.inputVariableList.Name = "inputVariableList";
-      this.inputVariableList.Size = new System.Drawing.Size(170, 409);
+      this.inputVariableList.Size = new System.Drawing.Size(221, 454);
       this.inputVariableList.TabIndex = 1;
       this.inputVariableList.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.inputVariableList_ItemCheck);
@@ -60,5 +73,5 @@
       // 
       this.inputVariablesLabel.AutoSize = true;
-      this.inputVariablesLabel.Location = new System.Drawing.Point(191, 0);
+      this.inputVariablesLabel.Location = new System.Drawing.Point(3, 0);
       this.inputVariablesLabel.Name = "inputVariablesLabel";
       this.inputVariablesLabel.Size = new System.Drawing.Size(79, 13);
@@ -66,16 +79,37 @@
       this.inputVariablesLabel.Text = "Input variables:";
       // 
+      // splitContainer
+      // 
+      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
+      this.splitContainer.Location = new System.Drawing.Point(0, 0);
+      this.splitContainer.Name = "splitContainer";
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.targetVariablesLabel);
+      this.splitContainer.Panel1.Controls.Add(this.targetVariableList);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.inputVariablesLabel);
+      this.splitContainer.Panel2.Controls.Add(this.inputVariableList);
+      this.splitContainer.Size = new System.Drawing.Size(429, 482);
+      this.splitContainer.SplitterDistance = 202;
+      this.splitContainer.SplitterWidth = 1;
+      this.splitContainer.TabIndex = 4;
+      // 
       // DispatcherView
       // 
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.inputVariablesLabel);
-      this.Controls.Add(this.targetVariablesLabel);
-      this.Controls.Add(this.inputVariableList);
-      this.Controls.Add(this.targetVariableList);
+      this.Controls.Add(this.splitContainer);
       this.Name = "DispatcherView";
       this.Size = new System.Drawing.Size(429, 482);
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.Panel2.PerformLayout();
+      this.splitContainer.ResumeLayout(false);
       this.ResumeLayout(false);
-      this.PerformLayout();
 
     }
@@ -87,4 +121,5 @@
     private System.Windows.Forms.Label targetVariablesLabel;
     private System.Windows.Forms.Label inputVariablesLabel;
+    private System.Windows.Forms.SplitContainer splitContainer;
   }
 }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2152)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs	(revision 2153)
@@ -20,12 +20,20 @@
 
     protected override void UpdateControls() {
-      base.UpdateControls();
+      if (InvokeRequired) {
+        Invoke((Action)UpdateControls);
+      } else {
+        base.UpdateControls();
+        targetVariableList.Items.Clear();
+        inputVariableList.Items.Clear();
 
-      foreach (string targetVar in dispatcher.TargetVariables) {
-        targetVariableList.Items.Add(targetVar);
-      }
+        foreach (string targetVar in dispatcher.TargetVariables) {
+          targetVariableList.Items.Add(targetVar, false);
+        }
 
-      foreach (string inputVar in dispatcher.InputVariables) {
-        inputVariableList.Items.Add(inputVar);
+        foreach (string inputVar in dispatcher.InputVariables) {
+          inputVariableList.Items.Add(inputVar, false);
+        }
+        targetVariableList.ClearSelected();
+        inputVariableList.Enabled = false;
       }
     }
@@ -40,9 +48,24 @@
 
     private void inputVariableList_ItemCheck(object sender, ItemCheckEventArgs e) {
+      string selectedTarget = (string)targetVariableList.SelectedItem;
       if (e.NewValue == CheckState.Checked) {
-        dispatcher.EnableInputVariable((string)inputVariableList.Items[e.Index]);
+        dispatcher.EnableInputVariable(selectedTarget, (string)inputVariableList.Items[e.Index]);
       } else if (e.NewValue == CheckState.Unchecked) {
-        dispatcher.DisableInputVariable((string)inputVariableList.Items[e.Index]);
+        dispatcher.DisableInputVariable(selectedTarget, (string)inputVariableList.Items[e.Index]);
       }
+    }
+
+    private void targetVariableList_SelectedValueChanged(object sender, EventArgs e) {
+      string selectedTarget = (string)targetVariableList.SelectedItem;
+      UpdateInputVariableList(selectedTarget);
+    }
+
+    private void UpdateInputVariableList(string target) {
+      inputVariableList.Items.Clear();
+      var activatedInputVariables = dispatcher.GetInputVariables(target);
+      foreach (string inputVar in dispatcher.InputVariables) {
+        inputVariableList.Items.Add(inputVar, activatedInputVariables.Contains(inputVar));
+      }
+      inputVariableList.Enabled = true;
     }
   }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2152)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2153)
@@ -116,5 +116,5 @@
 
         catch (Exception ex) {
-          HeuristicLab.Tracing.Logger.Warn("CEDMA Executer: Exception in job-management thread. " + ex.Message);
+          HeuristicLab.Tracing.Logger.Warn("CEDMA Executer: Exception in job-management thread. " + ex.Message + Environment.NewLine + ex.StackTrace);
         }
       }
Index: trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
===================================================================
--- trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2152)
+++ trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs	(revision 2153)
@@ -57,7 +57,5 @@
     }
 
-    public override IAlgorithm SelectAndConfigureAlgorithm(int[] targetVariables, int[] inputVariables, Problem problem) {
-      int targetVariable = SelectTargetVariable(targetVariables);
-
+    public override IAlgorithm SelectAndConfigureAlgorithm(int targetVariable, int[] inputVariables, Problem problem) {
       DiscoveryService ds = new DiscoveryService();
       IAlgorithm[] algos = ds.GetInstances<IAlgorithm>();
@@ -102,8 +100,4 @@
       if (stochasticAlgos.Count() == 0) return null;
       return stochasticAlgos.ElementAt(random.Next(stochasticAlgos.Count()));
-    }
-
-    public int SelectTargetVariable(int[] targetVariables) {
-      return targetVariables[random.Next(targetVariables.Length)];
     }
 
