Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/09/10 09:55:31 (13 years ago)
Author:
svonolfe
Message:

Merged relevant changes from the trunk into the branch (cloning,...) (#1177)

Location:
branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/MultiVRPSolutionCreator.cs

    r4365 r4752  
    3333using HeuristicLab.Problems.VehicleRouting.Variants;
    3434using System.Collections.Generic;
     35using HeuristicLab.Common;
    3536
    3637namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    6061
    6162      Parameters.Add(new LookupParameter<IVRPProblemInstance>("ProblemInstance", "The VRP problem instance"));
     63    }
     64
     65    public override IDeepCloneable Clone(Cloner cloner) {
     66      return new MultiVRPSolutionCreator(this, cloner);
     67    }
     68
     69    protected MultiVRPSolutionCreator(MultiVRPSolutionCreator original, Cloner cloner)
     70      : base(original, cloner) {
    6271    }
    6372
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Creators/VRPCreator.cs

    r4369 r4752  
    3030using HeuristicLab.Parameters;
    3131using HeuristicLab.Problems.VehicleRouting.Interfaces;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4647        Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours to be created."));
    4748    }
     49
     50    protected VRPCreator(VRPCreator original, Cloner cloner)
     51      : base(original, cloner) {
     52    }
    4853  }
    4954}
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs

    r4370 r4752  
    2626using HeuristicLab.Problems.VehicleRouting.Encodings.General;
    2727using HeuristicLab.Problems.VehicleRouting.Variants;
     28using HeuristicLab.Common;
    2829
    2930namespace HeuristicLab.Problems.VehicleRouting {
     
    4344    }
    4445
     46    public override IDeepCloneable Clone(Cloner cloner) {
     47      return new MultiVRPMoveEvaluator(this, cloner);
     48    }
     49
     50    private MultiVRPMoveEvaluator(MultiVRPMoveEvaluator original, Cloner cloner)
     51      : base(original, cloner) {
     52    }
     53
    4554    protected override void EvaluateMove() {
    4655      IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs

    r4370 r4752  
    3333using HeuristicLab.Problems.VehicleRouting.Interfaces;
    3434using HeuristicLab.Problems.VehicleRouting.Variants;
     35using HeuristicLab.Common;
    3536
    3637namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    8687      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours."));
    8788      Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
     89    }
     90
     91    public override IDeepCloneable Clone(Cloner cloner) {
     92      return new MultiVRPMoveGenerator(this, cloner);
     93    }
     94
     95    protected MultiVRPMoveGenerator(MultiVRPMoveGenerator original, Cloner cloner)
     96      : base(original, cloner) {
    8897    }
    8998
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs

    r4370 r4752  
    2828using System.Collections.Generic;
    2929using HeuristicLab.Problems.VehicleRouting.Variants;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
     
    4546    }
    4647
     48    public override IDeepCloneable Clone(Cloner cloner) {
     49      return new MultiVRPMoveMaker(this, cloner);
     50    }
     51
     52    protected MultiVRPMoveMaker(MultiVRPMoveMaker original, Cloner cloner)
     53      : base(original, cloner) {
     54    }
     55
    4756    protected override void PerformMove() {
    4857      IVRPMove move = VRPMoveParameter.ActualValue as IVRPMove;
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveEvaluator.cs

    r4369 r4752  
    3030using HeuristicLab.Parameters;
    3131using HeuristicLab.Problems.VehicleRouting.Interfaces;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    5152      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    5253      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
     54    }
     55
     56    protected VRPMoveEvaluator(VRPMoveEvaluator original, Cloner cloner)
     57      : base(original, cloner) {
    5358    }
    5459
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveGenerator.cs

    r4369 r4752  
    3030using HeuristicLab.Parameters;
    3131using HeuristicLab.Problems.VehicleRouting.Interfaces;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4243      : base() {
    4344    }
     45
     46    protected VRPMoveGenerator(VRPMoveGenerator original, Cloner cloner)
     47      : base(original, cloner) {
     48    }
    4449  }
    4550}
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveMaker.cs

    r4370 r4752  
    3030using HeuristicLab.Parameters;
    3131using HeuristicLab.Problems.VehicleRouting.Interfaces;
     32using HeuristicLab.Common;
    3233
    3334namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4950      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the solution."));
    5051      Parameters.Add(new LookupParameter<DoubleValue>("MoveQuality", "The relative quality of the move."));
     52    }
     53
     54    protected VRPMoveMaker(VRPMoveMaker original, Cloner cloner)
     55      : base(original, cloner) {
    5156    }
    5257
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/Moves/VRPMoveOperator.cs

    r4370 r4752  
    2828using HeuristicLab.Problems.VehicleRouting.Interfaces;
    2929using HeuristicLab.Parameters;
     30using HeuristicLab.Common;
    3031
    3132namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
     
    4546      Parameters.Add(new LookupParameter<IVRPEncoding>("VRPTours", "The VRP tours considered in the move."));
    4647    }
     48
     49    protected VRPMoveOperator(VRPMoveOperator original, Cloner cloner)
     50      : base(original, cloner) {
     51    }
    4752  }
    4853}
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/PermutationEncoding.cs

    r4365 r4752  
    4040    protected IVRPProblemInstance ProblemInstance { get; set; }
    4141
    42     public override IDeepCloneable Clone(Cloner cloner) {
    43       PermutationEncoding clone = (PermutationEncoding)base.Clone(cloner);
    44 
    45       clone.ProblemInstance = (IVRPProblemInstance)cloner.Clone(ProblemInstance);
    46 
    47       return clone;
     42    protected PermutationEncoding(PermutationEncoding original, Cloner cloner)
     43      : base(original, cloner) {
     44        this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
     45        this.readOnly = original.readOnly;
    4846    }
    4947
  • branches/VRP/HeuristicLab.Problems.VehicleRouting/3.4/Encodings/General/TourEncoding.cs

    r4376 r4752  
    8282    }
    8383
     84    protected TourEncoding(TourEncoding original, Cloner cloner)
     85      : base(original, cloner) {
     86       this.Tours = (ItemList<Tour>)cloner.Clone(original.Tours);
     87       this.ProblemInstance = (IVRPProblemInstance)cloner.Clone(original.ProblemInstance);
     88    }
     89
    8490    public static void ConvertFrom(IVRPEncoding encoding, TourEncoding solution, IVRPProblemInstance problemInstance) {
    8591      solution.Tours = new ItemList<Tour>(encoding.GetTours());
Note: See TracChangeset for help on using the changeset viewer.