Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/07/18 14:54:42 (6 years ago)
Author:
rhanghof
Message:

#2817:

  • Added a new packer.
  • Enhanced the material types.
  • Added extreme point pruning for layer support in the extrem point creators.
  • BinPacking3D: Added a graph for calculating weigth distribution of the items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2817-BinPackingSpeedup/HeuristicLab.Problems.BinPacking/3.3/3D/Evaluators/BinUtilizationEvaluator.cs

    r15646 r15731  
    8181    }
    8282
    83     public Tuple<int, double, int> Evaluate1(Solution solution) {
     83    public Tuple<int, double, int, int> Evaluate1(Solution solution) {
    8484
    8585
    86       var res = Tuple.Create<int, double, int>(
     86      var res = Tuple.Create<int, double, int, int>(
    8787        GetBinCount(solution),
    8888        CalculateBinUtilizationFirstBin(solution),
    89         GetNumberOfResidualSpaces(solution)
     89        GetNumberOfResidualSpaces(solution),
     90        CalculateMaxDepth(solution)
    9091        );
    9192
     
    107108    }
    108109
     110    private static int CalculateMaxDepth(Solution solution) {
     111      var packing = solution.Bins.Last();
     112      if (packing == null) {
     113        return Int32.MaxValue;
     114      }
     115
     116      return packing.Positions.Select(x => x.Value.Z + packing.Items[x.Key].Depth).Max();
     117    }
     118
    109119
    110120    #endregion
Note: See TracChangeset for help on using the changeset viewer.