Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 20:30:20 (14 years ago)
Author:
gkronber
Message:

Refactored cloning in HeuristicLab.Problems.VehicleRouting. #922

Location:
branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveEvaluator.cs

    r4352 r4690  
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.Alba;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting {
     
    3738    [StorableConstructor]
    3839    private AlbaTranslocationMoveEvaluator(bool deserializing) : base(deserializing) { }
    39 
     40    private AlbaTranslocationMoveEvaluator(AlbaTranslocationMoveEvaluator original, Cloner cloner)      : base(original, cloner) {    }
    4041    public AlbaTranslocationMoveEvaluator()
    4142      : base() {
    4243      Parameters.Add(new LookupParameter<TranslocationMove>("TranslocationMove", "The move to evaluate."));
     44    }
     45
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new AlbaTranslocationMoveEvaluator(this, cloner);
    4348    }
    4449
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveGenerator.cs

    r4352 r4690  
    2727using HeuristicLab.Parameters;
    2828using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     29using HeuristicLab.Common;
    2930
    3031namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    7071    [StorableConstructor]
    7172    private AlbaTranslocationMoveGenerator(bool deserializing) : base(deserializing) { }
    72 
     73    private AlbaTranslocationMoveGenerator(AlbaTranslocationMoveGenerator original, Cloner cloner) : base(original, cloner) { }
    7374    public AlbaTranslocationMoveGenerator()
    7475      : base() {
     
    7879
    7980      ((IMultiMoveGenerator)TranslocationMoveGeneratorParameter.Value).SampleSizeParameter.ActualName = SampleSizeParameter.Name;
     81    }
     82
     83    public override IDeepCloneable Clone(Cloner cloner) {
     84      return new AlbaTranslocationMoveGenerator(this, cloner);
    8085    }
    8186
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveHardTabuCriterion.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveHardTabuCriterion(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveHardTabuCriterion(AlbaTranslocationMoveHardTabuCriterion original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveHardTabuCriterion()
    6265      : base() {
    6366      tabuChecker = new TranslocationMoveHardTabuCriterion();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveHardTabuCriterion(this, cloner);
     70    }
    6571  }
    6672}
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveMaker.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5051    [StorableConstructor]
    5152    private AlbaTranslocationMoveMaker(bool deserializing) : base(deserializing) { }
    52 
     53    private AlbaTranslocationMoveMaker(AlbaTranslocationMoveMaker original, Cloner cloner)
     54      : base(original, cloner) {
     55    }
    5356    public AlbaTranslocationMoveMaker()
    5457      : base() {
    5558      moveMaker = new TranslocationMoveMaker();
    5659    }
    57 
     60    public override IDeepCloneable Clone(Cloner cloner) {
     61      return new AlbaTranslocationMoveMaker(this, cloner);
     62    }
    5863    public override IOperation Apply() {
    5964      IOperation next = base.Apply();
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveSoftTabuCriterion.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveSoftTabuCriterion(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveSoftTabuCriterion(AlbaTranslocationMoveSoftTabuCriterion original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveSoftTabuCriterion()
    6265      : base() {
    6366      tabuChecker = new TranslocationMoveSoftTabuCriterion();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveSoftTabuCriterion(this, cloner);
     70    }
    6571  }
    6672}
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Alba/Moves/ThreeOpt/AlbaTranslocationMoveTabuMaker.cs

    r4352 r4690  
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2728
    2829namespace HeuristicLab.Problems.VehicleRouting.Encodings.Alba {
     
    5859    [StorableConstructor]
    5960    private AlbaTranslocationMoveTabuMaker(bool deserializing) : base(deserializing) { }
    60 
     61    private AlbaTranslocationMoveTabuMaker(AlbaTranslocationMoveTabuMaker original, Cloner cloner)
     62      : base(original, cloner) {
     63    }
    6164    public AlbaTranslocationMoveTabuMaker()
    6265      : base() {
    6366      moveTabuMaker = new TranslocationMoveTabuMaker();
    6467    }
     68    public override IDeepCloneable Clone(Cloner cloner) {
     69      return new AlbaTranslocationMoveTabuMaker(this, cloner);
     70    }
    6571  }
    6672}
Note: See TracChangeset for help on using the changeset viewer.