Changeset 4752 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion
- Timestamp:
- 11/09/10 09:55:31 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaExhaustiveIntraRouteInversionMoveGenerator.cs
r4370 r4752 28 28 using System.Collections.Generic; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 38 39 public AlbaExhaustiveIntraRouteInversionGenerator() 39 40 : base() { 41 } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new AlbaExhaustiveIntraRouteInversionGenerator(this, cloner); 45 } 46 47 private AlbaExhaustiveIntraRouteInversionGenerator(AlbaExhaustiveIntraRouteInversionGenerator original, Cloner cloner) 48 : base(original, cloner) { 40 49 } 41 50 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs
r4383 r4752 26 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 27 using HeuristicLab.Data; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting { … … 47 48 } 48 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new AlbaIntraRouteInversionMoveEvaluator(this, cloner); 52 } 53 54 private AlbaIntraRouteInversionMoveEvaluator(AlbaIntraRouteInversionMoveEvaluator original, Cloner cloner) 55 : base(original, cloner) { 56 } 57 49 58 protected override void EvaluateMove() { 50 59 AlbaEncoding newSolution = IntraRouteInversionMoveParameter.ActualValue.Permutation.Clone() as AlbaEncoding; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs
r4383 r4752 46 46 } 47 47 48 public override IDeepCloneable Clone( HeuristicLab.Common.Cloner cloner) {49 AlbaIntraRouteInversionMove clone = new AlbaIntraRouteInversionMove(50 Index1, Index2);48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new AlbaIntraRouteInversionMove(this, cloner); 50 } 51 51 52 if (Permutation != null) 53 clone.Permutation = Permutation.Clone() as AlbaEncoding; 54 55 cloner.RegisterClonedObject(this, clone); 56 return clone; 52 protected AlbaIntraRouteInversionMove(AlbaIntraRouteInversionMove original, Cloner cloner) 53 : base(original, cloner) { 54 if (Permutation != null) 55 this.Permutation = cloner.Clone(original.Permutation); 57 56 } 58 57 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveGenerator.cs
r4370 r4752 28 28 using System.Collections.Generic; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 54 55 } 55 56 57 protected AlbaIntraRouteInversionMoveGenerator(AlbaIntraRouteInversionMoveGenerator original, Cloner cloner) 58 : base(original, cloner) { 59 } 60 56 61 protected abstract AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance); 57 62 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs
r4383 r4752 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 47 48 } 48 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new AlbaIntraRouteInversionMoveMaker(this, cloner); 52 } 53 54 protected AlbaIntraRouteInversionMoveMaker(AlbaIntraRouteInversionMoveMaker original, Cloner cloner) 55 : base(original, cloner) { 56 } 57 49 58 public static void Apply(AlbaEncoding solution, AlbaIntraRouteInversionMove move) { 50 59 AlbaIntraRouteInversionManipulator.Apply(solution, move.Index1, move.Index2); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs
r4370 r4752 29 29 using HeuristicLab.Data; 30 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 51 52 } 52 53 54 public override IDeepCloneable Clone(Cloner cloner) { 55 return new AlbaStochasticIntraRouteInversionMultiMoveGenerator(this, cloner); 56 } 57 58 private AlbaStochasticIntraRouteInversionMultiMoveGenerator(AlbaStochasticIntraRouteInversionMultiMoveGenerator original, Cloner cloner) 59 : base(original, cloner) { 60 } 61 53 62 protected override AlbaIntraRouteInversionMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance) { 54 63 int sampleSize = SampleSizeParameter.ActualValue.Value; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs
r4370 r4752 29 29 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 53 54 : base() { 54 55 Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator.")); 56 } 57 58 public override IDeepCloneable Clone(Cloner cloner) { 59 return new AlbaStochasticIntraRouteInversionSingleMoveGenerator(this, cloner); 60 } 61 62 private AlbaStochasticIntraRouteInversionSingleMoveGenerator(AlbaStochasticIntraRouteInversionSingleMoveGenerator original, Cloner cloner) 63 : base(original, cloner) { 55 64 } 56 65
Note: See TracChangeset
for help on using the changeset viewer.