Changeset 7865 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMultiMoveGenerator.cs
- Timestamp:
- 05/22/12 09:53:07 (12 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMultiMoveGenerator.cs
r7774 r7865 32 32 33 33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 34 [Item("Potvin OnePointCrossoverMultiMoveGenerator", "Generates customer relocationmoves from a given VRP encoding.")]34 [Item("PotvinTwoOptStarMultiMoveGenerator", "Generates two opt star moves from a given VRP encoding.")] 35 35 [StorableClass] 36 public sealed class Potvin OnePointCrossoverMultiMoveGenerator : PotvinOnePointCrossoverMoveGenerator, IMultiMoveGenerator, IMultiVRPMoveGenerator {36 public sealed class PotvinTwoOptStarMultiMoveGenerator : PotvinTwoOptStarMoveGenerator, IMultiMoveGenerator, IMultiVRPMoveGenerator { 37 37 public ILookupParameter<IRandom> RandomParameter { 38 38 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } … … 44 44 45 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new Potvin OnePointCrossoverMultiMoveGenerator(this, cloner);46 return new PotvinTwoOptStarMultiMoveGenerator(this, cloner); 47 47 } 48 48 49 49 [StorableConstructor] 50 private Potvin OnePointCrossoverMultiMoveGenerator(bool deserializing) : base(deserializing) { }50 private PotvinTwoOptStarMultiMoveGenerator(bool deserializing) : base(deserializing) { } 51 51 52 public Potvin OnePointCrossoverMultiMoveGenerator()52 public PotvinTwoOptStarMultiMoveGenerator() 53 53 : base() { 54 54 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); … … 56 56 } 57 57 58 private Potvin OnePointCrossoverMultiMoveGenerator(PotvinOnePointCrossoverMoveGenerator original, Cloner cloner)58 private PotvinTwoOptStarMultiMoveGenerator(PotvinTwoOptStarMoveGenerator original, Cloner cloner) 59 59 : base(original, cloner) { 60 60 } 61 61 62 protected override Potvin OnePointCrossoverMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) {63 List<Potvin OnePointCrossoverMove> result = new List<PotvinOnePointCrossoverMove>();62 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncoding individual, IVRPProblemInstance problemInstance) { 63 List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>(); 64 64 65 65 for (int i = 0; i < SampleSizeParameter.ActualValue.Value; i++) { 66 result.Add(Potvin OnePointCrossoverSingleMoveGenerator.Apply(individual, ProblemInstance, RandomParameter.ActualValue));66 result.Add(PotvinTwoOptStarSingleMoveGenerator.Apply(individual, ProblemInstance, RandomParameter.ActualValue)); 67 67 } 68 68
Note: See TracChangeset
for help on using the changeset viewer.