- Timestamp:
- 11/09/10 09:55:31 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveEvaluator.cs
r4369 r4752 27 27 using HeuristicLab.Core; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 38 39 : base() { 39 40 } 41 42 protected AlbaMoveEvaluator(AlbaMoveEvaluator original, Cloner cloner) 43 : base(original, cloner) { 44 } 40 45 } 41 46 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveGenerator.cs
r4376 r4752 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 40 41 } 41 42 43 protected AlbaMoveGenerator(AlbaMoveGenerator original, Cloner cloner) 44 : base(original, cloner) { 45 } 46 42 47 public override IOperation Apply() { 43 48 IVRPEncoding solution = VRPToursParameter.ActualValue; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveMaker.cs
r4378 r4752 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 39 40 : base() { 40 41 } 42 43 protected AlbaMoveMaker(AlbaMoveMaker original, Cloner cloner) 44 : base(original, cloner) { 45 } 41 46 } 42 47 } -
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 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaExhaustiveLambdaInterchangeMoveGenerator.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 AlbaExhaustiveLambdaInterchangeMoveGenerator() 39 40 : base() { 41 } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new AlbaExhaustiveLambdaInterchangeMoveGenerator(this, cloner); 45 } 46 47 private AlbaExhaustiveLambdaInterchangeMoveGenerator(AlbaExhaustiveLambdaInterchangeMoveGenerator original, Cloner cloner) 48 : base(original, cloner) { 40 49 } 41 50 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMove.cs
r4383 r4752 79 79 } 80 80 81 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 82 AlbaLambdaInterchangeMove clone = new AlbaLambdaInterchangeMove(); 83 84 clone.Tour1 = Tour1; 85 clone.Position1 = Position1; 86 clone.Length1 = Length1; 87 88 clone.Tour2 = Tour2; 89 clone.Position2 = Position2; 90 clone.Length2 = Length2; 91 92 if (Individual != null) 93 clone.Individual = Individual.Clone() as AlbaEncoding; 94 95 cloner.RegisterClonedObject(this, clone); 96 return clone; 81 public override IDeepCloneable Clone(Cloner cloner) { 82 return new AlbaLambdaInterchangeMove(this, cloner); 97 83 } 98 84 85 protected AlbaLambdaInterchangeMove(AlbaLambdaInterchangeMove original, Cloner cloner) 86 : base(original, cloner) { 87 this.Tour1 = original.Tour1; 88 this.Position1 = original.Position1; 89 this.Length1 = original.Length1; 99 90 91 this.Tour2 = original.Tour2; 92 this.Position2 = original.Position2; 93 this.Length2 = original.Length2; 94 95 this.Individual = cloner.Clone(Individual) as AlbaEncoding; 96 } 100 97 101 98 #region IVRPMove Members -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveEvaluator.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 AlbaLambdaInterchangeMoveEvaluator(this, cloner); 52 } 53 54 private AlbaLambdaInterchangeMoveEvaluator(AlbaLambdaInterchangeMoveEvaluator original, Cloner cloner) 55 : base(original, cloner) { 56 } 57 49 58 protected override void EvaluateMove() { 50 59 AlbaEncoding newSolution = LambdaInterchangeMoveParameter.ActualValue.Individual.Clone() as AlbaEncoding; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveGenerator.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 { … … 64 65 } 65 66 67 protected AlbaLambdaInterchangeMoveGenerator(AlbaLambdaInterchangeMoveGenerator original, Cloner cloner) 68 : base(original, cloner) { 69 } 70 66 71 protected abstract AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance, int lambda); 67 72 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaLambdaInterchangeMoveMaker.cs
r4383 r4752 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 28 using System.Collections.Generic; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 51 52 } 52 53 54 public override IDeepCloneable Clone(Cloner cloner) { 55 return new AlbaLambdaInterchangeMoveMaker(this, cloner); 56 } 57 58 protected AlbaLambdaInterchangeMoveMaker(AlbaLambdaInterchangeMoveMaker original, Cloner cloner) 59 : base(original, cloner) { 60 } 61 53 62 public static void Apply(AlbaEncoding solution, AlbaLambdaInterchangeMove move) { 54 63 AlbaLambdaInterchangeManipulator.Apply( -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.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 AlbaStochasticLambdaInterchangeMultiMoveGenerator(this, cloner); 56 } 57 58 private AlbaStochasticLambdaInterchangeMultiMoveGenerator(AlbaStochasticLambdaInterchangeMultiMoveGenerator original, Cloner cloner) 59 : base(original, cloner) { 60 } 61 53 62 protected override AlbaLambdaInterchangeMove[] GenerateMoves(AlbaEncoding individual, IVRPProblemInstance problemInstance, int lambda) { 54 63 int sampleSize = SampleSizeParameter.ActualValue.Value; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.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 AlbaStochasticLambdaInterchangeSingleMoveGenerator(this, cloner); 60 } 61 62 private AlbaStochasticLambdaInterchangeSingleMoveGenerator(AlbaStochasticLambdaInterchangeSingleMoveGenerator original, Cloner cloner) 63 : base(original, cloner) { 55 64 } 56 65 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs
r4383 r4752 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 30 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 63 64 } 64 65 66 public override IDeepCloneable Clone(Cloner cloner) { 67 return new AlbaStochasticTranslocationSingleMoveGenerator(this, cloner); 68 } 69 70 private AlbaStochasticTranslocationSingleMoveGenerator(AlbaStochasticTranslocationSingleMoveGenerator original, Cloner cloner) 71 : base(original, cloner) { 72 } 73 65 74 public override IOperation Apply() { 66 75 IOperation next = base.Apply(); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMove.cs
r4383 r4752 43 43 } 44 44 45 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 46 AlbaTranslocationMove clone = new AlbaTranslocationMove( 47 Index1, Index2, Index3); 48 if (Permutation != null) 49 clone.Permutation = Permutation.Clone() as AlbaEncoding; 45 [StorableConstructor] 46 protected AlbaTranslocationMove(bool deserializing) : base(deserializing) { } 50 47 51 cloner.RegisterClonedObject(this, clone); 52 return clone; 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new AlbaTranslocationMove(this, cloner); 50 } 51 52 protected AlbaTranslocationMove(AlbaTranslocationMove original, Cloner cloner) 53 : base(original, cloner) { 54 this.Index1 = original.Index1; 55 this.Index2 = original.Index2; 56 this.Index3 = original.Index3; 57 58 this.Permutation = cloner.Clone(Permutation) as AlbaEncoding; 53 59 } 54 60 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs
r4383 r4752 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting { … … 47 48 } 48 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new AlbaTranslocationMoveEvaluator(this, cloner); 52 } 53 54 private AlbaTranslocationMoveEvaluator(AlbaTranslocationMoveEvaluator original, Cloner cloner) 55 : base(original, cloner) { 56 } 57 49 58 protected override void EvaluateMove() { 50 59 TranslocationMove move = TranslocationMoveParameter.ActualValue; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r4370 r4752 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 85 86 } 86 87 88 public override IDeepCloneable Clone(Cloner cloner) { 89 return new AlbaTranslocationMoveGenerator(this, cloner); 90 } 91 92 private AlbaTranslocationMoveGenerator(AlbaTranslocationMoveGenerator original, Cloner cloner) 93 : base(original, cloner) { 94 } 95 87 96 public override IOperation Apply() { 88 97 IOperation next = base.Apply(); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
r4370 r4752 27 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 70 71 } 71 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new AlbaTranslocationMoveHardTabuCriterion(this, cloner); 75 } 76 77 private AlbaTranslocationMoveHardTabuCriterion(AlbaTranslocationMoveHardTabuCriterion original, Cloner cloner) 78 : base(original, cloner) { 79 } 80 72 81 public override IOperation Apply() { 73 82 IOperation next = base.Apply(); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r4383 r4752 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 27 using HeuristicLab.Problems.VehicleRouting.Interfaces; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 53 54 } 54 55 56 public override IDeepCloneable Clone(Cloner cloner) { 57 return new AlbaTranslocationMoveMaker(this, cloner); 58 } 59 60 private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner) 61 : base(original, cloner) { 62 } 63 55 64 protected override void PerformMove() { 56 65 IVariable moveVariable = this.ExecutionContext.Scope.Variables[ -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
r4370 r4752 27 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 70 71 } 71 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new AlbaTranslocationMoveSoftTabuCriterion(this, cloner); 75 } 76 77 private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner) 78 : base(original, cloner) { 79 } 80 72 81 public override IOperation Apply() { 73 82 IOperation next = base.Apply(); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
r4370 r4752 27 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 70 71 } 71 72 73 public override IDeepCloneable Clone(Cloner cloner) { 74 return new AlbaTranslocationMoveTabuMaker(this, cloner); 75 } 76 77 private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner) 78 : base(original, cloner) { 79 } 80 72 81 public override IOperation Apply() { 73 82 IOperation next = base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.