Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/Encoding.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/Encoding.cs	(revision 14064)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/Encoding.cs	(revision 14064)
@@ -0,0 +1,75 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.BinPacking;
+
+namespace HeuristicLab.Encodings.PackingEncoding.PackingSequence {
+  [StorableClass]
+  internal class Encoding : HeuristicLab.Optimization.Encoding<PackingSolutionCreator> {
+    [StorableConstructor]
+    private Encoding(bool deserializing) : base(deserializing) { }
+    public Encoding() : base("PackingSequence") {
+      SolutionCreator = new PackingSequenceRandomCreator();
+      RegisterParameterEvents();
+      DiscoverOperators();
+    }
+
+    private Encoding(Encoding original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterParameterEvents();
+    }
+
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Encoding(this, cloner);
+    }
+
+    public override void ConfigureOperators(IEnumerable<IOperator> operators) {
+      // TODO
+    }
+
+    #region Operator discovery
+    private static readonly IEnumerable<Type> encodingSpecificOperatorTypes;
+    static Encoding() {
+      encodingSpecificOperatorTypes = new List<Type>
+      {
+        typeof(IPackingSequenceOperator),         // TODO move (also namespace)
+      };
+    }
+    private void DiscoverOperators() {
+      var assembly = typeof(IPackingSequenceCreator).Assembly;
+      var discoveredTypes = ApplicationManager.Manager.GetTypes(encodingSpecificOperatorTypes, assembly, true, false, false);
+      var operators = discoveredTypes.Select(t => (IOperator)Activator.CreateInstance(t));
+      var newOperators = operators.Except(Operators, new TypeEqualityComparer<IOperator>()).ToList();
+
+      ConfigureOperators(newOperators);
+      foreach (var @operator in newOperators)
+        AddOperator(@operator);
+    }
+    #endregion
+
+    private void RegisterParameterEvents() {
+      // nothing to do
+    }
+
+
+  }
+
+  public static class IndividualExtensionMethods {
+    public static PackingSequence PackingSequence(this Individual individual) {
+      var encoding = individual.GetEncoding<Encoding>();
+      return individual.PackingSequence(encoding.Name);
+    }
+
+    public static PackingSequence PackingSequence(this Individual individual, string name) {
+      return (PackingSequence)individual[name];
+    }
+  }
+}
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/IPackingSequenceCreator.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/IPackingSequenceCreator.cs	(revision 14063)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/IPackingSequenceCreator.cs	(revision 14064)
@@ -24,9 +24,10 @@
 using HeuristicLab.Data;
 using HeuristicLab.Optimization;
