Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleCreator.cs	(revision 13469)
@@ -25,6 +25,7 @@
 
 namespace HeuristicLab.Encodings.ScheduleEncoding {
-  public interface IScheduleCreator : ISolutionCreator<ISchedule>, IScheduleOperator {
-    ILookupParameter<ISchedule> ScheduleParameter { get; }
+  public interface IScheduleCreator<TSchedule> : ISolutionCreator<TSchedule>, IScheduleOperator
+  where TSchedule : class,ISchedule {
+    ILookupParameter<TSchedule> ScheduleParameter { get; }
     IValueLookupParameter<IntValue> JobsParameter { get; }
     IValueLookupParameter<IntValue> ResourcesParameter { get; }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Interfaces/IScheduleDecoder.cs	(revision 13469)
@@ -30,3 +30,8 @@
     Schedule DecodeSchedule(ISchedule solution, ItemList<Job> jobData);
   }
+
+  public interface IScheduleDecoder<TSchedule> : IScheduleDecoder
+    where TSchedule : class, ISchedule {
+    Schedule DecodeSchedule(TSchedule solution, ItemList<Job> jobData);
+  }
 }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Decoder/JSMDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Decoder/JSMDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/Decoder/JSMDecoder.cs	(revision 13469)
@@ -34,5 +34,5 @@
   [Item("JobSequenceMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequence Matrix.")]
   [StorableClass]
-  public class JSMDecoder : ScheduleDecoder {
+  public class JSMDecoder : ScheduleDecoder<JSMEncoding> {
 
     public IFixedValueParameter<EnumValue<JSMDecodingErrorPolicy>> DecodingErrorPolicyParameter {
@@ -130,11 +130,9 @@
     }
 
-    public override Schedule DecodeSchedule(ISchedule encoding, ItemList<Job> jobData) {
-      var solution = encoding as JSMEncoding;
-      if (solution == null) throw new InvalidOperationException("Encoding is not of type JSMEncoding");
-      return DecodeSchedule(solution, jobData, DecodingErrorPolicy, ForcingStrategy);
+    public override Schedule DecodeSchedule(JSMEncoding encoding, ItemList<Job> jobData) {
+      return Decode(encoding, jobData, DecodingErrorPolicy, ForcingStrategy);
     }
 
-    public static Schedule DecodeSchedule(JSMEncoding solution, ItemList<Job> jobData, JSMDecodingErrorPolicy decodingErrorPolicy, JSMForcingStrategy forcingStrategy) {
+    public static Schedule Decode(JSMEncoding solution, ItemList<Job> jobData, JSMDecodingErrorPolicy decodingErrorPolicy, JSMForcingStrategy forcingStrategy) {
       var random = new FastRandom(solution.RandomSeed);
       var jobs = (ItemList<Job>)jobData.Clone();
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/JobSequenceMatrix/JSMRandomCreator.cs	(revision 13469)
@@ -30,5 +30,5 @@
   [Item("JobSequenceMatrixCreator", "Creator class used to create Job Sequence Matrix solutions for standard JobShop scheduling problems.")]
   [StorableClass]
-  public class JSMRandomCreator : ScheduleCreator, IStochasticOperator {
+  public class JSMRandomCreator : ScheduleCreator<JSMEncoding>, IStochasticOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
@@ -56,5 +56,5 @@
     }
 
-    protected override ISchedule CreateSolution() {
+    protected override JSMEncoding CreateSolution() {
       return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue);
     }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Decoder/PWRDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Decoder/PWRDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/Decoder/PWRDecoder.cs	(revision 13469)
@@ -28,5 +28,5 @@
   [Item("PWRDecoder", "An item used to convert a PWR-individual into a generalized schedule.")]
   [StorableClass]
-  public class PWRDecoder : ScheduleDecoder {
+  public class PWRDecoder : ScheduleDecoder<PWREncoding> {
     [StorableConstructor]
     protected PWRDecoder(bool deserializing) : base(deserializing) { }
@@ -38,11 +38,9 @@
     }
 
-    public override Schedule DecodeSchedule(ISchedule solution, ItemList<Job> jobData) {
-      var pwr = solution as PWREncoding;
-      if (pwr == null) throw new InvalidOperationException("Encoding is not of type PWREncoding");
-      return DecodeSchedule(pwr, jobData);
+    public override Schedule DecodeSchedule(PWREncoding solution, ItemList<Job> jobData) {
+      return Decode(solution, jobData);
     }
 
-    public static Schedule DecodeSchedule(PWREncoding solution, ItemList<Job> jobData) {
+    public static Schedule Decode(PWREncoding solution, ItemList<Job> jobData) {
       var jobs = (ItemList<Job>)jobData.Clone();
       var resultingSchedule = new Schedule(jobs[0].Tasks.Count);
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWRRandomCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWRRandomCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PermutationWithRepetition/PWRRandomCreator.cs	(revision 13469)
@@ -29,5 +29,5 @@
   [Item("PermutationWithRepetitionRandomCreator", "Creates PWR-individuals at random.")]
   [StorableClass]
-  public class PWRRandomCreator : ScheduleCreator, IStochasticOperator {
+  public class PWRRandomCreator : ScheduleCreator<PWREncoding>, IStochasticOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
@@ -51,5 +51,5 @@
     }
 
-    protected override ISchedule CreateSolution() {
+    protected override PWREncoding CreateSolution() {
       return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue);
     }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs.frame
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs.frame	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/Plugin.cs.frame	(revision 13469)
@@ -35,4 +35,5 @@
   [PluginDependency("HeuristicLab.Parameters", "3.3")]
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  [PluginDependency("HeuristicLab.Random", "3.3")]
   public class HeuristicLabEncodingsScheduleEncodingPlugin : PluginBase {
   }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Decoder/PRVDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Decoder/PRVDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/Decoder/PRVDecoder.cs	(revision 13469)
@@ -20,9 +20,7 @@
 #endregion
 
-using System;
 using System.Linq;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
-using HeuristicLab.Encodings.ScheduleEncoding;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 using HeuristicLab.Random;
@@ -31,5 +29,5 @@
   [Item("JobSequencingMatrixDecoder", "Applies the GifflerThompson algorithm to create an active schedule from a JobSequencing Matrix.")]
   [StorableClass]
-  public class PRVDecoder : ScheduleDecoder {
+  public class PRVDecoder : ScheduleDecoder<PRVEncoding> {
     #region Priority Rules
     //smallest number of remaining tasks
@@ -189,11 +187,9 @@
     }
 
-    public override Schedule DecodeSchedule(ISchedule encoding, ItemList<Job> jobData) {
-      var solution = encoding as PRVEncoding;
-      if (solution == null) throw new InvalidOperationException("Encoding is not of type PRVEncoding");
-      return DecodeSchedule(solution, jobData);
-    }
-
-    public static Schedule DecodeSchedule(PRVEncoding solution, ItemList<Job> jobData) {
+    public override Schedule DecodeSchedule(PRVEncoding encoding, ItemList<Job> jobData) {
+      return Decode(encoding, jobData);
+    }
+
+    public static Schedule Decode(PRVEncoding solution, ItemList<Job> jobData) {
       var random = new FastRandom(solution.RandomSeed);
       var jobs = (ItemList<Job>)jobData.Clone();
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/PRVRandomCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/PRVRandomCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/PriorityRulesVector/PRVRandomCreator.cs	(revision 13469)
@@ -29,5 +29,5 @@
   [Item("PriorityRulesRandomCreator", "Creator class used to create PRV encoding objects for scheduling problems.")]
   [StorableClass]
-  public class PRVRandomCreator : ScheduleCreator, IStochasticOperator {
+  public class PRVRandomCreator : ScheduleCreator<PRVEncoding>, IStochasticOperator {
 
     [Storable]
@@ -58,5 +58,5 @@
     }
 
-    protected override ISchedule CreateSolution() {
+    protected override PRVEncoding CreateSolution() {
       return Apply(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value, RandomParameter.ActualValue, NrOfRules);
     }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleCreator.cs	(revision 13469)
@@ -30,8 +30,9 @@
   [Item("ScheduleCreator", "Represents the generalized form of creators for Scheduling Problems.")]
   [StorableClass]
-  public abstract class ScheduleCreator : InstrumentedOperator, IScheduleCreator {
+  public abstract class ScheduleCreator<TSchedule> : InstrumentedOperator, IScheduleCreator<TSchedule>
+  where TSchedule : class,ISchedule {
 
-    public ILookupParameter<ISchedule> ScheduleParameter {
-      get { return (ILookupParameter<ISchedule>)Parameters["Schedule"]; }
+    public ILookupParameter<TSchedule> ScheduleParameter {
+      get { return (ILookupParameter<TSchedule>)Parameters["Schedule"]; }
     }
     public IValueLookupParameter<IntValue> JobsParameter {
@@ -44,8 +45,8 @@
     [StorableConstructor]
     protected ScheduleCreator(bool deserializing) : base(deserializing) { }
-    protected ScheduleCreator(ScheduleCreator original, Cloner cloner) : base(original, cloner) { }
+    protected ScheduleCreator(ScheduleCreator<TSchedule> original, Cloner cloner) : base(original, cloner) { }
     public ScheduleCreator()
       : base() {
-      Parameters.Add(new LookupParameter<ISchedule>("Schedule", "The new scheduling solution candidate."));
+      Parameters.Add(new LookupParameter<TSchedule>("Schedule", "The new scheduling solution candidate."));
       Parameters.Add(new ValueLookupParameter<IntValue>("Jobs", "The number of jobs handled in this problem instance."));
       Parameters.Add(new ValueLookupParameter<IntValue>("Resources", "The number of resources used in this problem instance."));
@@ -57,5 +58,5 @@
     }
 
-    protected abstract ISchedule CreateSolution();
+    protected abstract TSchedule CreateSolution();
   }
 }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleDecoder.cs	(revision 13469)
@@ -20,4 +20,5 @@
 #endregion
 
+using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -29,5 +30,6 @@
   [Item("ScheduleDecoder", "A schedule decoder translates a respresentation into an actual schedule.")]
   [StorableClass]
-  public abstract class ScheduleDecoder : SingleSuccessorOperator, IScheduleDecoder {
+  public abstract class ScheduleDecoder<TSchedule> : SingleSuccessorOperator, IScheduleDecoder<TSchedule>
+  where TSchedule : class, ISchedule {
 
     public ILookupParameter<ISchedule> ScheduleEncodingParameter {
@@ -43,5 +45,5 @@
     [StorableConstructor]
     protected ScheduleDecoder(bool deserializing) : base(deserializing) { }
-    protected ScheduleDecoder(ScheduleDecoder original, Cloner cloner) : base(original, cloner) { }
+    protected ScheduleDecoder(ScheduleDecoder<TSchedule> original, Cloner cloner) : base(original, cloner) { }
     public ScheduleDecoder()
       : base() {
@@ -51,5 +53,10 @@
     }
 
-    public abstract Schedule DecodeSchedule(ISchedule solution, ItemList<Job> jobData);
+    public Schedule DecodeSchedule(ISchedule schedule, ItemList<Job> jobData) {
+      TSchedule solution = schedule as TSchedule;
+      if (solution == null) throw new InvalidOperationException("Encoding is not of type " + typeof(TSchedule).GetPrettyName());
+      return DecodeSchedule(solution, jobData);
+    }
+    public abstract Schedule DecodeSchedule(TSchedule schedule, ItemList<Job> jobData);
 
     public override IOperation Apply() {
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding.cs	(revision 13469)
@@ -34,5 +34,5 @@
 namespace HeuristicLab.Encodings.ScheduleEncoding {
   [StorableClass]
-  public abstract class ScheduleEncoding<TSchedule> : Encoding<ISchedule>, IScheduleEncoding
+  public abstract class ScheduleEncoding<TSchedule> : Encoding<TSchedule>, IScheduleEncoding
   where TSchedule : class, ISchedule {
     #region Encoding Parameters
@@ -85,7 +85,6 @@
 
     [Storable]
-    private IValueParameter<IScheduleDecoder> decoderParameter;
-
-    public IValueParameter<IScheduleDecoder> DecoderParameter {
+    private IValueParameter<IScheduleDecoder<TSchedule>> decoderParameter;
+    public IValueParameter<IScheduleDecoder<TSchedule>> DecoderParameter {
       get { return decoderParameter; }
       set {
@@ -114,5 +113,5 @@
     }
 
-    public IScheduleDecoder Decoder {
+    public IScheduleDecoder<TSchedule> Decoder {
       get { return DecoderParameter.Value; }
       set { DecoderParameter.Value = value; }
@@ -123,4 +122,8 @@
     protected ScheduleEncoding(ScheduleEncoding<TSchedule> original, Cloner cloner)
       : base(original, cloner) {
+      jobDataParameter = cloner.Clone(original.JobDataParameter);
+      jobsParameter = cloner.Clone(original.JobsParameter);
+      resourcesParameter = cloner.Clone(original.ResourcesParameter);
+      decoderParameter = cloner.Clone(original.DecoderParameter);
     }
 
@@ -135,5 +138,5 @@
       jobsParameter = new FixedValueParameter<IntValue>(Name + ".Jobs", new IntValue(jobs));
       resourcesParameter = new FixedValueParameter<IntValue>(Name + ".Resources", new IntValue(resources));
-      decoderParameter = new ValueParameter<IScheduleDecoder>(Name + ".Decoder");
+      decoderParameter = new ValueParameter<IScheduleDecoder<TSchedule>>(Name + ".Decoder");
 
       Parameters.Add(jobDataParameter);
@@ -163,10 +166,10 @@
 
     public override void ConfigureOperators(IEnumerable<IItem> operators) {
-      ConfigureCreators(operators.OfType<IScheduleCreator>());
+      ConfigureCreators(operators.OfType<IScheduleCreator<TSchedule>>());
       ConfigureCrossovers(operators.OfType<IScheduleCrossover>());
       ConfigureManipulators(operators.OfType<IScheduleManipulator>());
     }
 
-    private void ConfigureCreators(IEnumerable<IScheduleCreator> creators) {
+    private void ConfigureCreators(IEnumerable<IScheduleCreator<TSchedule>> creators) {
       foreach (var creator in creators) {
         creator.ScheduleParameter.ActualName = Name;
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Decoder/DirectScheduleDecoder.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Decoder/DirectScheduleDecoder.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/Decoder/DirectScheduleDecoder.cs	(revision 13469)
@@ -20,5 +20,4 @@
 #endregion
 
-using System;
 using HeuristicLab.Common;
 using HeuristicLab.Core;
@@ -28,5 +27,5 @@
   [Item("DirectScheduleDecoder", "An item used to convert a direct schedule into a generalized schedule.")]
   [StorableClass]
-  public class DirectScheduleDecoder : ScheduleDecoder {
+  public class DirectScheduleDecoder : ScheduleDecoder<Schedule> {
     [StorableConstructor]
     protected DirectScheduleDecoder(bool deserializing) : base(deserializing) { }
@@ -38,11 +37,9 @@
     }
 
-    public override Schedule DecodeSchedule(ISchedule solution, ItemList<Job> jobData) {
-      var schedule = solution as Schedule;
-      if (schedule == null) throw new InvalidOperationException("Encoding is not of type PWREncoding");
-      return DecodeSchedule(schedule, jobData);
+    public override Schedule DecodeSchedule(Schedule solution, ItemList<Job> jobData) {
+      return Decode(solution, jobData);
     }
 
-    public static Schedule DecodeSchedule(Schedule solution, ItemList<Job> jobData) {
+    public static Schedule Decode(Schedule solution, ItemList<Job> jobData) {
       return solution;
     }
Index: branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs
===================================================================
--- branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs	(revision 13449)
+++ branches/ProblemRefactoring/HeuristicLab.Encodings.ScheduleEncoding/3.3/ScheduleEncoding/DirectScheduleRandomCreator.cs	(revision 13469)
@@ -30,5 +30,5 @@
   [Item("DirectScheduleRandomCreator", "Creator class used to create schedule encoding objects.")]
   [StorableClass]
-  public class DirectScheduleRandomCreator : ScheduleCreator, IStochasticOperator, IDirectScheduleOperator {
+  public class DirectScheduleRandomCreator : ScheduleCreator<Schedule>, IStochasticOperator, IDirectScheduleOperator {
 
     public ILookupParameter<IRandom> RandomParameter {
@@ -68,6 +68,5 @@
 
 
-
-    protected override ISchedule CreateSolution() {
+    protected override Schedule CreateSolution() {
       var jobData = (ItemList<Job>)JobDataParameter.ActualValue.Clone();
       var pwrEncoding = new PWREncoding(JobsParameter.ActualValue.Value, ResourcesParameter.ActualValue.Value,
