Changeset 6448 for trunk/sources/HeuristicLab.Problems.VehicleRouting
- Timestamp:
- 06/20/11 13:33:29 (14 years ago)
- 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 39 39 } 40 40 41 p rotected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {41 public static AlbaLambdaInterchangeMove[] GenerateAllMoves(AlbaEncoding individual, int lambda) { 42 42 List<AlbaLambdaInterchangeMove> moves = new List<AlbaLambdaInterchangeMove>(); 43 43 … … 66 66 return moves.ToArray(); 67 67 } 68 69 protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) { 70 return GenerateAllMoves(individual, lambda); 71 } 68 72 } 69 73 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs
r5445 r6448 50 50 return new AlbaStochasticLambdaInterchangeMultiMoveGenerator(this, cloner); 51 51 } 52 protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {53 int sampleSize = SampleSizeParameter.ActualValue.Value;54 52 53 public static AlbaLambdaInterchangeMove[] GenerateAllMoves(AlbaEncoding individual, int lambda, int sampleSize, IRandom random) { 55 54 AlbaLambdaInterchangeMove[] moves = new AlbaLambdaInterchangeMove[sampleSize]; 56 55 for (int i = 0; i < sampleSize; i++) { 57 56 moves[i] = AlbaStochasticLambdaInterchangeSingleMoveGenerator.Apply( 58 individual, Cities, lambda, RandomParameter.ActualValue);57 individual, individual.Cities, lambda, random); 59 58 } 60 59 61 60 return moves; 62 61 } 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 } 63 68 } 64 69 }
Note: See TracChangeset
for help on using the changeset viewer.