Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/12/10 18:42:54 (12 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/SimpleLocalSearchMoveEvaluator.cs

    r4204 r4205  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
     27using HeuristicLab.Data;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting {
     
    4243    }
    4344
    44     protected override TourEvaluation GetMoveQuality() {
    45       SimpleLocalSearchMove move = SimpleLocalSearchMoveParameter.ActualValue;
    46       //perform move
    47       AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding;
     45    public static TourEvaluation GetMoveQuality(AlbaEncoding individual, SimpleLocalSearchMove move,
     46      DoubleArray dueTimeArray, DoubleArray serviceTimeArray, DoubleArray readyTimeArray,
     47      DoubleArray demandArray, DoubleValue capacity, DoubleMatrix coordinates,
     48      DoubleValue fleetUsageFactor, DoubleValue timeFactor, DoubleValue distanceFactor,
     49      DoubleValue overloadPenalty, DoubleValue tardinessPenalty,
     50      ILookupParameter<DoubleMatrix> distanceMatrix, Data.BoolValue useDistanceMatrix) {
     51      AlbaEncoding newSolution = individual.Clone() as AlbaEncoding;
    4852      SimpleLocalSearchMoveMaker.Apply(newSolution, move);
    4953
    5054      return VRPEvaluator.Evaluate(
    51         newSolution,
     55        newSolution, dueTimeArray, serviceTimeArray, readyTimeArray,
     56        demandArray, capacity, fleetUsageFactor, timeFactor, distanceFactor,
     57        overloadPenalty, tardinessPenalty, coordinates, distanceMatrix, useDistanceMatrix);
     58    }
     59
     60    protected override TourEvaluation GetMoveQuality() {
     61      return GetMoveQuality(
     62        VRPToursParameter.ActualValue as AlbaEncoding, SimpleLocalSearchMoveParameter.ActualValue,
    5263        DueTimeParameter.ActualValue, ServiceTimeParameter.ActualValue, ReadyTimeParameter.ActualValue,
    53         DemandParameter.ActualValue, CapacityParameter.ActualValue,
    54         FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue, TardinessPenalty.ActualValue,
    55         CoordinatesParameter.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
     64        DemandParameter.ActualValue, CapacityParameter.ActualValue, CoordinatesParameter.ActualValue,
     65        FleetUsageFactor.ActualValue, TimeFactor.ActualValue, DistanceFactor.ActualValue, OverloadPenalty.ActualValue,
     66        TardinessPenalty.ActualValue, DistanceMatrixParameter, UseDistanceMatrixParameter.ActualValue);
    5667    }
    5768  }
Note: See TracChangeset for help on using the changeset viewer.