Changeset 4520 for branches/VRP/HeuristicLab.Problems.VehicleRouting
- Timestamp:
- 09/27/10 16:00:18 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPEvaluator.cs
r4378 r4520 93 93 } 94 94 95 protected override void UpdateResultParameters(VRPEvaluation tourEvaluation) {96 base. UpdateResultParameters(tourEvaluation);95 protected override void SetResultParameters(VRPEvaluation tourEvaluation) { 96 base.SetResultParameters(tourEvaluation); 97 97 98 OverloadParameter.ActualValue.Value += (tourEvaluation as CVRPEvaluation).Overload;98 OverloadParameter.ActualValue.Value = (tourEvaluation as CVRPEvaluation).Overload; 99 99 } 100 100 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/SingleDepotVRP/CVRP/CVRPTW/CVRPTWEvaluator.cs
r4378 r4520 130 130 } 131 131 132 protected override void UpdateResultParameters(VRPEvaluation tourEvaluation) {133 base. UpdateResultParameters(tourEvaluation);132 protected override void SetResultParameters(VRPEvaluation tourEvaluation) { 133 base.SetResultParameters(tourEvaluation); 134 134 135 TardinessParameter.ActualValue.Value += (tourEvaluation as CVRPTWEvaluation).Tardiness;136 TravelTimeParameter.ActualValue.Value += (tourEvaluation as CVRPTWEvaluation).TravelTime;135 TardinessParameter.ActualValue.Value = (tourEvaluation as CVRPTWEvaluation).Tardiness; 136 TravelTimeParameter.ActualValue.Value = (tourEvaluation as CVRPTWEvaluation).TravelTime; 137 137 } 138 138 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/ProblemInstances/VRPEvaluator.cs
r4378 r4520 78 78 } 79 79 80 protected virtual void UpdateResultParameters(VRPEvaluation tourEvaluation) {81 QualityParameter.ActualValue.Value += tourEvaluation.Quality;82 VehcilesUtilizedParameter.ActualValue.Value += tourEvaluation.VehicleUtilization;83 DistanceParameter.ActualValue.Value += tourEvaluation.Distance;80 protected virtual void SetResultParameters(VRPEvaluation tourEvaluation) { 81 QualityParameter.ActualValue.Value = tourEvaluation.Quality; 82 VehcilesUtilizedParameter.ActualValue.Value = tourEvaluation.VehicleUtilization; 83 DistanceParameter.ActualValue.Value = tourEvaluation.Distance; 84 84 } 85 85 … … 111 111 112 112 public override IOperation Apply() { 113 double quality = 0;114 113 InitResultParameters(); 115 114 115 VRPEvaluation evaluation = CreateTourEvaluation(); 116 116 foreach (Tour tour in VRPToursParameter.ActualValue.GetTours()) { 117 VRPEvaluation tourEvaluation = EvaluateTour(ProblemInstance, tour); 118 quality += tourEvaluation.Quality; 117 EvaluateTour(evaluation, ProblemInstance, tour); 118 } 119 SetResultParameters(evaluation); 119 120 120 UpdateResultParameters(tourEvaluation); 121 } 122 123 QualityParameter.ActualValue = new DoubleValue(quality); 121 QualityParameter.ActualValue = new DoubleValue(evaluation.Quality); 124 122 125 123 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.