Changeset 4179 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators
- Timestamp:
- 08/09/10 18:08:14 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators
- Files:
-
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
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.