Changeset 4687 for branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers
- Timestamp:
- 10/29/10 20:21:04 (14 years ago)
- Location:
- branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs
r4352 r4687 23 23 using System.Linq; 24 24 using HeuristicLab.Collections; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 26 28 using HeuristicLab.Operators; 27 29 using HeuristicLab.Optimization; … … 29 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 32 using HeuristicLab.PluginInfrastructure; 31 using HeuristicLab.Data;32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 83 84 [StorableConstructor] 84 85 private MultiVRPSolutionCrossover(bool deserializing) : base(deserializing) { } 86 protected MultiVRPSolutionCrossover(MultiVRPSolutionCrossover original, Cloner cloner) : base(original, cloner) { } 87 public override IDeepCloneable Clone(Cloner cloner) { 88 return new MultiVRPSolutionCrossover(this, cloner); 89 } 85 90 public MultiVRPSolutionCrossover() 86 91 : base() { 87 92 Parameters.Add(new ScopeTreeLookupParameter<IVRPEncoding>("Parents", "The parent permutations which should be crossed.")); 88 93 ParentsParameter.ActualName = "VRPTours"; 89 94 Parameters.Add(new LookupParameter<IVRPEncoding>("Child", "The child permutation resulting from the crossover.")); -
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/RandomParentCloneCrossover.cs
r4352 r4687 20 20 #endregion 21 21 22 using System; 23 using System.Collections.Generic; 24 using System.Linq; 25 using System.Text; 22 using HeuristicLab.Common; 26 23 using HeuristicLab.Core; 27 24 using HeuristicLab.Optimization; … … 39 36 [StorableConstructor] 40 37 private RandomParentCloneCrossover(bool deserializing) : base(deserializing) { } 38 protected RandomParentCloneCrossover(RandomParentCloneCrossover original, Cloner cloner) : base(original, cloner) { } 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new RandomParentCloneCrossover(this, cloner); 41 } 41 42 42 43 public RandomParentCloneCrossover() … … 54 55 Parameters.Remove("ServiceTime"); 55 56 } 56 57 57 58 public override IOperation Apply() { 58 59 if (RandomParameter.ActualValue.Next() < 0.5)
Note: See TracChangeset
for help on using the changeset viewer.