Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/29/10 20:34:10 (13 years ago)
Author:
mkommend
Message:

Worked on VRP project (ticket #922).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/CloningRefactoring/HeuristicLab.Problems.VehicleRouting/3.3/Encodings/Potvin/Manipulators/PotvinTwoLevelExchangeManipulator.cs

    r4352 r4691  
    2020#endregion
    2121
     22using HeuristicLab.Common;
    2223using HeuristicLab.Core;
    23 using HeuristicLab.Encodings.PermutationEncoding;
    24 using HeuristicLab.Parameters;
    2524using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    26 using HeuristicLab.Data;
    27 using System.Collections.Generic;
    2825
    2926namespace HeuristicLab.Problems.VehicleRouting.Encodings.Potvin {
     
    3330    [StorableConstructor]
    3431    private PotvinTwoLevelExchangeManipulator(bool deserializing) : base(deserializing) { }
     32    private PotvinTwoLevelExchangeManipulator(PotvinTwoLevelExchangeManipulator original, Cloner cloner) : base(original, cloner) { }
     33    public override IDeepCloneable Clone(Cloner cloner) {
     34      return new PotvinTwoLevelExchangeManipulator(this, cloner);
     35    }
     36    public PotvinTwoLevelExchangeManipulator() : base() { }
    3537
    36     public PotvinTwoLevelExchangeManipulator() : base() { }
    37    
    3838    protected override void Manipulate(IRandom random, PotvinEncoding individual) {
    3939      int selectedIndex = SelectRandomTourBiasedByLength(random, individual);
     
    5454                if (FindInsertionPlace(individual,
    5555                  customer2, selectedIndex, out route, out place)) {
    56                     individual.Tours[route].Cities.Insert(place, customer2);
     56                  individual.Tours[route].Cities.Insert(place, customer2);
    5757                  route1.Cities.RemoveAt(customer1Position);
    5858
Note: See TracChangeset for help on using the changeset viewer.