Changeset 17698 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin
- Timestamp:
- 07/24/20 00:58:42 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin
- Files:
-
- 1 added
- 1 deleted
- 68 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/IterativeInsertionCreator.cs
r17226 r17698 81 81 } 82 82 83 public static PotvinEncod ingCreateSolution(IVRPProblemInstance instance, IRandom random, bool adhereTimeWindows) {84 PotvinEncod ing result = new PotvinEncoding(instance);83 public static PotvinEncodedSolution CreateSolution(IVRPProblemInstance instance, IRandom random, bool adhereTimeWindows) { 84 PotvinEncodedSolution result = new PotvinEncodedSolution(instance); 85 85 86 86 IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Creators/PushForwardInsertionCreator.cs
r17226 r17698 194 194 } 195 195 196 public static PotvinEncod ingCreateSolution(IVRPProblemInstance problemInstance, IRandom random,196 public static PotvinEncodedSolution CreateSolution(IVRPProblemInstance problemInstance, IRandom random, 197 197 double alphaValue = 0.7, double betaValue = 0.1, double gammaValue = 0.2, 198 198 double alphaVariance = 0.5, double betaVariance = 0.07, double gammaVariance = 0.14) { 199 PotvinEncod ing result = new PotvinEncoding(problemInstance);199 PotvinEncodedSolution result = new PotvinEncodedSolution(problemInstance); 200 200 201 201 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinCrossover.cs
r17226 r17698 54 54 } 55 55 56 protected abstract PotvinEncod ing Crossover(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2);56 protected abstract PotvinEncodedSolution Crossover(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2); 57 57 58 protected static bool FindInsertionPlace(PotvinEncod ingindividual, int city, bool allowInfeasible,58 protected static bool FindInsertionPlace(PotvinEncodedSolution individual, int city, bool allowInfeasible, 59 59 out int route, out int place) { 60 60 return individual.FindInsertionPlace( … … 63 63 } 64 64 65 protected static Tour FindRoute(PotvinEncod ingsolution, int city) {65 protected static Tour FindRoute(PotvinEncodedSolution solution, int city) { 66 66 Tour found = null; 67 67 … … 76 76 } 77 77 78 protected static bool RouteUnrouted(PotvinEncod ingsolution, bool allowInfeasible) {78 protected static bool RouteUnrouted(PotvinEncodedSolution solution, bool allowInfeasible) { 79 79 bool success = true; 80 80 int index = 0; … … 99 99 } 100 100 101 protected static bool Repair(IRandom random, PotvinEncod ingsolution, Tour newTour, IVRPProblemInstance instance, bool allowInfeasible) {101 protected static bool Repair(IRandom random, PotvinEncodedSolution solution, Tour newTour, IVRPProblemInstance instance, bool allowInfeasible) { 102 102 bool success = true; 103 103 … … 145 145 146 146 public override IOperation InstrumentedApply() { 147 ItemArray<IVRPEncod ing> parents = new ItemArray<IVRPEncoding>(ParentsParameter.ActualValue.Length);147 ItemArray<IVRPEncodedSolution> parents = new ItemArray<IVRPEncodedSolution>(ParentsParameter.ActualValue.Length); 148 148 for (int i = 0; i < ParentsParameter.ActualValue.Length; i++) { 149 IVRPEncod ingsolution = ParentsParameter.ActualValue[i];149 IVRPEncodedSolution solution = ParentsParameter.ActualValue[i]; 150 150 151 if (!(solution is PotvinEncod ing)) {152 parents[i] = PotvinEncod ing.ConvertFrom(solution, ProblemInstance);151 if (!(solution is PotvinEncodedSolution)) { 152 parents[i] = PotvinEncodedSolution.ConvertFrom(solution, ProblemInstance); 153 153 } else { 154 154 parents[i] = solution; … … 157 157 ParentsParameter.ActualValue = parents; 158 158 159 ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as PotvinEncod ing, parents[1] as PotvinEncoding);160 (ChildParameter.ActualValue as PotvinEncod ing).Repair();159 ChildParameter.ActualValue = Crossover(RandomParameter.ActualValue, parents[0] as PotvinEncodedSolution, parents[1] as PotvinEncodedSolution); 160 (ChildParameter.ActualValue as PotvinEncodedSolution).Repair(); 161 161 162 162 return base.InstrumentedApply(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinInsertionBasedCrossover.cs
r17226 r17698 51 51 } 52 52 53 private static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncod ingindividual) {53 private static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncodedSolution individual) { 54 54 int tourIndex = -1; 55 55 … … 109 109 } 110 110 111 private int SelectCityBiasedByNeighborDistance(IRandom random, Tour tour, IVRPEncod ingsolution) {111 private int SelectCityBiasedByNeighborDistance(IRandom random, Tour tour, IVRPEncodedSolution solution) { 112 112 int cityIndex = -1; 113 113 … … 150 150 151 151 private bool FindRouteInsertionPlace( 152 PotvinEncod ingindividual,152 PotvinEncodedSolution individual, 153 153 Tour tour, 154 154 int city, bool allowInfeasible, out int place) { … … 181 181 } 182 182 183 private ICollection<int> GetUnrouted(PotvinEncod ingsolution, int cities) {183 private ICollection<int> GetUnrouted(PotvinEncodedSolution solution, int cities) { 184 184 HashSet<int> undiscovered = new HashSet<int>(); 185 185 for (int i = 1; i <= cities; i++) { … … 195 195 } 196 196 197 protected override PotvinEncod ing Crossover(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2) {198 PotvinEncod ing child = parent1.Clone() as PotvinEncoding;197 protected override PotvinEncodedSolution Crossover(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2) { 198 PotvinEncodedSolution child = parent1.Clone() as PotvinEncodedSolution; 199 199 child.Tours.Clear(); 200 200 … … 202 202 203 203 List<Tour> R1 = new List<Tour>(); 204 PotvinEncod ing p1Clone = parent1.Clone() as PotvinEncoding;204 PotvinEncodedSolution p1Clone = parent1.Clone() as PotvinEncodedSolution; 205 205 206 206 int length = Math.Min(Length.Value.Value, parent1.Tours.Count) + 1; … … 277 277 else { 278 278 if (random.NextDouble() < 0.5) 279 return parent1.Clone() as PotvinEncod ing;279 return parent1.Clone() as PotvinEncodedSolution; 280 280 else 281 return parent2.Clone() as PotvinEncod ing;281 return parent2.Clone() as PotvinEncodedSolution; 282 282 } 283 283 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinRouteBasedCrossover.cs
r17226 r17698 44 44 } 45 45 46 public static PotvinEncod ing Apply(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2, IVRPProblemInstance problemInstance, bool allowInfeasible) {47 PotvinEncod ing child = parent2.Clone() as PotvinEncoding;46 public static PotvinEncodedSolution Apply(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2, IVRPProblemInstance problemInstance, bool allowInfeasible) { 47 PotvinEncodedSolution child = parent2.Clone() as PotvinEncodedSolution; 48 48 49 49 if (parent1.Tours.Count > 0 && child.Tours.Count > 0) { … … 78 78 else { 79 79 if (random.NextDouble() < 0.5) 80 return parent1.Clone() as PotvinEncod ing;80 return parent1.Clone() as PotvinEncodedSolution; 81 81 else 82 return parent2.Clone() as PotvinEncod ing;82 return parent2.Clone() as PotvinEncodedSolution; 83 83 } 84 84 } else { … … 87 87 } 88 88 89 protected override PotvinEncod ing Crossover(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2) {89 protected override PotvinEncodedSolution Crossover(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2) { 90 90 return Apply(random, parent1, parent2, ProblemInstance, AllowInfeasibleSolutions.Value.Value); 91 91 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Crossovers/PotvinSequenceBasedCrossover.cs
r17226 r17698 43 43 } 44 44 45 public static PotvinEncod ing Apply(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2, IVRPProblemInstance problemInstance, bool allowInfeasible) {46 PotvinEncod ing child = parent1.Clone() as PotvinEncoding;45 public static PotvinEncodedSolution Apply(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2, IVRPProblemInstance problemInstance, bool allowInfeasible) { 46 PotvinEncodedSolution child = parent1.Clone() as PotvinEncodedSolution; 47 47 Tour newTour = new Tour(); 48 48 … … 80 80 } else { 81 81 if (random.NextDouble() < 0.5) 82 return parent1.Clone() as PotvinEncod ing;82 return parent1.Clone() as PotvinEncodedSolution; 83 83 else 84 return parent2.Clone() as PotvinEncod ing;84 return parent2.Clone() as PotvinEncodedSolution; 85 85 } 86 86 } else { … … 89 89 } 90 90 91 protected override PotvinEncod ing Crossover(IRandom random, PotvinEncoding parent1, PotvinEncodingparent2) {91 protected override PotvinEncodedSolution Crossover(IRandom random, PotvinEncodedSolution parent1, PotvinEncodedSolution parent2) { 92 92 return Apply(random, parent1, parent2, ProblemInstance, AllowInfeasibleSolutions.Value.Value); 93 93 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinLocalSearchManipulator.cs
r17226 r17698 53 53 54 54 private static bool FindBetterInsertionPlace( 55 PotvinEncod ingindividual, IVRPProblemInstance instance, int tour, int city, int length,55 PotvinEncodedSolution individual, IVRPProblemInstance instance, int tour, int city, int length, 56 56 out int insertionTour, out int insertionPlace) { 57 57 bool insertionFound = false; … … 92 92 } 93 93 94 public static void ApplyManipulation(IRandom random, PotvinEncod ingindividual, IVRPProblemInstance instance, int maxIterations) {94 public static void ApplyManipulation(IRandom random, PotvinEncodedSolution individual, IVRPProblemInstance instance, int maxIterations) { 95 95 //only apply to feasible individuals 96 96 if (instance.Feasible(individual)) { … … 141 141 142 142 143 protected override void Manipulate(IRandom random, PotvinEncod ingindividual) {143 protected override void Manipulate(IRandom random, PotvinEncodedSolution individual) { 144 144 ApplyManipulation(random, individual, ProblemInstance, Iterations.Value.Value); 145 145 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinManipulator.cs
r17226 r17698 53 53 } 54 54 55 protected abstract void Manipulate(IRandom random, PotvinEncod ingindividual);55 protected abstract void Manipulate(IRandom random, PotvinEncodedSolution individual); 56 56 57 protected static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncod ingindividual, IVRPProblemInstance instance) {57 protected static int SelectRandomTourBiasedByLength(IRandom random, PotvinEncodedSolution individual, IVRPProblemInstance instance) { 58 58 int tourIndex = -1; 59 59 … … 82 82 } 83 83 84 protected static bool FindInsertionPlace(PotvinEncod ingindividual, int city, int routeToAvoid, bool allowInfeasible, out int route, out int place) {84 protected static bool FindInsertionPlace(PotvinEncodedSolution individual, int city, int routeToAvoid, bool allowInfeasible, out int route, out int place) { 85 85 return individual.FindInsertionPlace( 86 86 city, routeToAvoid, allowInfeasible, out route, out place); … … 88 88 89 89 public override IOperation InstrumentedApply() { 90 IVRPEncod ingsolution = VRPToursParameter.ActualValue;91 if (!(solution is PotvinEncod ing)) {92 VRPToursParameter.ActualValue = PotvinEncod ing.ConvertFrom(solution, ProblemInstance);90 IVRPEncodedSolution solution = VRPToursParameter.ActualValue; 91 if (!(solution is PotvinEncodedSolution)) { 92 VRPToursParameter.ActualValue = PotvinEncodedSolution.ConvertFrom(solution, ProblemInstance); 93 93 } 94 94 95 Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncod ing);96 (VRPToursParameter.ActualValue as PotvinEncod ing).Repair();95 Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncodedSolution); 96 (VRPToursParameter.ActualValue as PotvinEncodedSolution).Repair(); 97 97 98 98 return base.InstrumentedApply(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinOneLevelExchangeManipulator.cs
r17226 r17698 42 42 } 43 43 44 public static void ApplyManipulation(IRandom random, PotvinEncod ingindividual, IVRPProblemInstance instance, bool allowInfeasible) {44 public static void ApplyManipulation(IRandom random, PotvinEncodedSolution individual, IVRPProblemInstance instance, bool allowInfeasible) { 45 45 int selectedIndex = SelectRandomTourBiasedByLength(random, individual, instance); 46 46 if (selectedIndex >= 0) { … … 68 68 } 69 69 70 protected override void Manipulate(IRandom random, PotvinEncod ingindividual) {70 protected override void Manipulate(IRandom random, PotvinEncodedSolution individual) { 71 71 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 72 72 ApplyManipulation(random, individual, ProblemInstance, allowInfeasible); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinPairwiseOneLevelExchangeManipulator.cs
r17226 r17698 44 44 } 45 45 46 public static bool PairwiseMove(PotvinEncod ingindividual, IVRPProblemInstance instance, int city, bool allowInfeasible) {46 public static bool PairwiseMove(PotvinEncodedSolution individual, IVRPProblemInstance instance, int city, bool allowInfeasible) { 47 47 bool success; 48 48 … … 128 128 } 129 129 130 public static void ApplyManipulation(IRandom random, PotvinEncod ingindividual, IPickupAndDeliveryProblemInstance pdp, bool allowInfeasible) {130 public static void ApplyManipulation(IRandom random, PotvinEncodedSolution individual, IPickupAndDeliveryProblemInstance pdp, bool allowInfeasible) { 131 131 int selectedIndex = SelectRandomTourBiasedByLength(random, individual, pdp); 132 132 if (selectedIndex >= 0) { … … 149 149 150 150 151 protected override void Manipulate(IRandom random, PotvinEncod ingindividual) {151 protected override void Manipulate(IRandom random, PotvinEncodedSolution individual) { 152 152 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 153 153 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinPairwiseTwoLevelExchangeManipulator.cs
r17226 r17698 45 45 } 46 46 47 private static PotvinEncod ing ReplacePair(PotvinEncodingindividual, IVRPProblemInstance instance, int replaced, int replacing, bool allowInfeasible) {48 individual = individual.Clone() as PotvinEncod ing;47 private static PotvinEncodedSolution ReplacePair(PotvinEncodedSolution individual, IVRPProblemInstance instance, int replaced, int replacing, bool allowInfeasible) { 48 individual = individual.Clone() as PotvinEncodedSolution; 49 49 IPickupAndDeliveryProblemInstance pdp = instance as IPickupAndDeliveryProblemInstance; 50 50 … … 128 128 } 129 129 130 public static PotvinEncod ing ApplyManipulation(IRandom random, PotvinEncodingindividual, IPickupAndDeliveryProblemInstance pdp, bool allowInfeasible) {131 PotvinEncod ingresult = null;130 public static PotvinEncodedSolution ApplyManipulation(IRandom random, PotvinEncodedSolution individual, IPickupAndDeliveryProblemInstance pdp, bool allowInfeasible) { 131 PotvinEncodedSolution result = null; 132 132 133 133 int selectedIndex = SelectRandomTourBiasedByLength(random, individual, pdp); … … 182 182 } 183 183 184 protected override void Manipulate(IRandom random, PotvinEncod ingindividual) {184 protected override void Manipulate(IRandom random, PotvinEncodedSolution individual) { 185 185 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 186 186 IPickupAndDeliveryProblemInstance pdp = ProblemInstance as IPickupAndDeliveryProblemInstance; 187 187 188 188 if (pdp != null) { 189 PotvinEncod ingresult = ApplyManipulation(random, individual, pdp, allowInfeasible);189 PotvinEncodedSolution result = ApplyManipulation(random, individual, pdp, allowInfeasible); 190 190 if (result != null) { 191 191 VRPToursParameter.ActualValue = result; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.cs
r17226 r17698 42 42 } 43 43 44 public static void ApplyManipulation(IRandom random, PotvinEncod ingindividual, IVRPProblemInstance instance, bool allowInfeasible) {44 public static void ApplyManipulation(IRandom random, PotvinEncodedSolution individual, IVRPProblemInstance instance, bool allowInfeasible) { 45 45 int selectedIndex = SelectRandomTourBiasedByLength(random, individual, instance); 46 46 if (selectedIndex >= 0) { … … 93 93 94 94 95 protected override void Manipulate(IRandom random, PotvinEncod ingindividual) {95 protected override void Manipulate(IRandom random, PotvinEncodedSolution individual) { 96 96 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 97 97 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinVehicleAssignmentManipulator.cs
r17226 r17698 61 61 62 62 public override IOperation InstrumentedApply() { 63 IVRPEncod ingsolution = VRPToursParameter.ActualValue;64 if (!(solution is PotvinEncod ing)) {65 VRPToursParameter.ActualValue = PotvinEncod ing.ConvertFrom(solution, ProblemInstance);63 IVRPEncodedSolution solution = VRPToursParameter.ActualValue; 64 if (!(solution is PotvinEncodedSolution)) { 65 VRPToursParameter.ActualValue = PotvinEncodedSolution.ConvertFrom(solution, ProblemInstance); 66 66 } 67 67 68 68 OperationCollection next = new OperationCollection(base.InstrumentedApply()); 69 69 70 VehicleAssignmentParameter.ActualValue = (VRPToursParameter.ActualValue as PotvinEncod ing).VehicleAssignment;70 VehicleAssignmentParameter.ActualValue = (VRPToursParameter.ActualValue as PotvinEncodedSolution).VehicleAssignment; 71 71 VehicleAssignmentManipuator.Value.PermutationParameter.ActualName = VehicleAssignmentParameter.ActualName; 72 72 next.Insert(0, ExecutionContext.CreateOperation(VehicleAssignmentManipuator.Value)); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationExhaustiveMoveGenerator.cs
r17226 r17698 46 46 } 47 47 48 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {48 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 49 49 List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>(); 50 50 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMove.cs
r17226 r17698 32 32 public class PotvinCustomerRelocationMove : Item, IVRPMove { 33 33 [Storable] 34 public IVRPEncod ingIndividual { get; protected set; }34 public IVRPEncodedSolution Individual { get; protected set; } 35 35 36 36 [Storable] … … 51 51 } 52 52 53 public PotvinCustomerRelocationMove(int city, int oldTour, int tour, PotvinEncod ingindividual) {53 public PotvinCustomerRelocationMove(int city, int oldTour, int tour, PotvinEncodedSolution individual) { 54 54 City = city; 55 55 OldTour = oldTour; 56 56 Tour = tour; 57 57 58 this.Individual = individual.Clone() as PotvinEncod ing;58 this.Individual = individual.Clone() as PotvinEncodedSolution; 59 59 } 60 60 … … 69 69 this.Tour = original.Tour; 70 70 71 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;71 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 72 72 } 73 73 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveEvaluator.cs
r17226 r17698 73 73 PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue; 74 74 75 PotvinEncod ing newSolution = CustomerRelocationMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;75 PotvinEncodedSolution newSolution = CustomerRelocationMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 76 76 PotvinCustomerRelocationMoveMaker.Apply(newSolution, move, ProblemInstance); 77 77 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinCustomerRelocationMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveMaker.cs
r17226 r17698 68 68 } 69 69 70 public static void Apply(PotvinEncod ingsolution, PotvinCustomerRelocationMove move, IVRPProblemInstance problemInstance) {70 public static void Apply(PotvinEncodedSolution solution, PotvinCustomerRelocationMove move, IVRPProblemInstance problemInstance) { 71 71 if (move.Tour >= solution.Tours.Count) 72 72 solution.Tours.Add(new Tour()); … … 87 87 PotvinCustomerRelocationMove move = CustomerRelocationMoveParameter.ActualValue; 88 88 89 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;89 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 90 90 Apply(newSolution, move, ProblemInstance); 91 91 newSolution.Repair(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuCriterion.cs
r17226 r17698 44 44 get { return CustomerRelocationMoveParameter; } 45 45 } 46 public ILookupParameter<IVRPEncod ing> VRPToursParameter {47 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }46 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 47 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 48 48 } 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 78 78 : base() { 79 79 Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made.")); 80 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));80 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 81 81 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 82 82 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMoveTabuMaker.cs
r17226 r17698 37 37 get { return CustomerRelocationMoveParameter; } 38 38 } 39 public ILookupParameter<IVRPEncod ing> VRPToursParameter {40 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }39 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 40 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 41 41 } 42 42 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 50 50 : base() { 51 51 Parameters.Add(new LookupParameter<PotvinCustomerRelocationMove>("PotvinCustomerRelocationMove", "The moves that should be made.")); 52 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));52 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 53 53 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 54 54 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/CustomerRelocation/PotvinCustomerRelocationSingleMoveGenerator.cs
r17226 r17698 61 61 } 62 62 63 public static PotvinCustomerRelocationMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {63 public static PotvinCustomerRelocationMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 64 64 int city = 1 + rand.Next(individual.Cities); 65 65 Tour oldTour = individual.Tours.Find(t => t.Stops.Contains(city)); … … 77 77 } 78 78 79 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {79 protected override PotvinCustomerRelocationMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 80 80 List<PotvinCustomerRelocationMove> result = new List<PotvinCustomerRelocationMove>(); 81 81 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeExhaustiveMoveGenerator.cs
r17226 r17698 47 47 } 48 48 49 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {49 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 50 50 List<PotvinPDExchangeMove> result = new List<PotvinPDExchangeMove>(); 51 51 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMove.cs
r17226 r17698 33 33 public class PotvinPDExchangeMove : Item, IVRPMove { 34 34 [Storable] 35 public IVRPEncod ingIndividual { get; protected set; }35 public IVRPEncodedSolution Individual { get; protected set; } 36 36 37 37 [Storable] … … 55 55 } 56 56 57 public PotvinPDExchangeMove(int city, int oldTour, int tour, int replaced, PotvinEncod ingindividual) {57 public PotvinPDExchangeMove(int city, int oldTour, int tour, int replaced, PotvinEncodedSolution individual) { 58 58 City = city; 59 59 OldTour = oldTour; … … 61 61 Replaced = replaced; 62 62 63 this.Individual = individual.Clone() as PotvinEncod ing;63 this.Individual = individual.Clone() as PotvinEncodedSolution; 64 64 } 65 65 … … 78 78 this.Replaced = original.Replaced; 79 79 80 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;80 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 81 81 } 82 82 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveEvaluator.cs
r17226 r17698 73 73 PotvinPDExchangeMove move = PDExchangeMoveParameter.ActualValue; 74 74 75 PotvinEncod ing newSolution = PDExchangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;75 PotvinEncodedSolution newSolution = PDExchangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 76 76 PotvinPDExchangeMoveMaker.Apply(newSolution, move, ProblemInstance); 77 77 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinPDExchangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinPDExchangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinPDExchangeMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveMaker.cs
r17226 r17698 56 56 } 57 57 58 public static void Apply(PotvinEncod ingsolution, PotvinPDExchangeMove move, IVRPProblemInstance problemInstance) {58 public static void Apply(PotvinEncodedSolution solution, PotvinPDExchangeMove move, IVRPProblemInstance problemInstance) { 59 59 if (move.Tour >= solution.Tours.Count) 60 60 solution.Tours.Add(new Tour()); … … 95 95 PotvinPDExchangeMove move = PDExchangeMoveParameter.ActualValue; 96 96 97 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;97 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 98 98 Apply(newSolution, move, ProblemInstance); 99 99 VRPToursParameter.ActualValue = newSolution; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuCriterion.cs
r17226 r17698 44 44 get { return PDExchangeMoveParameter; } 45 45 } 46 public ILookupParameter<IVRPEncod ing> VRPToursParameter {47 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }46 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 47 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 48 48 } 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 88 88 : base() { 89 89 Parameters.Add(new LookupParameter<PotvinPDExchangeMove>("PotvinPDExchangeMove", "The moves that should be made.")); 90 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));90 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 91 91 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 92 92 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMoveTabuMaker.cs
r17226 r17698 56 56 get { return PDExchangeMoveParameter; } 57 57 } 58 public ILookupParameter<IVRPEncod ing> VRPToursParameter {59 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }58 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 59 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 60 60 } 61 61 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 88 88 89 89 Parameters.Add(new LookupParameter<PotvinPDExchangeMove>("PotvinPDExchangeMove", "The moves that should be made.")); 90 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));90 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 91 91 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 92 92 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinPDExchangeMove> result = new List<PotvinPDExchangeMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDExchange/PotvinPDExchangeSingleMoveGenerator.cs
r17226 r17698 54 54 } 55 55 56 public static PotvinPDExchangeMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {56 public static PotvinPDExchangeMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 57 57 List<int> cities = new List<int>(); 58 58 … … 99 99 } 100 100 101 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {101 protected override PotvinPDExchangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 102 102 List<PotvinPDExchangeMove> result = new List<PotvinPDExchangeMove>(); 103 103 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeExhaustiveMoveGenerator.cs
r17226 r17698 47 47 } 48 48 49 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {49 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 50 50 List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>(); 51 51 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMove.cs
r17226 r17698 33 33 public class PotvinPDRearrangeMove : Item, IVRPMove { 34 34 [Storable] 35 public IVRPEncod ingIndividual { get; protected set; }35 public IVRPEncodedSolution Individual { get; protected set; } 36 36 37 37 [Storable] … … 49 49 } 50 50 51 public PotvinPDRearrangeMove(int city, int tour, PotvinEncod ingindividual) {51 public PotvinPDRearrangeMove(int city, int tour, PotvinEncodedSolution individual) { 52 52 City = city; 53 53 Tour = tour; 54 54 55 this.Individual = individual.Clone() as PotvinEncod ing;55 this.Individual = individual.Clone() as PotvinEncodedSolution; 56 56 } 57 57 … … 65 65 this.Tour = original.Tour; 66 66 67 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;67 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 68 68 } 69 69 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveEvaluator.cs
r17226 r17698 73 73 PotvinPDRearrangeMove move = PDRearrangeMoveParameter.ActualValue; 74 74 75 PotvinEncod ing newSolution = PDRearrangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;75 PotvinEncodedSolution newSolution = PDRearrangeMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 76 76 PotvinPDRearrangeMoveMaker.Apply(newSolution, move, ProblemInstance); 77 77 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinPDRearrangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinPDRearrangeMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveMaker.cs
r17226 r17698 56 56 } 57 57 58 public static void Apply(PotvinEncod ingsolution, PotvinPDRearrangeMove move, IVRPProblemInstance problemInstance) {58 public static void Apply(PotvinEncodedSolution solution, PotvinPDRearrangeMove move, IVRPProblemInstance problemInstance) { 59 59 Tour tour = solution.Tours[move.Tour]; 60 60 int position = tour.Stops.IndexOf(move.City); … … 82 82 PotvinPDRearrangeMove move = PDRearrangeMoveParameter.ActualValue; 83 83 84 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;84 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 85 85 Apply(newSolution, move, ProblemInstance); 86 86 VRPToursParameter.ActualValue = newSolution; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuCriterion.cs
r17226 r17698 44 44 get { return PDRearrangeMoveParameter; } 45 45 } 46 public ILookupParameter<IVRPEncod ing> VRPToursParameter {47 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }46 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 47 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 48 48 } 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 88 88 : base() { 89 89 Parameters.Add(new LookupParameter<PotvinPDRearrangeMove>("PotvinPDRearrangeMove", "The moves that should be made.")); 90 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));90 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 91 91 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 92 92 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMoveTabuMaker.cs
r17226 r17698 38 38 get { return PDRearrangeMoveParameter; } 39 39 } 40 public ILookupParameter<IVRPEncod ing> VRPToursParameter {41 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }40 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 41 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 42 42 } 43 43 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 64 64 : base() { 65 65 Parameters.Add(new LookupParameter<PotvinPDRearrangeMove>("PotvinPDRearrangeMove", "The moves that should be made.")); 66 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));66 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 67 67 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 68 68 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange/PotvinPDRearrangeSingleMoveGenerator.cs
r17226 r17698 54 54 } 55 55 56 public static PotvinPDRearrangeMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {56 public static PotvinPDRearrangeMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 57 57 List<int> cities = new List<int>(); 58 58 … … 72 72 } 73 73 74 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {74 protected override PotvinPDRearrangeMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 75 75 List<PotvinPDRearrangeMove> result = new List<PotvinPDRearrangeMove>(); 76 76 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftExhaustiveMoveGenerator.cs
r17226 r17698 47 47 } 48 48 49 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {49 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 50 50 List<PotvinPDShiftMove> result = new List<PotvinPDShiftMove>(); 51 51 IPickupAndDeliveryProblemInstance pdp = problemInstance as IPickupAndDeliveryProblemInstance; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMove.cs
r17226 r17698 33 33 public class PotvinPDShiftMove : Item, IVRPMove { 34 34 [Storable] 35 public IVRPEncod ingIndividual { get; protected set; }35 public IVRPEncodedSolution Individual { get; protected set; } 36 36 37 37 [Storable] … … 52 52 } 53 53 54 public PotvinPDShiftMove(int city, int oldTour, int tour, PotvinEncod ingindividual) {54 public PotvinPDShiftMove(int city, int oldTour, int tour, PotvinEncodedSolution individual) { 55 55 City = city; 56 56 OldTour = oldTour; 57 57 Tour = tour; 58 58 59 this.Individual = individual.Clone() as PotvinEncod ing;59 this.Individual = individual.Clone() as PotvinEncodedSolution; 60 60 } 61 61 … … 70 70 this.Tour = original.Tour; 71 71 72 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;72 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 73 73 } 74 74 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveEvaluator.cs
r17226 r17698 73 73 PotvinPDShiftMove move = PDShiftMoveParameter.ActualValue; 74 74 75 PotvinEncod ing newSolution = PDShiftMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;75 PotvinEncodedSolution newSolution = PDShiftMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 76 76 PotvinPDShiftMoveMaker.Apply(newSolution, move, ProblemInstance); 77 77 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinPDShiftMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinPDShiftMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinPDShiftMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveMaker.cs
r17226 r17698 57 57 } 58 58 59 public static void Apply(PotvinEncod ingsolution, PotvinPDShiftMove move, IVRPProblemInstance problemInstance) {59 public static void Apply(PotvinEncodedSolution solution, PotvinPDShiftMove move, IVRPProblemInstance problemInstance) { 60 60 bool newTour = false; 61 61 … … 121 121 PotvinPDShiftMove move = PDShiftMoveParameter.ActualValue; 122 122 123 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;123 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 124 124 Apply(newSolution, move, ProblemInstance); 125 125 VRPToursParameter.ActualValue = newSolution; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuCriterion.cs
r17226 r17698 44 44 get { return PDShiftMoveParameter; } 45 45 } 46 public ILookupParameter<IVRPEncod ing> VRPToursParameter {47 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }46 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 47 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 48 48 } 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 88 88 : base() { 89 89 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The moves that should be made.")); 90 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));90 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 91 91 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 92 92 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMoveTabuMaker.cs
r17226 r17698 38 38 get { return PDShiftMoveParameter; } 39 39 } 40 public ILookupParameter<IVRPEncod ing> VRPToursParameter {41 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }40 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 41 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 42 42 } 43 43 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 64 64 : base() { 65 65 Parameters.Add(new LookupParameter<PotvinPDShiftMove>("PotvinPDShiftMove", "The moves that should be made.")); 66 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));66 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 67 67 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 68 68 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinPDShiftMove> result = new List<PotvinPDShiftMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDShift/PotvinPDShiftSingleMoveGenerator.cs
r17226 r17698 54 54 } 55 55 56 public static PotvinPDShiftMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {56 public static PotvinPDShiftMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 57 57 List<int> cities = new List<int>(); 58 58 … … 82 82 } 83 83 84 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {84 protected override PotvinPDShiftMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 85 85 List<PotvinPDShiftMove> result = new List<PotvinPDShiftMove>(); 86 86 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PotvinMoveGenerator.cs
r17226 r17698 42 42 43 43 public override IOperation InstrumentedApply() { 44 IVRPEncod ingsolution = VRPToursParameter.ActualValue;45 if (!(solution is PotvinEncod ing)) {46 VRPToursParameter.ActualValue = PotvinEncod ing.ConvertFrom(solution, ProblemInstance);44 IVRPEncodedSolution solution = VRPToursParameter.ActualValue; 45 if (!(solution is PotvinEncodedSolution)) { 46 VRPToursParameter.ActualValue = PotvinEncodedSolution.ConvertFrom(solution, ProblemInstance); 47 47 } 48 48 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarExhaustiveMoveGenerator.cs
r17226 r17698 46 46 } 47 47 48 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {48 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 49 49 List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>(); 50 50 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMove.cs
r17226 r17698 32 32 public class PotvinTwoOptStarMove : Item, IVRPMove { 33 33 [Storable] 34 public IVRPEncod ingIndividual { get; protected set; }34 public IVRPEncodedSolution Individual { get; protected set; } 35 35 36 36 [Storable] … … 56 56 } 57 57 58 public PotvinTwoOptStarMove(int tour1, int x1, int tour2, int x2, PotvinEncod ingindividual) {58 public PotvinTwoOptStarMove(int tour1, int x1, int tour2, int x2, PotvinEncodedSolution individual) { 59 59 Tour1 = tour1; 60 60 X1 = x1; … … 62 62 X2 = x2; 63 63 64 this.Individual = individual.Clone() as PotvinEncod ing;64 this.Individual = individual.Clone() as PotvinEncodedSolution; 65 65 } 66 66 … … 76 76 this.X2 = original.X2; 77 77 78 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;78 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 79 79 } 80 80 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveEvaluator.cs
r17226 r17698 55 55 PotvinTwoOptStarMove move = TwoOptStarMoveParameter.ActualValue; 56 56 57 PotvinEncod ing newSolution = TwoOptStarMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;57 PotvinEncodedSolution newSolution = TwoOptStarMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 58 58 PotvinTwoOptStarMoveMaker.Apply(newSolution, move, ProblemInstance); 59 59 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinTwoOptStarMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinTwoOptStarMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveMaker.cs
r17226 r17698 57 57 58 58 public static void GetSegments(PotvinTwoOptStarMove move, out List<int> segmentX1, out List<int> segmentX2) { 59 PotvinEncod ing solution = move.Individual as PotvinEncoding;59 PotvinEncodedSolution solution = move.Individual as PotvinEncodedSolution; 60 60 61 61 Tour route1 = solution.Tours[move.Tour1]; … … 78 78 } 79 79 80 public static void Apply(PotvinEncod ingsolution, PotvinTwoOptStarMove move, IVRPProblemInstance problemInstance) {80 public static void Apply(PotvinEncodedSolution solution, PotvinTwoOptStarMove move, IVRPProblemInstance problemInstance) { 81 81 List<int> segmentX1; 82 82 List<int> segmentX2; … … 98 98 PotvinTwoOptStarMove move = TwoOptStarMoveParameter.ActualValue; 99 99 100 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;100 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 101 101 Apply(newSolution, move, ProblemInstance); 102 102 newSolution.Repair(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuCriterion.cs
r17226 r17698 45 45 get { return TwoOptStarMoveParameter; } 46 46 } 47 public ILookupParameter<IVRPEncod ing> VRPToursParameter {48 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }47 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 48 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 49 49 } 50 50 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 89 89 : base() { 90 90 Parameters.Add(new LookupParameter<PotvinTwoOptStarMove>("PotvinTwoOptStarMove", "The moves that should be made.")); 91 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));91 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 92 92 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 93 93 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMoveTabuMaker.cs
r17226 r17698 57 57 get { return TwoOptStarMoveParameter; } 58 58 } 59 public ILookupParameter<IVRPEncod ing> VRPToursParameter {60 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }59 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 60 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 61 61 } 62 62 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 86 86 87 87 Parameters.Add(new LookupParameter<PotvinTwoOptStarMove>("PotvinTwoOptStarMove", "The moves that should be made.")); 88 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));88 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 89 89 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 90 90 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/TwoOptStar/PotvinTwoOptStarSingleMoveGenerator.cs
r17226 r17698 61 61 } 62 62 63 public static PotvinTwoOptStarMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {63 public static PotvinTwoOptStarMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 64 64 int route1Idx = rand.Next(individual.Tours.Count); 65 65 int route2Idx = rand.Next(individual.Tours.Count - 1); … … 76 76 } 77 77 78 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {78 protected override PotvinTwoOptStarMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 79 79 List<PotvinTwoOptStarMove> result = new List<PotvinTwoOptStarMove>(); 80 80 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentExhaustiveMoveGenerator.cs
r17226 r17698 46 46 } 47 47 48 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {48 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 49 49 List<PotvinVehicleAssignmentMove> result = new List<PotvinVehicleAssignmentMove>(); 50 50 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMove.cs
r17226 r17698 32 32 public class PotvinVehicleAssignmentMove : Item, IVRPMove { 33 33 [Storable] 34 public IVRPEncod ingIndividual { get; protected set; }34 public IVRPEncodedSolution Individual { get; protected set; } 35 35 36 36 [Storable] … … 49 49 } 50 50 51 public PotvinVehicleAssignmentMove(int tour1, int tour2, PotvinEncod ingindividual) {51 public PotvinVehicleAssignmentMove(int tour1, int tour2, PotvinEncodedSolution individual) { 52 52 Tour1 = tour1; 53 53 Tour2 = tour2; 54 54 55 this.Individual = individual.Clone() as PotvinEncod ing;55 this.Individual = individual.Clone() as PotvinEncodedSolution; 56 56 } 57 57 … … 65 65 this.Tour2 = original.Tour2; 66 66 67 this.Individual = cloner.Clone(Individual) as PotvinEncod ing;67 this.Individual = cloner.Clone(Individual) as PotvinEncodedSolution; 68 68 } 69 69 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveEvaluator.cs
r17226 r17698 56 56 PotvinVehicleAssignmentMove move = VehicleAssignmentMoveParameter.ActualValue; 57 57 58 PotvinEncod ing newSolution = VehicleAssignmentMoveParameter.ActualValue.Individual.Clone() as PotvinEncoding;58 PotvinEncodedSolution newSolution = VehicleAssignmentMoveParameter.ActualValue.Individual.Clone() as PotvinEncodedSolution; 59 59 PotvinVehicleAssignmentMoveMaker.Apply(newSolution, move, ProblemInstance); 60 60 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveGenerator.cs
r17226 r17698 55 55 } 56 56 57 protected abstract PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance);57 protected abstract PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance); 58 58 59 59 public override IOperation InstrumentedApply() { 60 60 IOperation next = base.InstrumentedApply(); 61 61 62 PotvinEncod ing individual = VRPToursParameter.ActualValue as PotvinEncoding;62 PotvinEncodedSolution individual = VRPToursParameter.ActualValue as PotvinEncodedSolution; 63 63 PotvinVehicleAssignmentMove[] moves = GenerateMoves(individual, ProblemInstance); 64 64 Scope[] moveScopes = new Scope[moves.Length]; -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveMaker.cs
r17226 r17698 67 67 } 68 68 69 public static void Apply(PotvinEncod ingsolution, PotvinVehicleAssignmentMove move, IVRPProblemInstance problemInstance) {69 public static void Apply(PotvinEncodedSolution solution, PotvinVehicleAssignmentMove move, IVRPProblemInstance problemInstance) { 70 70 int vehicle1 = solution.VehicleAssignment[move.Tour1]; 71 71 int vehicle2 = solution.VehicleAssignment[move.Tour2]; … … 78 78 PotvinVehicleAssignmentMove move = VehicleAssignmentMoveParameter.ActualValue; 79 79 80 PotvinEncod ing newSolution = move.Individual.Clone() as PotvinEncoding;80 PotvinEncodedSolution newSolution = move.Individual.Clone() as PotvinEncodedSolution; 81 81 Apply(newSolution, move, ProblemInstance); 82 82 newSolution.Repair(); -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveTabuCriterion.cs
r17226 r17698 44 44 get { return VehicleAssignmentMoveParameter; } 45 45 } 46 public ILookupParameter<IVRPEncod ing> VRPToursParameter {47 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }46 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 47 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 48 48 } 49 49 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 88 88 : base() { 89 89 Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "The moves that should be made.")); 90 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));90 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 91 91 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 92 92 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMoveTabuMaker.cs
r17226 r17698 56 56 get { return VehicleAssignmentMoveParameter; } 57 57 } 58 public ILookupParameter<IVRPEncod ing> VRPToursParameter {59 get { return (ILookupParameter<IVRPEncod ing>)Parameters["VRPTours"]; }58 public ILookupParameter<IVRPEncodedSolution> VRPToursParameter { 59 get { return (ILookupParameter<IVRPEncodedSolution>)Parameters["VRPTours"]; } 60 60 } 61 61 public ILookupParameter<IVRPProblemInstance> ProblemInstanceParameter { … … 85 85 86 86 Parameters.Add(new LookupParameter<PotvinVehicleAssignmentMove>("PotvinVehicleAssignmentMove", "The moves that should be made.")); 87 Parameters.Add(new LookupParameter<IVRPEncod ing>("VRPTours", "The VRP tours considered in the move."));87 Parameters.Add(new LookupParameter<IVRPEncodedSolution>("VRPTours", "The VRP tours considered in the move.")); 88 88 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 89 89 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentMultiMoveGenerator.cs
r17226 r17698 59 59 } 60 60 61 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {61 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 62 62 List<PotvinVehicleAssignmentMove> result = new List<PotvinVehicleAssignmentMove>(); 63 63 -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/VehicleAssignment/PotvinVehicleAssignmentSingleMoveGenerator.cs
r17226 r17698 61 61 } 62 62 63 public static PotvinVehicleAssignmentMove Apply(PotvinEncod ingindividual, IVRPProblemInstance problemInstance, IRandom rand) {63 public static PotvinVehicleAssignmentMove Apply(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance, IRandom rand) { 64 64 if (individual.Tours.Count > 1) { 65 65 int tour1 = rand.Next(individual.Tours.Count); … … 75 75 } 76 76 77 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncod ingindividual, IVRPProblemInstance problemInstance) {77 protected override PotvinVehicleAssignmentMove[] GenerateMoves(PotvinEncodedSolution individual, IVRPProblemInstance problemInstance) { 78 78 List<PotvinVehicleAssignmentMove> result = new List<PotvinVehicleAssignmentMove>(); 79 79
Note: See TracChangeset
for help on using the changeset viewer.