Changeset 4722 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers
- Timestamp:
- 11/06/10 01:56:04 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
/branches/CloningRefactoring (added) merged: 4656-4693,4696-4697,4711-4714,4718-4719
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting
- Property svn:mergeinfo changed
/branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting (added) merged: 4686-4687,4689-4693,4696-4697
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/MultiVRPSolutionCrossover.cs
r4352 r4722 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 { … … 82 83 83 84 [StorableConstructor] 84 private MultiVRPSolutionCrossover(bool deserializing) : base(deserializing) { } 85 protected 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.")); -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Crossovers/RandomParentCloneCrossover.cs
r4352 r4722 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 private RandomParentCloneCrossover(RandomParentCloneCrossover original, Cloner cloner) : base(original, cloner) { } 39 public override IDeepCloneable Clone(Cloner cloner) { 40 return new RandomParentCloneCrossover(this, cloner); 41 } 42 41 43 42 44 public RandomParentCloneCrossover() … … 54 56 Parameters.Remove("ServiceTime"); 55 57 } 56 58 57 59 public override IOperation Apply() { 58 60 if (RandomParameter.ActualValue.Next() < 0.5)
Note: See TracChangeset
for help on using the changeset viewer.