Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecoder.cs	(revision 8757)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecoder.cs	(revision 8887)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -34,5 +35,6 @@
   [Item("JobSequenceMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequence Matrix.")]
   [StorableClass]
-  public class JSMDecoder : ScheduleDecoder<JSMEncoding>, IStochasticOperator, IJSSPOperator {
+  public class JSMDecoder : ScheduleDecoder, IStochasticOperator, IJSSPOperator {
+
     public ILookupParameter<IRandom> RandomParameter {
       get { return (LookupParameter<IRandom>)Parameters["Random"]; }
@@ -41,28 +43,22 @@
       get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }
     }
+    public IValueParameter<JSMDecodingErrorPolicy> DecodingErrorPolicyParameter {
+      get { return (IValueParameter<JSMDecodingErrorPolicy>)Parameters["DecodingErrorPolicy"]; }
+    }
+    public IValueParameter<JSMForcingStrategy> ForcingStrategyParameter {
+      get { return (IValueParameter<JSMForcingStrategy>)Parameters["ForcingStrategy"]; }
+    }
 
-    #region Private Members
-    [Storable]
-    private Schedule resultingSchedule;
+    private JSMDecodingErrorPolicyTypes DecodingErrorPolicy {
+      get { return DecodingErrorPolicyParameter.Value.Value; }
+    }
 
-    [Storable]
-    private ItemList<Job> jobs;
-
-    [Storable]
-    private JSMDecodingErrorPolicyTypes decodingErrorPolicy = JSMDecodingErrorPolicyTypes.GuidedPolicy;
-
-    [Storable]
-    private JSMForcingStrategyTypes forcingStrategy = JSMForcingStrategyTypes.ShiftForcing;
-    #endregion
+    private JSMForcingStrategyTypes ForcingStrategy {
+      get { return ForcingStrategyParameter.Value.Value; }
+    }
 
     [StorableConstructor]
     protected JSMDecoder(bool deserializing) : base(deserializing) { }
-    protected JSMDecoder(JSMDecoder original, Cloner cloner)
-      : base(original, cloner) {
-      this.resultingSchedule = cloner.Clone(original.resultingSchedule);
-      this.jobs = cloner.Clone(original.jobs);
-      this.decodingErrorPolicy = original.decodingErrorPolicy;
-      this.forcingStrategy = original.forcingStrategy;
-    }
+    protected JSMDecoder(JSMDecoder original, Cloner cloner) : base(original, cloner) { }
     public override IDeepCloneable Clone(Cloner cloner) {
       return new JSMDecoder(this, cloner);
@@ -73,7 +69,9 @@
       Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators."));
       Parameters.Add(new LookupParameter<ItemList<Job>>("JobData", "Job data taken from the Schedulingproblem - Instance."));
+      Parameters.Add(new ValueParameter<JSMDecodingErrorPolicy>("DecodingErrorPolicy", "Specify the policy that should be used to handle decoding errors.", new JSMDecodingErrorPolicy(JSMDecodingErrorPolicyTypes.RandomPolicy)));
+      Parameters.Add(new ValueParameter<JSMForcingStrategy>("ForcingStrategy", "Specifies a forcing strategy.", new JSMForcingStrategy(JSMForcingStrategyTypes.SwapForcing)));
+
       ScheduleEncodingParameter.ActualName = "JobSequenceMatrix";
     }
-
 
     private Task SelectTaskFromConflictSet(int conflictedResourceNr, int progressOnConflictedResource, ItemList<Task> conflictSet, ItemList<Permutation> jsm) {
@@ -100,6 +98,7 @@
       return result;
     }
+
     private Task ApplyDecodingErrorPolicy(ItemList<Task> conflictSet, Permutation resource, int progress) {
-      if (decodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) {
+      if (DecodingErrorPolicy == JSMDecodingErrorPolicyTypes.RandomPolicy) {
         //Random
         return conflictSet[RandomParameter.ActualValue.Next(conflictSet.Count - 1)];
@@ -117,6 +116,7 @@
       }
     }
+
     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];
@@ -139,6 +139,6 @@
       ItemList<Permutation> jobSequenceMatrix = solution.JobSequenceMatrix;
 
-      jobs = (ItemList<Job>)jobData.Clone();
-      resultingSchedule = new Schedule(jobs[0].Tasks.Count);
+      var jobs = (ItemList<Job>)jobData.Clone();
+      var resultingSchedule = new Schedule(jobs[0].Tasks.Count);
 
       //Reset scheduled tasks in result
@@ -177,10 +177,8 @@
     }
 