+using HeuristicLab.Problems.BinPacking;
 
 namespace HeuristicLab.Encodings.PackingEncoding.PackingSequence {
-  interface IPackingSequenceCreator : ISolutionCreator {
+  interface IPackingSequenceCreator : ISolutionCreator, IPackingSequenceOperator {
     IValueLookupParameter<IntValue> PackingItemsParameter { get; }
-    ILookupParameter<Problems.BinPacking.Encodings.PackingSequence.PackingSequence> SolutionParameter { get; }
+    ILookupParameter<PackingSequence> SolutionParameter { get; }
 
   }
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequence.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequence.cs	(revision 14063)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequence.cs	(revision 14064)
@@ -9,5 +9,5 @@
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
 
-namespace HeuristicLab.Problems.BinPacking.Encodings.PackingSequence {
+namespace HeuristicLab.Encodings.PackingEncoding.PackingSequence {
   [Item("PackingSequence", "Represents a packing sequence (permutation).")]
   [StorableClass]
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceRandomCreator.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceRandomCreator.cs	(revision 14063)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/PackingSequenceRandomCreator.cs	(revision 14064)
@@ -42,6 +42,6 @@
     }
 
-    public ILookupParameter<Problems.BinPacking.Encodings.PackingSequence.PackingSequence> SolutionParameter {
-      get { return (ILookupParameter<Problems.BinPacking.Encodings.PackingSequence.PackingSequence>)Parameters["PackingItems"]; }
+    public ILookupParameter<PackingSequence> SolutionParameter {
+      get { return (ILookupParameter<PackingSequence>)Parameters["PackingItems"]; }
     }
 
@@ -59,5 +59,5 @@
       Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator."));
       Parameters.Add(new ValueLookupParameter<IntValue>("PackingItems", "The number of packing-items handled in this problem instance."));
-      Parameters.Add(new LookupParameter<Problems.BinPacking.Encodings.PackingSequence.PackingSequence>("PackingSequence"));
+      Parameters.Add(new LookupParameter<PackingSequence>("PackingSequence"));
 
       SolutionParameter.ActualName = "PackingSequence";
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 14063)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj	(revision 14064)
@@ -216,4 +216,5 @@
     <Compile Include="Encodings\PackingPlans\BinPacking.cs" />
     <Compile Include="Encodings\PackingPlans\PackingPlan.cs" />
+    <Compile Include="Encodings\PackingSequence\Encoding.cs" />
     <Compile Include="Encodings\PackingSequence\IPackingSequenceCreator.cs" />
     <Compile Include="Encodings\PackingSequence\Moves\Insertion\ExhaustiveInsertionMoveGenerator.cs" />
@@ -280,4 +281,5 @@
     <Compile Include="PackingSolutionDecoder.cs" />
     <Compile Include="Plugin.cs" />
+    <Compile Include="PackingSequenceProblem.cs" />
     <Compile Include="Problem.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
Index: /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingSequenceProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingSequenceProblem.cs	(revision 14064)
+++ /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingSequenceProblem.cs	(revision 14064)
@@ -0,0 +1,84 @@
+﻿#region License Information
+
+/* HeuristicLab
+ * Copyright (C) 2002-2016 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.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
+using HeuristicLab.Optimization;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.BinPacking2d {
+  [StorableClass]
+  abstract class PackingSequenceProblem : SingleObjectiveBasicProblem<Encoding> {
+
+    // persistence
+    [StorableConstructor]
+    protected PackingSequenceProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+
+
+    // cloning
+    protected PackingSequenceProblem(PackingSequenceProblem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    protected PackingSequenceProblem() : base() { }
+
+    public virtual bool IsBetter(double quality, double bestQuality) {
+      return (Maximization && quality > bestQuality || !Maximization && quality < bestQuality);
+    }
+
+    public sealed override double Evaluate(Individual individual, IRandom random) {
+      return Evaluate(individual.PackingSequence(), random);
+    }
+    public abstract double Evaluate(PackingSequence sequence, IRandom random);
+
+    public virtual void Analyze(PackingSequence[] trees, double[] qualities, ResultCollection results,
+      IRandom random) {
+      if (!results.ContainsKey("Best Solution Quality")) {
+        results.Add(new Result("Best Solution Quality", typeof(DoubleValue)));
+      }
+      if (!results.ContainsKey("Best Solution")) {
+        results.Add(new Result("Best Solution", typeof(PackingSequence)));
+      }
+
+      var bestQuality = Maximization ? qualities.Max() : qualities.Min();
+
+      if (results["Best Solution Quality"].Value == null ||
+          IsBetter(bestQuality, ((DoubleValue)results["Best Solution Quality"].Value).Value)) {
+        var bestIdx = Array.IndexOf(qualities, bestQuality);
+        var bestClone = (IItem)trees[bestIdx].Clone();
+        results["Best Solution"].Value = bestClone;
+        results["Best Solution Quality"].Value = new DoubleValue(bestQuality);
+      }
+    }
+
+    public sealed override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, IRandom random) {
+      Analyze(individuals.Select(ind => ind.PackingSequence()).ToArray(), qualities, results, random);
+    }
+  }
+}
