Ignore:
Timestamp:
07/21/16 21:07:27 (6 years ago)
Author:
gkronber
Message:

#2641:

  • fixed persistence bug
  • added unit test to create BPP sample
  • added BPP sample to start page
  • renaming of properties
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.BinPacking/3.3/PackingPlan.cs

    r14162 r14167  
    3838    public int NrOfBins {
    3939      get {
    40         if (BinPackings != null)
    41           return BinPackings.Count;
     40        if (Bins != null)
     41          return Bins.Count;
    4242        else return 0;
    4343      }
     
    4949
    5050    [Storable]
    51     public B BinMeasures { get; private set; }
     51    public B BinShape { get; private set; }
    5252
    5353    [Storable]
    54     public ObservableList<BinPacking<D, B, I>> BinPackings { get; set; }
     54    public ObservableList<BinPacking<D, B, I>> Bins { get; set; }
    5555
    5656    [Storable]
     
    6969    #endregion
    7070
    71     protected PackingPlan(B binMeasures, bool useExtremePoints, bool stackingConstraints)
     71    protected PackingPlan(B binShape, bool useExtremePoints, bool stackingConstraints)
    7272      : base() {
    73       BinMeasures = (B)binMeasures.Clone();
     73      BinShape = (B)binShape.Clone();
    7474      StackingConstraints = stackingConstraints;
    7575      UseExtremePoints = useExtremePoints;
    76       BinPackings = new ObservableList<BinPacking<D, B, I>>();
     76      Bins = new ObservableList<BinPacking<D, B, I>>();
    7777    }
    7878
     
    8181    protected PackingPlan(PackingPlan<D, B, I> original, Cloner cloner)
    8282      : base(original, cloner) {
    83       this.BinPackings = new ObservableList<BinPacking<D, B, I>>(original.BinPackings.Select(p => cloner.Clone(p)));
     83      this.Bins = new ObservableList<BinPacking<D, B, I>>(original.Bins.Select(p => cloner.Clone(p)));
    8484      UseExtremePoints = original.UseExtremePoints;
    8585      StackingConstraints = original.StackingConstraints;
    86       BinMeasures = cloner.Clone(original.BinMeasures);
     86      BinShape = cloner.Clone(original.BinShape);
    8787      Quality = cloner.Clone(original.Quality);
    8888    }
     
    9090
    9191    public void UpdateBinPackings() {
    92       BinPackings.RemoveAll(x => x.Positions.Count == 0);
    93       BinPackings = new ObservableList<BinPacking<D, B, I>>(BinPackings.OrderByDescending(bp => bp.PackingDensity));
     92      Bins.RemoveAll(x => x.Positions.Count == 0);
     93      Bins = new ObservableList<BinPacking<D, B, I>>(Bins.OrderByDescending(bp => bp.PackingDensity));
    9494    }
    9595
     
    110110      OnQualityChanged();
    111111    }
    112 
    113     public event EventHandler BinPackingsChanged;
    114112    #endregion
    115113  }
Note: See TracChangeset for help on using the changeset viewer.