-    public override Schedule CreateScheduleFromEncoding(JSMEncoding solution) {
+    public override Schedule CreateScheduleFromEncoding(IScheduleEncoding encoding) {
+      var solution = encoding as JSMEncoding;
+      if (solution == null) throw new InvalidOperationException("Encoding is not of type JSMEncoding");
       return CreateScheduleFromEncoding(solution, JobDataParameter.ActualValue);
-    }
-
-    public override IOperation Apply() {
-      return base.Apply();
     }
   }
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicy.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicy.cs	(revision 8887)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicy.cs	(revision 8887)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Scheduling {
+  [Item("JSMDecodingErrorPolicy", "Represents a policy for handling decoding errors.")]
+  [StorableClass]
+  public sealed class JSMDecodingErrorPolicy : ValueTypeValue<JSMDecodingErrorPolicyTypes> {
+
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; }
+    }
+
+    [StorableConstructor]
+    private JSMDecodingErrorPolicy(bool deserializing) : base(deserializing) { }
+    private JSMDecodingErrorPolicy(JSMDecodingErrorPolicy original, Cloner cloner) : base(original, cloner) { }
+    public JSMDecodingErrorPolicy() : base() { }
+    public JSMDecodingErrorPolicy(JSMDecodingErrorPolicyTypes types) : base(types) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new JSMDecodingErrorPolicy(this, cloner);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicyTypes.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicyTypes.cs	(revision 8757)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMDecodingErrorPolicyTypes.cs	(revision 8887)
@@ -19,4 +19,5 @@
  */
 #endregion
