Changeset 4383 for branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion
- Timestamp:
- 09/13/10 13:54:30 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionEvaluator.cs
r4370 r4383 48 48 49 49 protected override void EvaluateMove() { 50 AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;50 AlbaEncoding newSolution = IntraRouteInversionMoveParameter.ActualValue.Permutation.Clone() as AlbaEncoding; 51 51 AlbaIntraRouteInversionMoveMaker.Apply(newSolution, IntraRouteInversionMoveParameter.ActualValue); 52 52 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs
r4370 r4383 29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 31 [Item(" IntraRouteInversionMove", "Item that describes an intra route inversion move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")]31 [Item("AlbaIntraRouteInversionMove", "Item that describes an intra route inversion move on a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 32 32 [StorableClass] 33 33 public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove { … … 43 43 44 44 public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation) 45 : base(index1, index2, permutation) { 46 this.Permutation = permutation.Clone() as AlbaEncoding; 47 } 45 : base(index1, index2, permutation.Clone() as AlbaEncoding) { 46 } 48 47 49 48 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { … … 52 51 53 52 if (Permutation != null) 54 clone.Permutation = (AlbaEncoding)cloner.Clone(Permutation);53 clone.Permutation = Permutation.Clone() as AlbaEncoding; 55 54 56 55 cloner.RegisterClonedObject(this, clone); -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs
r4370 r4383 54 54 AlbaIntraRouteInversionMove move = IntraRouteInversionMoveParameter.ActualValue; 55 55 56 Apply(VRPToursParameter.ActualValue as AlbaEncoding, move); 56 Apply(move.Individual as AlbaEncoding, move); 57 VRPToursParameter.ActualValue = move.Individual as AlbaEncoding; 57 58 } 58 59 }
Note: See TracChangeset
for help on using the changeset viewer.