Changeset 4346 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.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/AlbaLambdaInterchangeMoveGenerator.cs
r4341 r4346 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 [Item(" LambdaInterchangeMoveGenerator", "Generates lambda interchange moves from a given VRP encoding.")]32 [Item("AlbaLambdaInterchangeMoveGenerator", "Generates 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 abstract class LambdaInterchangeMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaLambdaInterchangeMoveOperator {34 public abstract class AlbaLambdaInterchangeMoveGenerator : AlbaMoveOperator, IExhaustiveMoveGenerator, IAlbaLambdaInterchangeMoveOperator { 35 35 #region IAlbaLambdaInterchangeMoveOperator Members 36 36 37 public ILookupParameter< LambdaInterchangeMove> LambdaInterchangeMoveParameter {38 get { return (ILookupParameter< LambdaInterchangeMove>)Parameters["LambdaInterchangeMove"]; }37 public ILookupParameter<AlbaLambdaInterchangeMove> LambdaInterchangeMoveParameter { 38 get { return (ILookupParameter<AlbaLambdaInterchangeMove>)Parameters["AlbaLambdaInterchangeMove"]; } 39 39 } 40 40 … … 50 50 51 51 [StorableConstructor] 52 protected LambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { }52 protected AlbaLambdaInterchangeMoveGenerator(bool deserializing) : base(deserializing) { } 53 53 54 public LambdaInterchangeMoveGenerator()54 public AlbaLambdaInterchangeMoveGenerator() 55 55 : base() { 56 Parameters.Add(new LookupParameter< LambdaInterchangeMove>("LambdaInterchangeMove", "The moves that should be generated in subscopes."));56 Parameters.Add(new LookupParameter<AlbaLambdaInterchangeMove>("AlbaLambdaInterchangeMove", "The moves that should be generated in subscopes.")); 57 57 Parameters.Add(new ScopeParameter("CurrentScope", "The current scope where the moves should be added as subscopes.")); 58 58 Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1))); 59 59 } 60 60 61 protected abstract LambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda);61 protected abstract AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, int lambda); 62 62 63 63 public override IOperation Apply() { … … 65 65 66 66 AlbaEncoding individual = VRPToursParameter.ActualValue as AlbaEncoding; 67 LambdaInterchangeMove[] moves = GenerateMoves(individual, LambdaParameter.Value.Value);67 AlbaLambdaInterchangeMove[] moves = GenerateMoves(individual, LambdaParameter.Value.Value); 68 68 Scope[] moveScopes = new Scope[moves.Length]; 69 69 for (int i = 0; i < moveScopes.Length; i++) {
Note: See TracChangeset
for help on using the changeset viewer.