Index: anches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ISOContainerMultiComponentVectorDecoder3D.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 14041)
+++ 	(revision )
@@ -1,116 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Joseph Helm and 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Problems.BinPacking.Dimensions;
-using HeuristicLab.Problems.BinPacking.PackingBin;
-using HeuristicLab.Problems.BinPacking.PackingItem;
-using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
-using HeuristicLab.Common;
-using HeuristicLab.Collections;
-using HeuristicLab.Problems.BinPacking.Interfaces;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-
-namespace HeuristicLab.Problems.BinPacking.Decoders {
-  [Item("ISO container decoder for the MultiComponentVector encoding.", "<Description missing...>")]
-  [StorableClass]
-  public class ISOContainerMultiComponentVectorDecoder3D : PackingSolutionDecoder<
-      ThreeDimensionalPacking,
-      CuboidPackingBin,
-      CuboidPackingItem>, I3DMCVDecoder {
-
-    public ISOContainerMultiComponentVectorDecoder3D ()
-      : base() {
-    }
-    [StorableConstructor]
-    protected ISOContainerMultiComponentVectorDecoder3D (bool deserializing) : base(deserializing) { }
-    protected ISOContainerMultiComponentVectorDecoder3D(ISOContainerMultiComponentVectorDecoder3D original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ISOContainerMultiComponentVectorDecoder3D(this, cloner);
-    }
-
-    public static PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> resultPlan = new PackingPlan3D(binMeasures);
-      ObservableList<BinPacking3D> result = new ObservableList<BinPacking3D>();
-
-      var sequenceMatrix = solution.GenerateSequenceMatrix();
-      Dictionary<int, bool> rotated = solution.GenerateRotationArray();
-
-      //Fill bins according to grouping vector
-      List<int> remainingIDs = new List<int>();
-      foreach (var sequence in sequenceMatrix) {
-        remainingIDs = remainingIDs.Concat(sequence).ToList();
-        var bp = new BinPacking3D(binMeasures);
-        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
-        if (remainingIDs.Count > 0) {
-          bp.DoubleDepth();
-          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
-        }
-        result.Add(bp);
-      }
-      result.RemoveAll(x => x.ItemPositions.Count == 0);
-      result = new ObservableList<BinPacking3D>(result.OrderByDescending(bp => bp.PackingDensity));
-
-      //Try to put remaining items in existing bins
-      var temp = new List<int>(remainingIDs);
-      foreach (int id in temp) {
-        foreach (var bp in result) {
-          var position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
-          if (remainingIDs.Count > 0) {
-            bp.DoubleDepth();
-            position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
-          }
-          if (position != null) {
-            bp.PackItem(id, itemMeasures[id], position);
-            remainingIDs.Remove(id);
-          }
-        }
-      }
-
-      //Put still remaining items in new bins
-      while (remainingIDs.Count > 0) {
-        var bp = new BinPacking3D(binMeasures);
-        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
-        if (remainingIDs.Count > 0) {
-          bp.DoubleDepth();
-          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
-        }
-        result.Add(bp);
-      }
-      result.RemoveAll(x => x.ItemPositions.Count == 0); 
-      resultPlan.BinPackings = new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(bp => bp.PackingDensity));
-      return resultPlan;
-    }
-
-    public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
-      var solution = encodedSolution as MultiComponentVectorEncoding;
-      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
-      return Decode(solution, binMeasures, itemMeasures);
-    }
-  }
-}
Index: anches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/ISOContainerBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/ISOContainerBinPackingProblem.cs	(revision 14041)
+++ 	(revision )
@@ -1,188 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Joseph Helm and 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.Problems.BinPacking.Interfaces;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Core;
-using HeuristicLab.Common;
-using HeuristicLab.Problems.BinPacking.Decoders;
-using HeuristicLab.Problems.Instances;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-
-namespace HeuristicLab.Problems.BinPacking.Problem {
-  [Item("Bin Packing Problem (3D, ISO containers) (BPP)", "Represents a three-dimensional bin-packing problem using two different bin sizes.")]
-  [StorableClass]
-  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 320)]
-  public class ISOContainerBinPackingProblem : CuboidIdenticalBinPackingProblem {
-
-
-    #region Default Instance
-    private static readonly RealBPPData DefaultInstance = new RealBPPData() {  
-      Name = "3D BPP with weigthed items Default Instance", 
-      Description = "The default instance for 3D Bin Packing Problem with weighted items.",
-      BinMeasures = new int[] {25,25,35},
-      ItemMeasures = new int[][] {
-        new int[] {12,5,10},
-        new int[] {10,18,20},
-        new int[] {9,7,7},
-        new int[] {21,12,4},
-        new int[] {8,8,12},
-        new int[] {3,6,14},
-        new int[] {20,4,9},
-        new int[] {5,9,8},
-        new int[] {7,17,3},
-        new int[] {13,20,15},
-        new int[] {9,11,9},
-        new int[] {10,18,20},
-        new int[] {9,7,7},
-        new int[] {21,12,4},
-        new int[] {8,8,12},
-        new int[] {3,6,14},
-        new int[] {20,4,9},
-        new int[] {5,9,8},
-        new int[] {7,17,3},
-        new int[] {13,20,15},
-        new int[] {9,11,9},
-        new int[] {10,18,20},
-        new int[] {9,7,7},
-        new int[] {21,12,4},
-        new int[] {8,8,12},
-        new int[] {3,6,14},
-        new int[] {20,4,9},
-        new int[] {5,9,8},
-        new int[] {7,17,3},
-        new int[] {13,20,15},
-        new int[] {9,11,9},
-        new int[] {10,18,20},
-        new int[] {9,7,7},
-        new int[] {21,12,4},
-        new int[] {8,8,12},
-        new int[] {3,6,14},
-        new int[] {20,4,9},
-        new int[] {5,9,8},
-        new int[] {7,17,3},
-        new int[] {13,20,15},
-        new int[] {9,11,9}
-      },
-      Items = 30,
-      ItemWeights = new double[] {
-        12*5*10,
-        10*18*20,
-        9*7*7,
-        21*12*4,
-        8*8*12,
-        3*6*14,
-        20*4*9,
-        5*9*8,
-        7*17*3,
-        13*20*15,
-        9*11*9,
-        10*18*20,
-        9*7*7,
-        21*12*4,
-        8*8*12,
-        3*6*14,
-        20*4*9,
-        5*9*8,
-        7*17*3,
-        13*20*15,
-        9*11*9,
-        10*18*20,
-        9*7*7,
-        21*12*4,
-        8*8*12,
-        3*6*14,
-        20*4*9,
-        5*9*8,
-        7*17*3,
-        13*20*15,
-        9*11*9
-      },
-      ItemMaterials = new int[] {
-        1,
-        0,
-        0,
-        1,
-        0,
-        0,
-        1,
-        1,
-        0,
-        1,
-        1,
-        0,
-        0,
-        1,
-        0,
-        0,
-        1,
-        1,
-        0,
-        1,
-        1,
-        0,
-        0,
-        1,
-        0,
-        0,
-        1,
-        1,
-        0,
-        1,
-        1,
-
-      } 
-    };
-    #endregion
-    
-    [StorableConstructor]
-    protected ISOContainerBinPackingProblem(bool deserializing) : base(deserializing) { }
-    protected ISOContainerBinPackingProblem(ISOContainerBinPackingProblem original, Cloner cloner)
-      : base(original, cloner) {
-    }
-    public override IDeepCloneable Clone(Cloner cloner) {
-      return new ISOContainerBinPackingProblem(this, cloner);
-    }
-    public ISOContainerBinPackingProblem()
-      : base() {
-    }
-
-
-
-    #region Helpers
-    protected override void InitializeDecoder() {
-      // Operators.RemoveAll(op => op is I2DOperator); TODO
-
-      PackingSolutionDecoderParameter.ValidValues.Clear();
-      if (SolutionCreator is MultiComponentVectorRandomCreator) {
-        PackingSolutionDecoderParameter.ValidValues.Add(new ISOContainerMultiComponentVectorDecoder3D());
-      } else {
-        string error = "The given problem does not support the selected solution-creator.";
-        PluginInfrastructure.ErrorHandling.ShowErrorDialog(error, null);
-      }
-    }
-
-    protected override void InitializeProblemData() {
-      Load(DefaultInstance);
-    }
-    #endregion
-  }
-}
Index: anches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/RegularIdenticalBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/RegularIdenticalBinPackingProblem.cs	(revision 14041)
+++ 	(revision )
@@ -1,221 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Joseph Helm and 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.Problems.BinPacking.Interfaces;
-using HeuristicLab.Problems.BinPacking.Shapes;
-using HeuristicLab.Core;
-using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-using HeuristicLab.Common;
-using HeuristicLab.Parameters;
-using HeuristicLab.Problems.BinPacking.Decoders;
-using HeuristicLab.PluginInfrastructure;
-using HeuristicLab.Data;
-using HeuristicLab.Problems.BinPacking.Analyzers;
-using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
-using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
-using HeuristicLab.Problems.Instances;
-using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
-
-namespace HeuristicLab.Problems.BinPacking.Problem {
-  [Item("RegularIdenticalBinPackingProblem", "Represents a bin-packing problem-instance using only bins with identical measures and bins/items with regular shapes (e.g. rectangle, cuboid).")]
-  [StorableClass]
-  public abstract class RegularIdenticalBinPackingProblem<D, B, I> : BinPackingProblem<D, B, I>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData>
-    where D : class, IPackingDimensions
-    where B : PackingShape<D>, IPackingBin, IRegularPackingShape, new()
-    where I : PackingShape<D>, IPackingItem, IRegularPackingShape, new() {
-
-    #region Parameter Properties
-
-    #endregion
-
-    #region Properties
-
-    #endregion
-
-
-    [StorableConstructor]
-    protected RegularIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
-    protected RegularIdenticalBinPackingProblem(RegularIdenticalBinPackingProblem<D, B, I> original, Cloner cloner)
-      : base(original, cloner) {
-      InitializeEventHandlers();
-    }
-
-    protected RegularIdenticalBinPackingProblem(IPackingPlanEvaluationAlgorithm e) : this(e, new MultiComponentVectorRandomCreator()) { }
-    protected RegularIdenticalBinPackingProblem(IPackingPlanEvaluationAlgorithm e, IPackingSolutionCreator c)
-      : base(e, c) {
-      Parameters.Add(new ValueParameter<B>("PackingBinMeasures", "Packing-bin data defining the measures of the used bins.", new B()));
-      Parameters.Add(new ValueParameter<IPackingPlanEvaluator>("PackingPlanEvaluator", "The evaluator is used to determine the quality of a solution.", CreateDefaultEvaluator()));
-      Parameters.Add(new ConstrainedValueParameter<IPackingSolutionDecoder>("PackingSolutionDecoder", "The operator that decodes the representation and creates a packing plan."));
-      this.Maximization.Value = true;
-      InitializeProblemInstance();
-      InitializeOperators();
-      InitializeEventHandlers();
-    }
-
-
-
-
-    #region Helpers
-    protected override void InitializeProblemInstance() {
-      InitializeProblemData();
-      ApplyHorizontalOrientation();
-      SortItems();
-      RemoveTooBigItems();
-      PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
-      LowerBoundParameter.Value.Value = CalculateLowerBound();
-    }
-    protected abstract void RemoveTooBigItems();
-    protected abstract void InitializeProblemData();
-    protected abstract IPackingPlanEvaluator CreateDefaultEvaluator();
-    protected void ApplyHorizontalOrientation() {
-      PackingBinMeasures.ApplyHorizontalOrientation();
-      foreach (IRegularPackingShape shape in PackingItemMeasures) {
-        shape.ApplyHorizontalOrientation();
-      }
-    }
-    protected void SortItems() {
-      PackingItemMeasures.Sort((x, y) => y.CompareTo(x));
-    }
-    protected int CalculateLowerBound() {
-      //This is the obvious continuous lower bound calculation; Martello and Vigo proposed a better way but it has not been implemented yet;
-      int items = PackingItemMeasures.Select(x => x.Volume).Sum();
-      int bin = PackingBinMeasures.Volume;
-      return (items + bin - 1) / (bin);
-    }
-
-    protected override void InitializeOperators() {
-      Operators.Clear();
-      Operators.Add(new BestBinPackingSolutionAnalyzer<D, B, I>());
-
-      ApplyEncoding();
-      ParameterizeOperators();
-    }
-    private void ApplyEncoding() {
-      if (SolutionCreator.GetType() == typeof(PackingSequenceRandomCreator)) {
-        Operators.AddRange(ApplicationManager.Manager.GetInstances<IPackingSequenceOperator>());
-        InitializeDecoder();
-      } else if (SolutionCreator.GetType() == typeof(GroupingVectorRandomCreator)) {
-        Operators.AddRange(ApplicationManager.Manager.GetInstances<IGroupingVectorOperator>());
-        InitializeDecoder();
-      } else if (SolutionCreator.GetType() == typeof(MultiComponentVectorRandomCreator)) {
-        Operators.AddRange(ApplicationManager.Manager.GetInstances<IMultiComponentVectorOperator>());
-        InitializeDecoder();
-      }
-    }
-    private void ParameterizeOperators() {
-      foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
-        op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
-      }
-
-      Evaluator.PackingSolutionDecoderParameter.ActualName = PackingSolutionDecoderParameter.Name;
-      Evaluator.PackingSolutionDecoderParameter.Hidden = true;
-      Evaluator.PackingPlanEvaluatorParameter.ActualName = PackingPlanEvaluatorParameter.Name;
-      Evaluator.PackingPlanEvaluatorParameter.Hidden = true;
-      Evaluator.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
-      Evaluator.QualityParameter.Hidden = true;
-
-      if (PackingSolutionDecoder != null)
-        PackingSolutionDecoder.EncodedSolutionParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
-
-      if (PackingSolutionDecoder != null) {
-        PackingPlanEvaluator.PackingPlanParameter.ActualName = PackingSolutionDecoder.PackingPlanParameter.ActualName;
-        PackingPlanEvaluator.PackingPlanParameter.Hidden = true;
-      } else {
-        PackingPlanEvaluator.PackingPlanParameter.ActualName = PackingPlanEvaluator.PackingPlanParameter.Name;
-        PackingPlanEvaluator.PackingPlanParameter.Hidden = false;
-      }
-
-      foreach (var op in Operators.OfType<IPackingSolutionManipulator>()) {
-        op.EncodedSolutionParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
-        op.EncodedSolutionParameter.Hidden = true;
-      }
-
-      foreach (var op in Operators.OfType<IPackingSolutionCrossover>()) {
-        op.ChildParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
-        op.ChildParameter.Hidden = true;
-        op.ParentsParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
-        op.ParentsParameter.Hidden = true;
-      }
-
-      foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
-        op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
-        if (PackingSolutionDecoder != null) {
-          op.PackingPlanParameter.ActualName = PackingSolutionDecoder.PackingPlanParameter.ActualName;
-          op.PackingPlanParameter.Hidden = true;
-        } else {
-          op.PackingPlanParameter.ActualName = op.PackingPlanParameter.Name;
-          op.PackingPlanParameter.Hidden = false;
-        }
-      }
-
-    }
-
-    protected override void InitializeEventHandlers() {
-      PackingPlanEvaluatorParameter.ValueChanged += PackingPlanEvaluatorParameter_ValueChanged;
-      PackingPlanEvaluator.QualityParameter.ActualNameChanged += PackingPlanEvaluator_QualityParameter_ActualNameChanged;
-      SolutionCreatorParameter.ValueChanged += SolutionCreatorParameter_ValueChanged;
-      SolutionCreator.EncodedSolutionParameter.ActualNameChanged += SolutionCreator_EncodedSolutionParameter_ActualNameChanged;
-      PackingSolutionDecoderParameter.ValueChanged += PackingSolutionDecoderParameter_ValueChanged;
-      if (PackingSolutionDecoder != null) PackingSolutionDecoder.PackingPlanParameter.ActualNameChanged += PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged;
-    }
-
-    #endregion
-
-    #region Events
-    protected override void OnSolutionCreatorChanged() {
-      InitializeOperators();
-    }
-    protected override void OnEvaluatorChanged() {
-      base.OnEvaluatorChanged();
-      ParameterizeOperators();
-    }
-    private void PackingPlanEvaluatorParameter_ValueChanged(object sender, EventArgs eventArgs) {
-      PackingPlanEvaluator.QualityParameter.ActualNameChanged += PackingPlanEvaluator_QualityParameter_ActualNameChanged;
-      ParameterizeOperators();
-    }
-    private void PackingPlanEvaluator_QualityParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
-      ParameterizeOperators();
-    }
-    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs eventArgs) {
-      SolutionCreator.EncodedSolutionParameter.ActualNameChanged += SolutionCreator_EncodedSolutionParameter_ActualNameChanged;
-      ParameterizeOperators();
-    }
-    private void SolutionCreator_EncodedSolutionParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
-      ParameterizeOperators();
-    }
-    private void PackingSolutionDecoderParameter_ValueChanged(object sender, EventArgs eventArgs) {
-      if (PackingSolutionDecoder != null) PackingSolutionDecoder.PackingPlanParameter.ActualNameChanged += PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged;
-      ParameterizeOperators();
-    }
-    private void PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
-      ParameterizeOperators();
-    }
-
-    public abstract void Load(BPPData data);
-
-    public abstract BPPData Export();
-    #endregion
-
-  }
-}
Index: /branches/HeuristicLab.BinPacking/old files/ISOContainerBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/old files/ISOContainerBinPackingProblem.cs	(revision 14042)
+++ /branches/HeuristicLab.BinPacking/old files/ISOContainerBinPackingProblem.cs	(revision 14042)
@@ -0,0 +1,188 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Joseph Helm and 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.Problems.BinPacking.Interfaces;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Common;
+using HeuristicLab.Problems.BinPacking.Decoders;
+using HeuristicLab.Problems.Instances;
+using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
+
+namespace HeuristicLab.Problems.BinPacking.Problem {
+  [Item("Bin Packing Problem (3D, ISO containers) (BPP)", "Represents a three-dimensional bin-packing problem using two different bin sizes.")]
+  [StorableClass]
+  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 320)]
+  public class ISOContainerBinPackingProblem : CuboidIdenticalBinPackingProblem {
+
+
+    #region Default Instance
+    private static readonly RealBPPData DefaultInstance = new RealBPPData() {  
+      Name = "3D BPP with weigthed items Default Instance", 
+      Description = "The default instance for 3D Bin Packing Problem with weighted items.",
+      BinMeasures = new int[] {25,25,35},
+      ItemMeasures = new int[][] {
+        new int[] {12,5,10},
+        new int[] {10,18,20},
+        new int[] {9,7,7},
+        new int[] {21,12,4},
+        new int[] {8,8,12},
+        new int[] {3,6,14},
+        new int[] {20,4,9},
+        new int[] {5,9,8},
+        new int[] {7,17,3},
+        new int[] {13,20,15},
+        new int[] {9,11,9},
+        new int[] {10,18,20},
+        new int[] {9,7,7},
+        new int[] {21,12,4},
+        new int[] {8,8,12},
+        new int[] {3,6,14},
+        new int[] {20,4,9},
+        new int[] {5,9,8},
+        new int[] {7,17,3},
+        new int[] {13,20,15},
+        new int[] {9,11,9},
+        new int[] {10,18,20},
+        new int[] {9,7,7},
+        new int[] {21,12,4},
+        new int[] {8,8,12},
+        new int[] {3,6,14},
+        new int[] {20,4,9},
+        new int[] {5,9,8},
+        new int[] {7,17,3},
+        new int[] {13,20,15},
+        new int[] {9,11,9},
+        new int[] {10,18,20},
+        new int[] {9,7,7},
+        new int[] {21,12,4},
+        new int[] {8,8,12},
+        new int[] {3,6,14},
+        new int[] {20,4,9},
+        new int[] {5,9,8},
+        new int[] {7,17,3},
+        new int[] {13,20,15},
+        new int[] {9,11,9}
+      },
+      Items = 30,
+      ItemWeights = new double[] {
+        12*5*10,
+        10*18*20,
+        9*7*7,
+        21*12*4,
+        8*8*12,
+        3*6*14,
+        20*4*9,
+        5*9*8,
+        7*17*3,
+        13*20*15,
+        9*11*9,
+        10*18*20,
+        9*7*7,
+        21*12*4,
+        8*8*12,
+        3*6*14,
+        20*4*9,
+        5*9*8,
+        7*17*3,
+        13*20*15,
+        9*11*9,
+        10*18*20,
+        9*7*7,
+        21*12*4,
+        8*8*12,
+        3*6*14,
+        20*4*9,
+        5*9*8,
+        7*17*3,
+        13*20*15,
+        9*11*9
+      },
+      ItemMaterials = new int[] {
+        1,
+        0,
+        0,
+        1,
+        0,
+        0,
+        1,
+        1,
+        0,
+        1,
+        1,
+        0,
+        0,
+        1,
+        0,
+        0,
+        1,
+        1,
+        0,
+        1,
+        1,
+        0,
+        0,
+        1,
+        0,
+        0,
+        1,
+        1,
+        0,
+        1,
+        1,
+
+      } 
+    };
+    #endregion
+    
+    [StorableConstructor]
+    protected ISOContainerBinPackingProblem(bool deserializing) : base(deserializing) { }
+    protected ISOContainerBinPackingProblem(ISOContainerBinPackingProblem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ISOContainerBinPackingProblem(this, cloner);
+    }
+    public ISOContainerBinPackingProblem()
+      : base() {
+    }
+
+
+
+    #region Helpers
+    protected override void InitializeDecoder() {
+      // Operators.RemoveAll(op => op is I2DOperator); TODO
+
+      PackingSolutionDecoderParameter.ValidValues.Clear();
+      if (SolutionCreator is MultiComponentVectorRandomCreator) {
+        PackingSolutionDecoderParameter.ValidValues.Add(new ISOContainerMultiComponentVectorDecoder3D());
+      } else {
+        string error = "The given problem does not support the selected solution-creator.";
+        PluginInfrastructure.ErrorHandling.ShowErrorDialog(error, null);
+      }
+    }
+
+    protected override void InitializeProblemData() {
+      Load(DefaultInstance);
+    }
+    #endregion
+  }
+}
Index: /branches/HeuristicLab.BinPacking/old files/ISOContainerMultiComponentVectorDecoder3D.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/old files/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 14042)
+++ /branches/HeuristicLab.BinPacking/old files/ISOContainerMultiComponentVectorDecoder3D.cs	(revision 14042)
@@ -0,0 +1,116 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Joseph Helm and 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 HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Core;
+using HeuristicLab.Problems.BinPacking.Dimensions;
+using HeuristicLab.Problems.BinPacking.PackingBin;
+using HeuristicLab.Problems.BinPacking.PackingItem;
+using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
+using HeuristicLab.Common;
+using HeuristicLab.Collections;
+using HeuristicLab.Problems.BinPacking.Interfaces;
+using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
+
+namespace HeuristicLab.Problems.BinPacking.Decoders {
+  [Item("ISO container decoder for the MultiComponentVector encoding.", "<Description missing...>")]
+  [StorableClass]
+  public class ISOContainerMultiComponentVectorDecoder3D : PackingSolutionDecoder<
+      ThreeDimensionalPacking,
+      CuboidPackingBin,
+      CuboidPackingItem>, I3DMCVDecoder {
+
+    public ISOContainerMultiComponentVectorDecoder3D ()
+      : base() {
+    }
+    [StorableConstructor]
+    protected ISOContainerMultiComponentVectorDecoder3D (bool deserializing) : base(deserializing) { }
+    protected ISOContainerMultiComponentVectorDecoder3D(ISOContainerMultiComponentVectorDecoder3D original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ISOContainerMultiComponentVectorDecoder3D(this, cloner);
+    }
+
+    public static PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
+      PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> resultPlan = new PackingPlan3D(binMeasures);
+      ObservableList<BinPacking3D> result = new ObservableList<BinPacking3D>();
+
+      var sequenceMatrix = solution.GenerateSequenceMatrix();
+      Dictionary<int, bool> rotated = solution.GenerateRotationArray();
+
+      //Fill bins according to grouping vector
+      List<int> remainingIDs = new List<int>();
+      foreach (var sequence in sequenceMatrix) {
+        remainingIDs = remainingIDs.Concat(sequence).ToList();
+        var bp = new BinPacking3D(binMeasures);
+        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        if (remainingIDs.Count > 0) {
+          bp.DoubleDepth();
+          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        }
+        result.Add(bp);
+      }
+      result.RemoveAll(x => x.ItemPositions.Count == 0);
+      result = new ObservableList<BinPacking3D>(result.OrderByDescending(bp => bp.PackingDensity));
+
+      //Try to put remaining items in existing bins
+      var temp = new List<int>(remainingIDs);
+      foreach (int id in temp) {
+        foreach (var bp in result) {
+          var position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
+          if (remainingIDs.Count > 0) {
+            bp.DoubleDepth();
+            position = bp.FindExtremePointForItem(itemMeasures[id], rotated[id], true);
+          }
+          if (position != null) {
+            bp.PackItem(id, itemMeasures[id], position);
+            remainingIDs.Remove(id);
+          }
+        }
+      }
+
+      //Put still remaining items in new bins
+      while (remainingIDs.Count > 0) {
+        var bp = new BinPacking3D(binMeasures);
+        bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        if (remainingIDs.Count > 0) {
+          bp.DoubleDepth();
+          bp.ExtremePointBasedPacking(ref remainingIDs, itemMeasures, true, rotated);
+        }
+        result.Add(bp);
+      }
+      result.RemoveAll(x => x.ItemPositions.Count == 0); 
+      resultPlan.BinPackings = new ObservableList<BinPacking<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>>(result.OrderByDescending(bp => bp.PackingDensity));
+      return resultPlan;
+    }
+
+    public override PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingBin binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
+      var solution = encodedSolution as MultiComponentVectorEncoding;
+      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
+      return Decode(solution, binMeasures, itemMeasures);
+    }
+  }
+}
Index: /branches/HeuristicLab.BinPacking/old files/RegularIdenticalBinPackingProblem.cs
===================================================================
--- /branches/HeuristicLab.BinPacking/old files/RegularIdenticalBinPackingProblem.cs	(revision 14042)
+++ /branches/HeuristicLab.BinPacking/old files/RegularIdenticalBinPackingProblem.cs	(revision 14042)
@@ -0,0 +1,221 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Joseph Helm and 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.Problems.BinPacking.Interfaces;
+using HeuristicLab.Problems.BinPacking.Shapes;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.BinPacking.Decoders;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Data;
+using HeuristicLab.Problems.BinPacking.Analyzers;
+using HeuristicLab.Encodings.PackingEncoding.PackingSequence;
+using HeuristicLab.Encodings.PackingEncoding.GroupingVector;
+using HeuristicLab.Problems.Instances;
+using HeuristicLab.Encodings.PackingEncoding.MultiComponentVector;
+
+namespace HeuristicLab.Problems.BinPacking.Problem {
+  [Item("RegularIdenticalBinPackingProblem", "Represents a bin-packing problem-instance using only bins with identical measures and bins/items with regular shapes (e.g. rectangle, cuboid).")]
+  [StorableClass]
+  public abstract class RegularIdenticalBinPackingProblem<D, B, I> : BinPackingProblem<D, B, I>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData>
+    where D : class, IPackingDimensions
+    where B : PackingShape<D>, IPackingBin, IRegularPackingShape, new()
+    where I : PackingShape<D>, IPackingItem, IRegularPackingShape, new() {
+
+    #region Parameter Properties
+
+    #endregion
+
+    #region Properties
+
+    #endregion
+
+
+    [StorableConstructor]
+    protected RegularIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
+    protected RegularIdenticalBinPackingProblem(RegularIdenticalBinPackingProblem<D, B, I> original, Cloner cloner)
+      : base(original, cloner) {
+      InitializeEventHandlers();
+    }
+
+    protected RegularIdenticalBinPackingProblem(IPackingPlanEvaluationAlgorithm e) : this(e, new MultiComponentVectorRandomCreator()) { }
+    protected RegularIdenticalBinPackingProblem(IPackingPlanEvaluationAlgorithm e, IPackingSolutionCreator c)
+      : base(e, c) {
+      Parameters.Add(new ValueParameter<B>("PackingBinMeasures", "Packing-bin data defining the measures of the used bins.", new B()));
+      Parameters.Add(new ValueParameter<IPackingPlanEvaluator>("PackingPlanEvaluator", "The evaluator is used to determine the quality of a solution.", CreateDefaultEvaluator()));
+      Parameters.Add(new ConstrainedValueParameter<IPackingSolutionDecoder>("PackingSolutionDecoder", "The operator that decodes the representation and creates a packing plan."));
+      this.Maximization.Value = true;
+      InitializeProblemInstance();
+      InitializeOperators();
+      InitializeEventHandlers();
+    }
+
+
+
+
+    #region Helpers
+    protected override void InitializeProblemInstance() {
+      InitializeProblemData();
+      ApplyHorizontalOrientation();
+      SortItems();
+      RemoveTooBigItems();
+      PackingItemsParameter.Value.Value = PackingItemMeasures.Count;
+      LowerBoundParameter.Value.Value = CalculateLowerBound();
+    }
+    protected abstract void RemoveTooBigItems();
+    protected abstract void InitializeProblemData();
+    protected abstract IPackingPlanEvaluator CreateDefaultEvaluator();
+    protected void ApplyHorizontalOrientation() {
+      PackingBinMeasures.ApplyHorizontalOrientation();
+      foreach (IRegularPackingShape shape in PackingItemMeasures) {
+        shape.ApplyHorizontalOrientation();
+      }
+    }
+    protected void SortItems() {
+      PackingItemMeasures.Sort((x, y) => y.CompareTo(x));
+    }
+    protected int CalculateLowerBound() {
+      //This is the obvious continuous lower bound calculation; Martello and Vigo proposed a better way but it has not been implemented yet;
+      int items = PackingItemMeasures.Select(x => x.Volume).Sum();
+      int bin = PackingBinMeasures.Volume;
+      return (items + bin - 1) / (bin);
+    }
+
+    protected override void InitializeOperators() {
+      Operators.Clear();
+      Operators.Add(new BestBinPackingSolutionAnalyzer<D, B, I>());
+
+      ApplyEncoding();
+      ParameterizeOperators();
+    }
+    private void ApplyEncoding() {
+      if (SolutionCreator.GetType() == typeof(PackingSequenceRandomCreator)) {
+        Operators.AddRange(ApplicationManager.Manager.GetInstances<IPackingSequenceOperator>());
+        InitializeDecoder();
+      } else if (SolutionCreator.GetType() == typeof(GroupingVectorRandomCreator)) {
+        Operators.AddRange(ApplicationManager.Manager.GetInstances<IGroupingVectorOperator>());
+        InitializeDecoder();
+      } else if (SolutionCreator.GetType() == typeof(MultiComponentVectorRandomCreator)) {
+        Operators.AddRange(ApplicationManager.Manager.GetInstances<IMultiComponentVectorOperator>());
+        InitializeDecoder();
+      }
+    }
+    private void ParameterizeOperators() {
+      foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
+        op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
+      }
+
+      Evaluator.PackingSolutionDecoderParameter.ActualName = PackingSolutionDecoderParameter.Name;
+      Evaluator.PackingSolutionDecoderParameter.Hidden = true;
+      Evaluator.PackingPlanEvaluatorParameter.ActualName = PackingPlanEvaluatorParameter.Name;
+      Evaluator.PackingPlanEvaluatorParameter.Hidden = true;
+      Evaluator.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
+      Evaluator.QualityParameter.Hidden = true;
+
+      if (PackingSolutionDecoder != null)
+        PackingSolutionDecoder.EncodedSolutionParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
+
+      if (PackingSolutionDecoder != null) {
+        PackingPlanEvaluator.PackingPlanParameter.ActualName = PackingSolutionDecoder.PackingPlanParameter.ActualName;
+        PackingPlanEvaluator.PackingPlanParameter.Hidden = true;
+      } else {
+        PackingPlanEvaluator.PackingPlanParameter.ActualName = PackingPlanEvaluator.PackingPlanParameter.Name;
+        PackingPlanEvaluator.PackingPlanParameter.Hidden = false;
+      }
+
+      foreach (var op in Operators.OfType<IPackingSolutionManipulator>()) {
+        op.EncodedSolutionParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
+        op.EncodedSolutionParameter.Hidden = true;
+      }
+
+      foreach (var op in Operators.OfType<IPackingSolutionCrossover>()) {
+        op.ChildParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
+        op.ChildParameter.Hidden = true;
+        op.ParentsParameter.ActualName = SolutionCreator.EncodedSolutionParameter.ActualName;
+        op.ParentsParameter.Hidden = true;
+      }
+
+      foreach (var op in Operators.OfType<BestBinPackingSolutionAnalyzer<D, B, I>>()) {
+        op.QualityParameter.ActualName = PackingPlanEvaluator.QualityParameter.ActualName;
+        if (PackingSolutionDecoder != null) {
+          op.PackingPlanParameter.ActualName = PackingSolutionDecoder.PackingPlanParameter.ActualName;
+          op.PackingPlanParameter.Hidden = true;
+        } else {
+          op.PackingPlanParameter.ActualName = op.PackingPlanParameter.Name;
+          op.PackingPlanParameter.Hidden = false;
+        }
+      }
+
+    }
+
+    protected override void InitializeEventHandlers() {
+      PackingPlanEvaluatorParameter.ValueChanged += PackingPlanEvaluatorParameter_ValueChanged;
+      PackingPlanEvaluator.QualityParameter.ActualNameChanged += PackingPlanEvaluator_QualityParameter_ActualNameChanged;
+      SolutionCreatorParameter.ValueChanged += SolutionCreatorParameter_ValueChanged;
+      SolutionCreator.EncodedSolutionParameter.ActualNameChanged += SolutionCreator_EncodedSolutionParameter_ActualNameChanged;
+      PackingSolutionDecoderParameter.ValueChanged += PackingSolutionDecoderParameter_ValueChanged;
+      if (PackingSolutionDecoder != null) PackingSolutionDecoder.PackingPlanParameter.ActualNameChanged += PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged;
+    }
+
+    #endregion
+
+    #region Events
+    protected override void OnSolutionCreatorChanged() {
+      InitializeOperators();
+    }
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeOperators();
+    }
+    private void PackingPlanEvaluatorParameter_ValueChanged(object sender, EventArgs eventArgs) {
+      PackingPlanEvaluator.QualityParameter.ActualNameChanged += PackingPlanEvaluator_QualityParameter_ActualNameChanged;
+      ParameterizeOperators();
+    }
+    private void PackingPlanEvaluator_QualityParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
+      ParameterizeOperators();
+    }
+    private void SolutionCreatorParameter_ValueChanged(object sender, EventArgs eventArgs) {
+      SolutionCreator.EncodedSolutionParameter.ActualNameChanged += SolutionCreator_EncodedSolutionParameter_ActualNameChanged;
+      ParameterizeOperators();
+    }
+    private void SolutionCreator_EncodedSolutionParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
+      ParameterizeOperators();
+    }
+    private void PackingSolutionDecoderParameter_ValueChanged(object sender, EventArgs eventArgs) {
+      if (PackingSolutionDecoder != null) PackingSolutionDecoder.PackingPlanParameter.ActualNameChanged += PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged;
+      ParameterizeOperators();
+    }
+    private void PackingSolutionDecoder_PackingPlanParameter_ActualNameChanged(object sender, EventArgs eventArgs) {
+      ParameterizeOperators();
+    }
+
+    public abstract void Load(BPPData data);
+
+    public abstract BPPData Export();
+    #endregion
+
+  }
+}
