- Timestamp:
- 08/09/10 18:08:14 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings
- Files:
-
- 2 deleted
- 19 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs
r4177 r4179 154 154 cities); 155 155 } 156 157 internal static void RemoveUnusedParameters(ParameterCollection parameters) { 158 parameters.Remove("DistanceMatrix"); 159 parameters.Remove("UseDistanceMatrix"); 160 parameters.Remove("Capacity"); 161 parameters.Remove("Demand"); 162 parameters.Remove("ReadyTime"); 163 parameters.Remove("DueTime"); 164 parameters.Remove("ServiceTime"); 165 } 156 166 } 157 167 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs
r4177 r4179 30 30 [StorableClass] 31 31 public sealed class AlbaCrossover : VRPCrossover { 32 public IValueLookupParameter<IPermutationCrossover> PermutationCrossoverParameter {33 get { return (IValueLookupParameter<IPermutationCrossover>)Parameters[" PermutationCrossover"]; }32 public IValueLookupParameter<IPermutationCrossover> InnerCrossoverParameter { 33 get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["InnerCrossover"]; } 34 34 } 35 36 [StorableConstructor] 37 private AlbaCrossover(bool deserializing) : base(deserializing) { } 35 38 36 39 public AlbaCrossover() 37 40 : base() { 38 Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("PermutationCrossover", "The permutation crossover.", new EdgeRecombinationCrossover())); 41 Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("InnerCrossover", "The permutation crossover.", new EdgeRecombinationCrossover())); 42 43 AlbaEncoding.RemoveUnusedParameters(Parameters); 39 44 } 40 45 41 void Crossover() { 42 PermutationCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName; 46 private void Crossover() { 47 //note - the inner crossover is called here and the result is converted to an alba representation 48 //some refactoring should be done here in the future - the crossover operation should be called directly 49 50 InnerCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName; 43 51 IAtomicOperation op = this.ExecutionContext.CreateOperation( 44 PermutationCrossoverParameter.ActualValue, this.ExecutionContext.Scope);52 InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope); 45 53 op.Operator.Execute((IExecutionContext)op); 46 54 47 string childName = PermutationCrossoverParameter.ActualValue.ChildParameter.ActualName;55 string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName; 48 56 if (ExecutionContext.Scope.Variables.ContainsKey(childName)) { 49 57 Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation; -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs
r4177 r4179 29 29 [Item("AlbaManipulator", "An operator which manipulates an alba VRP representation.")] 30 30 [StorableClass] 31 public sealed class AlbaManipulator : VRPManipulator { 32 public IValueLookupParameter<IPermutationManipulator> PermutationManipulatorParameter {33 get { return (IValueLookupParameter<IPermutationManipulator>)Parameters[" PermutationManipulator"]; }31 public sealed class AlbaManipulator : VRPManipulator { 32 public IValueLookupParameter<IPermutationManipulator> InnerManipulatorParameter { 33 get { return (IValueLookupParameter<IPermutationManipulator>)Parameters["InnerManipulator"]; } 34 34 } 35 36 [StorableConstructor] 37 private AlbaManipulator(bool deserializing) : base(deserializing) { } 35 38 36 39 public AlbaManipulator() 37 40 : base() { 38 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("PermutationManipulator", "The permutation manipulator.", new TranslocationManipulator())); 41 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("InnerManipulator", "The permutation manipulator.", new TranslocationManipulator())); 42 43 AlbaEncoding.RemoveUnusedParameters(Parameters); 39 44 } 40 45 41 46 public override IOperation Apply() { 42 IVRPEncoding solution = VRP SolutionParameter.ActualValue;47 IVRPEncoding solution = VRPToursParameter.ActualValue; 43 48 if (!(solution is AlbaEncoding)) { 44 VRP SolutionParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);49 VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value); 45 50 } 46 51 47 52 OperationCollection next = new OperationCollection(base.Apply()); 48 53 49 IPermutationManipulator op = PermutationManipulatorParameter.ActualValue;54 IPermutationManipulator op = InnerManipulatorParameter.ActualValue; 50 55 if (op != null) { 51 op.PermutationParameter.ActualName = VRP SolutionParameter.ActualName;56 op.PermutationParameter.ActualName = VRPToursParameter.ActualName; 52 57 next.Insert(0, ExecutionContext.CreateOperation(op)); 53 58 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs
r4177 r4179 61 61 } 62 62 63 [StorableConstructor] 64 protected AlbaMoveMaker(bool deserializing) : base(deserializing) { } 63 65 64 66 public AlbaMoveMaker() -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs
r4177 r4179 33 33 protected abstract IPermutationMoveOperator PermutationMoveOperatorParameter { get; set; } 34 34 35 [StorableConstructor] 36 protected AlbaMoveOperator(bool deserializing) : base(deserializing) { } 37 38 public AlbaMoveOperator() : base() 39 { 40 AlbaEncoding.RemoveUnusedParameters(Parameters); 41 } 42 35 43 public override IOperation Apply() { 36 IVRPEncoding solution = VRP SolutionParameter.ActualValue;44 IVRPEncoding solution = VRPToursParameter.ActualValue; 37 45 if (!(solution is AlbaEncoding)) { 38 VRP SolutionParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value);46 VRPToursParameter.ActualValue = AlbaEncoding.ConvertFrom(solution, VehiclesParameter.ActualValue.Value); 39 47 } 40 48 41 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRP SolutionParameter.ActualName;49 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName; 42 50 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter); 43 51 op.Operator.Execute((IExecutionContext)op); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs
r4177 r4179 35 35 } 36 36 37 [StorableConstructor] 38 private AlbaTranslocationMoveEvaluator(bool deserializing) : base(deserializing) { } 39 37 40 public AlbaTranslocationMoveEvaluator() 38 41 : base() { … … 43 46 TranslocationMove move = TranslocationMoveParameter.ActualValue; 44 47 //perform move 45 AlbaEncoding newSolution = VRP SolutionParameter.ActualValue.Clone() as AlbaEncoding;48 AlbaEncoding newSolution = VRPToursParameter.ActualValue.Clone() as AlbaEncoding; 46 49 TranslocationManipulator.Apply(newSolution, move.Index1, move.Index2, move.Index3); 47 50 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r4177 r4179 68 68 } 69 69 70 [StorableConstructor] 71 private AlbaTranslocationMoveGenerator(bool deserializing) : base(deserializing) { } 72 70 73 public AlbaTranslocationMoveGenerator() 71 74 : base() { … … 80 83 IOperation successor = base.Apply(); 81 84 82 Permutation permutation = VRP SolutionParameter.ActualValue as Permutation;85 Permutation permutation = VRPToursParameter.ActualValue as Permutation; 83 86 string moveName = TranslocationMoveGeneratorParameter.ActualValue.TranslocationMoveParameter.Name; 84 87 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
r4177 r4179 56 56 } 57 57 58 [StorableConstructor] 59 private AlbaTranslocationMoveHardTabuCriterion(bool deserializing) : base(deserializing) { } 60 58 61 public AlbaTranslocationMoveHardTabuCriterion() 59 62 : base() { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r4177 r4179 52 52 } 53 53 54 [StorableConstructor] 55 private AlbaTranslocationMoveMaker(bool deserializing) : base(deserializing) { } 56 54 57 public AlbaTranslocationMoveMaker() 55 58 : base() { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
r4177 r4179 56 56 } 57 57 58 [StorableConstructor] 59 private AlbaTranslocationMoveSoftTabuCriterion(bool deserializing) : base(deserializing) { } 60 58 61 public AlbaTranslocationMoveSoftTabuCriterion() 59 62 : base() { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
r4177 r4179 56 56 } 57 57 58 [StorableConstructor] 59 private AlbaTranslocationMoveTabuMaker(bool deserializing) : base(deserializing) { } 60 58 61 public AlbaTranslocationMoveTabuMaker() 59 62 : base() { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/DefaultRepresentationCreator.cs
r4176 r4179 27 27 using System.Collections.Generic; 28 28 using HeuristicLab.Problems.VehicleRouting.Encodings; 29 using HeuristicLab.Problems.VehicleRouting.Encodings.Alba; 30 using HeuristicLab.Problems.VehicleRouting.Encodings.Potvin; 29 31 30 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { 33 [Item("DefaultRepresentationCreator", "An operator which creates a VRP solution in the default representation.")] 31 34 [StorableClass] 32 public abstract class IntListRepresentationCreator : VRPCreator { 33 protected abstract IVRPEncoding CreateEncoding(List<int> route); 34 35 public abstract class DefaultRepresentationCreator : VRPCreator { 35 36 protected abstract List<int> CreateSolution(); 36 37 38 [StorableConstructor] 39 protected DefaultRepresentationCreator(bool deserializing) : base(deserializing) { } 40 41 public DefaultRepresentationCreator() : base() { } 42 37 43 public override IOperation Apply() { 38 VRPSolutionParameter.ActualValue = CreateEncoding(CreateSolution()); 44 //choose default encoding here 45 VRPToursParameter.ActualValue = PotvinEncoding.ConvertFrom(CreateSolution()); 39 46 40 47 return base.Apply(); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/PushForwardInsertionCreator.cs
r4177 r4179 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { 32 [Item("PushForwardCreator", "The push forward insertion heuristic. It is implemented as described in Sam, and Thangiah, R. (1999). A Hybrid Genetic Algorithms, Simulated Annealing and Tabu Search Heuristic for Vehicle Routing Problems with Time Windows. Practical Handbook of Genetic Algorithms, Volume III, pp 347–381.")] 32 33 [StorableClass] 33 //The push forward insertion heuristic. It is implemented as described in Sam, and Thangiah, R. (1999). A Hybrid Genetic Algorithms, Simulated Annealing and Tabu Search Heuristic for Vehicle Routing Problems with Time Windows. Practical Handbook of Genetic Algorithms, Volume III, pp 347–381. 34 public abstract class PushForwardCreator : IntListRepresentationCreator, IStochasticOperator { 34 public sealed class PushForwardCreator : DefaultRepresentationCreator, IStochasticOperator { 35 35 #region IStochasticOperator Members 36 36 public ILookupParameter<IRandom> RandomParameter { … … 57 57 get { return (IValueParameter<DoubleValue>)Parameters["GammaVariance"]; } 58 58 } 59 60 [StorableConstructor] 61 private PushForwardCreator(bool deserializing) : base(deserializing) { } 59 62 60 63 public PushForwardCreator() -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/RandomCreator.cs
r4177 r4179 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { 32 [Item("RandomCreator", "Creates a randomly initialized VRP solution.")] 32 33 [StorableClass] 33 public abstract class RandomCreator : IntListRepresentationCreator, IStochasticOperator {34 public sealed class RandomCreator : DefaultRepresentationCreator, IStochasticOperator { 34 35 #region IStochasticOperator Members 35 36 public ILookupParameter<IRandom> RandomParameter { … … 37 38 } 38 39 #endregion 40 41 [StorableConstructor] 42 private RandomCreator(bool deserializing) : base(deserializing) { } 39 43 40 44 public RandomCreator() -
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); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCreator.cs
r4154 r4179 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings { 29 [Item("VRPCreator", "A VRP creator.")] 29 30 [StorableClass] 30 31 public abstract class VRPCreator : VRPOperator, IVRPCreator { … … 34 35 35 36 #region IVRPCreator Members 36 public ILookupParameter<IVRPEncoding> VRP SolutionParameter {37 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRP Solution"]; }37 public ILookupParameter<IVRPEncoding> VRPToursParameter { 38 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; } 38 39 } 39 40 40 public IValueLookupParameter<IntValue> CitiesParameter { 41 get { return (IValueLookupParameter<IntValue>)Parameters["Cities"]; } 42 } 41 public IValueLookupParameter<IntValue> CitiesParameter { 42 get { return (IValueLookupParameter<IntValue>)Parameters["Cities"]; } 43 } 44 45 [StorableConstructor] 46 protected VRPCreator(bool deserializing) : base(deserializing) { } 43 47 44 48 public VRPCreator() 45 49 : base() { 46 Parameters.Add(new LookupParameter<IVRPEncoding>("VRP Solution", "The new VRP solution."));50 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The new VRP tours.")); 47 51 } 48 52 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPCrossover.cs
r4154 r4179 24 24 using HeuristicLab.Operators; 25 25 using HeuristicLab.Parameters; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 27 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings { 29 [Item("VRPCreator", "A VRP crossover operation.")] 30 [StorableClass] 28 31 public abstract class VRPCrossover : VRPOperator, IVRPCrossover { 29 32 #region IVRPCrossover Members … … 39 42 #endregion 40 43 44 [StorableConstructor] 45 protected VRPCrossover(bool deserializing) : base(deserializing) { } 46 41 47 public VRPCrossover() 42 48 : base() { 43 49 Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("Parents", "The parent permutations which should be crossed.")); 44 ParentsParameter.ActualName = "VRP Solution";50 ParentsParameter.ActualName = "VRPTours"; 45 51 Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover.")); 46 ChildParameter.ActualName = "VRP Solution";52 ChildParameter.ActualName = "VRPTours"; 47 53 } 48 54 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPManipulator.cs
r4154 r4179 24 24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 27 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings { 29 [Item("VRPManipulator", "A VRP manipulation operation.")] 30 [StorableClass] 28 31 public abstract class VRPManipulator : VRPOperator, IVRPManipulator { 29 32 #region IVRPManipulator Members 30 33 31 public ILookupParameter<IVRPEncoding> VRP SolutionParameter {32 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRP Solution"]; }34 public ILookupParameter<IVRPEncoding> VRPToursParameter { 35 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; } 33 36 } 34 37 35 38 #endregion 36 39 40 [StorableConstructor] 41 protected VRPManipulator(bool deserializing) : base(deserializing) { } 42 37 43 public VRPManipulator() 38 44 : base() { 39 Parameters.Add(new LookupParameter<IVRPEncoding>("VRP Solution", "The new VRP solution."));45 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The new VRP tours.")); 40 46 } 41 47 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/VRPMoveOperator.cs
r4154 r4179 24 24 using HeuristicLab.Parameters; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 27 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings { 29 [Item("VRPMoveOperator", "A VRP move operation.")] 30 [StorableClass] 28 31 public abstract class VRPMoveOperator : VRPOperator, IVRPMoveOperator { 29 32 #region IVRPManipulator Members 30 33 31 public ILookupParameter<IVRPEncoding> VRP SolutionParameter {32 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRP Solution"]; }34 public ILookupParameter<IVRPEncoding> VRPToursParameter { 35 get { return (ILookupParameter<IVRPEncoding>)Parameters["VRPTours"]; } 33 36 } 34 37 35 38 #endregion 36 39 40 [StorableConstructor] 41 protected VRPMoveOperator(bool deserializing) : base(deserializing) { } 42 37 43 public VRPMoveOperator() 38 44 : base() { 39 Parameters.Add(new LookupParameter<IVRPEncoding>("VRP Solution", "The VRP solution."));45 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours.")); 40 46 } 41 47 }
Note: See TracChangeset
for help on using the changeset viewer.