Changeset 17708 for branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
- Timestamp:
- 08/03/20 08:44:52 (4 years ago)
- Location:
- branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPPDTW/CVRPPDTWEvaluation.cs
r17226 r17708 21 21 22 22 using System.Collections.Generic; 23 using System.Linq; 24 using HEAL.Attic; 25 using HeuristicLab.Common; 26 using HeuristicLab.Core; 23 27 24 28 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 29 [Item("CVRPPDTWInsertionInfo", "")] 30 [StorableType("acb4ecf2-70a5-42ec-a2a5-68b11bd033e2")] 25 31 public class CVRPPDTWInsertionInfo : CVRPTWInsertionInfo { 26 private List<int> visited; 32 [Storable] public List<int> Visited { get; private set; } 33 [Storable] public double ArrivalSpareCapacity { get; private set; } 27 34 28 public List<int> Visited { 29 get { return visited; } 35 [StorableConstructor] 36 protected CVRPPDTWInsertionInfo(StorableConstructorFlag _) : base(_) { } 37 protected CVRPPDTWInsertionInfo(CVRPPDTWInsertionInfo original, Cloner cloner) 38 : base(original, cloner) { 39 Visited = original.Visited.ToList(); 40 ArrivalSpareCapacity = original.ArrivalSpareCapacity; 30 41 } 31 32 private double arrivalSpareCapacity;33 34 public double ArrivalSpareCapacity {35 get { return arrivalSpareCapacity; }36 }37 38 42 public CVRPPDTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, 39 43 double arrivalTime, double leaveTime, double spareTime, double waitingTime, List<int> visited, double arrivalSpareCapacity) 40 44 : base(start, end, spareCapacity, tourStartTime, arrivalTime, leaveTime, spareTime, waitingTime) { 41 this.visited = visited; 42 this.arrivalSpareCapacity = arrivalSpareCapacity; 45 Visited = visited; 46 ArrivalSpareCapacity = arrivalSpareCapacity; 47 } 48 49 public override IDeepCloneable Clone(Cloner cloner) { 50 return new CVRPPDTWInsertionInfo(this, cloner); 43 51 } 44 52 } 45 53 54 [Item("CVRPPDTWEvaluation", "")] 55 [StorableType("877ae91a-708f-4b32-95f3-d790e0efc018")] 46 56 public class CVRPPDTWEvaluation : CVRPTWEvaluation { 47 public int PickupViolations { get; set; } 57 [Storable] public int PickupViolations { get; set; } 58 59 [StorableConstructor] 60 protected CVRPPDTWEvaluation(StorableConstructorFlag _) : base(_) { } 61 protected CVRPPDTWEvaluation(CVRPPDTWEvaluation original, Cloner cloner) 62 : base(original, cloner) { 63 PickupViolations = original.PickupViolations; 64 } 65 public CVRPPDTWEvaluation() { } 66 67 public override IDeepCloneable Clone(Cloner cloner) { 68 return new CVRPPDTWEvaluation(this, cloner); 69 } 48 70 } 49 71 } -
branches/2521_ProblemRefactoring/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluation.cs
r17226 r17708 21 21 22 22 23 using HEAL.Attic; 24 using HeuristicLab.Common; 25 using HeuristicLab.Core; 26 23 27 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 28 [Item("CVRPTWInsertionInfo", "")] 29 [StorableType("487635b5-2682-42a2-9ec2-1a210e6ce88c")] 24 30 public class CVRPTWInsertionInfo : CVRPInsertionInfo { 25 private double tourStartTime;26 31 27 public double TourStartTime { 28 get { return tourStartTime; } 32 [Storable] public double TourStartTime { get; private set; } 33 [Storable] public double ArrivalTime { get; private set; } 34 [Storable] public double LeaveTime { get; private set; } 35 [Storable] public double SpareTime { get; private set; } 36 [Storable] public double WaitingTime { get; private set; } 37 38 39 [StorableConstructor] 40 protected CVRPTWInsertionInfo(StorableConstructorFlag _) : base(_) { } 41 protected CVRPTWInsertionInfo(CVRPTWInsertionInfo original, Cloner cloner) 42 : base(original, cloner) { 43 TourStartTime = original.TourStartTime; 44 ArrivalTime = original.ArrivalTime; 45 LeaveTime = original.LeaveTime; 46 SpareTime = original.SpareTime; 47 WaitingTime = original.WaitingTime; 29 48 } 30 31 private double arrivalTime;32 33 public double ArrivalTime {34 get { return arrivalTime; }35 }36 37 private double leaveTime;38 39 public double LeaveTime {40 get { return leaveTime; }41 }42 43 private double spareTime;44 45 public double SpareTime {46 get { return spareTime; }47 }48 49 private double waitingTime;50 51 public double WaitingTime {52 get { return waitingTime; }53 }54 55 49 public CVRPTWInsertionInfo(int start, int end, double spareCapacity, double tourStartTime, double arrivalTime, double leaveTime, double spareTime, double waitingTime) 56 50 : base(start, end, spareCapacity) { 57 this.tourStartTime = tourStartTime;58 this.arrivalTime = arrivalTime;59 this.leaveTime = leaveTime;60 this.spareTime = spareTime;61 this.waitingTime = waitingTime;51 TourStartTime = tourStartTime; 52 ArrivalTime = arrivalTime; 53 LeaveTime = leaveTime; 54 SpareTime = spareTime; 55 WaitingTime = waitingTime; 62 56 } 63 57 } 64 58 59 [Item("CVRPTWEvaluation", "")] 60 [StorableType("b3b31244-5ac8-4007-9ae6-249e2a7d5321")] 65 61 public class CVRPTWEvaluation : CVRPEvaluation { 66 public double Tardiness { get; set; } 67 public double TravelTime { get; set; } 62 [Storable] public double Tardiness { get; set; } 63 [Storable] public double TravelTime { get; set; } 64 65 [StorableConstructor] 66 protected CVRPTWEvaluation(StorableConstructorFlag _) : base(_) { } 67 protected CVRPTWEvaluation(CVRPTWEvaluation original, Cloner cloner) 68 : base(original, cloner) { 69 Tardiness = original.Tardiness; 70 TravelTime = original.TravelTime; 71 } 72 public CVRPTWEvaluation() { } 73 74 public override IDeepCloneable Clone(Cloner cloner) { 75 return new CVRPTWEvaluation(this, cloner); 76 } 68 77 } 69 78 }
Note: See TracChangeset
for help on using the changeset viewer.