Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/12/17 14:10:55 (7 years ago)
Author:
dsouravl
Message:

#2762: worked on best fit heuristics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BinPackingExtension/HeuristicLab.Problems.BinPacking/3.3/BinPacking.cs

    r14876 r14976  
    5151    protected Dictionary<int, List<int>> OccupationLayers { get; set; }
    5252
     53    [Storable]
     54    public Dictionary<TPos, Tuple<int,int,int>> ResidualSpace { get; protected set; }
     55
    5356    #endregion Properties
    5457
     
    6467      OccupationLayers = new Dictionary<int, List<int>>();
    6568    }
    66 
    6769
    6870    [StorableConstructor]
     
    9395    public abstract void SlidingBasedPacking(ref IList<int> sequence, IList<TItem> items, Dictionary<int, bool> rotationArray);
    9496    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints);
     97    public abstract bool ExtremePointBasedPacking(int ID, IList<TItem> items, bool stackingConstraints);
    9598    public abstract void ExtremePointBasedPacking(ref IList<int> sequence, IList<TItem> items, bool stackingConstraints, Dictionary<int, bool> rotationArray);
    9699
     
    99102      Positions[itemID] = position;
    100103      ExtremePoints.Remove(position);
     104      if (ResidualSpace != null) ResidualSpace.Remove(position);
    101105      foreach (int id in Items.Select(x => x.Key))
    102106        GenerateNewExtremePointsForNewItem(Items[id], Positions[id]);
    103 
     107     
    104108      AddNewItemToOccupationLayers(itemID, item, position);
    105109    }
     
    146150    public abstract bool IsStaticStable(TItem measures, TPos position);
    147151
    148 
    149152    protected abstract void InitializeOccupationLayers();
    150153    protected abstract void AddNewItemToOccupationLayers(int itemID, TItem item, TPos position);
Note: See TracChangeset for help on using the changeset viewer.