- Timestamp:
- 11/09/10 09:55:31 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/BestAverageWorstVRPToursAnalyzer.cs
r4374 r4752 178 178 private BestAverageWorstVRPToursAnalyzer(bool deserializing) : base() { } 179 179 180 public override IDeepCloneable Clone(Cloner cloner) { 181 return new BestAverageWorstVRPToursAnalyzer(this, cloner); 182 } 183 184 private BestAverageWorstVRPToursAnalyzer(BestAverageWorstVRPToursAnalyzer original, Cloner cloner) 185 : base(original, cloner) { 186 this.Initialize(); 187 } 188 180 189 [StorableHook(HookType.AfterDeserialization)] 181 190 private void Initialize() { … … 184 193 } 185 194 186 public override IDeepCloneable Clone(Cloner cloner) {187 BestAverageWorstVRPToursAnalyzer clone = (BestAverageWorstVRPToursAnalyzer)base.Clone(cloner);188 clone.Initialize();189 return clone;190 }191 192 195 void DistanceParameter_DepthChanged(object sender, EventArgs e) { 193 196 BestAverageWorstCalculator.DistanceParameter.Depth = DistanceParameter.Depth; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/BestAverageWorstVRPToursCalculator.cs
r4374 r4752 25 25 using HeuristicLab.Parameters; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting { … … 67 68 Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageVehiclesUtilized", "The average utilized vehicles value of all solutions.")); 68 69 Parameters.Add(new ValueLookupParameter<DoubleValue>("WorstVehiclesUtilized", "The worst utilized vehicles value of all solutions.")); 70 } 71 72 [StorableConstructor] 73 private BestAverageWorstVRPToursCalculator(bool deserializing) : base(deserializing) { } 74 75 public override IDeepCloneable Clone(Cloner cloner) { 76 return new BestAverageWorstVRPToursCalculator(this, cloner); 77 } 78 79 private BestAverageWorstVRPToursCalculator(BestAverageWorstVRPToursCalculator original, Cloner cloner) 80 : base(original, cloner) { 69 81 } 70 82 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/BestVRPToursMemorizer.cs
r4374 r4752 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting { … … 55 56 } 56 57 58 [StorableConstructor] 59 protected BestVRPToursMemorizer(bool deserializing) : base(deserializing) { } 60 61 public override IDeepCloneable Clone(Cloner cloner) { 62 return new BestVRPToursMemorizer(this, cloner); 63 } 64 65 protected BestVRPToursMemorizer(BestVRPToursMemorizer original, Cloner cloner) 66 : base(original, cloner) { 67 } 68 57 69 public override IOperation Apply() { 58 70 int i = DistanceParameter.ActualValue.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/Capacitated/BestAverageWorstCapacitatedVRPToursAnalyzer.cs
r4376 r4752 137 137 138 138 public override IDeepCloneable Clone(Cloner cloner) { 139 BestAverageWorstCapaciatatedVRPToursAnalyzer clone = (BestAverageWorstCapaciatatedVRPToursAnalyzer)base.Clone(cloner); 140 clone.Initialize(); 141 return clone; 139 return new BestAverageWorstCapaciatatedVRPToursAnalyzer(this, cloner); 140 } 141 142 private BestAverageWorstCapaciatatedVRPToursAnalyzer(BestAverageWorstCapaciatatedVRPToursAnalyzer original, Cloner cloner) 143 : base(original, cloner) { 144 this.Initialize(); 142 145 } 143 146 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/Capacitated/BestAverageWorstCapacitatedVRPToursCalculator.cs
r4374 r4752 25 25 using HeuristicLab.Parameters; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting { … … 50 51 Parameters.Add(new ValueLookupParameter<DoubleValue>("WorstOverload", "The worst overload value of all solutions.")); 51 52 } 53 54 public override IDeepCloneable Clone(Cloner cloner) { 55 return new BestAverageWorstCapacitatedVRPToursCalculator(this, cloner); 56 } 57 58 private BestAverageWorstCapacitatedVRPToursCalculator(BestAverageWorstCapacitatedVRPToursCalculator original, Cloner cloner) 59 : base(original, cloner) { 60 } 61 62 [StorableConstructor] 63 private BestAverageWorstCapacitatedVRPToursCalculator(bool deserializing) : base(deserializing) { } 52 64 53 65 private void UpdateOverloads() { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/Capacitated/BestCapacitatedVRPToursMemorizer.cs
r4374 r4752 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting { … … 46 47 } 47 48 49 public override IDeepCloneable Clone(Cloner cloner) { 50 return new BestCapacitatedVRPToursMemorizer(this, cloner); 51 } 52 53 protected BestCapacitatedVRPToursMemorizer(BestCapacitatedVRPToursMemorizer original, Cloner cloner) 54 : base(original, cloner) { 55 } 56 57 [StorableConstructor] 58 protected BestCapacitatedVRPToursMemorizer(bool deserializing) : base(deserializing) { } 59 48 60 public override IOperation Apply() { 49 61 int i = OverloadParameter.ActualValue.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/TimeWindowed/BestAverageWorstTimeWindowedVRPToursAnalyzer.cs
r4374 r4752 185 185 186 186 public override IDeepCloneable Clone(Cloner cloner) { 187 BestAverageWorstTimeWindowedVRPToursAnalyzer clone = (BestAverageWorstTimeWindowedVRPToursAnalyzer)base.Clone(cloner); 188 clone.Initialize(); 189 return clone; 187 return new BestAverageWorstTimeWindowedVRPToursAnalyzer(this, cloner); 188 } 189 190 private BestAverageWorstTimeWindowedVRPToursAnalyzer(BestAverageWorstTimeWindowedVRPToursAnalyzer original, Cloner cloner) 191 : base(original, cloner) { 192 this.Initialize(); 190 193 } 191 194 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/TimeWindowed/BestAverageWorstTimeWindowedVRPToursCalculator.cs
r4374 r4752 25 25 using HeuristicLab.Parameters; 26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Common; 27 28 28 29 namespace HeuristicLab.Problems.VehicleRouting { … … 67 68 Parameters.Add(new ValueLookupParameter<DoubleValue>("AverageTravelTime", "The average travel time value of all solutions.")); 68 69 Parameters.Add(new ValueLookupParameter<DoubleValue>("WorstTravelTime", "The worst travel time value of all solutions.")); 70 } 71 72 [StorableConstructor] 73 private BestAverageWorstTimeWindowedVRPToursCalculator(bool deserializing) : base(deserializing) { } 74 75 public override IDeepCloneable Clone(Cloner cloner) { 76 return new BestAverageWorstTimeWindowedVRPToursCalculator(this, cloner); 77 } 78 79 private BestAverageWorstTimeWindowedVRPToursCalculator(BestAverageWorstTimeWindowedVRPToursCalculator original, Cloner cloner) 80 : base(original, cloner) { 69 81 } 70 82 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestAverageWorstTours/TimeWindowed/BestTimeWindowedVRPToursMemorizer.cs
r4374 r4752 26 26 using HeuristicLab.Parameters; 27 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting { … … 69 70 return base.Apply(); 70 71 } 72 73 [StorableConstructor] 74 protected BestTimeWindowedVRPToursMemorizer(bool deserializing) : base(deserializing) { } 75 76 public override IDeepCloneable Clone(Cloner cloner) { 77 return new BestTimeWindowedVRPToursMemorizer(this, cloner); 78 } 79 80 protected BestTimeWindowedVRPToursMemorizer(BestTimeWindowedVRPToursMemorizer original, Cloner cloner) 81 : base(original, cloner) { 82 } 71 83 } 72 84 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/BestVRPSolutionAnalyzer.cs
r4374 r4752 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 30 using HeuristicLab.Problems.VehicleRouting.Variants; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting { … … 77 78 } 78 79 80 public override IDeepCloneable Clone(Cloner cloner) { 81 return new BestVRPSolutionAnalyzer(this, cloner); 82 } 83 84 private BestVRPSolutionAnalyzer(BestVRPSolutionAnalyzer original, Cloner cloner) 85 : base(original, cloner) { 86 } 87 79 88 public override IOperation Apply() { 80 89 IVRPProblemInstance problemInstance = ProblemInstanceParameter.ActualValue; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/Capacitated/BestCapacitatedVRPSolutionAnalyzer.cs
r4454 r4752 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 30 using HeuristicLab.Problems.VehicleRouting.Variants; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting { … … 73 74 } 74 75 76 public override IDeepCloneable Clone(Cloner cloner) { 77 return new BestCapacitatedVRPSolutionAnalyzer(this, cloner); 78 } 79 80 private BestCapacitatedVRPSolutionAnalyzer(BestCapacitatedVRPSolutionAnalyzer original, Cloner cloner) 81 : base(original, cloner) { 82 } 83 75 84 public override IOperation Apply() { 76 85 ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/BestSolution/TimeWindowed/BestTimeWindowedVRPSolutionAnalyzer.cs
r4454 r4752 29 29 using HeuristicLab.Problems.VehicleRouting.Interfaces; 30 30 using HeuristicLab.Problems.VehicleRouting.Variants; 31 using HeuristicLab.Common; 31 32 32 33 namespace HeuristicLab.Problems.VehicleRouting { … … 77 78 } 78 79 80 public override IDeepCloneable Clone(Cloner cloner) { 81 return new BestTimeWindowedVRPSolutionAnalyzer(this, cloner); 82 } 83 84 private BestTimeWindowedVRPSolutionAnalyzer(BestTimeWindowedVRPSolutionAnalyzer original, Cloner cloner) 85 : base(original, cloner) { 86 } 87 79 88 public override IOperation Apply() { 80 89 ItemArray<IVRPEncoding> solutions = VRPToursParameter.ActualValue; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Analyzer/VRPSolution.cs
r4374 r4752 99 99 } 100 100 101 101 102 public override IDeepCloneable Clone(Cloner cloner) { 102 VRPSolution clone = new VRPSolution(); 103 cloner.RegisterClonedObject(this, clone); 104 clone.problemInstance = (IVRPProblemInstance)cloner.Clone(problemInstance); 105 clone.solution = (IVRPEncoding)cloner.Clone(solution); 106 clone.quality = (DoubleValue)cloner.Clone(quality); 107 108 clone.Initialize(); 109 return clone; 103 return new VRPSolution(this, cloner); 104 } 105 106 private VRPSolution(VRPSolution original, Cloner cloner) 107 : base(original, cloner) { 108 this.problemInstance = (IVRPProblemInstance)cloner.Clone(original.problemInstance); 109 this.solution = (IVRPEncoding)cloner.Clone(original.solution); 110 this.quality = (DoubleValue)cloner.Clone(original.quality); 111 112 this.Initialize(); 110 113 } 111 114
Note: See TracChangeset
for help on using the changeset viewer.