Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/13 17:51:14 (12 years ago)
Author:
jhelm
Message:

#1966: Implemented new encoding (MultiComponentVector/MCV); Implemented move-operators for MCV and GV encodings; Implemented new decoding-methods for PS, GV and MCV encodings (ExtremePoint-based packing);

Location:
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan2DView.cs

    r9348 r9440  
    33using HeuristicLab.Core.Views;
    44using HeuristicLab.MainForm;
    5 using HeuristicLab.Problems.BinPacking.PackingPlans;
     5using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
    66using HeuristicLab.Problems.BinPacking.Interfaces;
    77using HeuristicLab.Problems.BinPacking.PackingItem;
     
    1313namespace HeuristicLab.Problems.BinPacking.Views {
    1414  [View("2-dimensional packing plan View")]
    15   [Content(typeof(RegularSimpleRotationPackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>), true)]
     15  [Content(typeof(PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>), true)]
    1616  public partial class PackingPlan2DView : NamedItemView {
    1717
     
    2121
    2222
    23     public new RegularSimpleRotationPackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> Content {
    24       get { return (RegularSimpleRotationPackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>)base.Content; }
     23    public new PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> Content {
     24      get { return (PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem>)base.Content; }
    2525      set { base.Content = value; }
    2626    }
     
    4444    }
    4545
    46     private void Redraw(RegularSimpleRotationPackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> plan) {     
     46    private void Redraw(PackingPlan<TwoDimensionalPacking, RectangularPackingBin, RectangularPackingItem> plan) {     
    4747      int currentBin = (binSelection != null && binSelection.SelectedItem != null) ? (int)(binSelection.SelectedItem) : 0;
    4848      var bin = plan.PackingBinMeasures;
     
    5252        var position = plan.PackingItemPositions[i++];
    5353        if (position.AssignedBin == currentBin)
    54           packingPlan2D.AddItemToContainer(item.Width, item.Height, position.X, position.Y, i.ToString());
     54          packingPlan2D.AddItemToContainer(
     55            position.Rotated ? item.Height : item.Width,
     56            position.Rotated ? item.Width : item.Height,
     57            position.X, position.Y, i.ToString());
    5558      }
    5659    }
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking.Views/3.3/PackingPlans/PackingPlan3DView.cs

    r9348 r9440  
    33using HeuristicLab.Core.Views;
    44using HeuristicLab.MainForm;
    5 using HeuristicLab.Problems.BinPacking.PackingPlans;
     5using HeuristicLab.Encodings.PackingEncoding.PackingPlan;
    66using HeuristicLab.Problems.BinPacking.Interfaces;
    77using HeuristicLab.Problems.BinPacking.PackingItem;
     
    1313namespace HeuristicLab.Problems.BinPacking.Views {
    1414  [View("3-dimensional packing plan View")]
    15   [Content(typeof(RegularSimpleRotationPackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>), true)]
     15  [Content(typeof(PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>), true)]
    1616  public partial class PackingPlan3DView : NamedItemView {
    1717
     
    2222
    2323
    24     public new RegularSimpleRotationPackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Content {
    25       get { return (RegularSimpleRotationPackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>)base.Content; }
     24    public new PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem> Content {
     25      get { return (PackingPlan<ThreeDimensionalPacking, CuboidPackingBin, CuboidPackingItem>)base.Content; }
    2626      set { base.Content = value; }
    2727    }
     
    5151        var position = Content.PackingItemPositions[i];
    5252        if (position.AssignedBin == currentBin)
    53           packingPlan3D.AddItemToContainer(item.Width, item.Height, item.Depth, position.X, position.Y, position.Z, i);
     53          packingPlan3D.AddItemToContainer(
     54            position.Rotated ? item.Depth : item.Width,
     55            item.Height,
     56            position.Rotated ? item.Width : item.Depth,
     57            position.X, position.Y, position.Z, i);
    5458        i++;
    5559      }
     
    7680          itemSelection.Items.Add(i);
    7781      }
    78       itemSelection.Items.Add("enum");
     82      //itemSelection.Items.Add("enum");
    7983
    8084      packingPlan3D.Invalidate();
Note: See TracChangeset for help on using the changeset viewer.