Changeset 6752 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluation.cs
- Timestamp:
- 09/13/11 16:00:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluation.cs
r4454 r6752 24 24 using System.Linq; 25 25 using System.Text; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Core; 28 using HeuristicLab.Common; 26 29 27 30 namespace HeuristicLab.Problems.VehicleRouting.ProblemInstances { 31 public class StopInsertionInfo { 32 private int start; 33 34 public int Start { 35 get { return start; } 36 } 37 38 private int end; 39 40 public int End { 41 get { return end; } 42 } 43 44 public StopInsertionInfo(int start, int end) 45 : base() { 46 this.start = start; 47 this.end = end; 48 } 49 } 50 51 public class TourInsertionInfo { 52 public double Penalty { get; set; } 53 54 private List<StopInsertionInfo> stopInsertionInfos; 55 56 public TourInsertionInfo() 57 : base() { 58 stopInsertionInfos = new List<StopInsertionInfo>(); 59 } 60 61 public void AddStopInsertionInfo(StopInsertionInfo info) { 62 stopInsertionInfos.Add(info); 63 } 64 65 public StopInsertionInfo GetStopInsertionInfo(int stop) { 66 return stopInsertionInfos[stop]; 67 } 68 69 public int GetStopCount() { 70 return stopInsertionInfos.Count; 71 } 72 } 73 74 public class InsertionInfo { 75 private List<TourInsertionInfo> tourInsertionInfos; 76 77 public InsertionInfo() 78 : base() { 79 tourInsertionInfos = new List<TourInsertionInfo>(); 80 } 81 82 public void AddTourInsertionInfo(TourInsertionInfo info) { 83 tourInsertionInfos.Add(info); 84 } 85 86 public TourInsertionInfo GetTourInsertionInfo(int tour) { 87 return tourInsertionInfos[tour]; 88 } 89 } 90 28 91 public class VRPEvaluation { 29 92 public double Quality { get; set; } 30 93 public double Distance { get; set; } 31 94 public int VehicleUtilization { get; set; } 95 public InsertionInfo InsertionInfo { get; set; } 32 96 33 97 public double Penalty { get; set; } 98 99 public VRPEvaluation() { 100 InsertionInfo = new InsertionInfo(); 101 } 34 102 } 35 103 }
Note: See TracChangeset
for help on using the changeset viewer.