Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/29/11 15:40:01 (14 years ago)
Author:
svonolfe
Message:

Merged changes from trunk into branch (#1177)

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  
    5858      IAtomicOperation op = this.ExecutionContext.CreateOperation(
    5959        InnerCrossoverParameter.ActualValue, this.ExecutionContext.Scope);
    60       op.Operator.Execute((IExecutionContext)op);
     60      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    6161
    6262      string childName = InnerCrossoverParameter.ActualValue.ChildParameter.ActualName;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Manipulators/AlbaPermutationManipulator.cs

    r4752 r5867  
    5656      IAtomicOperation op = this.ExecutionContext.CreateOperation(
    5757        InnerManipulatorParameter.ActualValue, this.ExecutionContext.Scope);
    58       op.Operator.Execute((IExecutionContext)op);
     58      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    5959    }
    6060  }
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaIntraRouteInversionMove.cs

    r4752 r5867  
    3333  public class AlbaIntraRouteInversionMove : TwoIndexMove, IVRPMove {
    3434    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
    3643    public AlbaIntraRouteInversionMove()
    3744      : base() {
     
    4350
    4451    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;
    4654     }
    4755
    4856    public override IDeepCloneable Clone(Cloner cloner) {
    4957      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);
    5658    }
    5759
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionMutliMoveGenerator.cs

    r4752 r5867  
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3131using HeuristicLab.Common;
     32using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3435  [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.")]
    3536  [StorableClass]
    36   public sealed class AlbaStochasticIntraRouteInversionMultiMoveGenerator : AlbaIntraRouteInversionMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
     37  public sealed class AlbaStochasticIntraRouteInversionMultiMoveGenerator : AlbaIntraRouteInversionMoveGenerator, IStochasticOperator,
     38    IMultiMoveGenerator, IAlbaIntraRouteInversionMoveOperator, IMultiVRPMoveGenerator {
    3739    public ILookupParameter<IRandom> RandomParameter {
    3840      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/IntraRouteInversion/AlbaStochasticIntraRouteInversionSingleMoveGenerator.cs

    r4752 r5867  
    3535  [StorableClass]
    3636  public sealed class AlbaStochasticIntraRouteInversionSingleMoveGenerator : AlbaIntraRouteInversionMoveGenerator,
    37     IStochasticOperator, ISingleMoveGenerator, IAlbaIntraRouteInversionMoveOperator, IMultiVRPMoveGenerator {
     37    IStochasticOperator, ISingleMoveGenerator, IAlbaIntraRouteInversionMoveOperator {
    3838    #region IMultiVRPMoveOperator Members
    3939
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeMutliMoveGenerator.cs

    r4752 r5867  
    3030using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3131using HeuristicLab.Common;
     32using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
    3435  [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.")]
    3536  [StorableClass]
    36   public sealed class AlbaStochasticLambdaInterchangeMultiMoveGenerator : AlbaLambdaInterchangeMoveGenerator, IStochasticOperator, IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator {
     37  public sealed class AlbaStochasticLambdaInterchangeMultiMoveGenerator : AlbaLambdaInterchangeMoveGenerator, IStochasticOperator,
     38    IMultiMoveGenerator, IAlbaLambdaInterchangeMoveOperator, IMultiVRPMoveGenerator {
    3739    public ILookupParameter<IRandom> RandomParameter {
    3840      get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/LambdaInterchange/AlbaStochasticLambdaInterchangeSingleMoveGenerator.cs

    r5201 r5867  
    3535  [StorableClass]
    3636  public sealed class AlbaStochasticLambdaInterchangeSingleMoveGenerator : AlbaLambdaInterchangeMoveGenerator,
    37     IStochasticOperator, ISingleMoveGenerator, IAlbaLambdaInterchangeMoveOperator, IMultiVRPMoveGenerator {
     37    IStochasticOperator, ISingleMoveGenerator, IAlbaLambdaInterchangeMoveOperator {
    3838    #region IMultiVRPMoveOperator Members
    3939
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaStochasticTranslocationSingleMoveGenerator.cs

    r5130 r5867  
    3434  [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.")]
    3535  [StorableClass]
    36   public sealed class AlbaStochasticTranslocationSingleMoveGenerator : AlbaMoveGenerator, IAlbaTranslocationMoveOperator, IMultiVRPMoveGenerator {
     36  public sealed class AlbaStochasticTranslocationSingleMoveGenerator : AlbaMoveGenerator, IAlbaTranslocationMoveOperator {
    3737    [Storable]
    3838    private TranslocationMoveGenerator generator = new StochasticTranslocationSingleMoveGenerator();
     
    8080      generator.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    8181      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(generator);
    82       op.Operator.Execute((IExecutionContext)op);
     82      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    8383
    8484      foreach (IScope scope in this.ExecutionContext.Scope.SubScopes) {
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r4752 r5867  
    101101      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    102102      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    103       op.Operator.Execute((IExecutionContext)op);
     103      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    104104
    105105      return next;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs

    r5130 r5867  
    7878    private AlbaTranslocationMoveHardTabuCriterion(AlbaTranslocationMoveHardTabuCriterion original, Cloner cloner)
    7979      : base(original, cloner) {
     80      tabuChecker = cloner.Clone(original.tabuChecker);
    8081    }
    8182
     
    8788      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    8889      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    89       op.Operator.Execute((IExecutionContext)op);
     90      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    9091
    9192      return next;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs

    r5130 r5867  
    6161    private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner)
    6262      : base(original, cloner) {
     63        moveMaker = cloner.Clone(original.moveMaker);
    6364    }
    6465
     
    7172      moveMaker.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    7273      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(moveMaker);
    73       op.Operator.Execute((IExecutionContext)op);
     74      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    7475    }
    7576  }
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs

    r5130 r5867  
    7878    private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner)
    7979      : base(original, cloner) {
     80        tabuChecker = cloner.Clone(original.tabuChecker);
    8081    }
    8182
     
    8788      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    8889      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    89       op.Operator.Execute((IExecutionContext)op);
     90      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    9091
    9192      return next;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs

    r5130 r5867  
    7878    private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner)
    7979      : base(original, cloner) {
     80        moveTabuMaker = cloner.Clone(original.moveTabuMaker);
    8081    }
    8182
     
    8788      PermutationMoveOperatorParameter.PermutationParameter.ActualName = VRPToursParameter.ActualName;
    8889      IAtomicOperation op = this.ExecutionContext.CreateChildOperation(PermutationMoveOperatorParameter);
    89       op.Operator.Execute((IExecutionContext)op);
     90      op.Operator.Execute((IExecutionContext)op, CancellationToken);
    9091
    9192      return next;
Note: See TracChangeset for help on using the changeset viewer.