Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14049 for branches


Ignore:
Timestamp:
07/12/16 20:03:45 (8 years ago)
Author:
gkronber
Message:

#1966: simplified class names

Location:
branches/HeuristicLab.BinPacking
Files:
32 edited
7 moved

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/BinPacking2D.cs

    r14048 r14049  
    3131  [Item("BinPacking2D", "Represents a single-bin packing for a 2D bin-packing problem.")]
    3232  [StorableClass]
    33   public class BinPacking2D : BinPacking<PackingPosition, RectangularPackingShape, RectangularPackingItem> {
    34 
    35     public BinPacking2D(RectangularPackingShape binMeasures)
     33  public class BinPacking2D : BinPacking<PackingPosition, PackingShape, PackingItem> {
     34
     35    public BinPacking2D(PackingShape binMeasures)
    3636      : base(binMeasures) {
    3737      ExtremePoints = new SortedSet<PackingPosition>(new EPComparer2D());
     
    4848    }
    4949
    50     protected override void GenerateNewExtremePointsForNewItem(RectangularPackingItem newItem, PackingPosition position) {
     50    protected override void GenerateNewExtremePointsForNewItem(PackingItem newItem, PackingPosition position) {
    5151
    5252      int newWidth = position.Rotated ? newItem.Height : newItem.Width;
     
    8585    }
    8686
    87     public override PackingPosition FindExtremePointForItem(RectangularPackingItem measures, bool rotated, bool stackingConstraints) {
    88       RectangularPackingItem item = new RectangularPackingItem(
     87    public override PackingPosition FindExtremePointForItem(PackingItem measures, bool rotated, bool stackingConstraints) {
     88      PackingItem item = new PackingItem(
    8989        rotated ? measures.Height : measures.Width,
    9090        rotated ? measures.Width : measures.Height,
     
    102102      return null;
    103103    }
    104     public override PackingPosition FindPositionBySliding(RectangularPackingItem measures, bool rotated) {
     104    public override PackingPosition FindPositionBySliding(PackingItem measures, bool rotated) {
    105105      PackingPosition currentPosition = new PackingPosition(0,
    106106        BinMeasures.Width - (rotated ? measures.Height : measures.Width),
     
    120120    }
    121121
    122     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures) {
     122    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures) {
    123123      var temp = new List<int>(sequence);
    124124      for (int i = 0; i < temp.Count; i++) {
     
    131131      }
    132132    }
    133     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
     133    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
    134134      var temp = new List<int>(sequence);
    135135      for (int i = 0; i < temp.Count; i++) {
     
    142142      }
    143143    }
    144     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, bool stackingConstraints) {
     144    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints) {
    145145      var temp = new List<int>(sequence);
    146146      foreach (int itemID in temp) {
     
    153153      }
    154154    }
    155     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<RectangularPackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
     155    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
    156156      var temp = new List<int>(sequence);
    157157      foreach (int itemID in temp) {
     
    186186      return shortestSide;
    187187    }
    188     public override bool IsStaticStable(RectangularPackingItem item, PackingPosition position) {
     188    public override bool IsStaticStable(PackingItem item, PackingPosition position) {
    189189      throw new NotImplementedException();
    190190    }
     
    196196      }
    197197    }
    198     protected override void AddNewItemToOccupationLayers(int itemID, RectangularPackingItem measures, PackingPosition position) {
     198    protected override void AddNewItemToOccupationLayers(int itemID, PackingItem measures, PackingPosition position) {
    199199      int x1 = position.X / 10;
    200200      int x2 = (position.X + (position.Rotated ? measures.Height : measures.Width)) / 10;
     
    206206      return OccupationLayers[position.X / 10];
    207207    }
    208     protected override List<int> GetLayerItemIDs(RectangularPackingItem measures, PackingPosition position) {
     208    protected override List<int> GetLayerItemIDs(PackingItem measures, PackingPosition position) {
    209209      List<int> result = new List<int>();
    210210      int x1 = position.X / 10;
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftGroupingVectorDecoder.cs

    r14048 r14049  
    3131  [Item("Identical bin two dimensional grouping vector decoder", "<Description missing...>")]
    3232  [StorableClass]
    33   public class BottomLeftGroupingVectorDecoder : PackingSolutionDecoder<PackingPosition, RectangularPackingShape, RectangularPackingItem>, I2DGVDecoder {
     33  public class BottomLeftGroupingVectorDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I2DGVDecoder {
    3434    public BottomLeftGroupingVectorDecoder() : base() {}
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     44    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      var solution = encodedSolution as GroupingVectorEncoding;
    4646      if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftMultiComponentVectorDecoder.cs

    r14048 r14049  
    3131  [Item("Identical bin two dimensional multi component vector decoder", "<Description missing...>")]
    3232  [StorableClass]
    33   public class BottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<PackingPosition,RectangularPackingShape, RectangularPackingItem>, I2DMCVDecoder {
     33  public class BottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<PackingPosition,PackingShape, PackingItem>, I2DMCVDecoder {
    3434    public BottomLeftMultiComponentVectorDecoder() : base() {}
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     44    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      var solution = encodedSolution as MultiComponentVectorEncoding;
    4646      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponent Vector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/BL/BottomLeftPackingSequenceDecoder.cs

    r14048 r14049  
    3232  [Item("Identical bin, two dimensional, direct permutation decoder", "<Description missing...>")]
    3333  [StorableClass]
    34   public class BottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, RectangularPackingShape, RectangularPackingItem>, I2DPSDecoder {
     34  public class BottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I2DPSDecoder {
    3535
    3636    public BottomLeftPackingSequenceDecoder(): base() { }
     
    4444    }
    4545
    46     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     46    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4747      var solution = encodedSolution as PackingSequenceEncoding;
    4848      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointGroupingVectorDecoder2D.cs

    r14048 r14049  
    3232  [Item("Identical bin, two dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")]
    3333  [StorableClass]
    34   public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder<PackingPosition, RectangularPackingShape, RectangularPackingItem>, I2DGVDecoder {
     34  public class ExtremePointGroupingVectorDecoder2D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I2DGVDecoder {
    3535    public ExtremePointGroupingVectorDecoder2D () : base() {}
    3636    [StorableConstructor]
     
    4343    }
    4444
    45     public static PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> Decode(GroupingVectorEncoding solution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     45    public static PackingPlan<PackingPosition, PackingShape, PackingItem> Decode(GroupingVectorEncoding solution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4646      Solution result = new Solution(binMeasures, true, false);
    4747      result.Pack(solution, itemMeasures);
     
    4949    }
    5050
    51     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     51    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    5252      var solution = encodedSolution as GroupingVectorEncoding;
    5353      if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointMultiComponentVectorDecoder2D.cs

    r14048 r14049  
    3131  [Item("Identical bin, two dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")] // TODO
    3232  [StorableClass]
    33   public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder<PackingPosition, RectangularPackingShape, RectangularPackingItem>, I2DMCVDecoder {
     33  public class ExtremePointMultiComponentVectorDecoder2D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I2DMCVDecoder {
    3434    public ExtremePointMultiComponentVectorDecoder2D () : base() {}
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public static PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> Decode(MultiComponentVectorEncoding solution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     44    public static PackingPlan<PackingPosition, PackingShape, PackingItem> Decode(MultiComponentVectorEncoding solution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      Solution result = new Solution(binMeasures, true, false);
    4646      result.Pack(solution, itemMeasures);
     
    4848    }
    4949
    50     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     50    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    5151      var solution = encodedSolution as MultiComponentVectorEncoding;
    5252      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Decoders/EP/ExtremePointPackingSequenceDecoder2D.cs

    r14048 r14049  
    3232  [Item("Identical bin, two dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")] // TODO
    3333  [StorableClass]
    34   public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder<PackingPosition, RectangularPackingShape, RectangularPackingItem>, I2DPSDecoder {
     34  public class ExtremePointPackingSequenceDecoder2D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I2DPSDecoder {
    3535    public ExtremePointPackingSequenceDecoder2D () : base() {}
    3636    [StorableConstructor]
     
    4444
    4545
    46     public override PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, RectangularPackingShape binMeasures, ItemList<RectangularPackingItem> itemMeasures) {
     46    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4747      var solution = encodedSolution as PackingSequenceEncoding;
    4848      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/HeuristicLab.Problems.BinPacking2D-3.3.csproj

    r14048 r14049  
    172172    <Compile Include="MoveEvaluators\PackingMoveEvaluator2DMCV.cs" />
    173173    <Compile Include="MoveEvaluators\PackingMoveEvaluator2DPS.cs" />
     174    <Compile Include="PackingItem.cs" />
    174175    <Compile Include="PackingPosition.cs" />
    175176    <Compile Include="PackingRatioRectangularIdenticalBinEvaluator.cs" />
     177    <Compile Include="PackingShape.cs" />
    176178    <Compile Include="Plugin.cs" />
     179    <Compile Include="Problem.cs" />
    177180    <Compile Include="Properties\AssemblyInfo.cs" />
    178     <Compile Include="RectangularIdenticalBinPackingProblem.cs" />
    179     <Compile Include="RectangularPackingItem.cs" />
    180     <Compile Include="RectangularPackingShape.cs" />
    181181    <Compile Include="Solution.cs" />
    182182  </ItemGroup>
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DGV.cs

    r14048 r14049  
    2929  [Item("GroupingVectorMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")]
    3030  [StorableClass]
    31   public class PackingMoveEvaluator2DGV : PackingMoveEvaluator<PackingPosition, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I2DOperator {
     31  public class PackingMoveEvaluator2DGV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I2DOperator {
    3232    [StorableConstructor]
    3333    protected PackingMoveEvaluator2DGV(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DMCV.cs

    r14048 r14049  
    2929  [Item("MultiComponentVectorMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")]
    3030  [StorableClass]
    31   public class PackingMoveEvaluator2DMCV : PackingMoveEvaluator<PackingPosition, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I2DOperator {
     31  public class PackingMoveEvaluator2DMCV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I2DOperator {
    3232    [StorableConstructor]
    3333    protected PackingMoveEvaluator2DMCV(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/MoveEvaluators/PackingMoveEvaluator2DPS.cs

    r14048 r14049  
    2929  [Item("PackingSequenceMoveEvaluator2D", "Class for evaluating packing moves for 2dimensional problems.")]
    3030  [StorableClass]
    31   public class PackingMoveEvaluator2DPS : PackingMoveEvaluator<PackingPosition, RectangularPackingShape, RectangularPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I2DOperator {
     31  public class PackingMoveEvaluator2DPS : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I2DOperator {
    3232    [StorableConstructor]
    3333    protected PackingMoveEvaluator2DPS(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PackingItem.cs

    r14048 r14049  
    2929
    3030namespace HeuristicLab.Problems.BinPacking2D {
    31   [Item("RectangularPackingItem", "Represents a rectangular packing-item for bin-packing problems.")]
     31  [Item("PackingItem (2d)", "Represents a rectangular packing-item for bin-packing problems.")]
    3232  [StorableClass]
    33   public class RectangularPackingItem : RectangularPackingShape, IPackingItem {
     33  public class PackingItem : PackingShape, IPackingItem {
    3434
    35     public RectangularPackingShape TargetBin {
    36       get { return ((IValueParameter<RectangularPackingShape>)Parameters["TargetBin"]).Value; }
    37       set { ((IValueParameter<RectangularPackingShape>)Parameters["TargetBin"]).Value = value; }
     35    public PackingShape TargetBin {
     36      get { return ((IValueParameter<PackingShape>)Parameters["TargetBin"]).Value; }
     37      set { ((IValueParameter<PackingShape>)Parameters["TargetBin"]).Value = value; }
    3838    }
    3939
     
    4949
    5050    [StorableConstructor]
    51     protected RectangularPackingItem(bool deserializing) : base(deserializing) { }
    52     protected RectangularPackingItem(RectangularPackingItem original, Cloner cloner)
     51    protected PackingItem(bool deserializing) : base(deserializing) { }
     52    protected PackingItem(PackingItem original, Cloner cloner)
    5353      : base(original, cloner) {
    5454    }
    5555
    5656    public override IDeepCloneable Clone(Cloner cloner) {
    57       return new RectangularPackingItem(this, cloner);
     57      return new PackingItem(this, cloner);
    5858    }
    5959
    60     public RectangularPackingItem()
     60    public PackingItem()
    6161      : base() {
    62       Parameters.Add(new ValueParameter<RectangularPackingShape>("TargetBin"));
     62      Parameters.Add(new ValueParameter<PackingShape>("TargetBin"));
    6363      Parameters.Add(new FixedValueParameter<DoubleValue>("Weight"));
    6464      Parameters.Add(new FixedValueParameter<IntValue>("Material"));
    6565    }
    6666
    67     public RectangularPackingItem(int width, int height, RectangularPackingShape targetBin)
     67    public PackingItem(int width, int height, PackingShape targetBin)
    6868      : this() {
    6969      this.Width = width;
    7070      this.Height = height;
    71       this.TargetBin = (RectangularPackingShape)targetBin.Clone();
     71      this.TargetBin = (PackingShape)targetBin.Clone();
    7272    }
    7373
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PackingRatioRectangularIdenticalBinEvaluator.cs

    r14048 r14049  
    2929  [Item("Packing-Ratio Rectangular Identical-Bin Evaluator", "Represents an evaluation-algorithm for rectangular-shaped bin-packing problems with identical bins which calculates the ratio between packed and unpacked space. Found in Falkenauer:1996")]
    3030  [StorableClass]
    31   public class PackingRatioRectangularIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<PackingPosition, RectangularPackingShape, RectangularPackingItem> {
     31  public class PackingRatioRectangularIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<PackingPosition, PackingShape, PackingItem> {
    3232
    3333    [StorableConstructor]
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/PackingShape.cs

    r14048 r14049  
    3030
    3131namespace HeuristicLab.Problems.BinPacking2D {
    32   [Item("RectangularPackingShape", "Represents the rectangular measures (width, height) of a two-dimensional bin-packing object.")]
     32  [Item("PackingShape (2d)", "Represents the rectangular measures (width, height) of a two-dimensional bin-packing object.")]
    3333  [StorableClass]
    34   public class RectangularPackingShape : PackingShape<PackingPosition>, IComparable<RectangularPackingShape> {
     34  public class PackingShape : PackingShape<PackingPosition>, IComparable<PackingShape> {
    3535    public int Height {
    3636      get { return ((IFixedValueParameter<IntValue>)Parameters["Height"]).Value.Value; }
     
    4444
    4545    [StorableConstructor]
    46     protected RectangularPackingShape(bool deserializing) : base(deserializing) { }
    47     protected RectangularPackingShape(RectangularPackingShape original, Cloner cloner)
     46    protected PackingShape(bool deserializing) : base(deserializing) { }
     47    protected PackingShape(PackingShape original, Cloner cloner)
    4848      : base(original, cloner) {
    4949    }
    50     public RectangularPackingShape()
     50    public PackingShape()
    5151      : base() {
    5252      Parameters.Add(new FixedValueParameter<IntValue>("Width"));
    5353      Parameters.Add(new FixedValueParameter<IntValue>("Height"));
    5454    }
    55     public RectangularPackingShape(int width, int height)
     55    public PackingShape(int width, int height)
    5656      : this() {
    5757      this.Height = height;
     
    6060
    6161    public override IDeepCloneable Clone(Cloner cloner) {
    62       return new RectangularPackingShape(this, cloner);
     62      return new PackingShape(this, cloner);
    6363    }
    6464
     
    6969    #region IComparable<RectangularPackingShape> Members
    7070
    71     public int CompareTo(RectangularPackingShape other) {
     71    public int CompareTo(PackingShape other) {
    7272      int result = this.Width.CompareTo(other.Width);
    7373      if (result == 0)
     
    7777
    7878    public override int CompareTo(object obj) {
    79       var other = obj as RectangularPackingShape;
     79      var other = obj as PackingShape;
    8080      if (other != null) return CompareTo(other);
    8181      else throw new ArgumentException(string.Format("Cannot compare to object {0}", obj), "obj");
     
    9696    }
    9797    public override bool Encloses(PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    98       return Encloses(checkedPosition, (RectangularPackingShape)checkedShape);
     98      return Encloses(checkedPosition, (PackingShape)checkedShape);
    9999    }
    100     private bool Encloses(PackingPosition checkedPosition, RectangularPackingShape checkedShape) {
     100    private bool Encloses(PackingPosition checkedPosition, PackingShape checkedShape) {
    101101      return Encloses(new RectangleDiagonal(this), new RectangleDiagonal(checkedPosition, checkedShape));
    102102    }
     
    109109
    110110    public override bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    111       return Overlaps(myPosition, checkedPosition, (RectangularPackingShape)checkedShape);
     111      return Overlaps(myPosition, checkedPosition, (PackingShape)checkedShape);
    112112    }
    113     private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, RectangularPackingShape checkedShape) {
     113    private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape checkedShape) {
    114114      return Overlaps(new RectangleDiagonal(myPosition, this), new RectangleDiagonal(checkedPosition, checkedShape));
    115115    }
     
    136136      public int x2;
    137137      public int y2;
    138       public RectangleDiagonal(RectangularPackingShape myShape) : this(new PackingPosition(0, 0, 0), myShape) { }
    139       public RectangleDiagonal(PackingPosition myPosition, RectangularPackingShape myShape) {
     138      public RectangleDiagonal(PackingShape myShape) : this(new PackingPosition(0, 0, 0), myShape) { }
     139      public RectangleDiagonal(PackingPosition myPosition, PackingShape myShape) {
    140140        x1 = myPosition.X;
    141141        y1 = myPosition.Y;
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Problem.cs

    r14048 r14049  
    3838  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 300)]
    3939  // TODO: only support 2d BPPData
    40   public class RectangularIdenticalBinPackingProblem : BinPackingProblem<PackingPosition, RectangularPackingShape, RectangularPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {
     40  public class Problem : Problem<PackingPosition, PackingShape, PackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {
    4141
    4242    #region Default Instance
     
    8989
    9090    [StorableConstructor]
    91     protected RectangularIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
    92     protected RectangularIdenticalBinPackingProblem(RectangularIdenticalBinPackingProblem original, Cloner cloner)
     91    protected Problem(bool deserializing) : base(deserializing) { }
     92    protected Problem(Problem original, Cloner cloner)
    9393      : base(original, cloner) {
    9494    }
    9595    public override IDeepCloneable Clone(Cloner cloner) {
    96       return new RectangularIdenticalBinPackingProblem(this, cloner);
     96      return new Problem(this, cloner);
    9797    }
    98     public RectangularIdenticalBinPackingProblem() : base(
    99       new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, RectangularPackingShape, RectangularPackingItem>()) {
     98    public Problem() : base(
     99      new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, PackingShape, PackingItem>()) {
    100100    }
    101101
     
    103103    public void Load(BPPData data) {
    104104      var realData = data as RealBPPData;
    105       var binData = new RectangularPackingShape(data.BinMeasures[0], data.BinMeasures[1]);
     105      var binData = new PackingShape(data.BinMeasures[0], data.BinMeasures[1]);
    106106
    107       var itemData = new ItemList<RectangularPackingItem>(data.Items);
     107      var itemData = new ItemList<PackingItem>(data.Items);
    108108      for (int j = 0; j < data.Items; j++) {
    109         var bin = new RectangularPackingShape(data.BinMeasures[0], data.BinMeasures[1]);
    110         var item = new RectangularPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], bin);
     109        var bin = new PackingShape(data.BinMeasures[0], data.BinMeasures[1]);
     110        var item = new PackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], bin);
    111111        if (realData != null) {
    112112          item.Weight = realData.ItemWeights[j];
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.2D/3.3/Solution.cs

    r14048 r14049  
    2828  [Item("Bin Packing Solution (2d)", "Represents a solution for a 2D bin packing problem.")]
    2929  [StorableClass]
    30   public class Solution : PackingPlan<PackingPosition, RectangularPackingShape, RectangularPackingItem> {
    31     public Solution(RectangularPackingShape binMeasures) : this(binMeasures, false, false) { }
    32     public Solution(RectangularPackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }
     30  public class Solution : PackingPlan<PackingPosition, PackingShape, PackingItem> {
     31    public Solution(PackingShape binMeasures) : this(binMeasures, false, false) { }
     32    public Solution(PackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }
    3333    [StorableConstructor]
    3434    protected Solution(bool deserializing) : base(deserializing) { }
     
    3939      return new Solution(this, cloner);
    4040    }
    41     public override BinPacking<PackingPosition, RectangularPackingShape, RectangularPackingItem> NewBinPacking() {
     41    public override BinPacking<PackingPosition, PackingShape, PackingItem> NewBinPacking() {
    4242      return new BinPacking2D(BinMeasures);
    4343    }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/BinPacking3D.cs

    r14048 r14049  
    3030  [Item("BinPacking3D", "Represents a single-bin packing for a 3D bin-packing problem.")]
    3131  [StorableClass]
    32   public class BinPacking3D : BinPacking<PackingPosition, CuboidPackingShape, CuboidPackingItem> {
    33 
    34     public BinPacking3D(CuboidPackingShape binMeasures)
     32  public class BinPacking3D : BinPacking<PackingPosition, PackingShape, PackingItem> {
     33
     34    public BinPacking3D(PackingShape binMeasures)
    3535      : base(binMeasures) {
    3636      ExtremePoints = new SortedSet<PackingPosition>(new EPComparer3D());
     
    4848    }
    4949
    50     protected override void GenerateNewExtremePointsForNewItem(CuboidPackingItem newItem, PackingPosition position) {
     50    protected override void GenerateNewExtremePointsForNewItem(PackingItem newItem, PackingPosition position) {
    5151      int newWidth = position.Rotated ? newItem.Depth : newItem.Width;
    5252      int newDepth = position.Rotated ? newItem.Width : newItem.Depth;
     
    146146    }
    147147
    148     public override PackingPosition FindExtremePointForItem(CuboidPackingItem measures, bool rotated, bool stackingConstraints) {
    149 
    150       CuboidPackingItem item = new CuboidPackingItem(
     148    public override PackingPosition FindExtremePointForItem(PackingItem measures, bool rotated, bool stackingConstraints) {
     149
     150      PackingItem item = new PackingItem(
    151151        rotated ? measures.Depth : measures.Width,
    152152        measures.Height,
     
    170170    }
    171171
    172     public override PackingPosition FindPositionBySliding(CuboidPackingItem measures, bool rotated) {
     172    public override PackingPosition FindPositionBySliding(PackingItem measures, bool rotated) {
    173173      //Starting-position at upper right corner (=left bottom point of item-rectangle is at position item.width,item.height)
    174174      PackingPosition currentPosition = new PackingPosition(0,
     
    197197    }
    198198
    199     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<CuboidPackingItem> itemMeasures) {
     199    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures) {
    200200      var temp = new List<int>(sequence);
    201201      for (int i = 0; i < temp.Count; i++) {
     
    208208      }
    209209    }
    210     public override void SlidingBasedPacking(ref List<int> sequence, ItemList<CuboidPackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
     210    public override void SlidingBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, Dictionary<int, bool> rotationArray) {
    211211      var temp = new List<int>(sequence);
    212212      for (int i = 0; i < temp.Count; i++) {
     
    219219      }
    220220    }
    221     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {
     221    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints) {
    222222      var temp = new List<int>(sequence);
    223223      foreach (int itemID in temp) {
     
    230230      }
    231231    }
    232     public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
     232    public override void ExtremePointBasedPacking(ref List<int> sequence, ItemList<PackingItem> itemMeasures, bool stackingConstraints, Dictionary<int, bool> rotationArray) {
    233233      var temp = new List<int>(sequence);
    234234      foreach (int itemID in temp) {
     
    271271      return shortestSide;
    272272    }
    273     public override bool IsStaticStable(CuboidPackingItem item, PackingPosition position) {
     273    public override bool IsStaticStable(PackingItem item, PackingPosition position) {
    274274      //Static stability is given, if item is placed on the ground
    275275      if (position.Y == 0)
     
    314314    }
    315315
    316     public bool IsSupportedByAtLeastOnePoint(CuboidPackingItem item, PackingPosition position) {
     316    public bool IsSupportedByAtLeastOnePoint(PackingItem item, PackingPosition position) {
    317317      if (position.Y == 0)
    318318        return true;
     
    326326      return false;
    327327    }
    328     public bool IsWeightSupported(CuboidPackingItem item, PackingPosition ep) {
     328    public bool IsWeightSupported(PackingItem item, PackingPosition ep) {
    329329      if (ep.Y == 0)
    330330        return true;
     
    345345      }
    346346    }
    347     protected override void AddNewItemToOccupationLayers(int itemID, CuboidPackingItem measures, PackingPosition position) {
     347    protected override void AddNewItemToOccupationLayers(int itemID, PackingItem measures, PackingPosition position) {
    348348      int z1 = position.Z / 10;
    349349      int z2 = (position.Z + (position.Rotated ? measures.Width : measures.Depth)) / 10;
     
    355355      return OccupationLayers[position.Z / 10];
    356356    }
    357     protected override List<int> GetLayerItemIDs(CuboidPackingItem measures, PackingPosition position) {
     357    protected override List<int> GetLayerItemIDs(PackingItem measures, PackingPosition position) {
    358358      List<int> result = new List<int>();
    359359      int z1 = position.Z / 10;
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftGroupingVectorDecoder.cs

    r14048 r14049  
    3131  [Item("Identical bin, three dimensional, GroupingVector-decoder", "<Description missing...>")]
    3232  [StorableClass]
    33   public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DGVDecoder {
     33  public class DeepestBottomLeftGroupingVectorDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DGVDecoder {
    3434    public DeepestBottomLeftGroupingVectorDecoder() : base() {}
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     44    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      var solution = encodedSolution as GroupingVectorEncoding;
    4646      if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftMultiComponentVectorDecoder.cs

    r14048 r14049  
    3131  [Item("Identical bin, three dimensional, MultiComponentVector-decoder", "<Description missing...>")]
    3232  [StorableClass]
    33   public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DMCVDecoder {
     33  public class DeepestBottomLeftMultiComponentVectorDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DMCVDecoder {
    3434    public DeepestBottomLeftMultiComponentVectorDecoder() : base() { }
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     44    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      var solution = encodedSolution as MultiComponentVectorEncoding;
    4646      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponent Vector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/DBL/DeepestBottomLeftPackingSequenceDecoder.cs

    r14048 r14049  
    3131  [Item("Identical bin, three dimensional, PackingSequence-decoder", "<Description missing...>")]
    3232  [StorableClass]
    33   public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DPSDecoder {
     33  public class DeepestBottomLeftPackingSequenceDecoder : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DPSDecoder {
    3434    public DeepestBottomLeftPackingSequenceDecoder(): base() {}
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     44    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4545      var solution = encodedSolution as PackingSequenceEncoding;
    4646      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointGroupingVectorDecoder3D.cs

    r14048 r14049  
    3131  [Item("Identical bin, three dimensional, extreme points based decoder for the GroupingVector encoding.", "<Description missing...>")]
    3232  [StorableClass]
    33   public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DGVDecoder {
     33  public class ExtremePointGroupingVectorDecoder3D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DGVDecoder {
    3434    public ExtremePointGroupingVectorDecoder3D() : base() { }
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public static PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> Decode(GroupingVectorEncoding solution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {
     44    public static PackingPlan<PackingPosition, PackingShape, PackingItem> Decode(GroupingVectorEncoding solution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures, bool stackingConstraints) {
    4545      Solution result = new Solution(binMeasures, true, stackingConstraints);
    4646      result.Pack(solution, itemMeasures);
     
    4848    }
    4949
    50     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     50    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    5151      var solution = encodedSolution as GroupingVectorEncoding;
    5252      if (solution == null) throw new InvalidOperationException("Encoding is not of type GroupingVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointMultiComponentVectorDecoder3D.cs

    r14048 r14049  
    3131  [Item("Identical bin, three dimensional, extreme points based decoder for the MultiComponentVector encoding.", "<Description missing...>")]
    3232  [StorableClass]
    33   public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DMCVDecoder {
     33  public class ExtremePointMultiComponentVectorDecoder3D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DMCVDecoder {
    3434    public ExtremePointMultiComponentVectorDecoder3D () : base() { }
    3535    [StorableConstructor]
     
    4242    }
    4343
    44     public static PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> Decode(MultiComponentVectorEncoding solution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures, bool stackingConstraints) {
     44    public static PackingPlan<PackingPosition, PackingShape, PackingItem> Decode(MultiComponentVectorEncoding solution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures, bool stackingConstraints) {
    4545      Solution result = new Solution(binMeasures, true, stackingConstraints);
    4646      result.Pack(solution, itemMeasures);
     
    4848    }
    4949
    50     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     50    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    5151      var solution = encodedSolution as MultiComponentVectorEncoding;
    5252      if (solution == null) throw new InvalidOperationException("Encoding is not of type MultiComponentVector");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Decoders/EP/ExtremePointPackingSequenceDecoder3D.cs

    r14048 r14049  
    3232  [Item("Identical bin, three dimensional, extreme points based decoder for the PackingSequence encoding.", "<Description missing...>")]
    3333  [StorableClass]
    34   public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<PackingPosition, CuboidPackingShape, CuboidPackingItem>, I3DPSDecoder {
     34  public class ExtremePointPackingSequenceDecoder3D : PackingSolutionDecoder<PackingPosition, PackingShape, PackingItem>, I3DPSDecoder {
    3535    public ExtremePointPackingSequenceDecoder3D () : base() {}
    3636    [StorableConstructor]
     
    4444
    4545
    46     public override PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, CuboidPackingShape binMeasures, ItemList<CuboidPackingItem> itemMeasures) {
     46    public override PackingPlan<PackingPosition, PackingShape, PackingItem> CreatePackingPlanFromEncoding(IItem encodedSolution, PackingShape binMeasures, ItemList<PackingItem> itemMeasures) {
    4747      var solution = encodedSolution as PackingSequenceEncoding;
    4848      if (solution == null) throw new InvalidOperationException("Encoding is not of type PackingSequence");
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/HeuristicLab.Problems.BinPacking3D-3.3.csproj

    r14048 r14049  
    159159  <ItemGroup>
    160160    <Compile Include="BinPacking3D.cs" />
    161     <Compile Include="CuboidIdenticalBinPackingProblem.cs" />
    162     <Compile Include="CuboidPackingItem.cs" />
    163     <Compile Include="CuboidPackingShape.cs" />
    164161    <Compile Include="DecoderInterfaces\I3DGVDecoder.cs" />
    165162    <Compile Include="DecoderInterfaces\I3DMCVDecoder.cs" />
     
    175172    <Compile Include="MoveEvaluators\PackingMoveEvaluator3DMCV.cs" />
    176173    <Compile Include="MoveEvaluators\PackingMoveEvaluator3DPS.cs" />
     174    <Compile Include="PackingItem.cs" />
    177175    <Compile Include="PackingPosition.cs" />
    178176    <Compile Include="PackingRatioCuboidIdenticalBinEvaluator.cs" />
     177    <Compile Include="PackingShape.cs" />
    179178    <Compile Include="Plugin.cs" />
     179    <Compile Include="Problem.cs" />
    180180    <Compile Include="Properties\AssemblyInfo.cs" />
    181181    <Compile Include="Solution.cs" />
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DGV.cs

    r14048 r14049  
    3030  [Item("GroupingVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")]
    3131  [StorableClass]
    32   public class PackingMoveEvaluator3DGV : PackingMoveEvaluator<PackingPosition, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator {
     32  public class PackingMoveEvaluator3DGV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IGroupingVectorMoveOperator, I3DOperator {
    3333    [StorableConstructor]
    3434    protected PackingMoveEvaluator3DGV(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DMCV.cs

    r14048 r14049  
    3030  [Item("MultiComponentVectorMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")]
    3131  [StorableClass]
    32   public class PackingMoveEvaluator3DMCV : PackingMoveEvaluator<PackingPosition, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator {
     32  public class PackingMoveEvaluator3DMCV : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IMultiComponentVectorMoveOperator, I3DOperator {
    3333    [StorableConstructor]
    3434    protected PackingMoveEvaluator3DMCV(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/MoveEvaluators/PackingMoveEvaluator3DPS.cs

    r14048 r14049  
    3030  [Item("PackingSequenceMoveEvaluator3D", "Class for evaluating packing moves for 3dimensional problems.")]
    3131  [StorableClass]
    32   public class PackingMoveEvaluator3DPS : PackingMoveEvaluator<PackingPosition, CuboidPackingShape, CuboidPackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator {
     32  public class PackingMoveEvaluator3DPS : PackingMoveEvaluator<PackingPosition, PackingShape, PackingItem>, ISingleObjectiveMoveEvaluator, IPackingSequenceMoveOperator, I3DOperator {
    3333    [StorableConstructor]
    3434    protected PackingMoveEvaluator3DPS(bool deserializing) : base(deserializing) { }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingItem.cs

    r14048 r14049  
    2828
    2929namespace HeuristicLab.Problems.BinPacking3D {
    30   [Item("CuboidPackingItem", "Represents a cuboidic packing-item for bin-packing problems.")]
     30  [Item("PackingItem (3d)", "Represents a cuboidic packing-item for bin-packing problems.")]
    3131  [StorableClass]
    32   public class CuboidPackingItem : CuboidPackingShape, IPackingItem {
    33     public IValueParameter<CuboidPackingShape> TargetBinParameter {
    34       get { return (IValueParameter<CuboidPackingShape>)Parameters["TargetBin"]; }
     32  public class PackingItem : PackingShape, IPackingItem {
     33    public IValueParameter<PackingShape> TargetBinParameter {
     34      get { return (IValueParameter<PackingShape>)Parameters["TargetBin"]; }
    3535    }
    3636    public IFixedValueParameter<DoubleValue> WeightParameter {
     
    4141    }
    4242
    43     public CuboidPackingShape TargetBin {
     43    public PackingShape TargetBin {
    4444      get { return TargetBinParameter.Value; }
    4545      set { TargetBinParameter.Value = value; }
     
    6161
    6262    [StorableConstructor]
    63     protected CuboidPackingItem(bool deserializing) : base(deserializing) { }
    64     protected CuboidPackingItem(CuboidPackingItem original, Cloner cloner)
     63    protected PackingItem(bool deserializing) : base(deserializing) { }
     64    protected PackingItem(PackingItem original, Cloner cloner)
    6565      : base(original, cloner) {
    6666      RegisterEvents();
    6767    }
    68     public CuboidPackingItem()
     68    public PackingItem()
    6969      : base() {
    70       Parameters.Add(new ValueParameter<CuboidPackingShape>("TargetBin"));
     70      Parameters.Add(new ValueParameter<PackingShape>("TargetBin"));
    7171      Parameters.Add(new FixedValueParameter<DoubleValue>("Weight"));
    7272      Parameters.Add(new FixedValueParameter<IntValue>("Material"));
     
    7575    }
    7676
    77     public CuboidPackingItem(int width, int height, int depth, CuboidPackingShape targetBin, double weight, int material)
     77    public PackingItem(int width, int height, int depth, PackingShape targetBin, double weight, int material)
    7878      : this() {
    7979      this.Width = width;
     
    8282      this.Weight = weight;
    8383      this.Material = material;
    84       this.TargetBin = (CuboidPackingShape)targetBin.Clone();
     84      this.TargetBin = (PackingShape)targetBin.Clone();
    8585    }
    8686
    87     public CuboidPackingItem(int width, int height, int depth, CuboidPackingShape targetBin)
     87    public PackingItem(int width, int height, int depth, PackingShape targetBin)
    8888      : this() {
    8989      this.Width = width;
    9090      this.Height = height;
    9191      this.Depth = depth;
    92       this.TargetBin = (CuboidPackingShape)targetBin.Clone();
     92      this.TargetBin = (PackingShape)targetBin.Clone();
    9393    }
    9494
     
    9999
    100100    public override IDeepCloneable Clone(Cloner cloner) {
    101       return new CuboidPackingItem(this, cloner);
     101      return new PackingItem(this, cloner);
    102102    }
    103103
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingRatioCuboidIdenticalBinEvaluator.cs

    r14048 r14049  
    2828  [Item("Packing-Ratio Cuboid Identical-Bin Evaluator", "Represents an evaluation-algorithm for cuboid-shaped bin-packing problems with identical bins which calculates the ratio between packed and unpacked space. Found in Falkenauer:1996")]
    2929  [StorableClass]
    30   public class PackingRatioCuboidIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<PackingPosition, CuboidPackingShape, CuboidPackingItem> {
     30  public class PackingRatioCuboidIdenticalBinEvaluator : PackingRatioRegularIdenticalBinEvaluator<PackingPosition, PackingShape, PackingItem> {
    3131
    3232    [StorableConstructor]
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/PackingShape.cs

    r14048 r14049  
    2929
    3030namespace HeuristicLab.Problems.BinPacking3D {
    31   [Item("CuboidPackingShape", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")]
     31  [Item("PackingShape (3d)", "Represents the cuboid measures (width, height, depth) of a three-dimensional cuboidic bin-packing object.")]
    3232  [StorableClass]
    33   public class CuboidPackingShape : PackingShape<PackingPosition>, IComparable<CuboidPackingShape> {
     33  public class PackingShape : PackingShape<PackingPosition>, IComparable<PackingShape> {
    3434    public IFixedValueParameter<IntValue> HeightParameter {
    3535      get { return (IFixedValueParameter<IntValue>)Parameters["Height"]; }
     
    5858
    5959    [StorableConstructor]
    60     protected CuboidPackingShape(bool deserializing) : base(deserializing) { }
    61     protected CuboidPackingShape(CuboidPackingShape original, Cloner cloner)
     60    protected PackingShape(bool deserializing) : base(deserializing) { }
     61    protected PackingShape(PackingShape original, Cloner cloner)
    6262      : base(original, cloner) {
    6363      RegisterEvents();
    6464    }
    65     public CuboidPackingShape()
     65    public PackingShape()
    6666      : base() {
    6767      Parameters.Add(new FixedValueParameter<IntValue>("Width"));
     
    7272    }
    7373
    74     public CuboidPackingShape(int width, int height, int depth)
     74    public PackingShape(int width, int height, int depth)
    7575      : this() {
    7676      this.Width = width;
     
    8080
    8181    public override IDeepCloneable Clone(Cloner cloner) {
    82       return new CuboidPackingShape(this, cloner);
     82      return new PackingShape(this, cloner);
    8383    }
    8484
     
    101101    #region IComparable Members
    102102
    103     public int CompareTo(CuboidPackingShape other) {
     103    public int CompareTo(PackingShape other) {
    104104      //Using "Clustered-Area-Height"-comparison as descr
    105105
     
    114114
    115115    public override int CompareTo(object obj) {
    116       var other = (CuboidPackingShape)obj;
     116      var other = (PackingShape)obj;
    117117      if (other != null) return CompareTo(other);
    118118      else throw new ArgumentException(string.Format("Cannot compare with object {0}", obj), "obj");
     
    128128      public int y2;
    129129      public int z2;
    130       public CuboidDiagonal(CuboidPackingShape myShape) : this(new PackingPosition(0, 0, 0, 0), myShape) { }
    131       public CuboidDiagonal(PackingPosition myPosition, CuboidPackingShape myShape) {
     130      public CuboidDiagonal(PackingShape myShape) : this(new PackingPosition(0, 0, 0, 0), myShape) { }
     131      public CuboidDiagonal(PackingPosition myPosition, PackingShape myShape) {
    132132        x1 = myPosition.X;
    133133        y1 = myPosition.Y;
     
    153153    }
    154154    public override bool Encloses(PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    155       return Encloses(checkedPosition, (CuboidPackingShape)checkedShape);
     155      return Encloses(checkedPosition, (PackingShape)checkedShape);
    156156    }
    157     private bool Encloses(PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
     157    private bool Encloses(PackingPosition checkedPosition, PackingShape checkedShape) {
    158158      return Encloses(new CuboidDiagonal(this), new CuboidDiagonal(checkedPosition, checkedShape));
    159159    }
     
    168168
    169169    public override bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape<PackingPosition> checkedShape) {
    170       return Overlaps(myPosition, checkedPosition, (CuboidPackingShape)checkedShape);
     170      return Overlaps(myPosition, checkedPosition, (PackingShape)checkedShape);
    171171    }
    172     private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, CuboidPackingShape checkedShape) {
     172    private bool Overlaps(PackingPosition myPosition, PackingPosition checkedPosition, PackingShape checkedShape) {
    173173      return Overlaps(new CuboidDiagonal(myPosition, this), new CuboidDiagonal(checkedPosition, checkedShape));
    174174    }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Problem.cs

    r14048 r14049  
    3838  [Creatable(CreatableAttribute.Categories.CombinatorialProblems, Priority = 310)]
    3939  // TODO don't support generic BPPData but only 3d BPPData
    40   public class CuboidIdenticalBinPackingProblem : BinPackingProblem<PackingPosition, CuboidPackingShape, CuboidPackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {
     40  public class Problem : Problem<PackingPosition, PackingShape, PackingItem>, IProblemInstanceConsumer<BPPData>, IProblemInstanceExporter<BPPData> {
    4141
    4242
     
    9494
    9595    [StorableConstructor]
    96     protected CuboidIdenticalBinPackingProblem(bool deserializing) : base(deserializing) { }
    97     protected CuboidIdenticalBinPackingProblem(CuboidIdenticalBinPackingProblem original, Cloner cloner)
     96    protected Problem(bool deserializing) : base(deserializing) { }
     97    protected Problem(Problem original, Cloner cloner)
    9898      : base(original, cloner) {
    9999    }
    100100    public override IDeepCloneable Clone(Cloner cloner) {
    101       return new CuboidIdenticalBinPackingProblem(this, cloner);
     101      return new Problem(this, cloner);
    102102    }
    103     public CuboidIdenticalBinPackingProblem() : base(
    104       new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, CuboidPackingShape, CuboidPackingItem>()) {
     103    public Problem() : base(
     104      new PackingPlanEvaluationAlgorithm<Permutation, PackingPosition, PackingShape, PackingItem>()) {
    105105    }
    106106
     
    109109    public void Load(BPPData data) {
    110110      var realData = data as RealBPPData;
    111       var binData = new CuboidPackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
     111      var binData = new PackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
    112112
    113       var itemData = new ItemList<CuboidPackingItem>(data.Items);
     113      var itemData = new ItemList<PackingItem>(data.Items);
    114114      for (int j = 0; j < data.Items; j++) {
    115         var bin = new CuboidPackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
    116         var item = new CuboidPackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], data.ItemMeasures[j][2], bin);
     115        var bin = new PackingShape(data.BinMeasures[0], data.BinMeasures[1], data.BinMeasures[2]);
     116        var item = new PackingItem(data.ItemMeasures[j][0], data.ItemMeasures[j][1], data.ItemMeasures[j][2], bin);
    117117        if (realData != null) {
    118118          item.Weight = realData.ItemWeights[j];
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.3D/3.3/Solution.cs

    r14048 r14049  
    77  [Item("Bin Packing Solution (3d)", "Represents a solution for a 3D bin packing problem.")]
    88  [StorableClass]
    9   public class Solution : PackingPlan<PackingPosition, CuboidPackingShape, CuboidPackingItem> {
    10     public Solution(CuboidPackingShape binMeasures) : this(binMeasures, false, false) { }
    11     public Solution(CuboidPackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }
     9  public class Solution : PackingPlan<PackingPosition, PackingShape, PackingItem> {
     10    public Solution(PackingShape binMeasures) : this(binMeasures, false, false) { }
     11    public Solution(PackingShape binMeasures, bool useExtremePoints, bool stackingConstraints) : base(binMeasures, useExtremePoints, stackingConstraints) { }
    1212    [StorableConstructor]
    1313    protected Solution(bool deserializing) : base(deserializing) { }
     
    1818      return new Solution(this, cloner);
    1919    }
    20     public override BinPacking<PackingPosition, CuboidPackingShape, CuboidPackingItem> NewBinPacking() {
     20    public override BinPacking<PackingPosition, PackingShape, PackingItem> NewBinPacking() {
    2121      return new BinPacking3D(BinMeasures);
    2222    }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container2DView.xaml.cs

    r14048 r14049  
    3333    private int selectedItemKey;
    3434    private Size renderSize;
    35     private BinPacking<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem> packing;
    36     public BinPacking<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem> Packing {
     35    private BinPacking<BinPacking2D.PackingPosition, PackingShape, PackingItem> packing;
     36    public BinPacking<BinPacking2D.PackingPosition, PackingShape, PackingItem> Packing {
    3737      get { return packing; }
    3838      set {
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/Container3DView.xaml.cs

    r14048 r14049  
    3535    private int selectedItemKey;
    3636
    37     private BinPacking<BinPacking3D.PackingPosition, CuboidPackingShape, CuboidPackingItem> packing;
    38     public BinPacking<BinPacking3D.PackingPosition, CuboidPackingShape, CuboidPackingItem> Packing {
     37    private BinPacking<BinPacking3D.PackingPosition, PackingShape, PackingItem> packing;
     38    public BinPacking<BinPacking3D.PackingPosition, PackingShape, PackingItem> Packing {
    3939      get { return packing; }
    4040      set {
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan2DView.cs

    r14048 r14049  
    2828namespace HeuristicLab.Problems.BinPacking.Views {
    2929  [View("2-dimensional packing plan view")]
    30   [Content(typeof(PackingPlan<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem>), true)]
     30  [Content(typeof(PackingPlan<BinPacking2D.PackingPosition, PackingShape, PackingItem>), true)]
    3131  public partial class PackingPlan2DView : ItemView {
    3232
     
    3535    }
    3636
    37     public new PackingPlan<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem> Content {
    38       get { return (PackingPlan<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem>)base.Content; }
     37    public new PackingPlan<BinPacking2D.PackingPosition, PackingShape, PackingItem> Content {
     38      get { return (PackingPlan<BinPacking2D.PackingPosition, PackingShape, PackingItem>)base.Content; }
    3939      set { base.Content = value; }
    4040    }
     
    5656    }
    5757
    58     private void UpdateState(PackingPlan<BinPacking2D.PackingPosition, RectangularPackingShape, RectangularPackingItem> plan) {
     58    private void UpdateState(PackingPlan<BinPacking2D.PackingPosition, PackingShape, PackingItem> plan) {
    5959      int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
    6060      container2DView.Packing = plan.BinPackings[currentBin];
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlan3DView.cs

    r14048 r14049  
    2828namespace HeuristicLab.Problems.BinPacking.Views {
    2929  [View("3-dimensional packing plan View")]
    30   [Content(typeof(PackingPlan<BinPacking3D.PackingPosition, CuboidPackingShape, CuboidPackingItem>), true)]
     30  [Content(typeof(PackingPlan<BinPacking3D.PackingPosition, PackingShape, PackingItem>), true)]
    3131  public partial class PackingPlan3DView : ItemView {
    3232
     
    3535    }
    3636
    37     public new PackingPlan<BinPacking3D.PackingPosition, CuboidPackingShape, CuboidPackingItem> Content {
    38       get { return (PackingPlan<BinPacking3D.PackingPosition, CuboidPackingShape, CuboidPackingItem>)base.Content; }
     37    public new PackingPlan<BinPacking3D.PackingPosition, PackingShape, PackingItem> Content {
     38      get { return (PackingPlan<BinPacking3D.PackingPosition, PackingShape, PackingItem>)base.Content; }
    3939      set { base.Content = value; }
    4040    }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/HeuristicLab.Problems.BinPacking-3.3.csproj

    r14048 r14049  
    160160    <Compile Include="Analyzers\BestBinPackingSolutionAnalyzer.cs" />
    161161    <Compile Include="Analyzers\BinPackingAnalyzer.cs" />
    162     <Compile Include="BinPackingProblem.cs" />
    163162    <Compile Include="Encodings\GroupingVector\GroupingVectorSwap2Manipulator.cs" />
    164163    <Compile Include="Encodings\GroupingVector\GroupingVectorSinglePointCrossover.cs" />
     
    287286    <Compile Include="PackingSolutionDecoder.cs" />
    288287    <Compile Include="Plugin.cs" />
     288    <Compile Include="Problem.cs" />
    289289    <Compile Include="Properties\AssemblyInfo.cs" />
    290290  </ItemGroup>
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/PackingShape.cs

    r14048 r14049  
    2929
    3030namespace HeuristicLab.Problems.BinPacking {
    31   [Item("PackingShape", "Represents an abstract shape to describe the measures and the positioning of objects related to bin-packing problems.")]
    3231  [StorableClass]
    3332  public abstract class PackingShape<T> : Item, IPackingShape, IParameterizedItem
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Problem.cs

    r14048 r14049  
    3535
    3636namespace HeuristicLab.Problems.BinPacking {
    37   [Item("BinPackingProblem", "Abstract class that represents a BinPacking Problem")]
    3837  [StorableClass]
    39   public abstract class BinPackingProblem<D, B, I> : SingleObjectiveHeuristicOptimizationProblem<IPackingPlanEvaluationAlgorithm, IPackingSolutionCreator>
     38  public abstract class Problem<D, B, I> : SingleObjectiveHeuristicOptimizationProblem<IPackingPlanEvaluationAlgorithm, IPackingSolutionCreator>
    4039    where D : class, IPackingPosition
    4140    where B : PackingShape<D>, new()
     
    9291
    9392    [StorableConstructor]
    94     protected BinPackingProblem(bool deserializing) : base(deserializing) { }
    95     protected BinPackingProblem(BinPackingProblem<D,B,I> original, Cloner cloner)
     93    protected Problem(bool deserializing) : base(deserializing) { }
     94    protected Problem(Problem<D,B,I> original, Cloner cloner)
    9695      : base(original, cloner) {
    9796      InitializeEventHandlers();
    9897    }
    9998
    100     protected BinPackingProblem(IPackingPlanEvaluationAlgorithm e) : this(e, new MultiComponentVectorRandomCreator()) { }
    101 
    102     protected BinPackingProblem(IPackingPlanEvaluationAlgorithm e, IPackingSolutionCreator c) : base (e, c){
     99    protected Problem(IPackingPlanEvaluationAlgorithm e) : this(e, new MultiComponentVectorRandomCreator()) { }
     100
     101    protected Problem(IPackingPlanEvaluationAlgorithm e, IPackingSolutionCreator c) : base (e, c){
    103102      Parameters.Add(new OptionalValueParameter<PackingPlan<D, B, I>>("BestKnownSolution", "The best known solution of this bin-packing instance."));
    104103      Parameters.Add(new ValueParameter<ItemList<I>>("PackingItemMeasures", "Packing-item data defining the measures of the different items that need to be packed.", new ItemList<I>()));
Note: See TracChangeset for help on using the changeset viewer.