Changeset 17698 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange
- Timestamp:
- 07/24/20 00:58:42 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Moves/PickupDelivery/PDRearrange
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.