Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/09/18 12:59:38 (6 years ago)
Author:
rhanghof
Message:

#2817:

  • Adjusted the unit tests
  • Refactoring of the sorter
  • Bugfix on the BinPackerResidualSpaceBestFit packer
File:
1 edited

Legend:

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

    r15617 r15989  
    198198    protected virtual void SampleItemParameters(IRandom rand, out int w, out int h, out int d) {
    199199      Contract.Assert(@class >= 1 && @class <= 5);
    200       /*var weights = new double[] { 0.1, 0.1, 0.1, 0.1, 0.1 };
     200      var weights = new double[] { 0.1, 0.1, 0.1, 0.1, 0.1 };
    201201      weights[@class - 1] = 0.6;
    202202      var type = Enumerable.Range(1, 5).SampleProportional(rand, 1, weights).First();
    203       */
    204 
    205       // as by Martello and Vigo
    206       int type = @class;
    207       if (type <= 5) {
    208         var t = rand.Next(1, 10);
    209         if (t <= 5) {
    210           type = t;
    211         }
    212       }
    213203
    214204      switch (type) {
Note: See TracChangeset for help on using the changeset viewer.