Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/20/16 14:02:36 (8 years ago)
Author:
gkronber
Message:

#1966: refactoring of bin packing implementation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Encodings/PackingSequence/Moves/Insertion/StochasticInsertionMoveGenerator.cs

    r13032 r14128  
    2525using HeuristicLab.Core;
    2626using HeuristicLab.Data;
     27using HeuristicLab.Encodings.PermutationEncoding;
    2728using HeuristicLab.Optimization;
    2829using HeuristicLab.Parameters;
     
    5859    }
    5960
    60     public static InsertionMove[] Apply(PackingSequenceEncoding PackingSequence, IRandom random, int sampleSize) {
     61    public static InsertionMove[] Apply(Permutation packingSequence, IRandom random, int sampleSize) {
    6162
    6263      int nrOfBins = 0;
    63       foreach (int binNr in PackingSequence.PackingSequence) {
     64      foreach (int binNr in packingSequence) {
    6465        if (binNr > nrOfBins)
    6566          nrOfBins = binNr;
     
    6768      nrOfBins++;
    6869      var generatedMoves = new List<InsertionMove>();
    69       var moves = new List<InsertionMove>(ExhaustiveInsertionMoveGenerator.Generate(PackingSequence, nrOfBins));
     70      var moves = new List<InsertionMove>(ExhaustiveInsertionMoveGenerator.Generate(packingSequence, nrOfBins));
    7071      int moveCount = moves.Count;
    7172      for (int i = 0; i < sampleSize; i++) {
     
    7677    }
    7778
    78     protected override InsertionMove[] GenerateMoves(PackingSequenceEncoding SwapSequence) {
     79    protected override InsertionMove[] GenerateMoves(Permutation packingSequence) {
    7980      IRandom random = RandomParameter.ActualValue;
    80       return Apply(SwapSequence, random, SampleSizeParameter.ActualValue.Value);
     81      return Apply(packingSequence, random, SampleSizeParameter.ActualValue.Value);
    8182    }
    8283  }
Note: See TracChangeset for help on using the changeset viewer.