Changeset 17698 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators
- Timestamp:
- 07/24/20 00:58:42 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInsertionManipulator.cs
r17226 r17698 43 43 } 44 44 45 protected override void Manipulate(IRandom random, AlbaEncod ingindividual) {46 AlbaEncod ing original = (AlbaEncoding)individual.Clone();45 protected override void Manipulate(IRandom random, AlbaEncodedSolution individual) { 46 AlbaEncodedSolution original = (AlbaEncodedSolution)individual.Clone(); 47 47 int cutIndex, insertIndex, number; 48 48 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerInversionManipulator.cs
r17226 r17698 44 44 } 45 45 46 protected override void Manipulate(IRandom random, AlbaEncod ingindividual) {46 protected override void Manipulate(IRandom random, AlbaEncodedSolution individual) { 47 47 int breakPoint1, breakPoint2; 48 48 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaCustomerSwapManipulator.cs
r17226 r17698 43 43 } 44 44 45 protected override void Manipulate(IRandom random, AlbaEncod ingindividual) {45 protected override void Manipulate(IRandom random, AlbaEncodedSolution individual) { 46 46 int index1, index2, temp; 47 47 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaIntraRouteInversionManipulator.cs
r17226 r17698 44 44 } 45 45 46 public static void Apply(AlbaEncod ingindividual, int index1, int index2) {46 public static void Apply(AlbaEncodedSolution individual, int index1, int index2) { 47 47 if (index1 != -1 && index2 != -1) { 48 48 int breakPoint1 = index1 + 1; … … 56 56 } 57 57 58 protected override void Manipulate(IRandom rand, AlbaEncod ingindividual) {58 protected override void Manipulate(IRandom rand, AlbaEncodedSolution individual) { 59 59 int index1 = -1; 60 60 int index2 = -1; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaLambdaInterchangeManipulator.cs
r17226 r17698 52 52 } 53 53 54 public static void Apply(AlbaEncod ingindividual, int tour1Index, int position1, int length1,54 public static void Apply(AlbaEncodedSolution individual, int tour1Index, int position1, int length1, 55 55 int tour2Index, int position2, int length2) { 56 56 List<Tour> tours = individual.GetTours(); … … 74 74 } 75 75 76 AlbaEncod ing original = individual.Clone() as AlbaEncoding;76 AlbaEncodedSolution original = individual.Clone() as AlbaEncodedSolution; 77 77 int index = 0; 78 78 … … 106 106 } 107 107 108 protected override void Manipulate(IRandom rand, AlbaEncod ingindividual) {108 protected override void Manipulate(IRandom rand, AlbaEncodedSolution individual) { 109 109 List<Tour> tours = individual.GetTours(); 110 110 if (tours.Count > 1) { -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaManipulator.cs
r17226 r17698 48 48 } 49 49 50 protected abstract void Manipulate(IRandom random, AlbaEncod ingindividual);50 protected abstract void Manipulate(IRandom random, AlbaEncodedSolution individual); 51 51 52 protected int FindCustomerLocation(int customer, AlbaEncod ingindividual) {52 protected int FindCustomerLocation(int customer, AlbaEncodedSolution individual) { 53 53 int pos = -1; 54 54 for (int i = 0; i < individual.Length; i++) { … … 63 63 64 64 public override IOperation InstrumentedApply() { 65 IVRPEncod ingsolution = VRPToursParameter.ActualValue;66 if (!(solution is AlbaEncod ing)) {67 VRPToursParameter.ActualValue = AlbaEncod ing.ConvertFrom(solution, ProblemInstance);65 IVRPEncodedSolution solution = VRPToursParameter.ActualValue; 66 if (!(solution is AlbaEncodedSolution)) { 67 VRPToursParameter.ActualValue = AlbaEncodedSolution.ConvertFrom(solution, ProblemInstance); 68 68 } 69 69 70 Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncod ing);71 (VRPToursParameter.ActualValue as AlbaEncod ing).Repair();70 Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as AlbaEncodedSolution); 71 (VRPToursParameter.ActualValue as AlbaEncodedSolution).Repair(); 72 72 73 73 return base.InstrumentedApply(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
r17226 r17698 50 50 } 51 51 52 protected override void Manipulate(IRandom random, AlbaEncod ingindividual) {52 protected override void Manipulate(IRandom random, AlbaEncodedSolution individual) { 53 53 InnerManipulatorParameter.ActualValue.PermutationParameter.ActualName = VRPToursParameter.ActualName; 54 54
Note: See TracChangeset
for help on using the changeset viewer.