Changeset 4346 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs
- Timestamp:
- 08/31/10 14:03:12 (14 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs
r4341 r4346 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 [Item(" StochasticLambdaInterchangeMultiMoveGenerator", "Generates multiple random lambda interchange moves from a given VRP encoding.")]32 [Item("AlbaStochasticLambdaInterchangeMultiMoveGenerator", "Generates multiple random lambda interchange moves from a given VRP encoding. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 33 33 [StorableClass] 34 public sealed class StochasticLambdaInterchangeMultiMoveGenerator :LambdaInterchangeMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator {34 public sealed class AlbaStochasticLambdaInterchangeMultiMoveGenerator : AlbaLambdaInterchangeMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator { 35 35 public ILookupParameter<IRandom> RandomParameter { 36 36 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } … … 42 42 43 43 [StorableConstructor] 44 private StochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { }44 private AlbaStochasticLambdaInterchangeMultiMoveGenerator(bool deserializing) : base(deserializing) { } 45 45 46 public StochasticLambdaInterchangeMultiMoveGenerator()46 public AlbaStochasticLambdaInterchangeMultiMoveGenerator() 47 47 : base() { 48 48 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); … … 50 50 } 51 51 52 protected override LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) {52 protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda) { 53 53 int sampleSize = SampleSizeParameter.ActualValue.Value; 54 54 55 LambdaInterchangeMove[] moves = newLambdaInterchangeMove[sampleSize];55 AlbaLambdaInterchangeMove[] moves = new AlbaLambdaInterchangeMove[sampleSize]; 56 56 for (int i = 0; i < sampleSize; i++) { 57 moves[i] = StochasticLambdaInterchangeSingleMoveGenerator.Apply(57 moves[i] = AlbaStochasticLambdaInterchangeSingleMoveGenerator.Apply( 58 58 individual, Cities, lambda, RandomParameter.ActualValue); 59 59 }
Note: See TracChangeset
for help on using the changeset viewer.