Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/09/10 18:08:14 (14 years ago)
Author:
svonolfe
Message:

Refactored VRP based on the code review (#1039)

Location:
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin
Files:
1 deleted
2 edited
3 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinCrossover.cs

    r4174 r4179  
    2929
    3030namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     31  [Item("PotvinCrossover", "A VRP crossover operation on a Potvin encoding.")]
    3132  [StorableClass]
    3233  public abstract class PotvinCrossover : VRPCrossover, IStochasticOperator {
     
    3435      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3536    }
     37
     38    [StorableConstructor]
     39    protected PotvinCrossover(bool deserializing) : base(deserializing) { }
    3640
    3741    public PotvinCrossover() {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/SequenceBasedCrossover.cs

    r4177 r4179  
    2727
    2828namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    29   [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
     29  [Item("SequenceBasedCrossover", "The SBX crossover for the Potvin VRP representations.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
    3030  [StorableClass]
    31   public sealed class PotvinSBXCrossover : PotvinCrossover {
     31  public sealed class SequenceBasedCrossover : PotvinCrossover {
     32    [StorableConstructor]
     33    private SequenceBasedCrossover(bool deserializing) : base(deserializing) { }
     34
     35    public SequenceBasedCrossover()
     36      : base() { }
     37   
    3238    private Tour FindRoute(PotvinEncoding solution, int city) {
    3339      Tour found = null;
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/OneLevelExchangeManipulator.cs

    r4177 r4179  
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    30   [Item("Potvin1MMainpulator", "The one-level exchange operator which manipulates a Potvin VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
     30  [Item("OneLevelExchangeMainpulator", "The 1M operator which manipulates a Potvin VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
    3131  [StorableClass]
    32   public sealed class Potvin1MMainpulator : PotvinManipulator {
     32  public sealed class OneLevelExchangeMainpulator : PotvinManipulator {
     33    [StorableConstructor]
     34    private OneLevelExchangeMainpulator(bool deserializing) : base(deserializing) { }
     35
     36    public OneLevelExchangeMainpulator() : base() { }
     37   
    3338    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
    3439      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs

    r4174 r4179  
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     30  [Item("PotvinManipulator", "A VRP manipulation operation on a Potvin encoding.")]
    3031  [StorableClass]
    3132  public abstract class PotvinManipulator : VRPManipulator, IStochasticOperator {
     
    3334      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
    3435    }
     36
     37    [StorableConstructor]
     38    protected PotvinManipulator(bool deserializing) : base(deserializing) { }
    3539
    3640    public PotvinManipulator() {
     
    7680   
    7781    public override IOperation Apply() {
    78       IVRPEncoding solution = VRPSolutionParameter.ActualValue;
     82      IVRPEncoding solution = VRPToursParameter.ActualValue;
    7983      if (!(solution is PotvinEncoding)) {
    80         VRPSolutionParameter.ActualValue = PotvinEncoding.ConvertFrom(solution);
     84        VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(solution);
    8185      }
    8286     
    83       Manipulate(RandomParameter.ActualValue, VRPSolutionParameter.ActualValue as PotvinEncoding);
     87      Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncoding);
    8488
    8589      return base.Apply();
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/TwoLevelExchangeManipulator.cs

    r4177 r4179  
    2828
    2929namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
    30   [Item("Potvin2MMainpulator", "The two-level exchange operator which manipulates a Potvin VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
     30  [Item("TwoLevelExchangeOperator", "The 2M operator which manipulates a Potvin VRP representation.  It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")]
    3131  [StorableClass]
    32   public sealed class Potvin2MMainpulator : PotvinManipulator {
     32  public sealed class TwoLevelExchangeOperator : PotvinManipulator {
     33    [StorableConstructor]
     34    private TwoLevelExchangeOperator(bool deserializing) : base(deserializing) { }
     35
     36    public TwoLevelExchangeOperator(): base() { }
     37   
    3338    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
    3439      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
Note: See TracChangeset for help on using the changeset viewer.