Changeset 4690 for branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators
- Timestamp:
- 10/29/10 20:30:20 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs
r4352 r4690 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 32 33 [StorableConstructor] 33 34 private AlbaCustomerInsertionManipulator(bool deserializing) : base(deserializing) { } 34 35 private AlbaCustomerInsertionManipulator(AlbaCustomerInsertionManipulator original, Cloner cloner) 36 : base(original, cloner) { 37 } 35 38 public AlbaCustomerInsertionManipulator() 36 39 : base() { 40 } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new AlbaCustomerInsertionManipulator(this, cloner); 37 44 } 38 45 -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs
r4352 r4690 26 26 using HeuristicLab.Data; 27 27 using System.Collections.Generic; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 33 34 [StorableConstructor] 34 35 private AlbaCustomerInversionManipulator(bool deserializing) : base(deserializing) { } 35 36 private AlbaCustomerInversionManipulator(AlbaCustomerInversionManipulator original, Cloner cloner) 37 : base(original, cloner) { 38 } 36 39 public AlbaCustomerInversionManipulator() 37 40 : base() { 38 41 } 39 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new AlbaCustomerInversionManipulator(this, cloner); 45 } 40 46 protected override void Manipulate(IRandom random, AlbaEncoding individual) { 41 47 int breakPoint1, breakPoint2; -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs
r4352 r4690 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 32 33 [StorableConstructor] 33 34 private AlbaCustomerSwapManipulator(bool deserializing) : base(deserializing) { } 34 35 private AlbaCustomerSwapManipulator(AlbaCustomerSwapManipulator original, Cloner cloner) : base(original, cloner) { } 35 36 public AlbaCustomerSwapManipulator() 36 37 : base() { 38 } 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new AlbaCustomerSwapManipulator(this, cloner); 37 41 } 38 42 -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs
r4352 r4690 27 27 using System; 28 28 using System.Collections.Generic; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 31 32 [Item("AlbaIntraRouteInversionManipulator", "An operator which applies the SLS operation to a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 32 33 [StorableClass] 33 public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator { 34 public sealed class AlbaIntraRouteInversionManipulator : AlbaManipulator { 34 35 [StorableConstructor] 35 36 private AlbaIntraRouteInversionManipulator(bool deserializing) : base(deserializing) { } 36 37 private AlbaIntraRouteInversionManipulator(AlbaIntraRouteInversionManipulator original, Cloner cloner) : base(original, cloner) { } 37 38 public AlbaIntraRouteInversionManipulator() 38 39 : base() { 39 } 40 } 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 return new AlbaIntraRouteInversionManipulator(this, cloner); 44 } 40 45 41 46 public static void Apply(AlbaEncoding individual, int index1, int index2) { … … 72 77 73 78 int currentTourEnd = currentTourStart; 74 while (currentTourEnd < individual.Length && 79 while (currentTourEnd < individual.Length && 75 80 individual[currentTourEnd] < individual.Cities) { 76 81 currentTourEnd++; -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs
r4352 r4690 27 27 using System; 28 28 using System.Collections.Generic; 29 using HeuristicLab.Common; 29 30 30 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 35 36 get { return (IValueParameter<IntValue>)Parameters["Lambda"]; } 36 37 } 37 38 38 39 [StorableConstructor] 39 40 private AlbaLambdaInterchangeManipulator(bool deserializing) : base(deserializing) { } 40 41 private AlbaLambdaInterchangeManipulator(AlbaLambdaInterchangeManipulator original, Cloner cloner) : base(original, cloner) { } 41 42 public AlbaLambdaInterchangeManipulator() 42 43 : base() { 43 44 44 Parameters.Add(new ValueParameter<IntValue>("Lambda", "The lambda value.", new IntValue(1))); 45 } 45 46 46 public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1, 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new AlbaLambdaInterchangeManipulator(this, cloner); 49 } 50 51 public static void Apply(AlbaEncoding individual, int tour1Index, int position1, int length1, 47 52 int tour2Index, int position2, int length2) { 48 53 List<Tour> tours = individual.GetTours(); -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs
r4352 r4690 26 26 using HeuristicLab.Data; 27 27 using HeuristicLab.Optimization; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 37 38 [StorableConstructor] 38 39 protected AlbaManipulator(bool deserializing) : base(deserializing) { } 39 40 protected AlbaManipulator(AlbaManipulator original, Cloner cloner) : base(original, cloner) { } 40 41 public AlbaManipulator() 41 42 : base() { 42 43 Parameters.Add(new LookupParameter<IRandom>("Random", "The pseudo random number generator which should be used for stochastic manipulation operators.")); 43 44 44 45 AlbaEncoding.RemoveUnusedParameters(Parameters); 45 46 } 46 47 -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
r4416 r4690 25 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 26 using HeuristicLab.Data; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { … … 36 37 [StorableConstructor] 37 38 private AlbaPermutationManipualtor(bool deserializing) : base(deserializing) { } 38 39 private AlbaPermutationManipualtor(AlbaPermutationManipualtor original, Cloner cloner) : base(original, cloner) { } 39 40 public AlbaPermutationManipualtor() 40 41 : base() { 41 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator())); 42 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator())); 43 } 44 45 public override IDeepCloneable Clone(Cloner cloner) { 46 return new AlbaPermutationManipualtor(this, cloner); 42 47 } 43 48
Note: See TracChangeset
for help on using the changeset viewer.