Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/13/10 13:54:30 (14 years ago)
Author:
svonolfe
Message:

Improved moves, fixed behavior for SA (#1177)

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  
    4848
    4949    protected override void EvaluateMove() {
    50       AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;
     50      AlbaEncoding newSolution = IntraRouteInversionMoveParameter.ActualValue.Permutation.Clone() as AlbaEncoding;
    5151      AlbaIntraRouteInversionMoveMaker.Apply(newSolution, IntraRouteInversionMoveParameter.ActualValue);
    5252
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs

    r4370 r4383  
    2929
    3030namespace 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.")]
    3232  [StorableClass]
    3333  public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove {
     
    4343
    4444    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     }
    4847
    4948    public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) {
     
    5251
    5352      if (Permutation != null)
    54         clone.Permutation = (AlbaEncoding)cloner.Clone(Permutation);
     53        clone.Permutation = Permutation.Clone() as AlbaEncoding;
    5554
    5655      cloner.RegisterClonedObject(this, clone);
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMoveMaker.cs

    r4370 r4383  
    5454      AlbaIntraRouteInversionMove move = IntraRouteInversionMoveParameter.ActualValue;
    5555
    56       Apply(VRPToursParameter.ActualValue as AlbaEncoding, move);
     56      Apply(move.Individual as AlbaEncoding, move);
     57      VRPToursParameter.ActualValue = move.Individual as AlbaEncoding;
    5758    }
    5859  }
Note: See TracChangeset for help on using the changeset viewer.