Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleCrossover.cs	(revision 6475)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding {
+  [Item("DirectScheduleCrossover", "An operator which crosses two schedule representations.")]
+  [StorableClass]
+  public abstract class DirectScheduleCrossover : ScheduleCrossover<Schedule>, IDirectScheduleOperator {
+    [StorableConstructor]
+    protected DirectScheduleCrossover(bool deserializing) : base(deserializing) { }
+    protected DirectScheduleCrossover(DirectScheduleCrossover original, Cloner cloner) : base(original, cloner) { }
+    public DirectScheduleCrossover()
+      : base() {
+      ParentsParameter.ActualName = "Schedule";
+      ChildParameter.ActualName = "Schedule";
+      Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the JSSP - Instance."));
+    }
+
+
+    public ILookupParameter<ItemList<Job>> JobDataParameter {
+      get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }
+    }
+
+    public abstract Schedule Cross(IRandom random, Schedule parent1, Schedule parent2);
+
+    public override IOperation Apply() {
+      ItemArray<Schedule> parents = ParentsParameter.ActualValue;
+      ChildParameter.ActualValue =
+        Cross(RandomParameter.ActualValue, parents[0] as Schedule, parents[1] as Schedule);
+      return base.Apply();
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleGTCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleGTCrossover.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Crossovers/DirectScheduleGTCrossover.cs	(revision 6475)
@@ -0,0 +1,116 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding {
+  [Item("DirectScheduleGTCrossover", "Represents a crossover using the GT-Algorithm to cross two direct schedule representations.")]
+  [StorableClass]
+  public class DirectScheduleGTCrossover : DirectScheduleCrossover {
+    [StorableConstructor]
+    protected DirectScheduleGTCrossover(bool deserializing) : base(deserializing) { }
+    protected DirectScheduleGTCrossover(DirectScheduleGTCrossover original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DirectScheduleGTCrossover(this, cloner);
+    }
+    public DirectScheduleGTCrossover()
+      : base() {
+      Parameters.Add(new LookupParameter<PercentValue>("MutationProbability", "The probability that the mutation operator is applied on a solution."));
+    }
+
+
+    private LookupParameter<PercentValue> MutationProbabilityParameter {
+      get { return (LookupParameter<PercentValue>)Parameters["MutationProbability"]; }
+    }
+
+
+    public static Schedule Apply(IRandom random, Schedule parent1, Schedule parent2, ItemList<Job> jobData, double mutProp) {
+      Schedule child = new Schedule(parent1.Resources.Count);
+
+
+      //Reset scheduled tasks in result
+      foreach (Job j in jobData) {
+        foreach (Task t in j.Tasks) {
+          t.IsScheduled = false;
+        }
+      }
+
+      //GT-Algorithm
+      //STEP 0 - Compute a list of "earliest operations"
+      ItemList<Task> earliestTasksList = GTAlgorithmUtils.GetEarliestNotScheduledTasks(jobData);
+      while (earliestTasksList.Count > 0) {
+        //STEP 1 - Get earliest not scheduled operation with minimal earliest completing time
+        Task minimal = GTAlgorithmUtils.GetTaskWithMinimalEC(earliestTasksList, child);
+        int conflictedResourceNr = minimal.ResourceNr;
+        Resource conflictedResource = child.Resources[conflictedResourceNr];
+
+        //STEP 2 - Compute a conflict set of all operations that can be scheduled on the conflicted resource
+        ItemList<Task> conflictSet = GTAlgorithmUtils.GetConflictSetForTask(minimal, earliestTasksList, jobData, child);
+
+        //STEP 3 - Select a task from the conflict set
+        int progressOnResource = conflictedResource.Tasks.Count;
+        Task selectedTask = null;
+        if (random.Next(100) < mutProp) {
+          //Mutation
+          selectedTask = conflictSet[random.Next(conflictSet.Count)];
+        } else {
+          //Crossover
+          selectedTask = SelectTaskFromConflictSet(conflictSet, ((random.Next(2) == 0) ? parent1 : parent2), conflictedResourceNr, progressOnResource);
+        }
+
+        //STEP 4 - Add the selected task to the current schedule 
+        selectedTask.IsScheduled = true;
+        double startTime = GTAlgorithmUtils.ComputeEarliestStartTime(selectedTask, child);
+        child.ScheduleTask(selectedTask.ResourceNr, startTime, selectedTask.Duration, selectedTask.JobNr);
+
+        //STEP 5 - Back to STEP 1
+        earliestTasksList = GTAlgorithmUtils.GetEarliestNotScheduledTasks(jobData);
+      }
+
+      return child;
+    }
+
+
+    private static Task SelectTaskFromConflictSet(ItemList<Task> conflictSet, Schedule usedParent, int conflictedResourceNr, int progressOnResource) {
+      //Apply Crossover
+      foreach (ScheduledTask st in usedParent.Resources[conflictedResourceNr].Tasks) {
+        foreach (Task t in conflictSet) {
+          if (st.JobNr == t.JobNr)
+            return t;
+        }
+      }
+      return conflictSet[0];
+    }
+
+
+    public override Schedule Cross(IRandom random, Schedule parent1, Schedule parent2) {
+      ItemList<Job> jobData = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
+      PercentValue mutProp = MutationProbabilityParameter.ActualValue;
+      return Apply(random, parent1, parent2, jobData, mutProp.Value);
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs	(revision 6475)
@@ -0,0 +1,97 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.ScheduleEncoding.PermutationWithRepetition;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+
+namespace HeuristicLab.Encodings.ScheduleEncoding {
+  [Item("DirectScheduleRandomCreator", "Creator class used to create schedule encoding objects.")]
+  [StorableClass]
+  public class DirectScheduleRandomCreator : ScheduleCreator<Schedule>, IStochasticOperator {
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+    public IValueLookupParameter<IntValue> JobsParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["Jobs"]; }
+    }
+    public IValueLookupParameter<IntValue> ResourcesParameter {
+      get { return (IValueLookupParameter<IntValue>)Parameters["Resources"]; }
+    }
+    public ILookupParameter<ItemList<Job>> JobDataParameter {
+      get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }
+    }
+
+
+    [StorableConstructor]
+    protected DirectScheduleRandomCreator(bool deserializing) : base(deserializing) { }
+    protected DirectScheduleRandomCreator(DirectScheduleRandomCreator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new DirectScheduleRandomCreator(this, cloner);
+    }
+    public DirectScheduleRandomCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Jobs", "The number of jobs handled in this problem instance."));
+      Parameters.Add(new ValueLookupParameter<IntValue>("Resources", "The number of resources used in this problem instance."));
+      Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the JSSP - Instance."));
+      ScheduleEncodingParameter.ActualName = "Schedule";
+    }
+
+
+    public static Schedule Apply(int jobs, int resources, PWREncoding pwr, ItemList<Job> jobData) {
+      Schedule resultingSchedule = new Schedule(jobData[0].Tasks.Count);
+      foreach (int jobNr in pwr.PermutationWithRepetition) {
+        int i = 0;
+        while (jobData[jobNr].Tasks[i].IsScheduled) i++;
+        Task currentTask = jobData[jobNr].Tasks[i];
+        double startTime = GTAlgorithmUtils.ComputeEarliestStartTime(currentTask, resultingSchedule);
+        currentTask.IsScheduled = true;
+        resultingSchedule.ScheduleTask(currentTask.ResourceNr, startTime, currentTask.Duration, currentTask.JobNr);
+      }
+      return resultingSchedule;
+    }
+
+
+
+    protected override Schedule CreateSolution() {
+      try {
+        ItemList<Job> jobData = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
+        return Apply(JobsParameter.ActualValue.Value,
+          ResourcesParameter.ActualValue.Value,
+          new PWREncoding(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue),
+          jobData);
+      }
+      catch {
+        throw new Exception("ScheduleRandomCreator needs JobData parameter from a JSSP-Instance to create Schedule-Instances!");
+      }
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/GTAlgorithmUtils.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/GTAlgorithmUtils.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/GTAlgorithmUtils.cs	(revision 6475)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 HeuristicLab.Core;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding {
+  public static class GTAlgorithmUtils {
+
+    public static ItemList<Task> GetEarliestNotScheduledTasks(ItemList<Job> jobData) {
+      ItemList<Task> result = new ItemList<Task>();
+      foreach (Job j in jobData) {
+        foreach (Task t in j.Tasks) {
+          if (!t.IsScheduled) {
+            result.Add(t);
+            break;
+          }
+        }
+      }
+      return result;
+    }
+    public static Task GetTaskWithMinimalEC(ItemList<Task> earliestTasksList, Schedule schedule) {
+      double minEct = double.MaxValue;
+      Task result = null;
+      foreach (Task t in earliestTasksList) {
+        double ect = ComputeEarliestCompletionTime(t, schedule);
+        if (ect < minEct) {
+          result = t;
+          minEct = ect;
+        }
+      }
+      return result;
+    }
+    public static ItemList<Task> GetConflictSetForTask(Task conflictedTask, ItemList<Task> earliestTasksList, ItemList<Job> jobData, Schedule schedule) {
+      ItemList<Task> result = new ItemList<Task>();
+      double conflictedCompletionTime = ComputeEarliestCompletionTime(conflictedTask, schedule);
+      result.Add(conflictedTask);
+      foreach (Task t in earliestTasksList) {
+        if (t.ResourceNr == conflictedTask.ResourceNr) {
+          if (ComputeEarliestStartTime(t, schedule) < conflictedCompletionTime)
+            result.Add(t);
+        }
+      }
+      return result;
+    }
+
+    public static double ComputeEarliestStartTime(Task t, Schedule schedule) {
+      ScheduledTask previousTask = schedule.GetLastScheduledTaskForJobNr(t.JobNr);
+      Resource affectedResource = schedule.Resources[t.ResourceNr];
+      double lastMachineEndTime = affectedResource.TotalDuration;
+      double previousJobTaskEndTime = 0;
+      if (previousTask != null)
+        previousJobTaskEndTime = previousTask.EndTime;
+
+      return Math.Max(previousJobTaskEndTime, lastMachineEndTime);
+    }
+    public static double ComputeEarliestCompletionTime(Task t, Schedule schedule) {
+      return ComputeEarliestStartTime(t, schedule) + t.Duration;
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Job.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Job.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Job.cs	(revision 6475)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding {
+  [Item("Job", "Represents a composition of tasks that require processing in a scheduling problem.")]
+  [StorableClass]
+  public class Job : Item {
+    [Storable]
+    public double DueDate { get; set; }
+    [Storable]
+    public int Index { get; set; }
+    [Storable]
+    public ItemList<Task> Tasks { get; set; }
+
+    [StorableConstructor]
+    protected Job(bool deserializing) : base(deserializing) { }
+    protected Job(Job original, Cloner cloner)
+      : base(original, cloner) {
+      this.DueDate = original.DueDate;
+      this.Index = original.Index;
+      this.Tasks = cloner.Clone(original.Tasks);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Job(this, cloner);
+    }
+    public Job(int index, double dueDate)
+      : base() {
+      Index = index;
+      Tasks = new ItemList<Task>();
+
+      if (dueDate != null)
+        DueDate = dueDate;
+
+    }
+
+    public override string ToString() {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("Job#" + Index + " [ ");
+      foreach (Task t in Tasks) {
+        sb.Append(t.ToString() + " ");
+      }
+      if (DueDate != null)
+        sb.Append("{" + DueDate + "} ");
+      sb.Append("]");
+      return sb.ToString();
+    }
+
+    internal Task GetPreviousTask(Task t) {
+      if (t.TaskNr == 0)
+        return null;
+      else
+        return Tasks[t.TaskNr - 1];
+    }
+
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/ConcreteScheduleManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/ConcreteScheduleManipulator.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/ConcreteScheduleManipulator.cs	(revision 6475)
@@ -0,0 +1,50 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding {
+
+  [Item("ConcreteScheduleManipulator", "Represents an operator somehow mutating a schedule instance.")]
+  [StorableClass]
+  public class ConcreteScheduleManipulator : DirectScheduleManipulator {
+    [StorableConstructor]
+    protected ConcreteScheduleManipulator(bool deserializing) : base(deserializing) { }
+    protected ConcreteScheduleManipulator(ConcreteScheduleManipulator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ConcreteScheduleManipulator(this, cloner);
+    }
+    public ConcreteScheduleManipulator() : base() { }
+
+
+    public static void Apply(IRandom random, Schedule individual) {
+      //somehow manipulate individual
+    }
+
+    protected override void Manipulate(IRandom random, Schedule individual) {
+      Apply(random, individual);
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Manipulators/DirectScheduleManipulator.cs	(revision 6475)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding.ScheduleEncoding {
+  [Item("DirectScheduleManipulator", "An operator which manipulates a direct schedule representation.")]
+  [StorableClass]
+  public abstract class DirectScheduleManipulator : ScheduleManipulator<Schedule>, IDirectScheduleOperator {
+    [StorableConstructor]
+    protected DirectScheduleManipulator(bool deserializing) : base(deserializing) { }
+    protected DirectScheduleManipulator(DirectScheduleManipulator original, Cloner cloner) : base(original, cloner) { }
+    public DirectScheduleManipulator()
+      : base() {
+      ScheduleEncodingParameter.ActualName = "Schedule";
+    }
+
+
+    protected abstract void Manipulate(IRandom random, Schedule individual);
+    public override IOperation Apply() {
+      Schedule solution = ScheduleEncodingParameter.ActualValue;
+      Manipulate(RandomParameter.ActualValue, solution);
+      return base.Apply();
+    }
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Resource.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Resource.cs	(revision 6414)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Resource.cs	(revision 6475)
@@ -75,4 +75,23 @@
       return sb.ToString();
     }
+
+
+    public override bool Equals(object obj) {
+      if (obj.GetType() == typeof(Resource))
+        return AreEqual(this, obj as Resource);
+      else
+        return false;
+    }
+
+    private static bool AreEqual(Resource res1, Resource res2) {
+      if (res1.Tasks.Count != res2.Tasks.Count)
+        return false;
+      for (int i = 0; i < res1.Tasks.Count; i++) {
+        if (!res1.Tasks[i].Equals(res2.Tasks[i]))
+          return false;
+      }
+
+      return true;
+    }
   }
 }
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs	(revision 6414)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Schedule.cs	(revision 6475)
@@ -31,5 +31,5 @@
   [Item("Schedule", "Represents the general solution for scheduling problems.")]
   [StorableClass]
-  public class Schedule : NamedItem {
+  public class Schedule : NamedItem, IScheduleEncoding {
     #region Properties
     [Storable]
@@ -79,4 +79,5 @@
       lastScheduledTaskOfJob = new Dictionary<int, ScheduledTask>();
     }
+
 
 
@@ -159,4 +160,23 @@
       return quality;
     }
+
+    public override bool Equals(object obj) {
+      if (obj.GetType() == typeof(Schedule))
+        return AreEqual(this, obj as Schedule);
+      else
+        return false;
+    }
+
+    private static bool AreEqual(Schedule schedule1, Schedule schedule2) {
+      if (schedule1.Resources.Count != schedule2.Resources.Count)
+        return false;
+      for (int i = 0; i < schedule1.Resources.Count; i++) {
+        if (!schedule1.Resources[i].Equals(schedule2.Resources[i]))
+          return false;
+      }
+
+      return true;
+    }
+
   }
 }
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs	(revision 6414)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/ScheduledTask.cs	(revision 6475)
@@ -71,4 +71,20 @@
       return sb.ToString();
     }
+
+
+    public override bool Equals(object obj) {
+      if (obj.GetType() == typeof(ScheduledTask))
+        return AreEqual(this, obj as ScheduledTask);
+      else
+        return false;
+    }
+
+    public static bool AreEqual(ScheduledTask task1, ScheduledTask task2) {
+      return (task1.Duration == task2.Duration &&
+        task1.JobNr == task2.JobNr &&
+        task1.ResourceNr == task2.ResourceNr &&
+        task1.StartTime == task2.StartTime &&
+        task1.EndTime == task2.EndTime);
+    }
   }
 }
Index: branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Task.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Task.cs	(revision 6475)
+++ branches/Scheduling/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Task.cs	(revision 6475)
@@ -0,0 +1,87 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Encodings.ScheduleEncoding {
+  [Item("Task", "Represents a task that has to be scheduled.")]
+  [StorableClass]
+  public class Task : Item {
+    [Storable]
+    public int TaskNr { get; set; }
+    [Storable]
+    public int ResourceNr { get; set; }
+    [Storable]
+    public int JobNr { get; set; }
+    [Storable]
+    public double Duration { get; set; }
+    [Storable]
+    public bool IsScheduled { get; set; }
+
+    [StorableConstructor]
+    protected Task(bool deserializing) : base(deserializing) { }
+    protected Task(Task original, Cloner cloner)
+      : base(original, cloner) {
+      this.ResourceNr = original.ResourceNr;
+      this.JobNr = original.JobNr;
+      this.Duration = original.Duration;
+      this.TaskNr = original.TaskNr;
+      this.IsScheduled = original.IsScheduled;
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Task(this, cloner);
+    }
+
+
+    public Task(int taskNr, int resNr, int jobNr, double duration)
+      : base() {
+      Duration = duration;
+      ResourceNr = resNr;
+      JobNr = jobNr;
+      TaskNr = taskNr;
+      IsScheduled = false;
+    }
+
+    public override string ToString() {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("[" + TaskNr + "," + ResourceNr + "]");
+      return sb.ToString();
+    }
+
+    public override bool Equals(object obj) {
+      if (obj.GetType() == typeof(Task))
+        return AreEqual(this, obj as Task);
+      else
+        return false;
+    }
+
+    public static bool AreEqual(Task task1, Task task2) {
+      return (task1.Duration == task2.Duration &&
+        task1.IsScheduled == task2.IsScheduled &&
+        task1.JobNr == task2.JobNr &&
+        task1.ResourceNr == task2.ResourceNr &&
+        task1.TaskNr == task2.TaskNr);
+    }
+  }
+}
