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/PackingRatioEvaluator.cs

    r15646 r15731  
    9898    }
    9999
    100     public Tuple<int, double, int> Evaluate1(Solution solution) {
     100    public Tuple<int, double, int, int> Evaluate1(Solution solution) {
    101101
    102102
    103       var res = Tuple.Create<int, double, int>(
     103      var res = Tuple.Create<int, double, int, int>(
    104104        GetBinCount(solution),
    105105        CalculateBinUtilizationFirstBin(solution),
    106         GetNumberOfResidualSpaces(solution)
     106        GetNumberOfResidualSpaces(solution),
     107        CalculateMaxDepth(solution)
    107108        );
    108109
     
    124125    }
    125126
     127    private static int CalculateMaxDepth(Solution solution) {
     128      var packing = solution.Bins.Last();
     129      if (packing == null) {
     130        return Int32.MaxValue;
     131      }
     132
     133      return packing.Positions.Select(x => x.Value.Z + packing.Items[x.Key].Depth).Max();
     134    }
     135
    126136    #endregion
    127137  }
Note: See TracChangeset for help on using the changeset viewer.