Changeset 4722 for trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/GVR/GVREncoding.cs
- Timestamp:
- 11/06/10 01:56:04 (13 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 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/GVR/GVREncoding.cs
r4352 r4722 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Core; 24 25 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.PermutationEncoding;26 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using System.Drawing;28 using System.Collections.Generic;29 27 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 30 28 … … 75 73 return tours; 76 74 } 77 78 public override IDeepCloneable Clone(HeuristicLab.Common.Cloner cloner) { 79 GVREncoding clone = new GVREncoding(capacity, demand); 80 cloner.RegisterClonedObject(this, clone); 81 clone.Tours = (ItemList<Tour>)cloner.Clone(this.Tours); 82 83 return clone; 75 76 [StorableConstructor] 77 protected GVREncoding(bool deserializing) : base(deserializing) { } 78 protected GVREncoding(GVREncoding original, Cloner cloner) 79 : base(original, cloner) { 80 this.capacity = original.capacity; 81 this.demand = original.demand; 82 this.Tours = cloner.Clone(original.Tours); 84 83 } 85 84 public override IDeepCloneable Clone(Cloner cloner) { 85 return new GVREncoding(this, cloner); 86 } 86 87 public GVREncoding(DoubleValue capacity, DoubleArray demand) 87 88 : base() { 88 89 this.capacity = capacity; 89 90 this.demand = demand; 90 }91 92 [StorableConstructor]93 private GVREncoding(bool serializing)94 : base() {95 91 } 96 92
Note: See TracChangeset
for help on using the changeset viewer.