Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (14 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Problems.VehicleRouting

  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveGenerator.cs

    r4205 r4722  
    2020#endregion
    2121
    22 using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2422using HeuristicLab.Optimization;
    2523
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IMultiVRPMoveOperator.cs

    r4205 r4722  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2523
    2624namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/Interfaces/IVRPMove.cs

    r4352 r4722  
    2121
    2222using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Optimization;
    2523using HeuristicLab.Data;
    2624
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveEvaluator.cs

    r4352 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    2424using HeuristicLab.Parameters;
    2525using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     
    3636    [StorableConstructor]
    3737    private MultiVRPMoveEvaluator(bool deserializing) : base(deserializing) { }
     38    private MultiVRPMoveEvaluator(MultiVRPMoveEvaluator original, Cloner cloner) : base(original, cloner) { }
     39    public override IDeepCloneable Clone(Cloner cloner) {
     40      return new MultiVRPMoveEvaluator(this, cloner);
     41    }
    3842
    3943    public MultiVRPMoveEvaluator()
    4044      : base() {
    41         Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
     45      Parameters.Add(new LookupParameter<IVRPMove>("VRPMove", "The generated moves."));
    4246    }
    4347
     
    5357        CapacityParameter.ActualValue,
    5458        CoordinatesParameter.ActualValue,
    55         FleetUsageFactor.ActualValue, 
    56         TimeFactor.ActualValue, 
    57         DistanceFactor.ActualValue, 
    58         OverloadPenalty.ActualValue, 
     59        FleetUsageFactor.ActualValue,
     60        TimeFactor.ActualValue,
     61        DistanceFactor.ActualValue,
     62        OverloadPenalty.ActualValue,
    5963        TardinessPenalty.ActualValue,
    6064        DistanceMatrixParameter,
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveGenerator.cs

    r4352 r4722  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Linq;
    2425using HeuristicLab.Collections;
     26using HeuristicLab.Common;
    2527using HeuristicLab.Core;
     28using HeuristicLab.Data;
    2629using HeuristicLab.Operators;
    2730using HeuristicLab.Optimization;
     
    2932using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    3033using HeuristicLab.PluginInfrastructure;
    31 using HeuristicLab.Data;
    32 using System.Collections.Generic;
    3334
    3435namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3536  [Item("MultiVRPMoveGenerator", "Randomly selects and applies its move generators.")]
    3637  [StorableClass]
    37   public class MultiVRPMoveGenerator : CheckedMultiOperator<IMultiVRPMoveGenerator>, IMultiVRPMoveOperator, 
     38  public class MultiVRPMoveGenerator : CheckedMultiOperator<IMultiVRPMoveGenerator>, IMultiVRPMoveOperator,
    3839    IStochasticOperator, IMultiMoveGenerator {
    3940    public override bool CanChangeName {
     
    9798
    9899    [StorableConstructor]
    99     private MultiVRPMoveGenerator(bool deserializing) : base(deserializing) { }
     100    protected MultiVRPMoveGenerator(bool deserializing) : base(deserializing) { }
     101    protected MultiVRPMoveGenerator(MultiVRPMoveGenerator original, Cloner cloner) : base(original, cloner) { }
     102    public override IDeepCloneable Clone(Cloner cloner) {
     103      return new MultiVRPMoveGenerator(this, cloner);
     104    }
    100105    public MultiVRPMoveGenerator()
    101106      : base() {
  • trunk/sources/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/General/Moves/MultiVRPMoveOperator/MultiVRPMoveMaker.cs

    r4416 r4722  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    2324using HeuristicLab.Data;
    24 using HeuristicLab.Operators;
    2525using HeuristicLab.Optimization;
    2626using HeuristicLab.Parameters;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using System.Collections.Generic;
    2928
    30 namespace HeuristicLab.Problems.VehicleRouting.Encodings.General{
     29namespace HeuristicLab.Problems.VehicleRouting.Encodings.General {
    3130  [Item("MultiVRPMoveMaker", "Peforms multiple moves on a given VRP encoding and updates the quality.")]
    3231  [StorableClass]
     
    8180
    8281    [StorableConstructor]
    83     private LambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
     82    protected LambdaInterchangeMoveMaker(bool deserializing) : base(deserializing) { }
     83    protected LambdaInterchangeMoveMaker(LambdaInterchangeMoveMaker original, Cloner cloner) : base(original, cloner) { }
     84    public override IDeepCloneable Clone(Cloner cloner) {
     85      return new LambdaInterchangeMoveMaker(this, cloner);
     86    }
    8487
    8588    public LambdaInterchangeMoveMaker()
     
    112115      DoubleValue moveQuality = MoveQualityParameter.ActualValue;
    113116      DoubleValue quality = QualityParameter.ActualValue;
    114      
     117
    115118      //perform move
    116119      VRPToursParameter.ActualValue = move.MakeMove();
Note: See TracChangeset for help on using the changeset viewer.