- Timestamp:
- 08/09/10 18:08:14 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
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()
Note: See TracChangeset
for help on using the changeset viewer.