- Timestamp:
- 11/09/10 09:55:31 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs
r4365 r4752 33 33 using HeuristicLab.Problems.VehicleRouting.Variants; 34 34 using System.Collections.Generic; 35 using HeuristicLab.Common; 35 36 36 37 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 60 61 61 62 Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance")); 63 } 64 65 public override IDeepCloneable Clone(Cloner cloner) { 66 return new MultiVRPSolutionCreator(this, cloner); 67 } 68 69 protected MultiVRPSolutionCreator(MultiVRPSolutionCreator original, Cloner cloner) 70 : base(original, cloner) { 62 71 } 63 72 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/VRPCreator.cs
r4369 r4752 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 using HeuristicLab.Common; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 46 47 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be created.")); 47 48 } 49 50 protected VRPCreator(VRPCreator original, Cloner cloner) 51 : base(original, cloner) { 52 } 48 53 } 49 54 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs
r4370 r4752 26 26 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 27 27 using HeuristicLab.Problems.VehicleRouting.Variants; 28 using HeuristicLab.Common; 28 29 29 30 namespace HeuristicLab.Problems.VehicleRouting { … … 43 44 } 44 45 46 public override IDeepCloneable Clone(Cloner cloner) { 47 return new MultiVRPMoveEvaluator(this, cloner); 48 } 49 50 private MultiVRPMoveEvaluator(MultiVRPMoveEvaluator original, Cloner cloner) 51 : base(original, cloner) { 52 } 53 45 54 protected override void EvaluateMove() { 46 55 IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs
r4370 r4752 33 33 using HeuristicLab.Problems.VehicleRouting.Interfaces; 34 34 using HeuristicLab.Problems.VehicleRouting.Variants; 35 using HeuristicLab.Common; 35 36 36 37 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 86 87 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours.")); 87 88 Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves.")); 89 } 90 91 public override IDeepCloneable Clone(Cloner cloner) { 92 return new MultiVRPMoveGenerator(this, cloner); 93 } 94 95 protected MultiVRPMoveGenerator(MultiVRPMoveGenerator original, Cloner cloner) 96 : base(original, cloner) { 88 97 } 89 98 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs
r4370 r4752 28 28 using System.Collections.Generic; 29 29 using HeuristicLab.Problems.VehicleRouting.Variants; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{ … … 45 46 } 46 47 48 public override IDeepCloneable Clone(Cloner cloner) { 49 return new MultiVRPMoveMaker(this, cloner); 50 } 51 52 protected MultiVRPMoveMaker(MultiVRPMoveMaker original, Cloner cloner) 53 : base(original, cloner) { 54 } 55 47 56 protected override void PerformMove() { 48 57 IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs
r4369 r4752 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 using HeuristicLab.Common; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 51 52 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution.")); 52 53 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move.")); 54 } 55 56 protected VRPMoveEvaluator(VRPMoveEvaluator original, Cloner cloner) 57 : base(original, cloner) { 53 58 } 54 59 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveGenerator.cs
r4369 r4752 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 using HeuristicLab.Common; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 42 43 : base() { 43 44 } 45 46 protected VRPMoveGenerator(VRPMoveGenerator original, Cloner cloner) 47 : base(original, cloner) { 48 } 44 49 } 45 50 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs
r4370 r4752 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Problems.VehicleRouting.Interfaces; 32 using HeuristicLab.Common; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 49 50 Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution.")); 50 51 Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move.")); 52 } 53 54 protected VRPMoveMaker(VRPMoveMaker original, Cloner cloner) 55 : base(original, cloner) { 51 56 } 52 57 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveOperator.cs
r4370 r4752 28 28 using HeuristicLab.Problems.VehicleRouting.Interfaces; 29 29 using HeuristicLab.Parameters; 30 using HeuristicLab.Common; 30 31 31 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { … … 45 46 Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move.")); 46 47 } 48 49 protected VRPMoveOperator(VRPMoveOperator original, Cloner cloner) 50 : base(original, cloner) { 51 } 47 52 } 48 53 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs
r4365 r4752 40 40 protected IVRPProblemInstance ProblemInstance { get; set; } 41 41 42 public override IDeepCloneable Clone(Cloner cloner) { 43 PermutationEncoding clone = (PermutationEncoding)base.Clone(cloner); 44 45 clone.ProblemInstance = (IVRPProblemInstance)cloner.Clone(ProblemInstance); 46 47 return clone; 42 protected PermutationEncoding(PermutationEncoding original, Cloner cloner) 43 : base(original, cloner) { 44 this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance); 45 this.readOnly = original.readOnly; 48 46 } 49 47 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs
r4376 r4752 82 82 } 83 83 84 protected TourEncoding(TourEncoding original, Cloner cloner) 85 : base(original, cloner) { 86 this.Tours = (ItemList<Tour>)cloner.Clone(original.Tours); 87 this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance); 88 } 89 84 90 public static void ConvertFrom(IVRPEncoding encoding, TourEncoding solution, IVRPProblemInstance problemInstance) { 85 91 solution.Tours = new ItemList<Tour>(encoding.GetTours());
Note: See TracChangeset
for help on using the changeset viewer.