Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/12/10 18:42:54 (14 years ago)
Author:
svonolfe
Message:

Added MultiVRPMove (#1039)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/SimpleLocalSearch/SimpleLocalSearchMove.cs

    r4204 r4205  
    2424using HeuristicLab.Encodings.PermutationEncoding;
    2525using HeuristicLab.Common;
     26using HeuristicLab.Problems.VehicleRouting.Encodings.General;
     27using HeuristicLab.Data;
    2628
    2729namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    2830  [Item("InversionMove", "Item that describes a simple local search move on an Alba VRP representation.")]
    2931  [StorableClass]
    30   public class SimpleLocalSearchMove : TwoIndexMove {
     32  public class SimpleLocalSearchMove : TwoIndexMove, IVRPMove {
    3133    public SimpleLocalSearchMove()
    3234      : base() {
     
    5153      return clone;
    5254    }
     55
     56    #region IVRPMove Members
     57
     58    public TourEvaluation GetMoveQuality(
     59      IVRPEncoding individual,
     60      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray,
     61      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
     62      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
     63      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
     64      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
     65        return SimpleLocalSearchMoveEvaluator.GetMoveQuality(individual as AlbaEncoding, this,
     66          dueTimeArray, serviceTimeArray, readyTimeArray, demandArray, capacity,
     67          coordinates, fleetUsageFactor, timeFactor, distanceFactor,
     68          overloadPenalty, tardinessPenalty, distanceMatrix, useDistanceMatrix);
     69    }
     70
     71    public void MakeMove(IRandom random, IVRPEncoding individual) {
     72      SimpleLocalSearchMoveMaker.Apply(individual as AlbaEncoding, this);
     73    }
     74
     75    #endregion
    5376  }
    5477}
Note: See TracChangeset for help on using the changeset viewer.