- Timestamp:
- 08/09/10 18:08:14 (14 years ago)
- 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 29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 31 [Item("PotvinCrossover", "A VRP crossover operation on a Potvin encoding.")] 31 32 [StorableClass] 32 33 public abstract class PotvinCrossover : VRPCrossover, IStochasticOperator { … … 34 35 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 35 36 } 37 38 [StorableConstructor] 39 protected PotvinCrossover(bool deserializing) : base(deserializing) { } 36 40 37 41 public PotvinCrossover() { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/SequenceBasedCrossover.cs
r4177 r4179 27 27 28 28 namespace 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.")] 30 30 [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 32 38 private Tour FindRoute(PotvinEncoding solution, int city) { 33 39 Tour found = null; -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/OneLevelExchangeManipulator.cs
r4177 r4179 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 [Item(" Potvin1MMainpulator", "The one-level exchangeoperator 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.")] 31 31 [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 33 38 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 34 39 int selectedIndex = SelectRandomTourBiasedByLength(random, individual); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinManipulator.cs
r4174 r4179 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 [Item("PotvinManipulator", "A VRP manipulation operation on a Potvin encoding.")] 30 31 [StorableClass] 31 32 public abstract class PotvinManipulator : VRPManipulator, IStochasticOperator { … … 33 34 get { return (LookupParameter<IRandom>)Parameters["Random"]; } 34 35 } 36 37 [StorableConstructor] 38 protected PotvinManipulator(bool deserializing) : base(deserializing) { } 35 39 36 40 public PotvinManipulator() { … … 76 80 77 81 public override IOperation Apply() { 78 IVRPEncoding solution = VRP SolutionParameter.ActualValue;82 IVRPEncoding solution = VRPToursParameter.ActualValue; 79 83 if (!(solution is PotvinEncoding)) { 80 VRP SolutionParameter.ActualValue = PotvinEncoding.ConvertFrom(solution);84 VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(solution); 81 85 } 82 86 83 Manipulate(RandomParameter.ActualValue, VRP SolutionParameter.ActualValue as PotvinEncoding);87 Manipulate(RandomParameter.ActualValue, VRPToursParameter.ActualValue as PotvinEncoding); 84 88 85 89 return base.Apply(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/TwoLevelExchangeManipulator.cs
r4177 r4179 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 [Item(" Potvin2MMainpulator", "The two-level exchangeoperator 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.")] 31 31 [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 33 38 protected override void Manipulate(IRandom random, PotvinEncoding individual) { 34 39 int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
Note: See TracChangeset
for help on using the changeset viewer.