Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/18/14 08:57:37 (11 years ago)
Author:
svonolfe
Message:

added static apply methods to VRP operators (#2152)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Potvin/Manipulators/PotvinOneLevelExchangeManipulator.cs

    r9456 r10460  
    2323using HeuristicLab.Core;
    2424using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2526
    2627namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     
    4142    }
    4243
    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);
    4746      if (selectedIndex >= 0) {
    4847        Tour route1 =
     
    6867      }
    6968    }
     69
     70    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
     71      bool allowInfeasible = AllowInfeasibleSolutions.Value.Value;
     72      ApplyManipulation(random, individual, ProblemInstance, allowInfeasible);     
     73    }
    7074  }
    7175}
Note: See TracChangeset for help on using the changeset viewer.