Changeset 10483 for branches/LogResidualEvaluator/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.cs
- Timestamp:
- 02/20/14 14:56:39 (11 years ago)
- Location:
- branches/LogResidualEvaluator
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/LogResidualEvaluator
- Property svn:mergeinfo changed
-
branches/LogResidualEvaluator/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
-
branches/LogResidualEvaluator/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.cs
r9456 r10483 23 23 using HeuristicLab.Core; 24 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 using HeuristicLab.Problems.VehicleRouting.Interfaces; 25 26 26 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { … … 41 42 } 42 43 43 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 44 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 45 46 int selectedIndex = SelectRandomTourBiasedByLength(random, individual); 44 public static void ApplyManipulation(IRandom random, PotvinEncoding individual, IVRPProblemInstance instance, bool allowInfeasible) { 45 int selectedIndex = SelectRandomTourBiasedByLength(random, individual, instance); 47 46 if (selectedIndex >= 0) { 48 47 Tour route1 = individual.Tours[selectedIndex]; … … 63 62 route1.Stops.RemoveAt(customer1Position); 64 63 65 if ( ProblemInstance.TourFeasible(tour, individual)) {64 if (instance.TourFeasible(tour, individual)) { 66 65 int routeIdx, place; 67 66 if (FindInsertionPlace(individual, … … 92 91 } 93 92 } 93 94 95 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 96 bool allowInfeasible = AllowInfeasibleSolutions.Value.Value; 97 98 ApplyManipulation(random, individual, ProblemInstance, allowInfeasible); 99 } 94 100 } 95 101 }
Note: See TracChangeset
for help on using the changeset viewer.