+
 namespace HeuristicLab.Problems.Scheduling {
   public enum JSMDecodingErrorPolicyTypes {
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMForcingStrategy.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMForcingStrategy.cs	(revision 8887)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/JSMForcingStrategy.cs	(revision 8887)
@@ -0,0 +1,47 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Scheduling {
+  [Item("JSMForcingStrategy", "Represents a forcing strategy.")]
+  [StorableClass]
+  public sealed class JSMForcingStrategy : ValueTypeValue<JSMForcingStrategyTypes> {
+
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Enum; }
+    }
+
+    [StorableConstructor]
+    private JSMForcingStrategy(bool deserializing) : base(deserializing) { }
+    private JSMForcingStrategy(JSMForcingStrategy original, Cloner cloner) : base(original, cloner) { }
+    public JSMForcingStrategy() { }
+    public JSMForcingStrategy(JSMForcingStrategyTypes types) : base(types) { }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new JSMForcingStrategy(this, cloner);
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PRVDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PRVDecoder.cs	(revision 8757)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PRVDecoder.cs	(revision 8887)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -31,5 +32,6 @@
   [Item("JobSequencingMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequencing Matrix.")]
   [StorableClass]
-  public class PRVDecoder : ScheduleDecoder<PRVEncoding>, IStochasticOperator, IJSSPOperator {
+  public class PRVDecoder : ScheduleDecoder, IStochasticOperator, IJSSPOperator {
+
     public ILookupParameter<IRandom> RandomParameter {
       get { return (LookupParameter<IRandom>)Parameters["Random"]; }
@@ -38,12 +40,4 @@
       get { return (LookupParameter<ItemList<Job>>)Parameters["JobData"]; }
     }
-
-    #region Private Members
-    [Storable]
-    private Schedule resultingSchedule;
-
-    [Storable]
-    private ItemList<Job> jobs;
-    #endregion
 
     #region Priority Rules
@@ -55,9 +49,9 @@
 
     //earliest start time
-    private Task ESTRule(ItemList<Task> tasks) {
+    private Task ESTRule(ItemList<Task> tasks, Schedule schedule) {
       Task currentResult = RandomRule(tasks);
       double currentEST = double.MaxValue;
       foreach (Task t in tasks) {
-        double est = GTAlgorithmUtils.ComputeEarliestStartTime(t, resultingSchedule);
+        double est = GTAlgorithmUtils.ComputeEarliestStartTime(t, schedule);
         if (est < currentEST) {
           currentEST = est;
@@ -89,5 +83,5 @@
 
     //most work remaining
-    private Task MWRRule(ItemList<Task> tasks) {
+    private Task MWRRule(ItemList<Task> tasks, ItemList<Job> jobs) {
       Task currentResult = RandomRule(tasks);
       double currentLargestRemainingProcessingTime = 0;
@@ -107,5 +101,5 @@
 
     //least work remaining
-    private Task LWRRule(ItemList<Task> tasks) {
+    private Task LWRRule(ItemList<Task> tasks, ItemList<Job> jobs) {
       Task currentResult = RandomRule(tasks);
       double currentSmallestRemainingProcessingTime = double.MaxValue;
@@ -125,5 +119,5 @@
 
     //most operations remaining
-    private Task MORRule(ItemList<Task> tasks) {
+    private Task MORRule(ItemList<Task> tasks, ItemList<Job> jobs) {
       Task currentResult = RandomRule(tasks);
       int currentLargestNrOfRemainingTasks = 0;
@@ -143,5 +137,5 @@
 
     //least operationsremaining
-    private Task LORRule(ItemList<Task> tasks) {
+    private Task LORRule(ItemList<Task> tasks, ItemList<Job> jobs) {
       Task currentResult = RandomRule(tasks);
       int currentSmallestNrOfRemainingTasks = int.MaxValue;
@@ -176,12 +170,5 @@
     [StorableConstructor]
     protected PRVDecoder(bool deserializing) : base(deserializing) { }
-    protected PRVDecoder(PRVDecoder original, Cloner cloner)
-      : base(original, cloner) {
-      this.resultingSchedule = cloner.Clone(original.resultingSchedule);
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new PRVDecoder(this, cloner);
-    }
-
+    protected PRVDecoder(PRVDecoder original, Cloner cloner) : base(original, cloner) { }
     public PRVDecoder()
       : base() {
@@ -191,5 +178,9 @@
     }
 
-    private Task SelectTaskFromConflictSet(ItemList<Task> conflictSet, int ruleIndex, int nrOfRules) {
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PRVDecoder(this, cloner);
+    }
+
+    private Task SelectTaskFromConflictSet(ItemList<Task> conflictSet, int ruleIndex, int nrOfRules, Schedule schedule, ItemList<Job> jobs) {
       if (conflictSet.Count == 1)
         return conflictSet[0];
@@ -198,11 +189,11 @@
       switch (ruleIndex) {
         case 0: return FILORule(conflictSet);
-        case 1: return ESTRule(conflictSet);
+        case 1: return ESTRule(conflictSet, schedule);
         case 2: return SPTRule(conflictSet);
         case 3: return LPTRule(conflictSet);
-        case 4: return MWRRule(conflictSet);
-        case 5: return LWRRule(conflictSet);
-        case 6: return MORRule(conflictSet);
-        case 7: return LORRule(conflictSet);
+        case 4: return MWRRule(conflictSet, jobs);
+        case 5: return LWRRule(conflictSet, jobs);
+        case 6: return MORRule(conflictSet, jobs);
+        case 7: return LORRule(conflictSet, jobs);
         case 8: return FIFORule(conflictSet);
         case 9: return RandomRule(conflictSet);
@@ -211,7 +202,10 @@
     }
 
-    public override Schedule CreateScheduleFromEncoding(PRVEncoding solution) {
-      jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
-      resultingSchedule = new Schedule(jobs[0].Tasks.Count);
+    public override Schedule CreateScheduleFromEncoding(IScheduleEncoding encoding) {
+      var solution = encoding as PRVEncoding;
+      if (solution == null) throw new InvalidOperationException("Encoding is not of type PWREncoding");
+
+      var jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
+      var resultingSchedule = new Schedule(jobs[0].Tasks.Count);
 
       //Reset scheduled tasks in result
@@ -235,5 +229,5 @@
         //STEP 3 - Select an operation from the conflict set (various methods depending on how the algorithm should work..)
         //Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector [currentDecisionIndex++], solution.NrOfRules.Value);
-        Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector[minimal.JobNr], solution.NrOfRules.Value);
+        Task selectedTask = SelectTaskFromConflictSet(conflictSet, solution.PriorityRulesVector[minimal.JobNr], solution.NrOfRules.Value, resultingSchedule, jobs);
 
         //STEP 4 - Adding the selected operation to the current schedule
@@ -248,8 +242,4 @@
       return resultingSchedule;
     }
-
-    public override IOperation Apply() {
-      return base.Apply();
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PWRDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PWRDecoder.cs	(revision 8757)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/PWRDecoder.cs	(revision 8887)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -31,5 +32,6 @@
   [Item("PWRDecoder", "An item used to convert a PWR-individual into a generalized schedule.")]
   [StorableClass]
-  public class PWRDecoder : ScheduleDecoder<PWREncoding>, IStochasticOperator, IJSSPOperator {
+  public class PWRDecoder : ScheduleDecoder, IStochasticOperator, IJSSPOperator {
+
     public ILookupParameter<IRandom> RandomParameter {
       get { return (LookupParameter<IRandom>)Parameters["Random"]; }
@@ -41,11 +43,5 @@
     [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);
-    }
-
+    protected PWRDecoder(PWRDecoder original, Cloner cloner) : base(original, cloner) { }
     public PWRDecoder()
       : base() {
@@ -55,7 +51,14 @@
     }
 
-    public override Schedule CreateScheduleFromEncoding(PWREncoding solution) {
-      ItemList<Job> jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
-      Schedule resultingSchedule = new Schedule(jobs[0].Tasks.Count);
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new PWRDecoder(this, cloner);
+    }
+
+    public override Schedule CreateScheduleFromEncoding(IScheduleEncoding encoding) {
+      var solution = encoding as PWREncoding;
+      if (solution == null) throw new InvalidOperationException("Encoding is not of type PWREncoding");
+
+      var jobs = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
+      var resultingSchedule = new Schedule(jobs[0].Tasks.Count);
       foreach (int jobNr in solution.PermutationWithRepetition) {
         int i = 0;
@@ -68,8 +71,4 @@
       return resultingSchedule;
     }
-
-    public override IOperation Apply() {
-      return base.Apply();
-    }
   }
 }
Index: trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/ScheduleDecoder.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/ScheduleDecoder.cs	(revision 8887)
+++ trunk/sources/HeuristicLab.Problems.Scheduling/3.3/Decoders/ScheduleDecoder.cs	(revision 8887)
@@ -0,0 +1,58 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.ScheduleEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.Scheduling {
+  [Item("ScheduleDecoder", "A schedule decoder translates a respresentation into an actual schedule.")]
+  [StorableClass]
+  public abstract class ScheduleDecoder : SingleSuccessorOperator, IScheduleDecoder {
+
+    public ILookupParameter<IScheduleEncoding> ScheduleEncodingParameter {
+      get { return (ILookupParameter<IScheduleEncoding>)Parameters["ScheduleEncoding"]; }
+    }
+    public ILookupParameter<Schedule> ScheduleParameter {
+      get { return (ILookupParameter<Schedule>)Parameters["Schedule"]; }
+    }
+
+    [StorableConstructor]
+    protected ScheduleDecoder(bool deserializing) : base(deserializing) { }
+    protected ScheduleDecoder(ScheduleDecoder original, Cloner cloner) : base(original, cloner) { }
+    public ScheduleDecoder()
+      : base() {
+      Parameters.Add(new LookupParameter<IScheduleEncoding>("ScheduleEncoding", "The new scheduling solution represented as encoding."));
+      Parameters.Add(new LookupParameter<Schedule>("Schedule", "The decoded scheduling solution represented as generalized schedule."));
+    }
+
+    public abstract Schedule CreateScheduleFromEncoding(IScheduleEncoding solution);
+
+    public override IOperation Apply() {
+      Schedule result = CreateScheduleFromEncoding(ScheduleEncodingParameter.ActualValue);
+      ScheduleParameter.ActualValue = result;
+      return base.Apply();
+    }
+  }
+}
