- Timestamp:
- 09/10/10 13:00:54 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/AlbaMoveMaker.cs
r4369 r4378 39 39 : base() { 40 40 } 41 42 public override IOperation Apply() {43 IVRPEncoding solution = VRPToursParameter.ActualValue;44 if (!(solution is AlbaEncoding)) {45 //VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value,46 // DistanceMatrixParameter);47 }48 49 return base.Apply();50 }51 41 } 52 42 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/PotvinEncoding.cs
r4376 r4378 99 99 for (int tour = 0; tour < Tours.Count; tour++) { 100 100 if (tour != routeToAvoid) { 101 double length = GetTourLength(Tours[tour]); 102 101 103 for (int i = 0; i <= Tours[tour].Stops.Count; i++) { 102 double length = GetTourLength(Tours[tour]);103 104 104 Tours[tour].Stops.Insert(i, city); 105 105 106 if (ProblemInstance.Feasible(Tours[tour])) { 107 double newLength = GetTourLength(Tours[tour]); 106 VRPEvaluation eval = ProblemInstance.EvaluatorParameter.Value.Evaluate( 107 ProblemInstance, Tours[tour]); 108 if (ProblemInstance.EvaluatorParameter.Value.Feasible(eval)) { 109 double newLength = eval.Distance; 108 110 109 111 double detour = newLength - length;
Note: See TracChangeset
for help on using the changeset viewer.