Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/BestSchedulingSolutionAnalyzer.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/BestSchedulingSolutionAnalyzer.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Analyzers/BestSchedulingSolutionAnalyzer.cs	(revision 6260)
@@ -121,6 +121,6 @@
         if (max && bestSolution.Quality.Value < qualities[i].Value ||
           !max && bestSolution.Quality.Value > qualities[i].Value) {
-            bestSolution = (Schedule)solutions[i].Clone();
           bestSolution.Quality.Value = qualities[i].Value;
+          bestSolution.Resources = (ItemList<Resource>)solutions[i].Resources.Clone();
         }
       }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCreator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCreator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCreator.cs	(revision 6260)
@@ -34,5 +34,5 @@
   [Item("JobShop Scheduling Problem Creator", "Represents the generalized form of creators for JobShop Scheduling Problems.")]
   [StorableClass]
-  public abstract class JSSPCreator<T> :JSSPOperator, IJSSPCreator where T : Item, IJSSPEncoding{
+  public abstract class JSSPCreator<T> :JSSPOperator, ISchedulingCreator where T : Item, ISchedulingEncoding{
     [StorableConstructor]
     protected JSSPCreator(bool deserializing) : base(deserializing) { }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPCrossover.cs	(revision 6260)
@@ -30,12 +30,12 @@
   [Item("JSSPCrossover", "A scheduling crossover operation.")]
   [StorableClass]
-  public abstract class JSSPCrossover : JSSPOperator, IJSSPCrossover, IStochasticOperator {
+  public abstract class JSSPCrossover<T> : JSSPOperator, ISchedulingCrossover, IStochasticOperator where T : Item, ISchedulingEncoding {
     #region IJSSPCrossover Members
-    public ILookupParameter<ItemArray<IJSSPEncoding>> ParentsParameter {
-      get { return (ScopeTreeLookupParameter<IJSSPEncoding>)Parameters["Parents"]; }
+    public ILookupParameter<ItemArray<T>> ParentsParameter {
+      get { return (ScopeTreeLookupParameter<T>)Parameters["Parents"]; }
     }
 
-    public ILookupParameter<IJSSPEncoding> ChildParameter {
-      get { return (ILookupParameter<IJSSPEncoding>)Parameters["Child"]; }
+    public ILookupParameter<T> ChildParameter {
+      get { return (ILookupParameter<T>)Parameters["Child"]; }
     }
     #endregion
@@ -47,5 +47,5 @@
     [StorableConstructor]
     protected JSSPCrossover(bool deserializing) : base(deserializing) { }
-    protected JSSPCrossover(JSSPCrossover original, Cloner cloner)
+    protected JSSPCrossover(JSSPCrossover<T> original, Cloner cloner)
       : base(original, cloner) {
     }
@@ -53,7 +53,7 @@
       : base() {
         Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
-      Parameters.Add(new ScopeTreeLookupParameter<IJSSPEncoding>("Parents", "The parent solution which should be crossed."));
+      Parameters.Add(new ScopeTreeLookupParameter<T>("Parents", "The parent solution which should be crossed."));
       ParentsParameter.ActualName = "SchedulingSolution";
-      Parameters.Add(new LookupParameter<IJSSPEncoding>("Child", "The child solution resulting from the crossover."));
+      Parameters.Add(new LookupParameter<T>("Child", "The child solution resulting from the crossover."));
       ChildParameter.ActualName = "SchedulingSolution";
     }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPDecoder.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPDecoder.cs	(revision 6260)
@@ -31,5 +31,5 @@
 
 namespace HeuristicLab.Problems.Scheduling.Encodings {
-  public abstract class JSSPDecoder<T> : JSSPOperator, IJSSPDecoder where T : Item, IJSSPEncoding {
+  public abstract class JSSPDecoder<T> : JSSPOperator, ISchedulingDecoder where T : Item, ISchedulingEncoding {
     [StorableConstructor]
     protected JSSPDecoder(bool deserializing) : base(deserializing) { }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPEncodingTypes.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPEncodingTypes.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPEncodingTypes.cs	(revision 6260)
@@ -7,5 +7,6 @@
   public enum JSSPEncodingTypes {
     JSMEncoding,
-    PRVEncoding
+    PRVEncoding,
+    PWREncoding
   }
 }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPManipulator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPManipulator.cs	(revision 6260)
@@ -30,9 +30,9 @@
   [Item("JSSPManipulator", "A JSSP manipulation operation.")]
   [StorableClass]
-  public abstract class JSSPManipulator : JSSPOperator, IJSSPManipulator, IStochasticOperator {
+  public abstract class JSSPManipulator<T> : JSSPOperator, ISchedulingManipulator, IStochasticOperator where T : Item, ISchedulingEncoding {
     #region IJSSPManipulator Members
 
-    public ILookupParameter<IJSSPEncoding> SchedulingSolutionParameter {
-      get { return (ILookupParameter<IJSSPEncoding>)Parameters["SchedulingSolution"]; }
+    public ILookupParameter<T> SchedulingSolutionParameter {
+      get { return (ILookupParameter<T>)Parameters["SchedulingSolution"]; }
     }
 
@@ -45,10 +45,10 @@
     [StorableConstructor]
     protected JSSPManipulator(bool deserializing) : base(deserializing) { }
-    protected JSSPManipulator(JSSPManipulator original, Cloner cloner)
+    protected JSSPManipulator(JSSPManipulator<T> original, Cloner cloner)
       : base(original, cloner) {
     }
     public JSSPManipulator()
       : base() {
-        Parameters.Add(new LookupParameter<IJSSPEncoding>("SchedulingSolution", "The JSSP solution to be manipulated."));
+        Parameters.Add(new LookupParameter<T>("SchedulingSolution", "The JSSP solution to be manipulated."));
         Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
     }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPOperator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPOperator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JSSPOperator.cs	(revision 6260)
@@ -35,5 +35,5 @@
   [Item("SchedulingOperator", "A scheduling operator.")]
   [StorableClass]
-  public abstract class JSSPOperator : SingleSuccessorOperator, IJSSPOperator{
+  public abstract class JSSPOperator : SingleSuccessorOperator, ISchedulingOperator{
     [StorableConstructor]
     protected JSSPOperator(bool deserializing) : base(deserializing) { }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMCrossover.cs	(revision 6260)
@@ -30,5 +30,5 @@
   [Item("JSMCrossover", "An operator which crosses two JSM representations.")]
   [StorableClass]
-  public abstract class JSMCrossover : JSSPCrossover, IJSMOperator {
+  public abstract class JSMCrossover : JSSPCrossover<JSMEncoding>, IJSMOperator {
 
     [StorableConstructor]
@@ -39,8 +39,8 @@
     }
 
-    public abstract IJSSPEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2);
+    public abstract JSMEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2);
 
     public override IOperation Apply() {
-      ItemArray<IJSSPEncoding> parents = ParentsParameter.ActualValue;
+      ItemArray<JSMEncoding> parents = ParentsParameter.ActualValue;
 
       ChildParameter.ActualValue =
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMJOXCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMJOXCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMJOXCrossover.cs	(revision 6260)
@@ -46,9 +46,9 @@
     public JSMJOXCrossover() : base() { }
 
-    public static IJSSPEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+    public static JSMEncoding Cross(IRandom random, JSMEncoding p1, JSMEncoding p2) {
       JSMEncoding result = new JSMEncoding();
 
-      int nrOfResources = parent1.JobSequenceMatrix.Count;
-      int nrOfJobs = parent1.JobSequenceMatrix[0].Length;
+      int nrOfResources = p1.JobSequenceMatrix.Count;
+      int nrOfJobs = p1.JobSequenceMatrix[0].Length;
 
       //Determine randomly which jobindexes persist
@@ -56,5 +56,9 @@
       for (int i = 0; i < persist.Length; i++) {
         persist[i] = random.Next(2) == 1;
-      }
+      }    
+
+      bool dominantParent = random.Next(2) == 1;
+      JSMEncoding parent1 = dominantParent ? p1 : p2;
+      JSMEncoding parent2 = dominantParent ? p2 : p1;
 
       //Fill childmatrix with values
@@ -77,5 +81,5 @@
     }
 
-    public override IJSSPEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+    public override JSMEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
       return Cross(random, parent1, parent2);
     } 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMOXCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMOXCrossover.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMOXCrossover.cs	(revision 6260)
@@ -0,0 +1,62 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Common;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix.Crossovers {
+  [Item("JSM Order Crossover", "Represents a crossover operation swapping sequences of the parents to generate offspring.")]
+  [StorableClass]
+  public class JSMOXCrossover : JSMCrossover {
+    [StorableConstructor]
+    protected JSMOXCrossover(bool deserializing) : base(deserializing) { }
+    protected JSMOXCrossover(JSMOXCrossover original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new JSMOXCrossover(this, cloner);
+    }
+
+    public JSMOXCrossover() : base() { }
+
+    public static JSMEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+      JSMEncoding result = new JSMEncoding ();
+
+      for (int i = 0; i < parent1.JobSequenceMatrix.Count; i++) {
+        result.JobSequenceMatrix.Add (
+          HeuristicLab.Encodings.PermutationEncoding.OrderCrossover.Apply(random, 
+          parent1.JobSequenceMatrix[i], parent2.JobSequenceMatrix[i]));
+      }
+
+      return result;
+    }
+
+    public override JSMEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+      return Cross(random, parent1, parent2);
+    } 
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMOrderCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMOrderCrossover.cs	(revision 6177)
+++ 	(revision )
@@ -1,62 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Common;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Problems.Scheduling.Interfaces;
-
-namespace HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix.Crossovers {
-  [Item("JSM Swap Crossover", "Represents a crossover operation swapping sequences of the parents to generate offspring.")]
-  [StorableClass]
-  public class JSMOrderCrossover : JSMCrossover {
-    [StorableConstructor]
-    protected JSMOrderCrossover(bool deserializing) : base(deserializing) { }
-    protected JSMOrderCrossover(JSMOrderCrossover original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new JSMOrderCrossover(this, cloner);
-    }
-
-    public JSMOrderCrossover() : base() { }
-
-    public static IJSSPEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
-      JSMEncoding result = new JSMEncoding ();
-
-      for (int i = 0; i < parent1.JobSequenceMatrix.Count; i++) {
-        result.JobSequenceMatrix.Add (
-          HeuristicLab.Encodings.PermutationEncoding.OrderCrossover.Apply(random, 
-          parent1.JobSequenceMatrix[i], parent2.JobSequenceMatrix[i]));
-      }
-
-      return result;
-    }
-
-    public override IJSSPEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
-      return Cross(random, parent1, parent2);
-    } 
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMSXXCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMSXXCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Crossovers/JSMSXXCrossover.cs	(revision 6260)
@@ -45,8 +45,8 @@
     public JSMSXXCrossover () : base () {}
 
-    public static IJSSPEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+    public static JSMEncoding Cross(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
       JSMEncoding result = new JSMEncoding();
 
-      int subSequenceLength = 3;
+      int subSequenceLength = random.Next (parent1.JobSequenceMatrix[0].Length);
 
       for (int i = 0; i < parent1.JobSequenceMatrix.Count; i++) {
@@ -102,5 +102,5 @@
 
 
-    public override IJSSPEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
+    public override JSMEncoding Crossover(IRandom random, JSMEncoding parent1, JSMEncoding parent2) {
       return Cross(random, parent1, parent2);
     } 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMDecoder.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMDecoder.cs	(revision 6260)
@@ -41,4 +41,5 @@
       : base(original, cloner) {
         this.resultingSchedule = cloner.Clone(original.resultingSchedule);
+        this.jobs = cloner.Clone(original.jobs);
         this.decodingErrorPolicy = original.decodingErrorPolicy;
         this.forcingStrategy = original.forcingStrategy;
@@ -52,12 +53,17 @@
     }
 
+    #region Private Members
     [Storable]
     private Schedule resultingSchedule;
 
     [Storable]
+    private ItemList<JSSPJob> jobs;
+
+    [Storable]
     private JSMDecodingErrorPolicyTypes decodingErrorPolicy = JSMDecodingErrorPolicyTypes.GuidedPolicy;
 
     [Storable]
-    private JSMForcingStrategyTypes forcingStrategy = JSMForcingStrategyTypes.ShiftForcing;
+    private JSMForcingStrategyTypes forcingStrategy = JSMForcingStrategyTypes.ShiftForcing; 
+    #endregion
 
     public JSMDecoder()
@@ -66,5 +72,5 @@
     }
 
-    private ItemList<JSSPTask> GetEarliestNotScheduledTasks(ItemList<JSSPJob> jobs) {
+    private ItemList<JSSPTask> GetEarliestNotScheduledTasks() {
       ItemList<JSSPTask> result = new ItemList<JSSPTask>();
       foreach (JSSPJob j in jobs) {
@@ -79,9 +85,9 @@
     }
     private JSSPTask GetTaskWithMinimalEC(ItemList<JSSPTask> earliestTasksList) {
-      DoubleValue minEct = new DoubleValue(Double.MaxValue);
+      double minEct = double.MaxValue;
       JSSPTask result = null;
       foreach (JSSPTask t in earliestTasksList) {
-        DoubleValue ect = ComputeEarliestCompletionTime(t);
-        if (ect.Value < minEct.Value) {
+        double ect = resultingSchedule.ComputeEarliestCompletionTime(t, jobs[t.JobNr.Value]);
+        if (ect < minEct) {
           result = t;
           minEct = ect;
@@ -92,9 +98,9 @@
     private ItemList<JSSPTask> GetConflictSetForTask(JSSPTask conflictedTask, ItemList<JSSPTask> earliestTasksList) {
       ItemList<JSSPTask> result = new ItemList<JSSPTask>();
-      DoubleValue conflictedCompletionTime = ComputeEarliestCompletionTime(conflictedTask);
+      double conflictedCompletionTime = resultingSchedule.ComputeEarliestCompletionTime(conflictedTask, jobs[conflictedTask.JobNr.Value]);
       result.Add(conflictedTask);
       foreach (JSSPTask t in earliestTasksList) {
         if (t.ResourceNr.Value == conflictedTask.ResourceNr.Value) {
-          if (ComputeEarliestStartTime(t).Value < conflictedCompletionTime.Value)
+          if (resultingSchedule.ComputeEarliestStartTime(t, jobs[t.JobNr.Value]) < conflictedCompletionTime)
             result.Add(t);
         }
@@ -102,89 +108,71 @@
       return result;
     }
-    private JSSPTask SelectTaskFromConflictSet(IntValue conflictedResource, ItemList<JSSPTask> conflictSet, ItemList<Permutation> jsm) {
-      JSSPTask result = null;
-      IntValue progressOnResource = new IntValue (resultingSchedule.Resources[conflictedResource.Value].Tasks.Count);
-
-      if (progressOnResource.Value < jsm[conflictedResource.Value].Length) {
-        IntValue solutionCandidateJobNr = new IntValue(jsm[conflictedResource.Value][progressOnResource.Value]);
-        foreach (JSSPTask t in conflictSet) {
-          if (t.Job.Index.Value == solutionCandidateJobNr.Value)
-            result = t;
-        }
+    private JSSPTask SelectTaskFromConflictSet(int conflictedResourceNr, int progressOnConflictedResource, ItemList<JSSPTask> conflictSet, ItemList<Permutation> jsm) {
+      if (conflictSet.Count == 1)
+        return conflictSet[0];
+      
+      //get solutionCandidate from jobSequencingMatrix
+      int solutionCandidateJobNr = jsm[conflictedResourceNr][progressOnConflictedResource];
+
+      //scan conflictSet for given solutionCandidate, and return if found
+      foreach (JSSPTask t in conflictSet) {
+        if (t.JobNr.Value == solutionCandidateJobNr)
+          return t;
+      }
+
+      //if solutionCandidate wasn't found in conflictSet apply DecodingErrorPolicy and ForcingPolicy
+      JSSPTask result = ApplyDecodingErrorPolicy(conflictSet, jsm[conflictedResourceNr], progressOnConflictedResource);
+      int newResolutionIndex = 0;
+
+      while (newResolutionIndex < jsm[conflictedResourceNr].Length && jsm[conflictedResourceNr][newResolutionIndex] != result.JobNr.Value)
+        newResolutionIndex++;
+      ApplyForcingStrategy(jsm, conflictedResourceNr, newResolutionIndex, progressOnConflictedResource, result.JobNr.Value);
+
+      return result;
+    }
+    private JSSPTask ApplyDecodingErrorPolicy(ItemList<JSSPTask> conflictSet, Permutation resource, int progress) {
+      if (decodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) { 
+        //Random
+        return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)];
       } else {
-        return null;
-      }
-
-      //Repairing happens here
-      if (result == null) {
-        //Decoding Error Policy BEGIN
-        //CHOOSE OTHER RESOLUTION FOR CONFLICT SET
-        result = ApplyDecodingErrorPolicy(conflictSet);
-        //result = conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)];
-        //Decoding Error Policy END
-
-
-        //Determine index of new resolution
-        int index = 0;
-        while (index < jsm[conflictedResource.Value].Length && 
-          jsm[conflictedResource.Value][index] != result.Job.Index.Value)
-          index++;
-
-
-        //Forcing Strategy BEGIN
-        ApplyForcingStrategy(jsm, conflictedResource.Value, index, progressOnResource.Value, result.Job.Index.Value);
-        
-        //ForcingStrategy END
-      }
-      return result;
-    }
-
+        //Guided
+        for (int i = progress; i < resource.Length; i++) {
+          int j = 0;
+          while (j < conflictSet.Count && conflictSet[j].JobNr.Value != resource[i])
+            j++;
+
+          if (j < conflictSet.Count)
+            return (conflictSet[j]);
+        }
+        return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)];
+      }    
+    }
     private void ApplyForcingStrategy(ItemList<Permutation> jsm, int conflictedResource, int newResolutionIndex, int progressOnResource, int newResolution) {
-      //if (forcingStrategy == JSMForcingStrategyTypes.SwapForcing) {
+      if (forcingStrategy == JSMForcingStrategyTypes.SwapForcing) {
         //SwapForcing
         jsm[conflictedResource][newResolutionIndex] = jsm[conflictedResource][progressOnResource];
         jsm[conflictedResource][progressOnResource] = newResolution;
-      /*} else {
+      } else {
         //ShiftForcing
-
-      } */
-    }
-
-    private JSSPTask ApplyDecodingErrorPolicy(ItemList<JSSPTask> conflictSet) {
-      //if (decodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) { 
-        //Random
-        return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)];
-      /*} else {
-        //Guided
-
-      }    */
-    }
-    private DoubleValue ComputeEarliestStartTime(JSSPTask t) {
-      Resource affectedResource = resultingSchedule.Resources[t.ResourceNr.Value];
-
-      DoubleValue lastMachineEndTime = affectedResource.TotalDuration;
-      DoubleValue previousJoboperationEndTime = new DoubleValue(double.MinValue);
-      if (t.PreviousTask != null)
-        previousJoboperationEndTime = t.PreviousTask.EndTime;
-
-      return new DoubleValue(Math.Max(previousJoboperationEndTime.Value, lastMachineEndTime.Value));
-    }
-    private DoubleValue ComputeEarliestCompletionTime(JSSPTask t) {
-      return new DoubleValue(ComputeEarliestStartTime(t).Value + t.Duration.Value);
-    }
-    private void AddTaskToSchedule(JSSPTask selectedTask) {
-      Resource affectedResource = resultingSchedule.Resources[selectedTask.ResourceNr.Value];
-      selectedTask.StartTime = ComputeEarliestStartTime(selectedTask);
-      selectedTask.IsScheduled.Value = true;
-      affectedResource.Tasks.Add(selectedTask);
-    }
-
-    public override Schedule CreateScheduleFromEncoding(JSMEncoding solution) {
+        List<int> asList = jsm[conflictedResource].ToList<int>();
+        if (newResolutionIndex > progressOnResource) {
+          asList.RemoveAt(newResolutionIndex);
+          asList.Insert(progressOnResource, newResolution);
+        } else {
+          asList.Insert(progressOnResource, newResolution); 
+          asList.RemoveAt(newResolutionIndex);
+        }
+        jsm[conflictedResource] = new Permutation (PermutationTypes.Absolute, asList.ToArray<int>());
+      } 
+    }
+
+    public Schedule CreateScheduleFromEncoding(JSMEncoding solution, ItemList<JSSPJob> jobData) {
       ItemList<Permutation> jobSequenceMatrix = solution.JobSequenceMatrix;
 
-      resultingSchedule = new Schedule(new IntValue(Jobs[0].Tasks.Count));
+      jobs = (ItemList<JSSPJob>)jobData.Clone();
+      resultingSchedule = new Schedule(new IntValue(jobs[0].Tasks.Count));
 
       //Reset scheduled tasks in result
-      foreach (JSSPJob j in Jobs) {
+      foreach (JSSPJob j in jobs) {
         foreach (JSSPTask t in j.Tasks) {
           t.IsScheduled.Value = false;
@@ -194,23 +182,31 @@
       //GT-Algorithm
       //STEP 0 - Compute a list of "earliest operations"
-      ItemList<JSSPTask> earliestTasksList = GetEarliestNotScheduledTasks(Jobs);
+      ItemList<JSSPTask> earliestTasksList = GetEarliestNotScheduledTasks();
       while (earliestTasksList.Count > 0) {
         //STEP 1 - Get earliest not scheduled operation with minimal earliest completing time
         JSSPTask minimal = GetTaskWithMinimalEC(earliestTasksList);
-
-        //STEP 2 - Compute a conflict set of all operations that can be scheduled on the machine the previously selected operation runs on
+        int conflictedResourceNr = minimal.ResourceNr.Value;
+        Resource conflictedResource = resultingSchedule.Resources[conflictedResourceNr];
+
+        //STEP 2 - Compute a conflict set of all operations that can be scheduled on the conflicted resource
         ItemList<JSSPTask> conflictSet = GetConflictSetForTask(minimal, earliestTasksList);
 
-        //STEP 3 - Select an operation from the conflict set (various methods depending on how the algorithm should work..)
-        JSSPTask selectedTask = SelectTaskFromConflictSet(minimal.ResourceNr, conflictSet, jobSequenceMatrix);
-
-        //STEP 4 - Adding the selected operation to the current schedule
-        AddTaskToSchedule(selectedTask);
+        //STEP 3 - Select a task from the conflict set
+        int progressOnResource = conflictedResource.Tasks.Count;
+        JSSPTask selectedTask = SelectTaskFromConflictSet(conflictedResourceNr, progressOnResource, conflictSet, jobSequenceMatrix);
+
+        //STEP 4 - Add the selected task to the current schedule 
+        selectedTask.IsScheduled.Value = true;
+        resultingSchedule.AddTask(selectedTask, jobs[selectedTask.JobNr.Value]);
 
         //STEP 5 - Back to STEP 1
-        earliestTasksList = GetEarliestNotScheduledTasks(Jobs);
+        earliestTasksList = GetEarliestNotScheduledTasks();
       }
 
       return resultingSchedule;
+    }
+
+    public override Schedule CreateScheduleFromEncoding(JSMEncoding solution) {
+      return CreateScheduleFromEncoding(solution, Jobs);
     }
 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMEncoding.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMEncoding.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/JSMEncoding.cs	(revision 6260)
@@ -36,5 +36,5 @@
   [Item("Job Sequencing Matrix Encoding", "Represents a solution for a standard JobShop Scheduling Problem.")]
   [StorableClass]
-  public class JSMEncoding : ParameterizedNamedItem, IJSSPEncoding{
+  public class JSMEncoding : ParameterizedNamedItem, ISchedulingEncoding{
     [StorableConstructor]
     protected JSMEncoding(bool deserializing) : base(deserializing) { }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMInsertionManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMInsertionManipulator.cs	(revision 6177)
+++ 	(revision )
@@ -1,59 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Encodings.PermutationEncoding;
-
-namespace HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix.Manipulators {
-
-  [Item("JSM Insert Manipulator", "Represents a manipulation operation inserting parts of the individual at another position.")]
-  [StorableClass]
-  public class JSMInsertionManipulator : JSMManipulator {
-    [StorableConstructor]
-    protected JSMInsertionManipulator(bool deserializing) : base(deserializing) { }
-    protected JSMInsertionManipulator(JSMInsertionManipulator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new JSMInsertionManipulator(this, cloner);
-    }
-
-    public JSMInsertionManipulator () : base () {}
-
-    protected override JSMEncoding Manipulate(IRandom random, JSMEncoding individual) {
-      JSMEncoding result = (JSMEncoding)individual.Clone();
-      int resourceIndex = random.Next(result.JobSequenceMatrix.Count);
-      Permutation p = result.JobSequenceMatrix[resourceIndex];
-      int seqIndex1 = random.Next(p.Length);
-      int seqIndex2 = random.Next(p.Length);
-      int aux = p[seqIndex1];
-      p[seqIndex1] = p[seqIndex2];
-      p[seqIndex2] = aux;
-      return result;
-    }
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMManipulator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMManipulator.cs	(revision 6260)
@@ -32,5 +32,5 @@
   [Item("AlbaManipulator", "An operator which manipulates a VRP representation.")]
   [StorableClass]
-  public abstract class JSMManipulator : JSSPManipulator, IJSMOperator {
+  public abstract class JSMManipulator : JSSPManipulator<JSMEncoding>, IJSMOperator {
     [StorableConstructor]
     protected JSMManipulator(bool deserializing) : base(deserializing) { }
@@ -44,7 +44,10 @@
 
     public override IOperation Apply() {
-      IJSSPEncoding solution = SchedulingSolutionParameter.ActualValue;
+      JSMEncoding solution = SchedulingSolutionParameter.ActualValue;
 
-      SchedulingSolutionParameter.ActualValue = Manipulate(RandomParameter.ActualValue, solution as JSMEncoding);
+      int nrOfMutations = RandomParameter.ActualValue.Next(5) + 1;
+
+      for (int i = 0; i < nrOfMutations; i++ )
+        SchedulingSolutionParameter.ActualValue = Manipulate(RandomParameter.ActualValue, solution as JSMEncoding);
 
       return base.Apply();
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMSwapManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMSwapManipulator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/JobSequenceMatrix/Manipulators/JSMSwapManipulator.cs	(revision 6260)
@@ -0,0 +1,59 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.PermutationEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix.Manipulators {
+
+  [Item("JSM Swap Manipulator", "Represents a manipulation operation inserting parts of the individual at another position.")]
+  [StorableClass]
+  public class JSMSwapManipulator : JSMManipulator {
+    [StorableConstructor]
+    protected JSMSwapManipulator(bool deserializing) : base(deserializing) { }
+    protected JSMSwapManipulator(JSMSwapManipulator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new JSMSwapManipulator(this, cloner);
+    }
+
+    public JSMSwapManipulator () : base () {}
+
+    protected override JSMEncoding Manipulate(IRandom random, JSMEncoding individual) {
+      JSMEncoding result = (JSMEncoding)individual.Clone();
+      int resourceIndex = random.Next(result.JobSequenceMatrix.Count);
+      Permutation p = result.JobSequenceMatrix[resourceIndex];
+      int seqIndex1 = random.Next(p.Length);
+      int seqIndex2 = random.Next(p.Length);
+      int aux = p[seqIndex1];
+      p[seqIndex1] = p[seqIndex2];
+      p[seqIndex2] = aux;
+      return result;
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRCrossover.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRCrossover.cs	(revision 6260)
@@ -0,0 +1,52 @@
+﻿#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.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition.Crossovers {
+  [Item("PWRCrossover", "An operator which crosses two JSM representations.")]
+  [StorableClass]
+  public abstract class PWRCrossover : JSSPCrossover<PWREncoding>, IPWROperator {
+
+    [StorableConstructor]
+    protected PWRCrossover(bool deserializing) : base(deserializing) { }
+    protected PWRCrossover(PWRCrossover original, Cloner cloner) : base(original, cloner) { }
+    public PWRCrossover()
+      : base() {
+    }
+
+    public abstract PWREncoding Crossover(IRandom random, PWREncoding parent1, PWREncoding parent2);
+
+    public override IOperation Apply() {
+      ItemArray<PWREncoding> parents = ParentsParameter.ActualValue;
+
+      ChildParameter.ActualValue =
+        Crossover(RandomParameter.ActualValue, parents[0] as PWREncoding, parents[1] as PWREncoding);
+
+      return base.Apply();
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRGOXCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRGOXCrossover.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRGOXCrossover.cs	(revision 6260)
@@ -0,0 +1,95 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition.Crossovers {
+  [Item("PWR Generalization Order Crossover", "Represents a crossover operation swapping sequences of the parents to generate offspring.")]
+  [StorableClass]
+  public class PWRGOXCrossover : PWRCrossover{
+    [StorableConstructor]
+    protected PWRGOXCrossover(bool deserializing) : base(deserializing) { }
+    protected PWRGOXCrossover(PWRGOXCrossover original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRGOXCrossover(this, cloner);
+    }
+
+    public PWRGOXCrossover() : base() { }
+
+    public override PWREncoding Crossover(IRandom random, PWREncoding parent1, PWREncoding parent2) {
+      PWREncoding result = new PWREncoding();
+                                                                                           
+      List<int> p1 = ((IntegerVector)(parent1.PermutationWithRepetition.Clone())).ToList<int>();
+      List<int> p2 = ((IntegerVector)(parent2.PermutationWithRepetition.Clone())).ToList<int>();
+      List<int> child = new List<int> ();
+
+      int[] lookUpArrayP1 = GetLookUpForIndividual(p1);
+      int[] lookUpArrayP2 = GetLookUpForIndividual(p2);
+
+      int xStringLength = p1.Count / 2;
+      int xStringPosition = random.Next(p1.Count / 2);
+
+      //insert elements from parent1 that dont conflict with the "selected" elements form parent2
+      for (int i = 0; i < p1.Count; i++) {
+        bool isSelected = false;
+        for (int j = xStringPosition; j < xStringPosition + xStringLength; j++) {
+          if (p1[i] == p2[j] && lookUpArrayP1[i] == lookUpArrayP2[j])
+            isSelected = true;
+        }
+        if (!isSelected)
+          child.Add(p1[i]);
+      }
+
+      for (int i = xStringPosition; i < xStringPosition + xStringLength; i++) {
+        child.Insert(i, p2[i]);
+      }
+
+      result.PermutationWithRepetition = new IntegerVector(child.ToArray());
+      return result;
+    }
+
+    private int[] GetLookUpForIndividual(List<int> p) {
+      int[] result = new int[p.Count];
+      Dictionary<int, int> lookUpTable = new Dictionary<int, int>();
+
+      for (int i = 0; i < p.Count; i++) {
+        if (!lookUpTable.ContainsKey(p[i]))
+          lookUpTable.Add(p[i], 0);
+        result[i] = lookUpTable[p[i]];
+        lookUpTable[p[i]]++;
+      }
+
+      return result;
+    }
+
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRPPXCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRPPXCrossover.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Crossovers/PWRPPXCrossover.cs	(revision 6260)
@@ -0,0 +1,77 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition.Crossovers {
+  [Item("PWR Order Crossover", "Represents a crossover operation swapping sequences of the parents to generate offspring.")]
+  [StorableClass]
+  public class PWRPPXCrossover : PWRCrossover{
+    [StorableConstructor]
+    protected PWRPPXCrossover(bool deserializing) : base(deserializing) { }
+    protected PWRPPXCrossover(PWRPPXCrossover original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRPPXCrossover(this, cloner);
+    }
+
+    public PWRPPXCrossover() : base() { }
+
+    public override PWREncoding Crossover(IRandom random, PWREncoding parent1, PWREncoding parent2) {
+      PWREncoding result = new PWREncoding();
+      List<int> p1 = ((IntegerVector)(parent1.PermutationWithRepetition.Clone())).ToList<int>();
+      List<int> p2 = ((IntegerVector)(parent2.PermutationWithRepetition.Clone())).ToList<int>();
+      List<int> child = new List<int>();
+
+      bool[] lookUpTable = new bool[parent1.PermutationWithRepetition.Length];
+      for (int i = 0; i < lookUpTable.Length; i++ ) {
+        lookUpTable[i] = random.Next(2) == 1;
+      }
+
+      foreach (bool b in lookUpTable) {
+        if (b) {
+          child.Add(p1[0]);
+          p2.Remove(p1[0]);
+          p1.RemoveAt(0);
+        } else {
+          child.Add(p2[0]);
+          p1.Remove(p2[0]);
+          p2.RemoveAt(0);
+        }
+      }
+
+      result.PermutationWithRepetition = new IntegerVector(child.ToArray());
+
+      return result;
+    }
+
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRManipulator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRManipulator.cs	(revision 6260)
@@ -0,0 +1,54 @@
+﻿#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.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Problems.Scheduling.Encodings;
+using HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition.Manipulators {
+  [Item("PWRManipulator", "An operator which manipulates a PWR representation.")]
+  [StorableClass]
+  public abstract class PWRManipulator : JSSPManipulator<PWREncoding>, IPWROperator {
+    [StorableConstructor]
+    protected PWRManipulator(bool deserializing) : base(deserializing) { }
+    protected PWRManipulator(PWRManipulator original, Cloner cloner) : base(original, cloner) { }
+    public PWRManipulator()
+      : base() {
+    }
+
+    protected abstract PWREncoding Manipulate(IRandom random, PWREncoding individual);
+
+
+    public override IOperation Apply() {
+      PWREncoding solution = SchedulingSolutionParameter.ActualValue;
+
+      SchedulingSolutionParameter.ActualValue = Manipulate(RandomParameter.ActualValue, solution as PWREncoding);
+
+      return base.Apply();
+    }
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRUniformOnePositionManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRUniformOnePositionManipulator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/Manipulators/PWRUniformOnePositionManipulator.cs	(revision 6260)
@@ -0,0 +1,71 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition.Manipulators {
+
+  [Item("PWR Uniform One Position Manipulator", "Represents a manipulation operation inserting parts of the individual at another position.")]
+  [StorableClass]
+  public class PWRUniformOnePositionManipulator : PWRManipulator {
+    [StorableConstructor]
+    protected PWRUniformOnePositionManipulator(bool deserializing) : base(deserializing) { }
+    protected PWRUniformOnePositionManipulator(PWRUniformOnePositionManipulator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRUniformOnePositionManipulator(this, cloner);
+    }
+
+    public PWRUniformOnePositionManipulator() : base() { }
+
+    protected override PWREncoding Manipulate(IRandom random, PWREncoding individual) {
+      PWREncoding result = new PWREncoding();
+
+      int cutIndex = random.Next(individual.PermutationWithRepetition.Length);
+      int insertIndex = random.Next(individual.PermutationWithRepetition.Length);
+
+      List<int> perm = ((IntegerVector)(individual.PermutationWithRepetition.Clone ())).ToList<int>();
+
+      int aux = perm[cutIndex];
+      if (cutIndex > insertIndex) {
+        perm.RemoveAt(cutIndex);
+        perm.Insert(insertIndex, aux);
+      } else {
+        perm.Insert(insertIndex, aux); 
+        perm.RemoveAt(cutIndex);
+      }
+
+      result.PermutationWithRepetition = new IntegerVector(perm.ToArray());
+      
+      return result;
+    }
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRDecoder.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRDecoder.cs	(revision 6260)
@@ -0,0 +1,71 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Data;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition {
+  [Item("PWRDecoder", "An item used to convert a PWR-individual into a generalized schedule.")]
+  [StorableClass]
+  public class PWRDecoder : JSSPDecoder<PWREncoding>, IStochasticOperator {
+    [StorableConstructor]
+    protected PWRDecoder(bool deserializing) : base(deserializing) { }
+    protected PWRDecoder(PWRDecoder original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRDecoder(this, cloner);
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public PWRDecoder()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+    }
+
+    public override Schedule CreateScheduleFromEncoding(PWREncoding solution) {
+      ItemList<JSSPJob> jobs = (ItemList<JSSPJob>)Jobs.Clone();
+      Schedule resultingSchedule = new Schedule(new IntValue(Jobs[0].Tasks.Count));
+      foreach (int jobNr in solution.PermutationWithRepetition) {
+        int i = 0;
+        while (jobs[jobNr].Tasks[i].IsScheduled.Value) i++;
+        jobs[jobNr].Tasks[i].IsScheduled.Value = true;
+        resultingSchedule.AddTask(jobs[jobNr].Tasks[i], jobs[jobNr]);
+      }
+      return resultingSchedule;
+    }
+
+    public override IOperation Apply() {
+      return base.Apply();
+    } 
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWREncoding.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWREncoding.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWREncoding.cs	(revision 6260)
@@ -0,0 +1,81 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition {
+  [Item("Permutation With Repetition Encoding", "Represents a solution for a standard JobShop Scheduling Problem.")]
+  [StorableClass]
+  public class PWREncoding : ParameterizedNamedItem, ISchedulingEncoding{
+    [StorableConstructor]
+    protected PWREncoding(bool deserializing) : base(deserializing) { }
+    protected PWREncoding(PWREncoding original, Cloner cloner)
+      : base(original, cloner) {
+        this.PermutationWithRepetition = cloner.Clone(original.PermutationWithRepetition);
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWREncoding(this, cloner);
+    }
+
+    [Storable]
+    public IntegerVector PermutationWithRepetition { get; set; }
+
+    public PWREncoding() 
+      : base () {
+      PermutationWithRepetition = new IntegerVector();
+    }
+
+    public PWREncoding(int problemDimension, IRandom random)
+      : base() {
+      PermutationWithRepetition = new IntegerVector(problemDimension * problemDimension);
+      int[] lookUpTable = new int[problemDimension];
+
+      for (int i = 0; i < PermutationWithRepetition.Length; i++) {
+        int newValue = random.Next(problemDimension);
+        while (lookUpTable[newValue] >= problemDimension)
+          newValue = random.Next(problemDimension);
+
+        PermutationWithRepetition[i] = newValue;
+
+        lookUpTable[newValue]++;
+      }
+    }
+
+    public override string ToString() {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("[ ");
+      foreach (int i in PermutationWithRepetition) {
+        sb.Append(i + " ");
+      }
+      sb.Append("]");
+
+      return sb.ToString();
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRRandomCreator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRRandomCreator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PermutationWithRepetition/PWRRandomCreator.cs	(revision 6260)
@@ -0,0 +1,64 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition {
+  [Item("Permutation With Repetition Random Creator", "Creates PWR-individuals at random.")]
+  [StorableClass]
+  public class PWRRandomCreator : JSSPCreator<PWREncoding>, IStochasticOperator {
+    [StorableConstructor]
+    protected PWRRandomCreator(bool deserializing) : base(deserializing) { }
+    protected PWRRandomCreator(PWRRandomCreator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRRandomCreator(this, cloner);
+    }
+
+    public ILookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
+    }
+
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+
+    public PWRRandomCreator()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
+    }
+
+
+    protected override PWREncoding CreateSolution() {
+      PWREncoding result = new PWREncoding(Jobs.Count, Random);
+      return result;
+    }
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVCrossover.cs	(revision 6260)
@@ -28,7 +28,7 @@
 
 namespace HeuristicLab.Problems.Scheduling.Encodings.PriorityRulesVector.Crossovers {
-  [Item("JSMCrossover", "An operator which crosses two JSM representations.")]
+  [Item("PRVCrossover", "An operator which crosses two PRV representations.")]
   [StorableClass]
-  public abstract class PRVCrossover : JSSPCrossover, IPRVOperator {
+  public abstract class PRVCrossover : JSSPCrossover<PRVEncoding>, IPRVOperator {
 
     [StorableConstructor]
@@ -39,8 +39,8 @@
     }
 
-    public abstract IJSSPEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2);
+    public abstract PRVEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2);
 
     public override IOperation Apply() {
-      ItemArray<IJSSPEncoding> parents = ParentsParameter.ActualValue;
+      ItemArray<PRVEncoding> parents = ParentsParameter.ActualValue;
 
       ChildParameter.ActualValue =
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVDiscreteCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVDiscreteCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVDiscreteCrossover.cs	(revision 6260)
@@ -45,9 +45,9 @@
     public PRVDiscreteCrossover() : base() { }
 
-    public static IJSSPEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
+    public static PRVEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
       return new PRVEncoding(DiscreteCrossover.Apply(random, parent1, parent2), parent1.NrOfRules);
     }
 
-    public override IJSSPEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
+    public override PRVEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
       return Cross(random, parent1, parent2);
     } 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVSinglePointCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVSinglePointCrossover.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Crossovers/PRVSinglePointCrossover.cs	(revision 6260)
@@ -45,10 +45,10 @@
     public PRVSinglePointCrossover() : base() { }
 
-    public static IJSSPEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
+    public static PRVEncoding Cross(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
       return new PRVEncoding(SinglePointCrossover.Apply(random, parent1, parent2), parent1.NrOfRules);
     }
 
-    public override IJSSPEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
-      return Cross(random, parent1, parent2);
+    public override PRVEncoding Crossover(IRandom random, PRVEncoding parent1, PRVEncoding parent2) {
+      return Cross(random, parent1, parent2);;
     } 
   }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Manipulators/PRVManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Manipulators/PRVManipulator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/Manipulators/PRVManipulator.cs	(revision 6260)
@@ -30,7 +30,7 @@
 
 namespace HeuristicLab.Problems.Scheduling.Encodings.PriorityRulesVector.Manipulators {
-  [Item("AlbaManipulator", "An operator which manipulates a VRP representation.")]
+  [Item("PRVManipulator", "An operator which manipulates a PRV representation.")]
   [StorableClass]
-  public abstract class PRVManipulator : JSSPManipulator, IPRVOperator {
+  public abstract class PRVManipulator : JSSPManipulator<PRVEncoding>, IPRVOperator {
     [StorableConstructor]
     protected PRVManipulator(bool deserializing) : base(deserializing) { }
@@ -44,5 +44,5 @@
 
     public override IOperation Apply() {
-      IJSSPEncoding solution = SchedulingSolutionParameter.ActualValue;
+      PRVEncoding solution = SchedulingSolutionParameter.ActualValue;
 
       SchedulingSolutionParameter.ActualValue = Manipulate(RandomParameter.ActualValue, solution as PRVEncoding);
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVDecoder.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVDecoder.cs	(revision 6260)
@@ -50,11 +50,11 @@
     }
 
+    #region Private Members
     [Storable]
     private Schedule resultingSchedule;
 
-    public PRVDecoder()
-      : base() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
-    }
+    [Storable]
+    private ItemList<JSSPJob> jobs;
+    #endregion
 
     #region Priority Rules
@@ -67,8 +67,8 @@
     //earliest start time
     private JSSPTask ESTRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       double currentEST = double.MaxValue;
       foreach (JSSPTask t in tasks) {
-        double est = ComputeEarliestStartTime(t).Value;
+        double est = resultingSchedule.ComputeEarliestStartTime(t, jobs[t.JobNr.Value]);
         if (est < currentEST) {
           currentEST = est;
@@ -81,5 +81,5 @@
     //shortest processingtime
     private JSSPTask SPTRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       foreach (JSSPTask t in tasks) {
         if (t.Duration.Value < currentResult.Duration.Value)
@@ -91,5 +91,5 @@
     //longest processing time    
     private JSSPTask LPTRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       foreach (JSSPTask t in tasks) {
         if (t.Duration.Value > currentResult.Duration.Value)
@@ -101,9 +101,9 @@
     //most work remaining
     private JSSPTask MWRRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       double currentLargestRemainingProcessingTime = 0;
       foreach (JSSPTask t in tasks) {
         double remainingProcessingTime = 0;
-        foreach (JSSPTask jt in t.Job.Tasks) {
+        foreach (JSSPTask jt in jobs[t.JobNr.Value].Tasks) {
           if (!jt.IsScheduled.Value)
             remainingProcessingTime += jt.Duration.Value;
@@ -119,9 +119,9 @@
     //least work remaining
     private JSSPTask LWRRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       double currentSmallestRemainingProcessingTime = double.MaxValue;
       foreach (JSSPTask t in tasks) {
         double remainingProcessingTime = 0;
-        foreach (JSSPTask jt in t.Job.Tasks) {
+        foreach (JSSPTask jt in jobs[t.JobNr.Value].Tasks) {
           if (!jt.IsScheduled.Value)
             remainingProcessingTime += jt.Duration.Value;
@@ -137,9 +137,9 @@
     //most operations remaining
     private JSSPTask MORRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       int currentLargestNrOfRemainingTasks = 0;
       foreach (JSSPTask t in tasks) {
         int nrOfRemainingTasks = 0;
-        foreach (JSSPTask jt in t.Job.Tasks) {
+        foreach (JSSPTask jt in jobs[t.JobNr.Value].Tasks) {
           if (!jt.IsScheduled.Value)
             nrOfRemainingTasks++;
@@ -155,9 +155,9 @@
     //least operationsremaining
     private JSSPTask LORRule(ItemList<JSSPTask> tasks) {
-      JSSPTask currentResult = tasks[0];
+      JSSPTask currentResult = RandomRule(tasks);
       int currentSmallestNrOfRemainingTasks = int.MaxValue;
       foreach (JSSPTask t in tasks) {
         int nrOfRemainingTasks = 0;
-        foreach (JSSPTask jt in t.Job.Tasks) {
+        foreach (JSSPTask jt in jobs[t.JobNr.Value].Tasks) {
           if (!jt.IsScheduled.Value)
             nrOfRemainingTasks++;
@@ -185,5 +185,10 @@
     #endregion
 
-    private ItemList<JSSPTask> GetEarliestNotScheduledTasks(ItemList<JSSPJob> jobs) {
+    public PRVDecoder()
+      : base() {
+      Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
+    }
+
+    private ItemList<JSSPTask> GetEarliestNotScheduledTasks() {
       ItemList<JSSPTask> result = new ItemList<JSSPTask>();
       foreach (JSSPJob j in jobs) {
@@ -198,9 +203,9 @@
     }
     private JSSPTask GetTaskWithMinimalEC(ItemList<JSSPTask> earliestTasksList) {
-      DoubleValue minEct = new DoubleValue(Double.MaxValue);
+      double minEct = double.MaxValue;
       JSSPTask result = null;
       foreach (JSSPTask t in earliestTasksList) {
-        DoubleValue ect = ComputeEarliestCompletionTime(t);
-        if (ect.Value < minEct.Value) {
+        double ect = resultingSchedule.ComputeEarliestCompletionTime(t, jobs[t.JobNr.Value]);
+        if (ect < minEct) {
           result = t;
           minEct = ect;
@@ -211,9 +216,8 @@
     private ItemList<JSSPTask> GetConflictSetForTask(JSSPTask conflictedTask, ItemList<JSSPTask> earliestTasksList) {
       ItemList<JSSPTask> result = new ItemList<JSSPTask>();
-      DoubleValue conflictedCompletionTime = ComputeEarliestCompletionTime(conflictedTask);
-      //result.Add(conflictedTask);
+      double conflictedCompletionTime = resultingSchedule.ComputeEarliestCompletionTime(conflictedTask, jobs[conflictedTask.JobNr.Value]);
       foreach (JSSPTask t in earliestTasksList) {
         if (t.ResourceNr.Value == conflictedTask.ResourceNr.Value) {
-          if (ComputeEarliestStartTime(t).Value < conflictedCompletionTime.Value)
+          if (resultingSchedule.ComputeEarliestStartTime(t, jobs[t.JobNr.Value]) < conflictedCompletionTime)
             result.Add(t);
         }
@@ -240,27 +244,7 @@
       }  
     }
-    private DoubleValue ComputeEarliestStartTime(JSSPTask t) {
-      Resource affectedResource = resultingSchedule.Resources[t.ResourceNr.Value];
-
-      DoubleValue lastMachineEndTime = affectedResource.TotalDuration;
-      DoubleValue previousJoboperationEndTime = new DoubleValue(double.MinValue);
-      if (t.PreviousTask != null)
-        previousJoboperationEndTime = t.PreviousTask.EndTime;
-
-      return new DoubleValue(Math.Max(previousJoboperationEndTime.Value, lastMachineEndTime.Value));
-    }
-    private DoubleValue ComputeEarliestCompletionTime(JSSPTask t) {
-      return new DoubleValue(ComputeEarliestStartTime(t).Value + t.Duration.Value);
-    }
-    private void AddTaskToSchedule(JSSPTask selectedTask) {
-      Resource affectedResource = resultingSchedule.Resources[selectedTask.ResourceNr.Value];
-      selectedTask.StartTime = ComputeEarliestStartTime(selectedTask);
-      selectedTask.IsScheduled.Value = true;
-      affectedResource.Tasks.Add(selectedTask);
-    }
 
     public override Schedule CreateScheduleFromEncoding(PRVEncoding solution) {
-      PRVEncoding priorityRulesVector = solution;
-
+      jobs = (ItemList<JSSPJob>)Jobs.Clone();
       resultingSchedule = new Schedule(new IntValue(Jobs[0].Tasks.Count));
 
@@ -274,5 +258,5 @@
       //GT-Algorithm
       //STEP 0 - Compute a list of "earliest operations"
-      ItemList<JSSPTask> earliestTasksList = GetEarliestNotScheduledTasks(Jobs);
+      ItemList<JSSPTask> earliestTasksList = GetEarliestNotScheduledTasks();
       int currentDecisionIndex = 0;
       while (earliestTasksList.Count > 0) {
@@ -284,11 +268,12 @@
 
         //STEP 3 - Select an operation from the conflict set (various methods depending on how the algorithm should work..)
-        JSSPTask selectedTask = SelectTaskFromConflictSet(conflictSet, priorityRulesVector [currentDecisionIndex++], solution.NrOfRules.Value);
+        JSSPTask selectedTask = SelectTaskFromConflictSet(conflictSet, solution [currentDecisionIndex++], solution.NrOfRules.Value);
 
         //STEP 4 - Adding the selected operation to the current schedule
-        AddTaskToSchedule(selectedTask);
+        selectedTask.IsScheduled.Value = true;
+        resultingSchedule.AddTask(selectedTask, jobs[selectedTask.JobNr.Value]);
 
         //STEP 5 - Back to STEP 1
-        earliestTasksList = GetEarliestNotScheduledTasks(Jobs);
+        earliestTasksList = GetEarliestNotScheduledTasks();
       }
 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVEncoding.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVEncoding.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Encodings/PriorityRulesVector/PRVEncoding.cs	(revision 6260)
@@ -37,5 +37,5 @@
   [Item("Priority Rules Vector Encoding", "Represents a solution for a standard JobShop Scheduling Problem.")]
   [StorableClass]
-  public class PRVEncoding : IntegerVector, IJSSPEncoding{
+  public class PRVEncoding : IntegerVector, ISchedulingEncoding{
     [StorableConstructor]
     protected PRVEncoding(bool deserializing) : base(deserializing) { }
@@ -64,5 +64,5 @@
     public PRVEncoding (IntegerVector iv, IntValue nrOfRules) : base (iv.Length) {
       this.nrOfRules = (IntValue)nrOfRules.Clone();
-      foreach (int i in iv) {
+      for (int i = 0; i < iv.Length; i++) {
         this[i] = iv[i];
       }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluationAlgorithm.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluationAlgorithm.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluationAlgorithm.cs	(revision 6260)
@@ -0,0 +1,76 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Operators;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix;
+using HeuristicLab.Optimization;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.Scheduling.Encodings.PriorityRulesVector;
+using HeuristicLab.Problems.Scheduling.Interfaces;
+using HeuristicLab.Problems.Scheduling.Encodings;
+
+namespace HeuristicLab.Problems.Scheduling.Evaluators {
+  [Item("Scheduling Evaluator", "Represents a general evaluator class for scheduling problems.")]
+  [StorableClass]
+  public class JSSPEvaluationAlgorithm : AlgorithmOperator, ISchedulingEvaluator {
+    [StorableConstructor]
+    protected JSSPEvaluationAlgorithm(bool deserializing) : base(deserializing) { }
+    protected JSSPEvaluationAlgorithm(JSSPEvaluationAlgorithm original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new JSSPEvaluationAlgorithm(this, cloner);
+    }
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get {
+        if (Parameters.ContainsKey("Quality"))
+          return (ILookupParameter<DoubleValue>)Parameters["Quality"];
+        else
+          return null;
+      }
+    }
+
+    public void InitializeOperatorGraph<T>(JSSPDecoder<T> decoder, JSSPEvaluator evaluator) where T: Item, ISchedulingEncoding{
+      OperatorGraph.InitialOperator = decoder;
+      decoder.Successor = evaluator;
+    }
+
+    public JSSPEvaluationAlgorithm()
+      : base() {
+        Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution."));
+        InitializeOperatorGraph<JSMEncoding>(new JSMDecoder(), new MakespanEvaluator());
+    }
+
+    public override IOperation Apply() {
+      return base.Apply();
+    }
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/JSSPEvaluator.cs	(revision 6260)
@@ -32,4 +32,5 @@
 using HeuristicLab.Problems.Scheduling.Encodings;
 using HeuristicLab.Operators;
+using HeuristicLab.Problems.Scheduling.Interfaces;
 
 
@@ -37,5 +38,5 @@
   [Item("JSSP Evaluator", "Represents a evaluator class for standard job shop scheduling problems.")]
   [StorableClass]
-  public abstract class JSSPEvaluator : JSSPOperator, ISingleObjectiveEvaluator {
+  public abstract class JSSPEvaluator : JSSPOperator, ISchedulingEvaluator {
     [StorableConstructor]
     protected JSSPEvaluator(bool deserializing) : base(deserializing) { }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/MakespanEvaluator.cs	(revision 6260)
@@ -50,5 +50,5 @@
       foreach (Resource r in schedule.Resources) {
         if (r.TotalDuration.Value > quality.Value) {
-          quality = r.TotalDuration;
+          quality.Value = r.TotalDuration.Value;
         }
       }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Evaluators/SchedulingEvaluator.cs	(revision 6177)
+++ 	(revision )
@@ -1,76 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Operators;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Problems.Scheduling.Encodings.JobSequenceMatrix;
-using HeuristicLab.Optimization;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Problems.Scheduling.Encodings.PriorityRulesVector;
-using HeuristicLab.Problems.Scheduling.Interfaces;
-using HeuristicLab.Problems.Scheduling.Encodings;
-
-namespace HeuristicLab.Problems.Scheduling.Evaluators {
-  [Item("Scheduling Evaluator", "Represents a general evaluator class for scheduling problems.")]
-  [StorableClass]
-  public class SchedulingEvaluator : AlgorithmOperator, ISchedulingEvaluator {
-    [StorableConstructor]
-    protected SchedulingEvaluator(bool deserializing) : base(deserializing) { }
-    protected SchedulingEvaluator(SchedulingEvaluator original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new SchedulingEvaluator(this, cloner);
-    }
-
-    public ILookupParameter<DoubleValue> QualityParameter {
-      get {
-        if (Parameters.ContainsKey("Quality"))
-          return (ILookupParameter<DoubleValue>)Parameters["Quality"];
-        else
-          return null;
-      }
-    }
-
-    public void InitializeOperatorGraph<T>(JSSPDecoder<T> decoder, JSSPEvaluator evaluator) where T: Item, IJSSPEncoding{
-      OperatorGraph.InitialOperator = decoder;
-      decoder.Successor = evaluator;
-    }
-
-    public SchedulingEvaluator()
-      : base() {
-        Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality value aka fitness value of the solution."));
-        InitializeOperatorGraph<JSMEncoding>(new JSMDecoder(), new MakespanEvaluator());
-    }
-
-    public override IOperation Apply() {
-      return base.Apply();
-    }
-
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/HeuristicLab.Problems.Scheduling-3.3.csproj
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/HeuristicLab.Problems.Scheduling-3.3.csproj	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/HeuristicLab.Problems.Scheduling-3.3.csproj	(revision 6260)
@@ -52,5 +52,5 @@
     <Compile Include="Encodings\JobSequenceMatrix\Crossovers\JSMJOXCrossover.cs" />
     <Compile Include="Encodings\JobSequenceMatrix\Crossovers\JSMCrossover.cs" />
-    <Compile Include="Encodings\JobSequenceMatrix\Crossovers\JSMOrderCrossover.cs" />
+    <Compile Include="Encodings\JobSequenceMatrix\Crossovers\JSMOXCrossover.cs" />
     <Compile Include="Encodings\JobSequenceMatrix\Crossovers\JSMSXXCrossover.cs" />
     <Compile Include="Encodings\JobSequenceMatrix\JSMDecoder.cs" />
@@ -60,8 +60,16 @@
     <Compile Include="Encodings\JobSequenceMatrix\Manipulators\JSMShiftChangeManipulator.cs" />
     <Compile Include="Encodings\JobSequenceMatrix\Manipulators\JSMManipulator.cs" />
-    <Compile Include="Encodings\JobSequenceMatrix\Manipulators\JSMInsertionManipulator.cs" />
+    <Compile Include="Encodings\JobSequenceMatrix\Manipulators\JSMSwapManipulator.cs" />
     <Compile Include="Encodings\JSSPCrossover.cs" />
     <Compile Include="Encodings\JSSPDecoder.cs" />
     <Compile Include="Encodings\JSSPEncodingTypes.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\Crossovers\PWRGOXCrossover.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\Crossovers\PWRCrossover.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\Crossovers\PWRPPXCrossover.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\Manipulators\PWRUniformOnePositionManipulator.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\Manipulators\PWRManipulator.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\PWRDecoder.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\PWREncoding.cs" />
+    <Compile Include="Encodings\PermutationWithRepetition\PWRRandomCreator.cs" />
     <Compile Include="Encodings\PriorityRulesVector\Crossovers\PRVSinglePointCrossover.cs" />
     <Compile Include="Encodings\PriorityRulesVector\Crossovers\PRVDiscreteCrossover.cs" />
@@ -69,5 +77,6 @@
     <Compile Include="Encodings\PriorityRulesVector\PRVEncoding.cs" />
     <Compile Include="Interfaces\IJSSPDecoder.cs" />
-    <Compile Include="Interfaces\IJSSPOperator.cs" />
+    <Compile Include="Interfaces\ISchedulingOperator.cs" />
+    <Compile Include="Interfaces\IPWROperator.cs" />
     <Compile Include="Interfaces\IPRVOperator.cs" />
     <Compile Include="Interfaces\IJSSPEncoding.cs" />
@@ -87,10 +96,9 @@
     <Compile Include="Resource.cs" />
     <Compile Include="Evaluators\JSSPEvaluator.cs" />
-    <Compile Include="Interfaces\IJSSPCreator.cs" />
     <Compile Include="JSSPJob.cs" />
     <Compile Include="JobShopSchedulingProblem.cs" />
     <Compile Include="JSSPTask.cs" />
     <Compile Include="Encodings\JSSPOperator.cs" />
-    <Compile Include="Evaluators\SchedulingEvaluator.cs" />
+    <Compile Include="Evaluators\JSSPEvaluationAlgorithm.cs" />
     <Compile Include="SchedulingProblem.cs" />
     <Compile Include="Plugin.cs" />
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPCreator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPCreator.cs	(revision 6177)
+++ 	(revision )
@@ -1,35 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Optimization;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Parameters;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPCreator : IJSSPOperator, ISchedulingCreator {
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPCrossover.cs	(revision 6177)
+++ 	(revision )
@@ -1,14 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Optimization;
-using HeuristicLab.Core;
-using HeuristicLab.Problems.Scheduling.Encodings;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPCrossover : ICrossover{
-    ILookupParameter<ItemArray<IJSSPEncoding>> ParentsParameter { get; }
-    ILookupParameter<IJSSPEncoding> ChildParameter { get; }
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPDecoder.cs	(revision 6177)
+++ 	(revision )
@@ -1,37 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPDecoder : IOperator {
-
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPEncoding.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPEncoding.cs	(revision 6177)
+++ 	(revision )
@@ -1,37 +1,0 @@
-﻿#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 System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Encodings.PermutationEncoding;
-using HeuristicLab.Data;
-using HeuristicLab.Parameters;
-using HeuristicLab.Problems.Scheduling.Encodings;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPEncoding : IItem {
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPManipulator.cs	(revision 6177)
+++ 	(revision )
@@ -1,30 +1,0 @@
-﻿#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.Core;
-using HeuristicLab.Optimization;
-using HeuristicLab.Problems.Scheduling.Encodings;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPManipulator : IManipulator {
-    ILookupParameter<IJSSPEncoding> SchedulingSolutionParameter { get; }
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPOperator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IJSSPOperator.cs	(revision 6177)
+++ 	(revision )
@@ -1,11 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using HeuristicLab.Core;
-
-namespace HeuristicLab.Problems.Scheduling.Interfaces {
-  public interface IJSSPOperator : IOperator {
-    ILookupParameter<ItemList<JSSPJob>> JobsParameter { get; }
-  }
-}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IPWROperator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IPWROperator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/IPWROperator.cs	(revision 6260)
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  interface IPWROperator : IOperator {
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingCrossover.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingCrossover.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingCrossover.cs	(revision 6260)
@@ -0,0 +1,12 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Optimization;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.Scheduling.Encodings;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  public interface ISchedulingCrossover : ICrossover{
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingDecoder.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingDecoder.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingDecoder.cs	(revision 6260)
@@ -0,0 +1,37 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  public interface ISchedulingDecoder : IOperator {
+
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingEncoding.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingEncoding.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingEncoding.cs	(revision 6260)
@@ -0,0 +1,37 @@
+﻿#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 System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.Scheduling.Encodings;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  public interface ISchedulingEncoding : IItem {
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingManipulator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingManipulator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingManipulator.cs	(revision 6260)
@@ -0,0 +1,29 @@
+﻿#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.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Problems.Scheduling.Encodings;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  public interface ISchedulingManipulator : IManipulator {
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingOperator.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingOperator.cs	(revision 6260)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Interfaces/ISchedulingOperator.cs	(revision 6260)
@@ -0,0 +1,10 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Core;
+
+namespace HeuristicLab.Problems.Scheduling.Interfaces {
+  public interface ISchedulingOperator : IOperator {
+  }
+}
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPJob.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPJob.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPJob.cs	(revision 6260)
@@ -54,4 +54,11 @@
       return sb.ToString();
     }
+
+    internal JSSPTask GetPreviousTask(JSSPTask t) {
+      if (t.TaskNr.Value == 0)
+        return null;
+      else
+        return Tasks[t.TaskNr.Value - 1];
+    }
   }
 }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPTask.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPTask.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JSSPTask.cs	(revision 6260)
@@ -42,7 +42,5 @@
       this.TaskNr = cloner.Clone(original.TaskNr);
       this.IsScheduled = cloner.Clone(original.IsScheduled);
-      this.Job = cloner.Clone(original.Job);
-      this.PreviousTask = cloner.Clone(original.PreviousTask);
-      this.NextTask = cloner.Clone(original.NextTask);
+      this.JobNr = cloner.Clone (original.JobNr);
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -61,9 +59,8 @@
       }
     }
-    public JSSPJob Job { get; set; }
-    public JSSPTask PreviousTask { get; set; }
-    public JSSPTask NextTask { get; set; }
+    public IntValue JobNr { get; set; }
 
-    public JSSPTask (IntValue taskNr, IntValue resNr, DoubleValue duration, JSSPJob j) : base () {
+
+    public JSSPTask (IntValue taskNr, IntValue resNr, DoubleValue duration, IntValue jobNr) : base () {
       Duration = duration;
       ResourceNr = resNr;
@@ -71,5 +68,11 @@
       StartTime = new DoubleValue(0);
       IsScheduled = new BoolValue(false);
-      Job = j;
+      JobNr = jobNr;
+    }
+
+    public override string ToString() {
+      StringBuilder sb = new StringBuilder();
+      sb.Append("[" + JobNr + "," + ResourceNr + "]");
+      return sb.ToString();
     }
   }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/JobShopSchedulingProblem.cs	(revision 6260)
@@ -43,4 +43,5 @@
 using HeuristicLab.Problems.Scheduling.Encodings.PriorityRulesVector;
 using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Problems.Scheduling.Encodings.PermutationWithRepetition;
 
 namespace HeuristicLab.Problems.Scheduling {
@@ -53,5 +54,4 @@
     private JobShopSchedulingProblem(JobShopSchedulingProblem original, Cloner cloner)
       : base(original, cloner) {
-        operators = original.operators.Select(x => (IOperator)cloner.Clone(x)).ToList();
         this.encodingType = original.encodingType;
         AttachEventHandlers();
@@ -82,13 +82,9 @@
     #endregion
 
-
-    [Storable]
-    private List<IOperator> operators;
-
     [Storable]
     private JSSPEncodingTypes encodingType;
 
     public JobShopSchedulingProblem()
-      : base(new SchedulingEvaluator (), new JSMRandomCreator ()) {
+      : base(new JSSPEvaluationAlgorithm (), new JSMRandomCreator ()) {
         Parameters.Add(new ValueParameter<ItemList<JSSPJob>>("Jobs", "Jobdata defining the precedence relationships and the duration of the tasks in this JSSP-Instance.", new ItemList<JSSPJob>()));
         Parameters.Add(new OptionalValueParameter<Schedule>("BestKnownSolution", "The best known solution of this JSSP instance.")); 
@@ -103,7 +99,10 @@
       if (SolutionCreator.GetType().Equals(typeof(JSMRandomCreator)))
         encodingType = JSSPEncodingTypes.JSMEncoding;
-      else
-        encodingType = JSSPEncodingTypes.PRVEncoding;
-
+      else {
+        if (SolutionCreator.GetType().Equals(typeof(PRVRandomCreator)))
+          encodingType = JSSPEncodingTypes.PRVEncoding;
+        else
+          encodingType = JSSPEncodingTypes.PWREncoding;
+      }
       InitializeOperators();
     }
@@ -122,9 +121,14 @@
       if (encodingType == JSSPEncodingTypes.JSMEncoding) {
         Operators.AddRange(ApplicationManager.Manager.GetInstances<IJSMOperator>());
-        ((SchedulingEvaluator)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<JSMEncoding>(new JSMDecoder(), new MakespanEvaluator());
+        ((JSSPEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<JSMEncoding>(new JSMDecoder(), new MakespanEvaluator());
       } else {
         if (encodingType == JSSPEncodingTypes.PRVEncoding) {
           Operators.AddRange(ApplicationManager.Manager.GetInstances<IPRVOperator>());
-          ((SchedulingEvaluator)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PRVEncoding>(new PRVDecoder(), new MakespanEvaluator());
+          ((JSSPEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PRVEncoding>(new PRVDecoder(), new MakespanEvaluator());
+        } else {
+          if (encodingType == JSSPEncodingTypes.PWREncoding) {
+            Operators.AddRange(ApplicationManager.Manager.GetInstances<IPWROperator>());
+            ((JSSPEvaluationAlgorithm)this.EvaluatorParameter.ActualValue).InitializeOperatorGraph<PWREncoding>(new PWRDecoder(), new MakespanEvaluator());
+          }
         }
       }
@@ -146,4 +150,6 @@
     #region Importmethods
     private List<string> SplitString(string line) {
+      if (line == null)
+        return null;
       List<string> data = new List<string>(line.Split(' '));
       List<string> result = new List<string>();
@@ -155,4 +161,11 @@
 
       return result;
+    }
+    private int[] GetIntArray(List<string> data) {
+      int[] arr = new int [data.Count];
+      for (int i = 0; i < data.Count; i++ ) {
+        arr[i] = Int32.Parse(data[i]);
+      }
+      return arr;
     }
     public void ImportFromORLibrary(string fileName) {
@@ -179,9 +192,7 @@
             JSSPJob j = new JSSPJob(new IntValue(jobCount));
             for (int i = 0; i < data.Count; i++) {
-              JSSPTask t = new JSSPTask(new IntValue (i / 2), new IntValue(Int32.Parse(data[i])), new DoubleValue(Double.Parse(data[i + 1])), j);
+              JSSPTask t = new JSSPTask(new IntValue (i / 2), new IntValue(Int32.Parse(data[i])), new DoubleValue(Double.Parse(data[i + 1])), new IntValue (jobCount));
               if (j.Tasks.Count > 0) {
-                t.PreviousTask = j.Tasks[j.Tasks.Count - 1];
-                j.Tasks[j.Tasks.Count - 1].NextTask = t;
-                t.StartTime = new DoubleValue (t.PreviousTask.EndTime.Value + 2);
+                t.StartTime = new DoubleValue (j.Tasks[j.Tasks.Count - 1].EndTime.Value + 2);
               }
               j.Tasks.Add(t);
@@ -198,4 +209,37 @@
       problemFile.Close();
     }
+
+    public void ImportJSMSolution(string fileName) {
+      if (!File.Exists(fileName))
+        return;
+      StreamReader solutionFile = new StreamReader(fileName);
+      //assures that the parser only reads the first solution instance given in the file
+      bool solutionFound = false;
+      JSMEncoding solution = new JSMEncoding();
+      while (!solutionFile.EndOfStream && !solutionFound) {
+        
+        string line = solutionFile.ReadLine();
+        List<string> data = SplitString(line);
+        if (data.Count > 0 && ((int)data[0][0] >= 48 && (int)data[0][0] <= 57)) {
+          if (data.Count > 2)
+            BestKnownQualityParameter.ActualValue = new DoubleValue(Double.Parse(data[2]));
+          line = solutionFile.ReadLine();
+          data = SplitString(line);
+          while (data != null && data.Count > 0 && ((int)data[0][0] >= 48 && (int)data[0][0] <= 57)) {
+            Permutation p = new Permutation(PermutationTypes.Absolute, GetIntArray (data));
+            solution.JobSequenceMatrix.Add(p);
+
+            line = solutionFile.ReadLine();
+            data = SplitString(line);
+          }//while
+          solutionFound = true;
+        }//if
+      }//while
+      solutionFile.Close();
+
+      JSMDecoder decoder = new JSMDecoder();
+      Schedule result = decoder.CreateScheduleFromEncoding(solution, Jobs);
+      BestKnownSolution = result;
+    }
     #endregion
 
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Resource.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Resource.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Resource.cs	(revision 6260)
@@ -45,8 +45,10 @@
     public DoubleValue TotalDuration {
       get {
-        if (Tasks.Count > 0)
-          return new DoubleValue(Tasks[Tasks.Count - 1].EndTime.Value);
-        else
-          return new DoubleValue (0);
+        double result = 0;
+        foreach (JSSPTask t in Tasks) {
+          if (t.EndTime.Value > result)
+            result = t.EndTime.Value;
+        }
+        return new DoubleValue (result);
       }
     }
Index: branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Schedule.cs
===================================================================
--- branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Schedule.cs	(revision 6177)
+++ branches/Scheduling/HeuristicLab.Problems.Scheduling/3.3/Schedule.cs	(revision 6260)
@@ -48,10 +48,39 @@
 
     [Storable]
-    public ItemList<Resource> Resources;
+    private ItemList<Resource> resources;
+    public ItemList<Resource> Resources {
+      get { return resources; }
+      set {
+        if (resources != null) DeregisterResourcesEvents();
+        resources = value;
+        if (resources != null) RegisterResourcesEvents();
+        OnResourcesChanged();
+      }
+    }
 
     [Storable]
+    private DoubleValue quality;
     public DoubleValue Quality {
-      get;
-      set;
+      get { return quality; }
+      set {
+        if (quality != value) {
+          if (quality != null) DeregisterQualityEvents();
+          quality = value;
+          if (quality != null) RegisterQualityEvents();
+          OnQualityChanged();
+        }
+      }
+    }
+
+    public double Makespan {
+      get {
+        double quality = 0;
+        foreach (Resource r in Resources) {
+          if (r.TotalDuration.Value > quality) {
+            quality = r.TotalDuration.Value;
+          }
+        }
+        return quality;
+      }
     }
 
@@ -62,4 +91,65 @@
         Resources.Add(new Resource(new IntValue (i)));
       }
+    }
+
+    #region Events
+    public event EventHandler QualityChanged;
+    private void OnQualityChanged() {
+      var changed = QualityChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    private void RegisterQualityEvents() {
+      Quality.ValueChanged += new EventHandler(Quality_ValueChanged);
+    }
+    private void DeregisterQualityEvents() {
+      Quality.ValueChanged -= new EventHandler(Quality_ValueChanged);
+    }
+    private void Quality_ValueChanged(object sender, EventArgs e) {
+      OnQualityChanged();
+    }
+
+    public event EventHandler ResourcesChanged;
+    private void OnResourcesChanged() {
+      var changed = ResourcesChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
+    }
+    private void RegisterResourcesEvents() {
+      Resources.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(Resources_PropertyChanged);
+    }
+    private void DeregisterResourcesEvents() {
+      Resources.PropertyChanged -= new System.ComponentModel.PropertyChangedEventHandler(Resources_PropertyChanged);
+    }
+    private void Resources_PropertyChanged(object sender, EventArgs e) {
+      OnResourcesChanged();
+    }
+    #endregion
+
+    public void AddTask(JSSPTask task, JSSPJob job) {
+      task.StartTime = new DoubleValue (ComputeEarliestStartTime(task, job));
+      Resource affectedResource = resources[task.ResourceNr.Value];
+      int i = 0;
+      while (i < affectedResource.Tasks.Count && affectedResource.Tasks[i].StartTime.Value < task.StartTime.Value)
+        i++;
+
+      if (i >= affectedResource.Tasks.Count)
+        affectedResource.Tasks.Add(task);
+      else
+        affectedResource.Tasks.Insert(i, task);
+    }
+    public double ComputeEarliestStartTime(JSSPTask t, JSSPJob job) {
+      Resource affectedResource = resources[t.ResourceNr.Value];
+      double lastMachineEndTime = affectedResource.TotalDuration.Value;
+      double previousJobTaskEndTime = 0;
+      JSSPTask previousTask = job.GetPreviousTask(t);
+      if (previousTask != null)
+        previousJobTaskEndTime = previousTask.EndTime.Value;
+
+      return Math.Max(previousJobTaskEndTime, lastMachineEndTime);
+    }
+    public double ComputeEarliestCompletionTime(JSSPTask t, JSSPJob job) {
+      Resource affectedResource = resources[t.ResourceNr.Value];
+      return ComputeEarliestStartTime(t, job) + t.Duration.Value;
     }
 
