- Timestamp:
- 08/09/10 13:29:06 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings
- Files:
-
- 3 added
- 2 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/AlbaEncoding.cs
r4174 r4177 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 30 [Item("AlbaEncoding", "Represents an alba encoding of VRP solutions.")]30 [Item("AlbaEncoding", "Represents an Alba encoding of VRP solutions. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 31 31 [StorableClass] 32 32 class AlbaEncoding : Permutation, IVRPEncoding { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPermutationCreator.cs
r4068 r4177 30 30 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 32 [Item("AlbaPermutationCreator", "An operator which creates a new alba VRP representation.")]32 [Item("AlbaPermutationCreator", "An operator which creates a new Alba VRP representation.")] 33 33 [StorableClass] 34 34 public sealed class AlbaPermutationCreator : VRPCreator, IStochasticOperator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Creators/AlbaPushForwardInsertionCreator.cs
r4154 r4177 31 31 32 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 33 [Item("AlbaPushForwardCreator", "An operator which creates a new alba VRP representation using the push forward insertion heuristic.")]33 [Item("AlbaPushForwardCreator", "An operator which creates a new Alba VRP representation using 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 34 [StorableClass] 35 35 public sealed class AlbaPushForwardCreator : PushForwardCreator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Crossovers/AlbaCrossover.cs
r4154 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaCrossover", "An operator which crosses two Alba VRP representations.")] 29 30 [StorableClass] 30 public abstract class AlbaCrossover : VRPCrossover { 31 protected virtual void Crossover() { 31 public sealed class AlbaCrossover : VRPCrossover { 32 public IValueLookupParameter<IPermutationCrossover> PermutationCrossoverParameter { 33 get { return (IValueLookupParameter<IPermutationCrossover>)Parameters["PermutationCrossover"]; } 34 } 35 36 public AlbaCrossover() 37 : base() { 38 Parameters.Add(new ValueLookupParameter<IPermutationCrossover>("PermutationCrossover", "The permutation crossover.", new EdgeRecombinationCrossover())); 39 } 40 41 void Crossover() { 42 PermutationCrossoverParameter.ActualValue.ParentsParameter.ActualName = ParentsParameter.ActualName; 43 IAtomicOperation op = this.ExecutionContext.CreateOperation( 44 PermutationCrossoverParameter.ActualValue, this.ExecutionContext.Scope); 45 op.Operator.Execute((IExecutionContext)op); 46 47 string childName = PermutationCrossoverParameter.ActualValue.ChildParameter.ActualName; 48 if (ExecutionContext.Scope.Variables.ContainsKey(childName)) { 49 Permutation permutation = ExecutionContext.Scope.Variables[childName].Value as Permutation; 50 ExecutionContext.Scope.Variables.Remove(childName); 51 52 ChildParameter.ActualValue = new AlbaEncoding(permutation, Cities); 53 } else 54 ChildParameter.ActualValue = null; 32 55 } 33 56 -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Manipulators/AlbaManipulator.cs
r4154 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaManipulator", "An operator which manipulates an alba VRP representation.")] 29 30 [StorableClass] 30 public abstract class AlbaManipulator : VRPManipulator { 31 protected virtual void Manipulate() { 31 public sealed class AlbaManipulator : VRPManipulator { 32 public IValueLookupParameter<IPermutationManipulator> PermutationManipulatorParameter { 33 get { return (IValueLookupParameter<IPermutationManipulator>)Parameters["PermutationManipulator"]; } 32 34 } 33 35 36 public AlbaManipulator() 37 : base() { 38 Parameters.Add(new ValueLookupParameter<IPermutationManipulator>("PermutationManipulator", "The permutation manipulator.", new TranslocationManipulator())); 39 } 40 34 41 public override IOperation Apply() { 35 42 IVRPEncoding solution = VRPSolutionParameter.ActualValue; … … 38 45 } 39 46 40 Manipulate();47 OperationCollection next = new OperationCollection(base.Apply()); 41 48 42 return base.Apply(); 49 IPermutationManipulator op = PermutationManipulatorParameter.ActualValue; 50 if (op != null) { 51 op.PermutationParameter.ActualName = VRPSolutionParameter.ActualName; 52 next.Insert(0, ExecutionContext.CreateOperation(op)); 53 } 54 55 return next; 43 56 } 44 57 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveMaker.cs
r4068 r4177 26 26 27 27 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 28 [Item("AlbaTranslocationMoveMaker", "An operator which makes translocation moves for the alba representation.")]28 [Item("AlbaTranslocationMoveMaker", "An operator which makes translocation moves for the Alba representation.")] 29 29 [StorableClass] 30 30 public abstract class AlbaMoveMaker : AlbaMoveOperator { … … 60 60 get { return (ILookupParameter<DoubleValue>)Parameters["Tardiness"]; } 61 61 } 62 62 63 63 64 public AlbaMoveMaker() -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/AlbaMoveOperator.cs
r4154 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaMoveOperator", "A move operator for an alba VRP representation.")]29 [Item("AlbaMoveOperator", "A move operator for an Alba VRP representation.")] 30 30 [StorableClass] 31 31 public abstract class AlbaMoveOperator : VRPMoveOperator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs
r4068 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting { 29 [Item("AlbaTranslocationMoveEvaluator", "Evaluates a translocation or insertion move (3-opt) for the VRP.")]29 [Item("AlbaTranslocationMoveEvaluator", "Evaluates a translocation or insertion move (3-opt) for the Alba representation.")] 30 30 [StorableClass] 31 31 public sealed class AlbaTranslocationMoveEvaluator : VRPMoveEvaluator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r4154 r4177 29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 31 [Item("AlbaTranslocationMoveGenerator", "An operator which generates translocation moves for the alba representation.")]31 [Item("AlbaTranslocationMoveGenerator", "An operator which generates translocation moves for the Alba representation.")] 32 32 [StorableClass] 33 33 public sealed class AlbaTranslocationMoveGenerator : AlbaMoveOperator, IAlbaTranslocationMoveOperator, IMultiMoveGenerator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
r4068 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaTranslocationMoveHardTabuCriterion", "An operator which checks if translocation moves are tabu using a hard criterion .")]29 [Item("AlbaTranslocationMoveHardTabuCriterion", "An operator which checks if translocation moves are tabu using a hard criterion for the Alba representation.")] 30 30 [StorableClass] 31 31 public sealed class AlbaTranslocationMoveHardTabuCriterion : AlbaMoveOperator, IAlbaTranslocationMoveOperator, ITabuChecker { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r4068 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaTranslocationMoveMaker", "An operator which makes translocation moves for the alba representation.")]29 [Item("AlbaTranslocationMoveMaker", "An operator which makes translocation moves for the Alba representation.")] 30 30 [StorableClass] 31 public sealed class AlbaTranslocationMoveMaker : AlbaMoveMaker, IAlbaTranslocationMoveOperator, I MoveMaker {31 public sealed class AlbaTranslocationMoveMaker : AlbaMoveMaker, IAlbaTranslocationMoveOperator, IVRPMoveMaker { 32 32 private TranslocationMoveMaker moveMaker; 33 33 protected override IPermutationMoveOperator PermutationMoveOperatorParameter { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
r4068 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaTranslocationMoveSoftTabuCriterion", "An operator which checks if translocation moves are tabu using a soft criterion .")]29 [Item("AlbaTranslocationMoveSoftTabuCriterion", "An operator which checks if translocation moves are tabu using a soft criterion for the Alba representation.")] 30 30 [StorableClass] 31 31 public sealed class AlbaTranslocationMoveSoftTabuCriterion : AlbaMoveOperator, IAlbaTranslocationMoveOperator, ITabuChecker { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
r4068 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 29 [Item("AlbaTranslocationMoveTabuMaker", "An operator which makes translocation moves tabu for the alba representation.")]29 [Item("AlbaTranslocationMoveTabuMaker", "An operator which makes translocation moves tabu for the Alba representation.")] 30 30 [StorableClass] 31 31 public sealed class AlbaTranslocationMoveTabuMaker : AlbaMoveOperator, IAlbaTranslocationMoveOperator, ITabuMaker { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/PushForwardInsertionCreator.cs
r4154 r4177 31 31 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General { 32 32 [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. 33 34 public abstract class PushForwardCreator : IntListRepresentationCreator, IStochasticOperator { 34 35 #region IStochasticOperator Members -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Creators/PotvinPushForwardInsertionCreator.cs
r4154 r4177 31 31 32 32 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 33 [Item("PotvinPushForwardCreator", "An operator which creates a new Potvin VRP representation using the push forward insertion heuristic. ")]33 [Item("PotvinPushForwardCreator", "An operator which creates a new Potvin VRP representation using 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 34 [StorableClass] 35 35 public sealed class PotvinPushForwardCreator : PushForwardCreator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Crossovers/PotvinSBXCrossover.cs
r4174 r4177 27 27 28 28 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 29 [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations. ")]29 [Item("PotvinSBXCrossover", "The SBX crossover for the Potvin VRP representations. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")] 30 30 [StorableClass] 31 31 public sealed class PotvinSBXCrossover : PotvinCrossover { … … 72 72 child.Unrouted.Add(city); 73 73 74 if (Repair(random, child, newTour))74 if (Repair(random, child, newTour)) 75 75 return child; 76 else 77 return parent1.Clone() as PotvinEncoding; 76 else { 77 if(random.NextDouble() < 0.5) 78 return parent1.Clone() as PotvinEncoding; 79 else 80 return parent2.Clone() as PotvinEncoding; 81 } 78 82 } 79 83 } -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/Potvin1MManipulator.cs
r4174 r4177 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 [Item("Potvin1MMainpulator", "The one-level exchange operator which manipulates a Potvin VRP representation. ")]30 [Item("Potvin1MMainpulator", "The one-level exchange operator which manipulates a Potvin VRP representation. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")] 31 31 [StorableClass] 32 32 public sealed class Potvin1MMainpulator : PotvinManipulator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/Potvin2MManipulator.cs
r4174 r4177 28 28 29 29 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 30 [Item("Potvin2MMainpulator", "The two-level exchange operator which manipulates a Potvin VRP representation. ")]30 [Item("Potvin2MMainpulator", "The two-level exchange operator which manipulates a Potvin VRP representation. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")] 31 31 [StorableClass] 32 32 public sealed class Potvin2MMainpulator : PotvinManipulator { -
trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/PotvinEncoding.cs
r4174 r4177 29 29 30 30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin { 31 [Item("PotvinEncoding", "Represents a potvin encoding of VRP solutions. ")]31 [Item("PotvinEncoding", "Represents a potvin encoding of VRP solutions. It is implemented as described in Potvin, J.-Y. and Bengio, S. (1996). The Vehicle Routing Problem with Time Windows - Part II: Genetic Search. INFORMS Journal of Computing, 8:165–172.")] 32 32 [StorableClass] 33 33 public class PotvinEncoding : Item, IVRPEncoding {
Note: See TracChangeset
for help on using the changeset viewer.