- Timestamp:
- 03/29/11 15:40:01 (14 years ago)
- Location:
- branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Crossovers/AlbaPermutationCrossover.cs
r4752 r5867 58 58 IAtomicOperation op = this.ExecutionContext.CreateOperation( 59 59 InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope); 60 op.Operator.Execute((IExecutionContext)op );60 op.Operator.Execute((IExecutionContext)op, CancellationToken); 61 61 62 62 string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs
r4752 r5867 56 56 IAtomicOperation op = this.ExecutionContext.CreateOperation( 57 57 InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope); 58 op.Operator.Execute((IExecutionContext)op );58 op.Operator.Execute((IExecutionContext)op, CancellationToken); 59 59 } 60 60 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs
r4752 r5867 33 33 public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove { 34 34 public IVRPEncoding Individual { get { return Permutation as AlbaEncoding; } } 35 35 36 [StorableConstructor] 37 protected AlbaIntraRouteInversionMove(bool deserializing) : base(deserializing) { } 38 39 protected AlbaIntraRouteInversionMove(AlbaIntraRouteInversionMove original, Cloner cloner) 40 : base(original, cloner) { 41 } 42 36 43 public AlbaIntraRouteInversionMove() 37 44 : base() { … … 43 50 44 51 public AlbaIntraRouteInversionMove(int index1, int index2, AlbaEncoding permutation) 45 : base(index1, index2, permutation.Clone() as AlbaEncoding) { 52 : base(index1, index2, null) { 53 this.Permutation = permutation.Clone() as AlbaEncoding; 46 54 } 47 55 48 56 public override IDeepCloneable Clone(Cloner cloner) { 49 57 return new AlbaIntraRouteInversionMove(this, cloner); 50 }51 52 protected AlbaIntraRouteInversionMove(AlbaIntraRouteInversionMove original, Cloner cloner)53 : base(original, cloner) {54 if (Permutation != null)55 this.Permutation = cloner.Clone(original.Permutation);56 58 } 57 59 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs
r4752 r5867 30 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 31 using HeuristicLab.Common; 32 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 34 35 [Item("AlbaStochasticIntraRouteInversionMultiMoveGenerator", "Generates multiple random intra route inversion moves from a given VRP encoding. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 35 36 [StorableClass] 36 public sealed class AlbaStochasticIntraRouteInversionMultiMoveGenerator : AlbaIntraRouteInversionMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaIntraRouteInversionMoveOperator { 37 public sealed class AlbaStochasticIntraRouteInversionMultiMoveGenerator : AlbaIntraRouteInversionMoveGenerator, IStochasticOperator, 38 IMultiMoveGenerator, IAlbaIntraRouteInversionMoveOperator, IMultiVRPMoveGenerator { 37 39 public ILookupParameter<IRandom> RandomParameter { 38 40 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs
r4752 r5867 35 35 [StorableClass] 36 36 public sealed class AlbaStochasticIntraRouteInversionSingleMoveGenerator : AlbaIntraRouteInversionMoveGenerator, 37 IStochasticOperator, ISingleMoveGenerator, IAlbaIntraRouteInversionMoveOperator , IMultiVRPMoveGenerator{37 IStochasticOperator, ISingleMoveGenerator, IAlbaIntraRouteInversionMoveOperator { 38 38 #region IMultiVRPMoveOperator Members 39 39 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs
r4752 r5867 30 30 using HeuristicLab.Problems.VehicleRouting.Interfaces; 31 31 using HeuristicLab.Common; 32 using HeuristicLab.Problems.VehicleRouting.Encodings.General; 32 33 33 34 namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba { 34 35 [Item("AlbaStochasticLambdaInterchangeMultiMoveGenerator", "Generates multiple random lambda interchange moves from a given VRP encoding. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 35 36 [StorableClass] 36 public sealed class AlbaStochasticLambdaInterchangeMultiMoveGenerator : AlbaLambdaInterchangeMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator { 37 public sealed class AlbaStochasticLambdaInterchangeMultiMoveGenerator : AlbaLambdaInterchangeMoveGenerator, IStochasticOperator, 38 IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator, IMultiVRPMoveGenerator { 37 39 public ILookupParameter<IRandom> RandomParameter { 38 40 get { return (ILookupParameter<IRandom>)Parameters["Random"]; } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs
r5201 r5867 35 35 [StorableClass] 36 36 public sealed class AlbaStochasticLambdaInterchangeSingleMoveGenerator : AlbaLambdaInterchangeMoveGenerator, 37 IStochasticOperator, ISingleMoveGenerator, IAlbaLambdaInterchangeMoveOperator , IMultiVRPMoveGenerator{37 IStochasticOperator, ISingleMoveGenerator, IAlbaLambdaInterchangeMoveOperator { 38 38 #region IMultiVRPMoveOperator Members 39 39 -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs
r5130 r5867 34 34 [Item("AlbaStochasticTranslocationSingleMoveGenerator", "An operator which generates a single translocation move for a VRP representation. It is implemented as described in Alba, E. and Dorronsoro, B. (2004). Solving the Vehicle Routing Problem by Using Cellular Genetic Algorithms.")] 35 35 [StorableClass] 36 public sealed class AlbaStochasticTranslocationSingleMoveGenerator : AlbaMoveGenerator, IAlbaTranslocationMoveOperator , IMultiVRPMoveGenerator{36 public sealed class AlbaStochasticTranslocationSingleMoveGenerator : AlbaMoveGenerator, IAlbaTranslocationMoveOperator { 37 37 [Storable] 38 38 private TranslocationMoveGenerator generator = new StochasticTranslocationSingleMoveGenerator(); … … 80 80 generator.PermutationParameter.ActualName = VRPToursParameter.ActualName; 81 81 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(generator); 82 op.Operator.Execute((IExecutionContext)op );82 op.Operator.Execute((IExecutionContext)op, CancellationToken); 83 83 84 84 foreach (IScope scope in this.ExecutionContext.Scope.SubScopes) { -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs
r4752 r5867 101 101 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName; 102 102 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter); 103 op.Operator.Execute((IExecutionContext)op );103 op.Operator.Execute((IExecutionContext)op, CancellationToken); 104 104 105 105 return next; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs
r5130 r5867 78 78 private AlbaTranslocationMoveHardTabuCriterion(AlbaTranslocationMoveHardTabuCriterion original, Cloner cloner) 79 79 : base(original, cloner) { 80 tabuChecker = cloner.Clone(original.tabuChecker); 80 81 } 81 82 … … 87 88 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName; 88 89 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter); 89 op.Operator.Execute((IExecutionContext)op );90 op.Operator.Execute((IExecutionContext)op, CancellationToken); 90 91 91 92 return next; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs
r5130 r5867 61 61 private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner) 62 62 : base(original, cloner) { 63 moveMaker = cloner.Clone(original.moveMaker); 63 64 } 64 65 … … 71 72 moveMaker.PermutationParameter.ActualName = VRPToursParameter.ActualName; 72 73 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(moveMaker); 73 op.Operator.Execute((IExecutionContext)op );74 op.Operator.Execute((IExecutionContext)op, CancellationToken); 74 75 } 75 76 } -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs
r5130 r5867 78 78 private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner) 79 79 : base(original, cloner) { 80 tabuChecker = cloner.Clone(original.tabuChecker); 80 81 } 81 82 … … 87 88 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName; 88 89 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter); 89 op.Operator.Execute((IExecutionContext)op );90 op.Operator.Execute((IExecutionContext)op, CancellationToken); 90 91 91 92 return next; -
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs
r5130 r5867 78 78 private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner) 79 79 : base(original, cloner) { 80 moveTabuMaker = cloner.Clone(original.moveTabuMaker); 80 81 } 81 82 … … 87 88 PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName; 88 89 IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter); 89 op.Operator.Execute((IExecutionContext)op );90 op.Operator.Execute((IExecutionContext)op, CancellationToken); 90 91 91 92 return next;
Note: See TracChangeset
for help on using the changeset viewer.