Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/20/11 13:33:29 (13 years ago)
Author:
svonolfe
Message:

Included additional operators (#1561)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.cs

    r5445 r6448  
    3939    }
    4040
    41     protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
     41    public static AlbaLambdaInterchangeMove[] GenerateAllMoves(AlbaEncoding individual, int lambda) {
    4242      List<AlbaLambdaInterchangeMove> moves = new List<AlbaLambdaInterchangeMove>();
    4343
     
    6666      return moves.ToArray();
    6767    }
     68
     69    protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
     70      return GenerateAllMoves(individual, lambda);
     71    }
    6872  }
    6973}
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs

    r5445 r6448  
    5050      return new AlbaStochasticLambdaInterchangeMultiMoveGenerator(this, cloner);
    5151    }
    52     protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
    53       int sampleSize = SampleSizeParameter.ActualValue.Value;
    5452
     53    public static AlbaLambdaInterchangeMove[] GenerateAllMoves(AlbaEncoding individual, int lambda, int sampleSize, IRandom random) {
    5554      AlbaLambdaInterchangeMove[] moves = new AlbaLambdaInterchangeMove[sampleSize];
    5655      for (int i = 0; i < sampleSize; i++) {
    5756        moves[i] = AlbaStochasticLambdaInterchangeSingleMoveGenerator.Apply(
    58           individual, Cities, lambda, RandomParameter.ActualValue);
     57          individual, individual.Cities, lambda, random);
    5958      }
    6059
    6160      return moves;
    6261    }
     62
     63    protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {
     64      int sampleSize = SampleSizeParameter.ActualValue.Value;
     65
     66      return GenerateAllMoves(individual, lambda, sampleSize, RandomParameter.ActualValue);
     67    }
    6368  }
    6469}
Note: See TracChangeset for help on using the changeset viewer.